# Tagged Questions

On a map, a closed shape defined by a connected sequence of x,y coordinate pairs, where the first and last coordinate pair are the same and all other pairs are unique.

33k views

### Removing small spaces (slivers) between polygons?

I have a set of polygons representing administrative districts. The districts were digitized by hand, and there are small spaces (slivers) between polygons where the polygons should be touching. How ...
8k views

### How can I calculate the average width of a polygon?

I'm interested in examining the average width of a polygon that represents the road surface. I also have the road centerline as a vector (which is sometimes not exactly in the center). In this example ...
8k views

### Separate polygons based on intersection using PostGIS

I have a PostGIS table of polygons where some intersect with one another. This is what I'm trying to do: For a given polygon selected by id, give me all of the polygons that intersect. Basically, ...
4k views

### What are the benefits of hexagonal sampling polygons?

I am always on the lookout for useful methods to sample or partition study areas (usually in the form of raster datasets) into smaller units. Recently, I read an ESRI blog post about a new tool for ...
2k views

### Packing Polygons within polygon

I have a Boolean raster. In the grey areas of the raster I would like to fit a given size polygon within a contiguous extent. Basically, I have an irregular polygon, and i would like to "fit" a ...
7k views

### How can I find a point inside a polygon in PostGIS?

How can I find a point that is guaranteed to be within a given polygon in PostGIS? I am aware of the ST_Centroid function. However, the centroid is not always within a polygon, see below: ...
10k views

### Generate points that lie inside polygon

I have polygon feature and want to be able to generate points inside it. I need this for one classification task. Generating random points until one is inside the polygon wouldn't work because it's ...
6k views

### Proper way to rbind SpatialPolygonsDataFrames with identical polygon IDs?

What's the proper R idiom for rbinding SPDFs together when the IDs overlap? Note that here (as is often the case) the IDs are basically meaningless so it's pretty annoying that I can't just make ...
9k views

### How best to fix a non-noded intersection problem in PostGIS?

I'm using a PL/R function and PostGIS to generate voronoi polygons around a set of points. The function that I am using is defined here. When I use this function on a particular dataset I get the ...
6k views

### How to find the maximum-area-rectangle inside a convex polygon?

In this post we are looking for algorithms / ideas on how to find the maximum-area-rectangle inside a convex polygon. In the following figure, numbers are the areas of the fitted rectangles. As shown ...
34k views

### Extracting coordinates of polygon vertices in ArcMap?

I've got about a dozen polygons in a feature class loaded in ArcMap 10, all in geographic WGS 1984. How do I easily obtain the coordinates associated with each vertex of each polygon in that feature ...
1k views

### Why do valid polygons repeat the same start and end point?

In the GIS world, for most modern formats and Standards (e.g., Shapefiles, WKB/WKT, GML, KML, etc.), valid polygons need to have closed linear rings, which is a linestring of coordinates where the ...
2k views

### Algorithm to fix topological errors in GIS software apps

Related question here. I notice that ensuring topological correctness is essential for GIS applications, this is because the input from user or polygon boolean operation can have severe topological ...
3k views

### Creating Thiessen (Voronoi) polygons using lines (rather than points) as the input features?

I have a set of line features inside a particular polygonal boundary. For each line, I'd like to generate a polygon inside which every possible point is closer to the given line than to any other line ...
17k views

### Performing reverse clip in ArcMap?

Is there a way to perform a 'reverse' of the clip function in ArcMap? I am not exactly sure how to explain this so here is a diagram:
17k views

### How to smooth/generalize a polygon in qgis

Is it possible to smooth or generalize a polygon in qgis? Ìs there a plugin available like the generalizer-plugin for lines? I could convert my polygons to lines, smooth them and convert them back to ...
6k views

### Instantiating spatial polygon without using a shape file in R

So, the usual way we read a shapefile in R is via the maptools package, like this: sfdata <- readShapeSpatial("/path/to/my/shapefile.shp", proj4string=CRS("+proj=longlat")) However, I have a use ...
6k views

### Is it possible to gray out a Google Maps map except for some area?

What i am looking for is a way to emphasize a certain area on a Google Maps map by graying out the rest of the world. I heard about some solution of using 2 polygons of which 1 is visible and the ...
32k views

### Get boundary of raster image as polygon in ArcGIS Desktop?

I have a rectangular raster image in ArcGIS. My question is: how can I produce a polygon which is just the extent of the raster image? That is, I want to have a polygon layer with a single ...
30k views

### How to convert .shp to .csv including attributes AND geometry?

I have a .shp file with 60k+ entries, all of which are polygons with corresponding attributes (acreage totals, landowner names, tax ID #s, etc.). What I ultimately need is a .csv file with all of ...
3k views

### What is the best open-source web mapping solution for handling 3000+ polygons

I have 3000+ polygons which represent watersheds (18 main watersheds). At the first stage all the 18 watershed will show and their list will be placed in the left sidebar. If any user mouse over the ...
3k views

### How can I fix my complex Polygons so they show correctly in Google Maps?

Problem: I'm trying to find a way to fix some broken polygon shapes and I'm not sure how I can do this. Details: I've got a number of polygons which I basically imported from TIGERLINES a while ...
6k views

### Get Raster Values from a Polygon Overlay in Opensource GIS Solutions

I have two layers. A polygon-shape-layer with many tiles and a raster-layer containing CORINE 2006 land cover with many categories in a colourmap. I want to obtain for each polygon in the shapelayer a ...
12k views

### How to insert a GeoJSON polygon into a PostGIS table?

I need to insert a polygon from GeoJSON to my PostGIS table. This is how the SQL query looks like. INSERT INTO tablename (name, polygon) VALUES ( 'Name', ST_GeomFromGeoJSON ( { ...
5k views

### How to merge two 'incompatible' polygon layers in ArcGIS?

I have two layers of polygons with administrative boundaries. Although they come from the same data provider, they seem to have small discrepancies and do not 'fit' each other. How could I merge ...
11k views

### How to use ST_Intersection?

Here's a quick summary about what I'm trying to do: I have 3 tables in Postgres, 'a' and 'b', each have a Polygon column, and 'c' has a Point column. What I'm trying to do here is to get the ...
10k views

### Algorithm for finding irrregular polygon centroid (label point)

I need to find a centroid (or label point) for irregularly shaped polygons in Google Maps. I'm showing InfoWindows for parcels and need a place to anchor the the InfoWindow that is guaranteed to be on ...
3k views

### How to speed up the plotting of polygons in R?

I want to plot the country borders of North America over a raster image depicting some variable and then overlay contours on top of the plot using R. I have been successful in doing this using base ...
284 views

### How to create lines to visualize differences between polygon features in PostGIS?

I've a PostGIS table polygon_b with some polygon features. There is also a table polygon_a which contains the same polygons as polygon_b but with minor changes. Now I want to create lines to visualize ...
520 views

### Group polygon features to match a set of specifications

I have two different sets of polygon features (398 census tracts and 80 ZIP codes) that each roll up to a larger feature (a US county). Though census tracts are smaller than ZIP codes, they do not ...
13k views

### Converting Polygon into single or all Points using QGIS?

I want to convert polygons into points using QGIS. I know how it's done in ArcGIS Desktop.
4k views

### Where can I get neighborhood boundaries?

Besides Zillow's creative-commons licensed neighborhood boundaries shapefiles, what sources of neighborhood boundaries are there? Not just in the US, but all over the world. Free/open source is ideal,...
8k views

### How to check Topology in QGIS?

I have two Shapefiles with Polygons ( City and Forerst) Is there a Plugin who is able check the topology (QGIS)? Like "Knots do not overlap" or something like that? I dont want that they overlap. ...
451 views

### Is there ArcPy tool for polygon resizing like Scale tool of Advanced Editing toolbar in ArcMap?

I am writing a python script for ArcGIS 10.3. I know about Scale tool in ArcGIS interface but I can't find such arcpy command. It exists? As you can see on the picture the Scale tool works different ...
184 views

### Project an attribute from one polygon layer to another

I have 2 polygon layers which can be found here. The two layers are overlapping. The first contains a map of the German counties in 1928 and the second the counties how they are in 2014. The 2014 ...
3k views

### Optimizing a nearest neighbor calculation using PostGIS

I'm using PostGIS to calculate the nearest neighbors of polygons. What I want to calculate is the minimum distance from each polygon, to the nearest polygon. Thus far I have got great help from Mike ...
4k views

### Self intersections for polygons, how to solve?

I have a question about repairing a self intersecting polygon shapefile. I have a shapefile containing Polygons (ZM) which have self intersecting features. If I use the "repair geometry" tool, it ...
1k views

### Grouping corner-touching contiguous polygons using ArcGIS Desktop?

Using ArcGIS 10, I have a Feature Class which I converted from a Raster (GRID) (Raster To Polygon Tool). There are approx. 180,000 polygons. The attribute table contains a [grid_code] field which ...
525 views

### Writing Python script for ArcGIS to square polygon corners? [closed]

I'm looking for a script that will square the corners of polygons that are near 90 degrees but not exactly. Near could be dealt with via a variable, for example within 5 degrees of 90 (85 - 95 degrees)...
7k views

### How to find the boundary co-ordinates from a given set of co-ordinates

Given a set of coordinates, How do we find the boundary coordinates. <== Figure 1 Given the coordinates in the above set, How can I get the coordinates on the red boundary. Boundary is the polygon ...
46k views

### Creating polygons from lines using ArcEditor/Standard level license of ArcGIS Desktop?

I am trying to create polygons from a line layer of lots and concessions (large blocks of land in rural areas). The lines are mainly grid style as they intersect mostly at right angles. I need to ...
2k views

### How do I make a heat or Choropleth map that uses polygons in QGis?

I've been playing around with the heatmap plugin for QGIS and I am wondering if it is possible to make heatmap with using a similar plugin/tool that uses polygons as well as points? I would like to ...
17k views

### How do I change the polygon fill color and border color for SpatialPolygons objects?

I have SpatialPolygons or SpatialPolygonsDataFrames which I'd like to plot. How do I change the color using the three plotting systems in R (base graphics, lattice graphics, and ggplot2)? Example ...
5k views

### How to merge two Polygons in OpenLayers?

I have two polygons. polygon1 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing1])) polygon2 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing2])) ...
15k views

### How to enable “snapping” in Quantum-GIS while drawing polygons?

I tried to draw polygons in qgis-1.7.0 and I somehow can't find or failed to find the "snapping" option. I'm used to ArcGIS-10.0 where you have some snapping options, like placing points of polygons ...
2k views

### Fixing orphaned holes in R

I'm trying to perform a union on a common field after merging two adjacent shapefiles. The shapefiles end up with at least one thin sliver of space between them. When I attempt a union I get the ...
3k views

### How to colour polygons with a completely transparent fill using MapServer?

Is it possible to fill polygons so that they are completely transparent in MapServer? I want to have a black background that is slightly opaque, and wherever there is a polygon I want that to be ...
766 views

### How to convert fake donut holes in polygons to real ones?

I have this problem where I have to import shapefiles into our system which must be geometrically valid, but the software that everyone uses to produce them seems to output files where every polygon ...