similar to: ANN: Polygons library + sweet demo

Displaying 20 results from an estimated 7000 matches similar to: "ANN: Polygons library + sweet demo"

2006 Jun 06
1
Default value plugin
I''m releasing a very small plugin that allows you to specify default values for fields in models. Ordinarily, you might do this in your schema, I guess, but then it''s awkward if you need that on a serialized field or need your default values calculated somehow. So you can do something like this: (repeated from an earlier post and the README) class Mixture <
2006 Jun 02
6
Set instance variable for all actions in the Controller
Can I set an application wide instance variable that is available for all actions...and their views? eg. class ApplicationController < ActionController::Base @current_user = User.find(session[:user_id]) end and everywhere I can call @current_user.id and I can get that object? Even down in the views? I could not get this to work... Thanks in advance, Jeff -------------- next part
2006 Jun 14
2
Can pagination work with caching
I am currently caching a page that indexes blog entries. Paginate was used to break the entries up. Now when you click on next at the bottom of the page it is only reloading the first page. Im hoping, against odds, that someone here knows of a way to make paginate and cache play together. -- Posted via http://www.ruby-forum.com/.
2006 May 31
7
Getting 22 elements
Hello, I''ve done === class HomeController < ApplicationController def index @country = Country.find(:all, :include => "cities") end end === And rhtml is: === <% @country.each do |country| %> <h1><%= country.name %></h1> <% country.cities.each do |city| %> - <%= link_to city.name, :action =>
2006 May 03
4
default values
Hello, I''m working with a postgresql table CREATE TABLE elements ( id serial primary key, c1 text default f1(), ... cN text default fN() ); But if I use de lines @element = Element.new @element.save the values that element take are the nextval in the id field and nules in all the other fields. How can I get the defaults? (but without rewriting the
2009 Feb 05
1
Does the "labpt" object in the Polygons-class represent the centroid of the polygon
Hello, I need to calculate the centroids of some spatial polygons that I have placed into a Polygons-class object. Is the labeling point in the Polygons-class the centroid of the polygon? Thank you for your help.
2010 Jun 02
2
Faster union of polygons?
Dear R-helpers, thanks for yesterday's speeding-up tip. Here is my next query: I have lots of polygons (not necessarily convex ones, and they never have holes) given by x,y coordinates. I want to get the polygon that is the union of these polygons. This is my current method, but I am hoping there is a faster method (up to thousands of polygons, each with ca. 40 xy points). Example:
2006 May 21
3
Catching events outside document (on window chrome)
Hello, How can I catch the onmouseup event outside the ducument - means when the pointer is above window chrome (e.g. toolbar)? Event.observe(document, ''mouseup'', someListener) works only inside the document for me. Thanks in advance for your help! Thomas -- Posted with http://DevLists.com. Sign up and save your mailbox.
2006 May 22
6
which kind of deployment has the best performance
In the following deployment of web app on ONE pc-based server,running linux,which can support the most amount of concurrent users as well as the shortest latency? 1 apache+mongrel 2 apache+mongrel_cluster 3 lighthttpd+mongrel 4 lighthttpd+mongrel_cluster 5 lighthttpd+fastcgi Thanks charlie -- Posted via http://www.ruby-forum.com/.
2010 Oct 25
1
calculate area between intersecting polygons
Dear list: I am trying to calculate the intersection area between two irregular polygons (see example data below). set.seed(1234) theta <- seq(0, 2 * pi, length=(100)) poly1<- cbind(c(0 + 1 * cos(theta) + rnorm(100, sd=0.1)), c(0 + 2 * sin(theta))) poly2<- cbind(c(0 + 2 * cos(theta) ), c(-1 + 1.5 * sin(theta)+ rnorm(100, sd=0.1))) plot(x, y, type = "n", ,
2012 Feb 03
3
SPATIAL QUESTION: HOW TO MAKE POLYGONS AROUND CLUSTERS OF POINTS AND EXTRACT AREAS AND COORDINATES OF THESE POLYGONS?
Imagine that I have a large number of points (given by coordinates x and y) that vary in density per space. For the purpose of demonstration it could be generated like this: s <- data.frame(x=runif(10000,0,900),y=runif(10000,0,900)); plot(s) I want to create polygons around the points where point density is greater than a selected threshold (for example, by using krieging or equivalent
2012 Mar 14
2
Creating polygons from scattered points
Hello, I have a distribution dataset for species consisting of xy coordinates at the 1km resolution, with only presence data. So a simplified example of a species distribution might be: y <- rbind(as.integer(rnorm(100,50,20)), as.integer(rnorm(200,100,30)), as.integer(rnorm(100,180,15))) x <- rbind(as.integer(rnorm(200,50,20)), as.integer(rnorm(200,100,20)), as.integer(rnorm(100,200,15)))
2005 Aug 17
2
CumulativeOffset
Hey All, I have a fairly basic question about the prototype.js library. First, I''ve been looking for documentation on this and I have yet to find it. If any of you know of any, please let me know. Since I''m new to both the scriptaculous and prototype libraries could someone explain why I would want to use the cumulativeOffset method and not to just grab the offset off
2008 Apr 11
1
polygons on scatterplot3d
Does anyone have any experience plotting complex polygons on a scatterplot3d display? I would like to present some spatially binned data in a 3-d type plot with background polygons (i.e.. a filled coastline map). I can get the coastline onto the plot window as a line type but cannot figure out how to fill the shape. I'm certain it may be possible but might require a bit of digging
2007 Sep 20
2
Superimposing vector polygons over raster grid in a plot
Hello: I would like to superimpose vector polygons (state outlines) from a Shape file on top of a satellite image, imported into a SpatialGridDataFrame from GEOTIFF via gdal_translate and readGDAL. When I plot polygon and point shape files in R, into SpatialPointDataFrame and SpatialPolygonDataFrame, the two feature sets line up geographically, so it seems logical that a SpatialGridDataFrame
2011 Nov 18
1
How to fill irregular polygons with patterns?
Hi, I'm looking the best way to fill irregular polygons with patterns, Something like the function grid.pattern do, but my case is with irregular polygons. Whit this script I can get it, but I'm looking for an "elegant" solution.. library(grid) grid.polygon(x=c(0.2, 0.8, 0.6, 0.6, 0.8, 0.2), y=c(0.2, 0.2, 0.3, 0.5, 0.7,0.7), gp=gpar(fill="grey",
2008 Feb 17
1
random location in polygons sp spsample splancs csr
Dear all, I had to place points at random, one in each of larger number of polygons (actually in objects of class 'SpatialPolygonsDataFrame' , see sp library), and tried first to do it using spsample (from sp). Surprisingly, every 5-15 trials, the output was a NULL value. The doc says that ' this may occur when trying to hit a small and awkwardly shaped polygon in a large
2002 Mar 10
1
lattice library: xyplot and polygons
Dear R-Helpers, Is there a way to draw shaded (filled) polygons in panel graphs produced by xyplot ? I made different trials (see below) with polygon() and grid.polygon() but polygons are not drawn (probably for the same reason that prevents the use of lines, points, etc. in xyplot panels). Thanks in advance, Renaud > Water id label longitude latitude 515 21 Zone inondable
2001 Jan 06
2
video compression using textured polygons?
I was just thinking last night, how about this: For each frame, detect edges and divide the frame into a bunch of non-overlapping polygons. Extract textures from the first frame, then save changes in polygon vertex coordinates only, unless the textures change too much in which case new textures (which could be wavelet compressed) would be stored. Also, if the movements of the vertices would
2006 Jun 01
3
more questions: human_name
One more question: Is there some way to set the human_name of a column? e.g.: human_name for column address1 shouldn''t be Address1 but "Address, line 1". If not, should I make a hash with my custom names? Best regards, -- ---------------------------------------------------------------------- Yannick Majoros http://www.inma.ucl.ac.be/~majoros Informaticien UCL/INMA-MEMA