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.

learn more… | top users | synonyms

8
votes
5answers
1k 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 ...
8
votes
2answers
685 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 ...
8
votes
3answers
1k views

Creating regularly spaced, defined # of points within polygon in QGIS

I used the research tool "Regular Points" to produce a certain number of points within a polygon, but it forms a rectangular grid of points rather than only within the shape of the polygon. Since I ...
7
votes
5answers
2k views

Algorithm to find polygons enclosing points

I'm trying to find an algorithm that can determine the smallest possible polygons to cover a number of points. I know how to get the convex hull around all the points, but say that the points are ...
7
votes
6answers
3k 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
3answers
2k 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 ( { ...
7
votes
2answers
2k 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
2answers
1k 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 ...
7
votes
3answers
2k views

Using polygons to apply unique value to all raster cells within those polygons?

In ArcGIS 9.3, I have a raster file that I would like to "mask" with polygons, giving a single value to all the raster cells that overlap the polygons. How can I do this? Here's a screen shot, ...
7
votes
1answer
4k 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 ...
7
votes
1answer
580 views

How to determine the longest line segment within a polygon that passes through its centroid?

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 of ...
7
votes
2answers
308 views

Lossless Polygon Simplification?

Is there a standard/recommended algorithm for simplifying a polygon without shrinking any of its original boundaries? Right now I'm using TopologyPreservingSimplifer within JTS and running into ...
7
votes
4answers
883 views

Output PostGIS geometry data as centroid or polygon depending on zoom level (GeoServer)

This is what I want: when I zoom out, cities of the country should appear as points and at a certain level when I zoom in, I want them to appear as polygons (showing the area of the city and ...
7
votes
3answers
517 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
1k views

How to select WFS features by polygon in OpenLayers?

I need to be able to select features on a wfs layer using a polygon instead of a box. I was hoping this would be a standard option in the SelectFeature class. Too bad this isn't the case. Any ...
7
votes
3answers
862 views

Create a square grid polygon shapefile with python

i have the following coordinates minx,maxx,miny,maxy = 448262.080078, 450360.750122, 6262492.020081, 6262938.950073 i wish to create a square grid of size 1 m using python. import math ...
7
votes
1answer
372 views

How to rectify polygon shapes in QGIS?

I have some polygon-shapes in qgis-1.7.0 and want to ensure that every polygon is a rectangle. See image below. Is there any way I can do this in QGIS (or any other f/oss)? Or how can I improve my ...
7
votes
1answer
909 views

Should I split MultiPolygons into Polygons?

In the system I'm implementing I have a table T1 with an associated geometry. Most of the geometries are a set of n polygons, with 10 < n < 100. At the moment in the table T1 I have a geometry ...
6
votes
2answers
713 views

How to remove small “salt & pepper” polygons from a layer?

I have a map made up of multiple polygons, with a few hundred thousand points very small polygons on within it. I need the larger polygons, but not the points small polygons. How do I select and ...
6
votes
7answers
2k views

Intersection algorithm that correctly handles the 180° meridian and poles?

Is there a well known intersection algorithm that correctly handles 180 meridian and poles? For example, let's say we have a list of latitude and longitude values that represent Antarctica. Let's ...
6
votes
2answers
235 views

Breaking apart a polygon layer by unique values, creating many new layers

I have a large dataset of habitat information that I need to calculate distances from animal locations to the closest polygon of each habitat type. The way to do this, that I understand, would be to ...
6
votes
4answers
4k views

How do I convert a polygon into a point?

I want to convert polygons into points. I know how it's done in ArcGis and I think this may sound trivial but it's a serious issue :/. I'll appreciate any hints :)
6
votes
4answers
16k views

How to create polygons from lines?

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 ...
6
votes
2answers
3k views

Converting point sets to polygon boundaries

I'm trying to convert sets of points to their respective polygon boundaries. I think this is something like a Voronoi diagram or Convex Hull, but not quite. I'm sure there's a technical term for it, ...
6
votes
4answers
648 views

Exporting polygon features to individual image pngs

I have a shapefile with a few thousand polygons, ArcGIS [9.3] (and even PostGIS). I would like to export each of those polygons into its own thumbnail image file without any real context. What is the ...
6
votes
1answer
5k views

How to convert a String to OpenLayers.Geometry.Polygon using javascript?

First let me say that I'm using Javascript, jQuery, Java, GeoServer, OpenLayers and PostGIS. Using java class ResultSet I return this String: POLYGON((516000 2135000,515039.264020162 ...
6
votes
1answer
492 views

Filling a polygon with lines using Postgis

i need to calculate a specific distance in an area. The distance is calculated from parallel lines in a polygon, And i need to find out how many parallel lines (with x meters distance to each other) ...
6
votes
2answers
125 views

summing up over an area based on a distance related function

Through a field study, we learned that the density of a bird species in the forest was related to the distance to forest edge: ln(density) = 1.89*(distance to edge) + 0.34 Now, for any forest ...
6
votes
4answers
283 views

How to avoid holes in polygons from lines?

I am trying to convert a dataset of lines that contains the coast of New Zealand into a big polygon. However using the vector -> geometry tools -> lines to polygon command in Quantum GIS results in a ...
6
votes
1answer
2k views

Postgis - Converting 'geometry_dump' data type to a 'geometry' type

I am working with a dataset of property boundaries that has had ST_Union() run on it, thus all the polygons appear as a multi polygon in one row of a table. I would like to separate these out so I get ...
6
votes
3answers
1k views

Can Polygons be generalized to MultiPolygons in GeoDjango?

I set up a model with models.PolygonField in geodjango, using postgres as database. I try to import shp into postgres. The problem is, shp (compiled with QGIS) mixes polygon and multipolygon, hence it ...
6
votes
1answer
408 views

QGIS define hexagon area around mapped points

I am using QGIS to map a number of radio antennas (for mobile network). Once I have the layer of the sites (done), I would like to assign to each site a coverage area (envelope). I could achieve that ...
6
votes
1answer
945 views

Where can I find a Unesco World Heritage List as boundaries?

I was wondering if anyone knows where to find the UNESCO world heritage list with boundaries? I can extract point data from the json feed for the map on the website http://whc.unesco.org/en/list via ...
6
votes
2answers
1k views

Finding parcel polygon features with frontage on multiple streets

The Department of Public Works would like to know how many properties in the city have a sidewalk at both the front and back. To get at this, I'm looking for a method to find parcels with frontage on ...
6
votes
1answer
310 views

Efficiently identifying overlapping polygons with Python

I'm parsing the NOAA severe weather alert feed and using it as a datasource for a weather alerting system. In the feed, I occasionally find a polygon entry for an alert. Unfortunately, counties that ...
6
votes
2answers
4k views

Create a polygon layer from point data

I'm currently using QGIS 1.8.0 I would like to create a polygon layer from a point dataset, where the size of the polygons relates to the resolution of the grid reference. The ultimate aim would be ...
6
votes
1answer
3k views

can I extract overlap of polygons within the same layer?

I am trying to extract the overlap of polygons that are within the same layer in 10. The layer came from a buffered street centerline and I'm trying to extract and delete the intersections from the ...
6
votes
2answers
687 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 ...
6
votes
1answer
327 views

How to draw shapes with highest possible decimal accuracy

I am trying to read input of lat and long to draw the shape based on condition.The input is standard array of lat and long with 15 decimal accuracy. I am realizing - I am loosing some decimal accuracy ...
6
votes
1answer
941 views

How to eliminate gaps in the ArcGIS union operation?

I have a layer that has nested polygons in them. I want to aggregate the polygons. I do this using the Union function. I use the "No Gaps" option when I perform the union. However, when I overlay ...
6
votes
1answer
76 views

Is there a way to select only a certain polygon for editing?

I have a spatialite data base with 4300 polygons contained within. I wish to be able to edit the polygons but once i have highlighted the Polygon from the attributes table i find it hard to edit the ...
6
votes
1answer
361 views

Generalize large polygon-file

I have a large polygone file with landuse information (6 classes). Its vectorised from a raster classification so the polygons are all angular. Any of my tries to generalize with v.generalize (sneaks, ...
6
votes
3answers
273 views

What geometric attributes do polygons possess, and how can these be used to filter features?

Given a polygon featureclass containing many polygons of different sizes and shapes, which geometric attributes (area, perimeter, etc) could be used to filter the polygons? It's probably best to ask ...
6
votes
1answer
281 views

Can you permanently set the polygon/polyline segment length?

I'm trying to create a several hundred polygons in ArcGIS 10, each of which may have up to several hundred vertices. For consistency sake I would like each line segment in these polygons to be of a ...
6
votes
2answers
2k views

Openlayers geometry: how to convert area from degrees to square kilometres?

I get a multypolygon from my web service and want to calculate the area of that polygon. I was trying to use this piece of code: var poly = new OpenLayers.Geometry.MultiPolygon(poligon); var area = ...
6
votes
1answer
62 views

Suitable algorithms for simplifying isochrone polygons

I'm looking for an algorithm for simplifying isochrones which were generated using OSM data. These are generally characterised as having lots of small "holes" mostly due to missing OSM data but also ...
6
votes
2answers
234 views

How do different GIS systems determine a Polygon's interior?

I'm interested in understanding how real-world GIS systems and their data encode Polygons. Specifically, how do they resolve the ambiguity of a Polygon's interior on a sphere? Background: in 2D, ...
6
votes
0answers
675 views

How to split polygons without ArcView? [closed]

I'm trying to split polygons into equal areas. While fishnet sort of works; the areas I'm trying to split don't touch; they're national parks. Fishnet spans the whole area, not just the polygons in ...
5
votes
2answers
5k views

How to calculate polygon areas and perimeters?

If I load a polygon layer and make a new column, how do I fill that column with the 1) area of each polygon and another column with 2) the length of the perimeter of each polygon?
5
votes
3answers
954 views

How to identify feature vertices that are part of a donut hole in ArcGIS 10?

I´m exporting the coordinates of polygon vertices to a CSV-File using the "Feature Vertices to Points" and then the "Export feature attributes to ASCII"-tools. Some of these polygons have holes ...