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.

Filter by
Sorted by
Tagged with
109 votes
8 answers
266k views

Calculating polygon areas in shapefile using QGIS

How do I calculate areas of an area shapefile in square meters (m²) or in acres (ha)? I didn't find that functionality in the Vector Tools.
user avatar
  • 2,171
22 votes
5 answers
20k views

Finding centrelines from polygons in QGIS

I was wondering if there is a way to create center lines from polygons in QGIS? I have a polygon layer, but ideally need the centerlines as a separate file.
user avatar
  • 2,397
57 votes
11 answers
63k 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 ...
user avatar
  • 681
37 votes
4 answers
12k 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, ...
user avatar
  • 1,684
13 votes
2 answers
49k 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?
user avatar
10 votes
4 answers
7k views

Dissolving polygons in QGIS or GRASS to new polygons of defined population sizes

I have a shapefile with 3800 polygons representing the smallest administrative areas in Ireland. Many of these, in rural areas, have tiny populations, under 100 people. In urban areas, all would have ...
user avatar
  • 249
19 votes
6 answers
37k views

Filling holes in polygons automatically using QGIS

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....
user avatar
  • 199
8 votes
2 answers
6k views

Calculating proportional area of polygon within another layer's polygon using QGIS

I have two polygon layers, 'model' and 'ntem', whose features overlap and intersect one another. I would like to calculate the proportion of the area of the 'model' polygons which fit within each '...
user avatar
  • 477
47 votes
5 answers
77k 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 ...
user avatar
  • 7,695
16 votes
4 answers
30k 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?
user avatar
  • 2,221
32 votes
2 answers
40k 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, ...
user avatar
  • 549
11 votes
3 answers
4k views

Summing up values of overlapping polygons in QGIS

I have large single layers with many features overlapping. Simplified example with 50% transparency: Where the features overlap I want the attributes added together. I manually created the output I ...
user avatar
  • 401
27 votes
4 answers
77k 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 ...
user avatar
  • 451
44 votes
5 answers
24k views

Calculating average width of polygon? [closed]

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,...
user avatar
  • 15.9k
18 votes
7 answers
12k views

Splitting polygon into equal area polygons using QGIS

There is a Plugin in QGIS 2.18 called "Polygon Divider" which divides an irregular polygon into smaller equal-area polygons of a specified/custom-sized but in QGIS 3.x version there is no &...
user avatar
18 votes
5 answers
26k views

Converting polygon into single or all points in QGIS

I want to convert polygons into points using QGIS. I know how it's done in ArcGIS Desktop. How can I implement it using QGIS?
user avatar
  • 657
11 votes
4 answers
520 views

One-to-many spatial join with results in one row in QGIS

I have two feature Datasets. Both are Polygons. 'Dataset A' has very big Areas and 'Dataset B' just small ones. Now, 'Dataset B' still overlaps in 2 or 3 Zones from 'Dataset A'. I want to perform a ...
user avatar
  • 195
6 votes
2 answers
2k 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 "...
user avatar
  • 153
2 votes
1 answer
1k 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 ...
user avatar
  • 21
41 votes
11 answers
57k views

Is there a way of auto_increment for the ID column in QGIS

I'm creating a fictive map and so I need to create lots of points, lines and for sure polygons. Later on I export my data as geojson. But before that I aways have to go and give every element an ...
user avatar
  • 857
34 votes
13 answers
100k views

Getting boundary of raster image as polygon in ArcMap

I have a rectangular raster image in ArcMap. 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 which is the ...
user avatar
  • 3,866
26 votes
3 answers
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 ...
user avatar
  • 925
15 votes
3 answers
931 views

Convert vertices of polygon features to points using Virtual Layer in QGIS

I have a polygon layer and want to use a Virtual Layer that creates points from the vertices of the polygon layer. The question is how to write a query that does this? I am aware of the tool "...
user avatar
  • 41.1k
25 votes
5 answers
15k views

Changing feature draw order in QGIS

Probably a very basic question here, I want to change the draw order of a shapefile in QGIS, how can this be done? As you can see in the picture below, only the "10" layer is shown, the others are ...
user avatar
47 votes
2 answers
63k views

Understanding difference between Polygon and Multipolygon for shapefiles in QGIS?

Creating Scratch layer gives me a choice between Polygon and Multipolygon, so I started wondering how should I make use of them. Reading a new book "Mastering QGIS" (through this answer by Joseph to ...
user avatar
  • 29.1k
28 votes
8 answers
80k 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 ...
user avatar
  • 2,987
18 votes
1 answer
3k 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 ...
user avatar
  • 5,682
19 votes
4 answers
16k 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 ...
user avatar
  • 351
10 votes
4 answers
3k views

Creating polygon connecting endpoints of multiple lines using ArcPy?

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 ...
user avatar
  • 111
63 votes
2 answers
162k views

Reading shapefile in Python

My question is an extension of Vertical lines in a polygon shapefile. Kindly refer to that question first. What you will see is a method of generating vertical lines with respect to the bounding box, ...
user avatar
  • 1,361
28 votes
2 answers
55k 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)...
user avatar
24 votes
6 answers
73k views

Converting 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 ...
user avatar
  • 241
42 votes
5 answers
33k views

Fixing non-noded intersection problem using 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 ...
user avatar
  • 15.9k
39 votes
10 answers
51k 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 ...
user avatar
  • 399
24 votes
3 answers
27k views

Order of polygon vertices in general GIS: clockwise or counterclockwise [closed]

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 ...
user avatar
  • 719
14 votes
4 answers
13k 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, ...
user avatar
  • 397
18 votes
2 answers
15k views

Checking Topology using 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 ...
user avatar
  • 251
4 votes
3 answers
1k views

Calculating interior angles of polygons or lines in QGIS

The problem In QGIS, it's easy to calculate areas of polygons or lengths of lines using QGIS expressions with area ($geometry) / $area or length($geoemtry) / $length respectively. However, there is no ...
user avatar
  • 41.1k
23 votes
6 answers
48k views

Converting line to polygon using QGIS

I have a shapefile with city areas, but unfortunately the shapefile only contains single lines. The shapefile looks like this: I want to convert those lines to an area-polygon shapefile in QGIS. I ...
user avatar
10 votes
2 answers
11k 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....
user avatar
  • 213
2 votes
1 answer
242 views

Anti-aliased rasterization of vectors in QGIS?

I have some polygons that I want to rasterize, but in a fairly low-resolution grid (cell size 250x250m). The raster values of the area inside the polygons should normally have the same value (100), ...
user avatar
  • 63
7 votes
2 answers
2k 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 ...
user avatar
  • 135
33 votes
2 answers
55k 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 ...
user avatar
41 votes
4 answers
46k 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( '{ ...
user avatar
  • 1,104
45 votes
8 answers
64k views

How to create polygons with straight lines and right angles in QGIS?

When creating a polygon, how do I do it so that the lines are straight (90, 0 degrees, etc.) and when I create corners they can be right angles? For instance, how do I create a perfect square or ...
user avatar
  • 2,987
13 votes
5 answers
16k 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 ...
user avatar
  • 775
27 votes
5 answers
88k views

Merge intersecting polygons into one which are part of the same feature

I'm not a GIS professional so I hope I use the correct wording, at least I hope you understand my question. Let's say there are five polygons in the feature A. In the shapefile there are more ...
user avatar
  • 273
10 votes
2 answers
14k views

Is it possible to convert Polygon to centerline linestring?

I have a Polygon which I want to convert to centerline linestring. IMAGE 1 I used the Vector to convert to Polyline but they are not center line as under: VECTOR TOOL IMAGE 2 Polyline created by ...
user avatar
  • 413
14 votes
2 answers
5k 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....
user avatar
  • 1,117
6 votes
2 answers
2k views

Optimizing ArcPy code to cut polygon?

There is a lot of nested loops and wondering of ways I could speed up this code? Any ideas? Note: This requires ArcMap 10.2 def cut_geometry(to_cut, cutter): """ Cut a feature by a line, ...
user avatar

1
2 3 4 5
15