Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [polygon]

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.

48
votes
10answers
48k 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 ...
11
votes
2answers
36k views

How to calculate polygon areas and perimeters using QGIS?

Using QGIS, if I load a polygon layer and make a new column, how do I fill that column with the: area of each polygon and another column with length of the perimeter of each polygon?
15
votes
4answers
11k views

Finding centrelines from polygons in QGIS?

I was wondering if there is a way to create centre lines from polygons in QGIS? I have a polygon layer, but ideally need the centrelines as a separate file.
36
votes
5answers
44k views

Smoothing/generalizing polygon in QGIS?

Is it possible to smooth or generalize a polygon in QGIS, perhaps by using a plugin like the generalizer-plugin for lines? I could convert my polygons to lines, smooth them and convert them back to ...
32
votes
4answers
11k 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, ...
6
votes
5answers
13k views

How to fill holes in polygons automatically?

Is there an option in QGIS to fill holes in polygons automatically by setting parameters e.g. maximum area, distance between borderlines? I want to delete/fill holes that a very "thin"/small.
5
votes
2answers
1k views

Mapping Russia - Int'l dateline splitting polygon

I am having the issue where the International Dateline is splitting a polygon I am working with. I have a layer of the "Federal Districts" of Russia, and the eastern most federal district is being "...
19
votes
3answers
52k views

Merging/Dissolving polygons by Common Attribute Field in QGIS?

I have joined corresponding Local Enterprise Partnerships table data into a polygon shapefile containing UK Local Authorities. How do I Dissolve or Merge the the Local Authorities polygons by ...
14
votes
4answers
21k 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.
7
votes
2answers
10k views

Spatially joining polygon fields onto point layer in QGIS?

I have gridded depth points in CSV format that I'm trying to add other map data to, in additional columns. I've tried joining fields, hoping that I could link the Shapefile data to the csv, but when I ...
26
votes
2answers
30k 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, ...
13
votes
1answer
15k views

Transforming polygon to linestring in QGIS?

I have a polygon, imported from a shapefile in QGIS. I would like transform it to a linestring instead so I can save it as a GPX file later. How can I transform a polygon to a linestring in QGIS?
38
votes
4answers
15k views

Calculating average width of 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,...
24
votes
9answers
60k 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 ...
25
votes
3answers
4k views

Packing Polygons within polygon using ArcGIS Desktop?

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

Deleting polygons smaller than certain dimension using ArcGIS Desktop?

I've made a model in ModelBuilder in ArcMap 10.3, what it basically does is creating polygons over open areas such as farm-lands, grass-lands, marshes etc that has a low slope. My challenge is that I ...
17
votes
1answer
2k 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 ...
17
votes
3answers
14k views

Order of polygon vertices in general GIS: clockwise or counterclockwise

Two days ago I asked a question about the internal storing order for the vertices of a polygon in ESRI shapefiles. That question was answered (Are polygons stored clockwise or counterclockwise in a ...
16
votes
2answers
13k 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. ...
25
votes
2answers
29k views

Joining polygons in R

I am wondering how to join spatial polygons using R code? I'm working with census data where certain areas change over time and I wish to join the polygons and the corresponding data and simply ...
19
votes
6answers
54k views

Convert shapefile to CSV including attributes AND geometry?

I have a shapefile 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 ...
2
votes
1answer
923 views

Splitting all polygon features in a shapefile into smaller equal width polygons

I have a shapefile of thousands of polygon features, that i would like to break up into smaller pieces (i.e. break a square into 8 equal pieces). I have read all over these boards for the right ...
12
votes
5answers
61k 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 ...
4
votes
1answer
212 views

Turning vector grid into individual shapefiles using QGIS?

I am using QGIS and I created a vector grid on a crop field in order to cut it into plots. I want to save each grid cell into individual polygon shapefiles automatically. Here is an example of a ...
15
votes
2answers
25k views

Extracting intersection areas in R

I have two polygons. One contains fields(X,Y,Z) and the other contains soil types (A,B,C,D). I want to know what area of every field contains which type of soil. I tried the following: library(rgdal)...
35
votes
5answers
18k 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 ...
28
votes
4answers
26k 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( '{ ...
26
votes
12answers
63k views

Getting boundary of raster image as polygon in ArcGIS Desktop?

I have a rectangular raster image in ArcGIS Desktop. 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 quadrilateral ...
15
votes
2answers
14k views

How to perform a true GIS clip of polygons layer using a polygon layer in R?

I would like to do a true GIS Clip in R of soils polygons using a series of single boundary polygons, but I cannot find an R function to properly do it. It should work just like the clip function in ...
24
votes
8answers
23k 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 ...
9
votes
4answers
10k views

Creating 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 minx,...
25
votes
10answers
49k 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:
7
votes
3answers
3k views

Removing small polygon gaps in Shapely polygon?

I know this issue has been addressed before with different software, but how do I do it with Shapely? I have a polygon with a very small gap on the interior of the shape: Here is a close up: The ...
9
votes
4answers
2k views

How to create a polygon connecting the endpoints of multiple lines using python?

I'm trying to figure out how to create a polygon that connects all the endpoints of a shapefile containing a set of polyilnes with pythonscript in ArcGIS, I'm having trouble doing this as the order of ...
13
votes
2answers
3k views

Clip polygon and retain data?

I have these two polygons: library(sp); library(rgeos); library(maptools) coords1 <- matrix(c(-1.841960, -1.823464, -1.838623, -1.841960, 55.663696, 55.659178, 55.650841, 55....
10
votes
3answers
9k views

Calculating roundness/compactness of polygon?

I am trying to find ways to quantitatively describe the shapes of various polygons. For my project, these polygons represent lakes, rivers, lagoons, and parks. So they can be almost any shape. One ...
4
votes
2answers
481 views

Select the most distant vertex from polygon's centroid using ArcPy

I have a polygon and the polygon's centroid. I want to select the most distant vertex from centroid (picture: point A). I used arcpy.FeatureVerticesToPoints_management to create a feature class ...
10
votes
2answers
7k views

Polygon label repeated for each tile

I'm using the standalone GeoWebCache to serve tiles from a remote GeoServer. My problem is that the polygon label is added to each one of the tiles served, instead of only once in the polygon centroid....
10
votes
2answers
6k views

Removing small “salt & pepper” polygons from layer in QGIS?

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 ...
5
votes
1answer
2k views

Identify Polygons on raster image

I have OS street view mapping as raster images. Is it possible (without the obvious of tracing each dwelling) to identify all polygons on each tile. To clarify, My ultimate aim is to produce a ...
2
votes
2answers
2k views

How to go with…somewhat complex geological maps in QGIS?

Just a follow-up to this question QGIS: Line to polygon conversion. Not sure do i have to continue there itself... We are currently digitizing a geological map...which has 36 features in total. Some ...
19
votes
2answers
13k views

Instantiating spatial polygon without using a shapefile 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 ...
13
votes
10answers
12k 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 ...
12
votes
4answers
10k views

Percentage of polygon in one shapefile within polygon of another

I'm a newbie, apologies if this is obvious/has already been asked and answered but I couldn't find anything. I have two shapefiles: 1. an administrative boundary layer for a county in the UK known as ...
23
votes
2answers
5k 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 ...
15
votes
5answers
54k 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 ...
11
votes
2answers
9k views

Dissolve polygons in QGIS (GEOS) with tolerance

I have a polygon vector layer representing the area inundated in a flood. The layer has been produced in a such a way that some of the areas are composed of multiple smaller touching polygons (see ...
6
votes
1answer
917 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) ...
9
votes
4answers
15k views

How to export polygon coordinates to CSV (not WKT)?

I am trying to export polygon coordinates from a shapefile to a CSV file, but so far all my attempts have failed. I have found numerous questions and answers about this, but none have solved my ...