Stack Exchange Network

Stack Exchange network consists of 175 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.

1
vote
1answer
1k views

OpenLayers polygon fill not working with GeoJSON file as source

I'm trying to visualise some data in a custom shape on a map, and I'm stuck with styling it. I'm currently using the openlayers framework in combination with a geoJSON file that I generate in code. I'...
10
votes
3answers
4k views

Rgeos drops associated values when intersecting polygons

I am trying to intersect two SpatialPolygonsDataFrames and get a SpatialPolygonsDataFrame as the result. Unfortunately, using the gIntersection function from rgeos (which works impressively quickly ...
0
votes
1answer
29 views

How can I calculate the direction of a Google Maps polygon?

To create a hole in a polygon, you need to know if the inner polygon is in the opposite direction as the outer polygon (See here). How can I calculate this? Here are some examples: var ...
1
vote
0answers
40 views

Finding overlapping geometries in the same table using PostGIS [on hold]

I have a table containing about 50,000 polygons and some of them are overlapping. I'm trying to use PostGIS to return a table with all the overlapping parts of the polygons along with some of the ...
27
votes
9answers
25k 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 ...
1
vote
1answer
45 views

Turning a single MultiPolygon into many small polygons?

I have a large GeoJSON file with a single very complex MultiPolygon, and I would like to turn it into an identical file with many small polygons. How can I do this? I can use ogr2ogr or mapshaper or ...
7
votes
1answer
2k views

Creating Multi-Part Polygons that touch internally using ArcGIS Desktop?

I have a set of parcels as illustrated in the image below. There are currently no multi-part features in dataset. What I would like to do is to merge (not the right word) all of the parcels with same ...
18
votes
3answers
15k 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 ...
0
votes
3answers
71 views

Removing 180th meridian line on map of Russia?

I'm not sure how to remove the line that represents the 180th meridian (international dateline) on my polygon. I have the "Russia Country Boundary 2017" feature layer added from the Living Atlas. My ...
2
votes
2answers
36 views

QGIS how to sum a certain vector field inside a polygon and populate a field in the polygon?

I have a polygon with vector point civic addresses inside it. Each civic address has a different number residence. I want to sum the total number of residence inside that polygon and it populate a ...
5
votes
0answers
60 views

Clipping rasters to mask layer QGIS 2.18, 3.4, 3.6 not working

Having a problem clipping a singleband GEOTIFF of Canadian land uses to a vector Quebec provincial boundary. When I do Raster -> Extraction -> Clip by mask layer, the program processes endlessly. I ...
-2
votes
1answer
25 views

Calculate the total area from two intersected polylines

If two polylines intersect with each other and there are more than 2 intersect points, there is more than 1 closed area will be created. How can I get these areas as polygons in ArcGIS?
1
vote
1answer
24 views

Rasterize the full area of a polygon, not only midpoints, using R [duplicate]

The default function in raster::rasterize is to see if a point is within a polygon and if yes, make a cell. This results in that some of the outer parts of the polygon is not covered by the new raster....
2
votes
1answer
56 views

Using ST_UNION to combine several polygons to one MULTIPOLYGON using PostGIS?

I have a problem with ST_UNION So, I have a several polygons DB looks like this I need UNION all off those polygons to one multipolygon and get result that looks like this I tried use ST_UNION ...
1
vote
3answers
81 views

Creating polygons that share the boundaries of existing polygons

I'm creating polygon (that about actual vegetation). First, I create one polygon After that, I will create more polygons that share the boundaries of existing polygon. But, it show result like below ...
0
votes
0answers
15 views

How to extract data from raster data set? [closed]

I am looking to create a standalone QGIS python application that can allow the user to enter in a coordinate on the US and find the population in a circle around this point and display the circle on ...
0
votes
2answers
61 views

QGIS Hex grid with the shape of vector

I'm trying to make a hex grid net with the shape of polygon. Unfortunately, the grid net is in the rectangle shape (see the screenshot). Any advice how to do it?
1
vote
1answer
37 views

Moving point labels on vertices inside of polygon

What I'm trying to do is to label vertices of a polygon with a number and plot that number inside the polygon. So far I extracted the vertices to a 2nd point layer. Named them correctly and plotted ...
2
votes
2answers
33 views

Unite several polygons that share boundaries in QGIS

My study zone is in the middle of two geologic maps with two different shp files. Is it possible to remove the boundaries of the polygons between these two maps that are created at the union of ...
0
votes
1answer
15 views

Using raster::rasterize's getcover to get total polygon area with overlaps

I want to use rasterize to get how much of a raster cell is covered by polygons. This can be done like this: library(raster) p1 <- rbind(c(-180,-20), c(-140,55), c(10, 0), c(-140,-60), c(-180,-20)...
3
votes
3answers
208 views

Prioritising polygons in QGIS

I just created a layer in which I hand drew a lot of polygons. Now I want to fill out the Attribute table through commands since it will save me a bunch of time. Therefore, I calculated the area of ...
0
votes
2answers
23 views

Java GeoTools API: getInteriorPoint does not work on an intersection between Polygon and MultiLineString

I'm working on a Java project using GeoTools API that want to get the interior point getInteriorPoint(), from the geometry coming from an intersection between a Polygon and a MultiLineString. Please ...
0
votes
1answer
21 views

Convert Oracle data to polygons using R

I have a polygon file, taken from an Oracle database, that looks something like this: ID FMC_AREA_TYPE_NAME DESCRIPTION 1 162 HARBOUR Esbjerg 2 164 HARBOUR Thyborøn ...
1
vote
0answers
32 views

Calculating distance between point and MultiPolygon Geoseries object in Python [closed]

I want to calculate the distance of a point from the Multiploygon geoseries object created using cascaded_union function of GeoPandas. Following is my code: import numpy as np import pandas as pd ...
4
votes
1answer
8k views

How to select and copy a group of polygons in QGIS?

I'm new to QGIS. I opened a few shapefiles that cover Europe. Now I want to select a smaller area and if possible copy the polygons in this area so I can work with a smaller set. How should I do this ...
0
votes
0answers
33 views

Extract point data to polygon features [duplicate]

I am trying to import data from a point that lies on a certain polygon feature (or raster). As an output I would like the polygon feature to have the point data as a new field in the attribute table. ...
2
votes
2answers
68 views

Measuring length of edge of polygon

I have a layer of polygons, cadastrals, that i'd like to have the length of the edge of: I thought about doing this: Dissolve the polygons Create one large dissolved polygon Making a; From polygon ...
2
votes
1answer
50 views

Identifying Parcels on Street Junction in QGIS

I have the following shapefiles (click here to download them): parcels polygon parcels point streets/row polygon streets line I use QGIS to manually identify polygon parcels with street corners (...
1
vote
2answers
33 views

Creating an arc with set angle and range using QGIS?

I'm currently using QGIS 3.6. For a while now to map the arcs of fire for historical fixed weapon emplacements. Creating an arc to a set range to a set angle is extremely important for my analysis ...
30
votes
2answers
49k views

Enabling “Snapping” in QGIS while drawing polygons?

I tried to draw polygons in QGIS 1.7.0 and somehow I 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 ...
1
vote
1answer
77 views

Inherited values between polygons in QGIS? [duplicate]

In this project, I have three polygons, see the image below "Polygons_From", includes input attributes, i.g. "Value_1", "Value_2", "Value_3", and $area for each quadrate (on the image there are two ...
1
vote
0answers
29 views

Calculating the area of raster within polygon

I have a raster layer with values of energy demand in each cell. I would like to know the area of the raster within each polygon (see screenshot). Any suggestions on a simple approach for this?
2
votes
1answer
28 views

Make polygon appear as point when zooming out beyond set range in ArcGIS Online

Is it possible to have a polygon layer visually appear as a point when zooming out beyond a certain extent that i will determine in a web map in ArcGIS Online? Or do i have to add a different layer ...
3
votes
1answer
38 views

How might one optimise geospatial operations on complex polygons, especially plots in R?

Question: I'm attempting to run some simple plots on some shapefiles with a high number of complex polygons. These aren't massive files - for the example below, the shapefile is 70mb (15872 obs), but ...
15
votes
2answers
26k 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)...
3
votes
1answer
573 views

Using Check Geometries plugin for polygons in QGIS?

I've a few hundred polygon features with many duplicate nodes, gaps, overlaps and other geometry errors. Fixing all errors seems to be quite tricky. I had to run the duplicate nodes check twice to fix ...
1
vote
0answers
803 views

Showing two layers at same time in QGIS? [closed]

I want to see two QGIS layers at the same time. one is lines which are boundary lines and the other is polygon which are district. when i was surfing about this question, it is impossible to show ...
1
vote
1answer
128 views

Obtaining correct area values *With* correct projections? [duplicate]

I'm trying to get the percentage of each U.S. county overlaying groundwater (data from the census and USGS respectively). They're both polygons. I have 1) correctly projected the data and the layer (...
1
vote
0answers
72 views

Drawing longest polyline within polygon? [closed]

I am looking for a GIS tool/script (preference on QGIS but I can also use ArcGIS/Matlab) that allows creating a polyline layer from a polygon layer where a polyline is drawn for each polygon. The ...
0
votes
1answer
46 views

Merge small underlying polygons into overlaying shapefile with larger polygons [closed]

I have a dataset with the average rent prices saved in a vector layer (.shp). It is "street" based, so it has quite a fine resolution. I have a different dataset (containing info about crime rates) in ...
2
votes
1answer
47 views

PostGIS - unique constraint for spatial equality

I have a polygon column for which I would like to add a unique constraint that tests for spatial equality akin to ST_Equals so that it ignores vertex order. For instance, I would like these polygons ...
1
vote
1answer
42 views

How to auto populate feature attribute values for new polygon (B) from parent layer (A) where B is made over layer A?

Is there any way in QGIS where we can auto populate new layer feature_attributes from parent layer? We have layer A as . It has attributes including: f_id, class_name, class_type, r_total. We now ...
3
votes
0answers
31 views

Creating equidistant sampling points in polygon in QGIS 3.6.0?

I have figured out how to add random points inside polygon boundaries. Although this works well, nevertheless I need a few different things to happen for my application. What I would like to do is ...
0
votes
0answers
21 views

Creating a grid of modifiable hexagonal tiles as overlay in geopandas

I have geo-tagged car sharing dataset which I am analyzing using geopandas. For analysis purposes I would like to create my own polygon overlay of hexagonal tiles. I have managed to find a ...
1
vote
0answers
28 views

How to remove complicated shapes in ArcGIS - generalization [duplicate]

What can be the way of simplifying polygons in ArcMap? I have a shapefile with buildings and I have to make them as simple as it's possible. I used already some tools, like: dissolve, union, ...
1
vote
1answer
44 views

Python - Convert shapefile lat-long value from Degree minutes seconds to Degree decimal

I am processing shapefiles in python using standard library functions like Python “shapefile” library and GeoPandas. I have two shapefiles having the same projected co-ordinate system-> ...
3
votes
3answers
3k views

Labelling only certain polygon features in QGIS

The red colored countries in the image are countries i consider highly vulnerable to freshwater shortages. I like to have the name of only these highly vulnerable countries appear on the map, i'd be ...
0
votes
0answers
18 views

Identify raster cells with point shapefile in QGIS

I have a binary raster, a point layer, and a polygon grid layer. I want to know how many raster cells have a point associated with them within each of the polygons of the grid, and the value of each ...
24
votes
7answers
28k 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 ...
39
votes
5answers
15k 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,...