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
11
votes
2 answers

Finding polygons within an undirected Graph

Please see Image: https://i.stack.imgur.com/NPUmR.jpg I have an undirected graph which contains one or more connected sub graphs. The graph is defined by a set of ordered pairs of connected vertices. There may be upto 300 vertices. The graph is…
Dev.D
  • 111
  • 1
  • 4
11
votes
2 answers

Convert Multipolygon to Polygon in Python

Is it possible to convert a Multipolygon into a Polygon which fills all holes or missing inner areas using Shapely? I have been trying since a while but I can't find it in the documentation. The following image I show an example of a multipolygon…
Alberto Bonsanto
  • 17,556
  • 10
  • 64
  • 93
11
votes
1 answer

Voronoi graph from set of polygons in Emgu CV (or OpenCV)

Using Emgu CV I have extracted a set of closed polygons from the contours in an image of a road network. The polygons represent road outlines. The result is shown below, plotted over an OpenStreetMaps map (the polygons in 'pixel' form from Emgu CV…
mchristos
  • 1,487
  • 1
  • 9
  • 24
11
votes
3 answers

Intersection area of 2 polygons in openCV

I have the contours of 2 polygons (as vector of cv::Point2d). I would like to calculate the area of intersection between them What is the easiest way to get it? Thank you very much! Ron
Ron Gross
  • 1,474
  • 5
  • 19
  • 34
10
votes
4 answers

Given a large set of vertices in a non-convex polygon, how can i find the edges?

I have a set of vertices(called A) and I want to find all the border vertices such that this border vertices set is an outline of the shape. Many of the vertices in A are redundant because they are inside the shape, I want to get rid of these…
tommy chheng
  • 9,108
  • 9
  • 55
  • 72
10
votes
2 answers

draw a smooth polygon around data points in a scatter plot, in matplotlib

I have a bunch of cross plots with two sets of data and have been looking for a matploltib way of highlighting their plotted regions with smoothed polygon outlines. At the moment i just use Adobe Illustrator and amend saved plot, but this is not…
user1665220
  • 678
  • 2
  • 7
  • 17
9
votes
1 answer

Cut polygons using contour line beneath the polygon layers

I would like to cut a polygon layer, according to the elevation, into two parts (upper and lower part). The polygon might convex or concave, and the position to cut might vary from each other. The contour line has an interval of 5m, which means I…
Marco
  • 505
  • 9
  • 18
9
votes
3 answers

Enhance performance of geopandas overlay(intersection)

I have two sets of shapefiles with polygons. One set of shapefile is just the US counties I'm interested in and this varies across firms and years. The other set of shapefile is the business area of firms and of course this varies across firms and…
Crystie
  • 385
  • 6
  • 12
9
votes
2 answers

Polygon Button with pure CSS

I need to code a polygon button that has an outline with pure css and html. This is what I have right now but I can't figure out how to add the outline. This need to be supported in IE as well. How do I do this? /**** CSS ***/ #statement…
9
votes
1 answer

How to change a SpatialPointsDataFrame into SpatialPolygonsDataFrame in R to use it after in ggplot2?

I use R to project some data flows on a world map using great circles form ggplot2. I would like to also project on my map also urban areas from: http://www.naturalearthdata.com/downloads/ These are however in a SpatialPointsDataFrame. Perhaps my…
flowflow
  • 121
  • 1
  • 3
8
votes
2 answers

How to correctly triangulate a polygon in C++

I'm working on triangulating an object (ultimately, I want to implement a Delaunay triangulation but the triangulation doesn't work even before legalizing edges, so I would like to focus on a simple triangulation first). I'm including the relevant…
Toj19
  • 129
  • 1
  • 2
  • 9
8
votes
1 answer

Assign polygon duplicate area (overlap) to only one polygon

I have a shapefile (which can be downloaded here http://www.car.gov.br/publico/municipios/downloads?sigla=MA (any would do)) where each polygon represent a rural private property, as the owner submited it. However, the polygons overlap. For the…
Liz
  • 91
  • 3
8
votes
2 answers

Convert GeoDataFrame polygons to kml file

I have a geopandas GeoDataFrame with various polygons and colors that I'm using to plot meteorological data (another question I asked here): color geometry 0 #fbfdd1 (POLYGON ((-97.12191717810094 32.569, -97.1194... 1 #f3fabf (POLYGON…
edub
  • 659
  • 4
  • 8
  • 19
8
votes
2 answers

Find the area of a bounding polygon that encloses a set of points

I have a series of points on a plot of the sky. I want to find the area that these points occupy. To do this I need to find the vertices of a polygon that encloses these points - convert the points to an equal-area projection and then work out the…
Samuel
  • 157
  • 6
  • 22
8
votes
3 answers

android maps v2 polygon transparency

I'm using Google Maps v2 API for android and I don't manage to control the transparency of the fillColor. I would like to be able to see the map under a filled polygon. Is there a way to do that ? Thanks for any help !
1
2
3
31 32