Questions tagged [polygons]

Polygons are multi-sided objects. This heading should be used when describing issues involving multiple polygons and how they relate to each other, for example, overlap detection.

Polygons are multi-sided objects. This heading should be used when describing issues involving multiple polygons and how they relate to each other, for example, overlap detection.

474 questions
6
votes
1 answer

Annoying white flashes happen when zooming in Google Map Api

I'm currently developing a webpage containing a map based on Google Map Api V3 : http://www.fairaidsyria.org I have two overlays containing polygons that appear successively as the user zooms in.. Unfortunately, annoying "white flashes" occur when…
mikav
  • 79
  • 1
  • 4
6
votes
2 answers

Can I convert an image to CSS3?

Supposing that I have a polygon image PNG file like this (No border, the shape is filled with one color, no gradient, and background of the image is transparent) http://www.enchantedlearning.com/crafts/books/shapes/gifs/4.GIF I'm thinking of using…
Atthapon Junpun-eak
  • 540
  • 2
  • 11
  • 23
6
votes
1 answer

Is there a more efficient way to detect polygon overlap/intersection than PathGeometry.FillContainsWithDetail()?

I have a method that is gobbling up 25% of my cpu time. I call this method about 27,000 times per second. (Yup, lots of calls since it's updating frequently). I am wondering if anybody knows a faster way to detect if 2 polygons overlap. …
Curtis
  • 5,794
  • 8
  • 50
  • 77
6
votes
1 answer

Rectangles from Points using Python

I have a text file full of points. They are separated on each line by a comma-limited (x,y) pair. eg. -43.1234,40.1234\n -43.1244,40.1244\n etc. I now need to create a polygon around each of these points. The polygon has to have a 15 kilometer…
aeupinhere
  • 2,883
  • 6
  • 31
  • 39
5
votes
2 answers

Is there a way to fade out a V3 google.maps.Polygon?

Is there a way to fade out a V3 google.maps.Polygon? Instead of just hiding / removing a standard Google Maps V3 polygon I want to fade it out. Is this possible? Are there any plugins out there?
iambriansreed
  • 21,935
  • 6
  • 63
  • 79
5
votes
1 answer

Given collection of points and polygons, determine which point lies in which polygon (or not)

My question is almost similar to this. But in my case, the polygons are not necessarily touching/overlapping each other. They are present all over the space. I have a big set of such polygons. Similarly, I have a huge set of points. I am…
sridharraman
  • 365
  • 1
  • 4
  • 16
5
votes
2 answers

numpy.poly1d , root-finding optimization, shifting polynom on x-axis

it is commonly an easy task to build an n-th order polynomial and find the roots with numpy: import numpy f = numpy.poly1d([1,2,3]) print numpy.roots(f) array([-1.+1.41421356j, -1.-1.41421356j]) However, suppose you want a polynomial of type: f(x)…
rrrak
  • 51
  • 1
  • 2
5
votes
3 answers

Changing Leaflet map according to input without redrawing (multiple polygons)

cannot fix my problem for MULTIPLE filters/polygons. Currently my code works, but very slow, I do not use observe(), reactive(), and LeafletProxy(), because I stumbled. I obviously checked this answer Changing Leaflet map according to input…
Anakin Skywalker
  • 2,400
  • 5
  • 35
  • 63
5
votes
1 answer

How to efficiently draw a polygon with multiple holes?

I would like to plot a polygon with multiple holes in it, like this: P = [ 0.5, 0.8; 1.0, 0.0; % outer boundary 0.0, 0.0; 0.5, 0.8; %{ %} 0.5, 0.3; 0.3, 0.1; % inner boundary I 0.7, 0.1; %…
Rody Oldenhuis
  • 37,726
  • 7
  • 50
  • 96
5
votes
1 answer

Drawing multiple polygons with leaflet in Shiny

I am struggling to draw multiple polygons in a Shiny app - based on leaflet package. Here is a non-app output that I wish for: data <- list( beam1 = data.frame(lat = c(-115,-125, -125, -115), lon = c(32, 32, 45,45)), beam2 = …
pitabread
  • 71
  • 1
  • 4
5
votes
2 answers

How to merge adjactent polygons to 1 polygon and keep min/max data?

I have the following polygons in PostGIS Each polygon has field with "Data" value. I would like auto merge the polygons which touch each other : 1-2 and 3-4-5-6-7 Also , If possible I would like to have the Min/Max values from the columns of each…
Alophind
  • 842
  • 2
  • 12
  • 27
5
votes
1 answer

Testing whether a polygon is weakly simple

I'm unable to come up with an algorithm to detect weakly simple polygons (i.e. polygons where the sides are allowed to touch but not cross over). Currently I am just checking for intersections between every side - here is the function I call for all…
user21760
  • 93
  • 5
5
votes
1 answer

**polygon.setfillcolor(Color)** not working for google map v2

I am adding a Polygon into Google Map v2 like this: for (int index = coordinats.size()-1; index >= 0; index--) { polygonOptions.add( new LatLng(latCoordinats.get(index), lngCoordinats.get(index))); } …
developer
  • 437
  • 2
  • 5
  • 12
5
votes
2 answers

Cities Geojson polygons database/library or API

I have a MongoDB database of markers with lat/long and I need another database (or other solution) containing cities, or area level boundaries. If in Geojson polygons it would have been optimal. I have a field named city (e.g. 'city' : 'New York')…
Diolor
  • 13,181
  • 30
  • 111
  • 179
5
votes
1 answer

getpaths() polygons google maps api

I am attempting to retrieve the latlng coordinates of both a polyline and polygon. After I complete the drawing of either object I would like to store the latlng in a database, but for now I am merely trying to show the latlng in a textarea. I have…
ddalbus
  • 53
  • 1
  • 1
  • 3