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.
19
votes
7answers
9k views
Removing small spaces between polygons
I have a set of polygons representing administrative districts. The districts were digitized by hand, and there are small spaces between polygons where the polygons should be touching. How can I ...
16
votes
3answers
2k 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 ...
16
votes
4answers
4k 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, ...
16
votes
3answers
847 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 ...
15
votes
5answers
1k 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 ...
14
votes
4answers
890 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 ...
14
votes
2answers
810 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 ...
14
votes
2answers
3k 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:
...
13
votes
2answers
1k 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 ...
12
votes
5answers
3k 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 ...
12
votes
4answers
508 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 ...
12
votes
5answers
4k 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 ...
11
votes
2answers
388 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 ...
11
votes
4answers
787 views
ArcGIS - How do I group corner-touching contiguous polygons?
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 ...
10
votes
6answers
485 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 ...
10
votes
3answers
1k 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 ...
10
votes
3answers
719 views
Polygons from Polylines in either ArcView or FOSS
I have 20,000 polylines in a .gdb that represent about 5,000 building footprints. Some of the building footprints have pretty substantial gaps (image below). I would like to snap the polylines closed ...
10
votes
3answers
215 views
How to improve drawn shapes in Quantum-GIS?
I have a polygon-shape in qgis-1.7.0 and want to fix overlays and gaps between the edges of adjacent polygons. See image below.
Is there any automated way to do this in quantum-gis? Or any other ...
10
votes
4answers
453 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 ...
9
votes
6answers
2k 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 ...
9
votes
5answers
2k 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 ...
9
votes
4answers
4k views
using shapely: translating between Polygons and MultiPolygons
[EDIT: the solution to this was simply to use OGR to read shapefiles. See geographika's example.]
In an ESRI shapefile, there is no distinction between Polygons and MultiPolygons. Furthermore, there ...
9
votes
3answers
4k 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 ...
9
votes
3answers
2k 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]))
...
9
votes
1answer
348 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 ...
9
votes
2answers
733 views
PostGIS: split a polygon in a given ratio
Is there a convenient way to split a polygon into n parts, more-or-less equal in size in PostGIS?
9
votes
1answer
301 views
Efficient raster sampling of billions of polygons (bounding boxes)
How can a raster be computed efficiently (in Python), given a set consisting of billions of bounding boxes (read sequentially from a file), and given that the raster values for each cell should give ...
9
votes
1answer
151 views
Compare spatial cluster/agglomeration patterns for polygon data
I have agricultural data in form of polygons which I would like to test for spatial clusterings/spatial agglomerations.
All in all I have about 40 variables which I can aggregate and standardize in ...
9
votes
1answer
416 views
Self intersections for polygons, howto solve?
I have a question about repairing a self intersecting polygon shapefile. I have a shapefile containing Polygons (ZM) which has self intersecting features. If I use the "repair Geometry" tool, it finds ...
8
votes
3answers
6k 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 ...
8
votes
4answers
2k views
How to find the minimum edge to edge distance of polygons?
I have a a map of about 3000 polygons in ArcGIS 10. I'm looking to find the distance between each one of them. I know how to do it using the lat and long coordinates of the centroid, but I'm looking ...
8
votes
4answers
14k views
How to split a polygon into multiple equal-width polygons in ArcMap 10?
I am adding parking spaces into a parking lot, and I need them to be exactly the same shape and not overlap each other or have spaces between. In ArcMap 9.3, there was an editing task that allowed you ...
8
votes
4answers
2k views
Best way to delete selected mass amounts of old data from a polygon shapefile attribute table?
Dumb problem that for some reason is giving me trouble. I have a polygon shapefile that is loaded with old demographic data in its attribute file, I just received the new data today in xls format. ...
8
votes
2answers
562 views
Splitting polylines using regions with PostGIS
I was wondering if it is possible to split a polyline on polygon boundaries (regions) in PostGIS, the picture below is of what we have at the moment and showing where I need the polylines split:
...
8
votes
1answer
119 views
How to automatically reduce polygon size?
I am working with two polygon layers (counties & states) which I will 'intersect' to find which counties are within which states.
Due to data inaccuracies I have to change all county polygons and ...
8
votes
3answers
288 views
Find Duplicate Polygons Algorithm
I have a group of polygons. My objective is to find the duplicate polygons from these group of polygons.
Using NetTopologySuite(A c# port of JTS), it is possible to compare two geometires and check ...
8
votes
2answers
498 views
Resize polygon along one axis
Using the following example I'm able to resize by scale and origin.
polygonFeature.geometry.resize(scale, origin);
vectorLayer.redraw();
But does anyone have any suggestions or sample code ...
7
votes
5answers
410 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 ...
7
votes
4answers
8k views
Extract coordinates of polygon vertices in ArcMap 10?
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 ...
7
votes
6answers
2k views
Lines to Polygons
I have failed to find the "name" of the algorithm that would allow one to convert lines to polygons. Since this issues crosses GIS and the fields of computational geometry and computer science. I am ...
7
votes
2answers
577 views
How to create a heat map or density map from stacked polygons in ArcMap 10
I have a polygon shape file that has many overlapping features. Each feature represents an area used by polar bears. So some of the polygons overlap and some don't, and there are separate clusters of ...
7
votes
5answers
5k views
Get boundary of raster image as polygon in ArcGIS 10
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 ...
7
votes
2answers
1k 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.
...
7
votes
1answer
1k 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 ...
7
votes
3answers
328 views
How to sum up values of neighbouring polygons?
I hope that you can help me with the following problem: I have a vector (polygon) layer. I would like to add an attribute to the layer that - for every polygon - sums the values of a specific field of ...
7
votes
1answer
412 views
How would you determine the longest line of a polygon that passes through it's centroid?
All,
A PhD student approached me recently asking how one would determine the longest straight line that passes through the centroid of a polygon, the output being a polyline rather than just a table ...
7
votes
3answers
193 views
maximum circle inside an irregular polygon from a random point
I am trying to work out an algorithm for creating the maximum radius circle within an irregular polygon (a census tract) based on a given center of the circle.
The motivation for this is to obscure ...
7
votes
1answer
437 views
Advanced Polygon and Parcel Splitting
While I am still struggling to divide polygons into same sizes in ArcGIS (we are using ArcView 3.0 scripts now which work fine), I now have an even much more complicated problem:
I would like to ...
7
votes
5answers
635 views
How to get an ocean shapefile from a very detailed land area shapefile?
I am looking for a possibility to "invert" a shapefile. What I want to do is to convert a shapefile with the continents and islands into a shapefile that has water polygons. The existing ocean ...
7
votes
2answers
905 views
Intersecting a raster with a polygon using PostGIS - artefact error
I'm using PostGIS2.0 to do some raster/polygon intersections. I'm having difficulty understanding which operation I should use, and what the quickest way of performing this is. My problem is as ...


