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.

0
votes
0answers
22 views

Filling polygon holes using PostGIS? [duplicate]

I have a polygon that I need to fill in the "holes" that are less than X meters squared in area. I can find the area of a polygon, but is there a way to find the areas of the "holes" and if they are ...
0
votes
1answer
70 views

Digitizing polygons by cut or split feature tool in QGIS

For saving digitizing time i created one polygon feature cover all satellite imagery (study area) and styled it outline, tried many tools inside qgis 2.18 to split / cut polygon features (i don't mean ...
1
vote
1answer
28 views

Clipped raster not retained when saved

I have clipped a raster to exact polygon outline using image analysis (ArcMap 10). The resulting temporary clip layer is exactly how I want it to be. However, when I export/save the temporary clip ...
1
vote
0answers
57 views

QGIS “Sum Line Lengths” return 'nan.'

I have a polygon shapefile and a (merged) line shapefile (both are zipped). When I use Vector -> Analysis Tools -> Sum Line Lengths on these shapefiles, I get a layer with some of the LENGTHS filled ...
0
votes
0answers
36 views

Spatial imputation for missing values in multiple variables in shapefile in r

I currently have a shapefile with approximately 20 numeric variables. Several of these variables have missing values. As this is a shapefile I do not think using the median or mean as a form of ...
0
votes
1answer
74 views

Filling polygon with png pattern in OpenLayers?

I want to fill a set of polygons with png pattern. Here is an extract of my code : var canvas = document.createElement('canvas'); var context = canvas.getContext('2d'); var pattern; var imageObj ...
3
votes
1answer
52 views

Clipping polygon layer to another polygon layer based on matching attributes using QGIS?

Working in QGIS, I have two polygon layers: Building Footprint Polygon Layer Parcel Polygon Layer These two layers have a matching field in the attributes known as "Parcel Number". I would like to ...
3
votes
1answer
98 views

Select only lines that touch both sides of polygon - PostGIS

I want to select lines that only touch both sides of a polygon. Is there a function in postgis that can do this? See image below. I only want to select lines from the circle on the left where the line ...
0
votes
0answers
33 views

Split Polygon to match length of lines with QGIS

I have a large polygon shapefile with many features (green), representing waterbody outlines, and a line shapefile (brown) representing river sections. I now want to split the polygon features into ...
0
votes
0answers
91 views

Extend line on both sides until it reaches polygon boundary - PostGIS

Is there a function in PostGIS where I can extend a line on both sides until it reaches the edge of a polygon boundary?
0
votes
0answers
10 views

Inverted polygon not displaying on printout

I'm printing from the layout in QGIS 3.2.2, using Windows 10. The page size is 42x42 inches. I created an inverted polygon to cover up layers that were outside of the main polygon. I printed ...
0
votes
0answers
23 views

Polygon overlay over an imagery in Google Earth Pro

Is there a way for me to overlay the polygon on the top of the imagery in Google Earth Pro ? I exported an imagery from another software and save it as shapefile I use the Open from the File menu to ...
1
vote
1answer
75 views

Intersecting raster with polygon grid in ArcGIS Desktop?

I'm trying to generate the fractional coverage of land-cover within polygon grid cells. My land-cover is a 30m raster dataset (10008x8939 cells) and my grid is a fishnet shapefile (approximately 1km ...
4
votes
1answer
94 views

Styling polygon layer with symbols that indicates value of attribute of polygon?

I want the same thing, but the number of dollars shown should indicate the value of the attribute of the polygon. For example one polygon may have 2 dollar icons indicating 200 (value of an attribute, ...
0
votes
1answer
24 views

Clipping Raster Object with Polygon Object in ArcPy?

I have about 400 rasters that I want to clip each of them based on a polygon object. The code I tried to use is the following: import arcpy, os origpath = ur'd:\test' jpgs = [f for f in os.listdir(...
1
vote
1answer
42 views

PostGIS Centroid coordinates (E, N)

I would like to add two new columns in the table (E, N), fill in the coordinates of a polygon centroid using PostGIS SQL code and have the column upadated as soon as I save the edit of a drawing in ...
2
votes
0answers
38 views

Copy polygons to another layer with different attribute

I am working in QGIS 3.0.2-Girona. I am digitizing images in which there are rocks that can be encrusted, totally or partially, by algae. I want to have a polygon for the rock and one for the algae. ...
0
votes
1answer
82 views

Calculating area under each polygon in QGIS [duplicate]

I would like to know how to calculate the area of the vector layer (red in the photo) under each polygon (white square in the photo). The red layer has the area (km2) in its attributes. But what I ...
0
votes
2answers
201 views

Calculating polygon area within polygons in QGIS?

I am new to QGIS - I want to estimate the area of the reef under a polygon grid. My shapefiles are already in meters, however I am having a hard time calculating the area under the grid layer. ...
1
vote
1answer
61 views

Split and merge polygons by ID and Feature value in python or QGIS

I have a spatial dataset with two major columns: county_name and group_ID. The spatial polygons are represented by each county_name. Some counties share the same group_ID, while some counties contain ...
0
votes
1answer
68 views

Add a polygon programmatically in OpenLayers 3?

I added a point like this and it works fine, but for polygon it's not working. var iconFeature = new ol.Feature({ geometry: new ol.geom.Point([8637791.36, 1456487.82]), name: '...
0
votes
0answers
73 views

Does Redis geo have the capability for storing polygon?

I followed the example here and also here about geospatial support in Redis. I tried to add POINT features to my Redis dataset, and subsequently I can query POINT names within certain radius of a ...
1
vote
0answers
23 views

Define polygon with even number of points?

I have the following problem..... I have a client that needs an equal number of schools divided up between 8 different zones. The state I am looking at is the state of Maryland. They want to use ...
2
votes
2answers
259 views

Make polygon circular in QGIS

I have drawn a polygon in a shape-layer, but it's not perfectly circular. Is there a way to either Draw a circular polygon with a given radius (in a shape-layer) Make a polygon into a circle I have ...
6
votes
3answers
112 views

Using ArcGIS to extend a polygon in one direction up to the edge of another polygon

I have two shapefiles: the first containing a route defined by a single polygon (black line in the image below), the second containing a series of between 1000 and 4000 small polygons located ...
2
votes
2answers
50 views

Performing multiple intersections between two polygon tables and one raster table in PostGIS?

Trying to perform an intersection of an intersection in PostGIS. Its an intersection between a point table, polygon table and a raster table with different number of rows. The polygon table is the ...
2
votes
0answers
38 views

Calculating individual width between buildings using ArcMap?

I have a building footprint shapefile and I would like to calculate the individual width between each building (i.e., adjacent building and across the street). I have looked at solutions which use the ...
2
votes
3answers
283 views

Clipping GeoTIFF with shapefile?

I have a GeoTIFF file and a shapefile. I want to clip the GeoTIFF file using the polygons defined in the shapefile in such a way that it produces a separate output for each polygon (which is different ...
1
vote
1answer
136 views

How to calculate mean value of a raster for each polygon in a shapefile

I wrote a Python script who calculate, for rasters, mean value for each polygon of a shapefile. But I think that it's a "war machine" (it takes many treatment time) and I would like to simplify it. ...
1
vote
0answers
134 views

Attributing polygons based on line attributes

I'm using QGIS 2.18. I have a grid that I need to calculate Azimuth and length for each side. Most have 4 sides but some ( see Gird C below) many more , up to 12. My process now convert Polygon to ...
1
vote
2answers
48 views

Find the NW vertex of a rotated polygon

I am using QGIS 2.18 and I am wondering how to find the NW corner of a polygon and create an attribute of that point number. See the attached image. For example, please node 8 is the NW corner for ...
1
vote
0answers
69 views

r - intersection of 3D objects

How can an intersection of 3D object with 3D object be done in R, for example a 3D line with 3D polygon ? Saw that "sf" provides some possibilities but didn't get the desired result. What was ...
1
vote
0answers
87 views

How to fix self intersected polygons visually, as well in QGIS?

I have same invalid polygon features because of self intersection. I can make them valid by using fix geometries tool in QGIS 3.2. However I want to show them valid visually also. The feature is valid ...
4
votes
1answer
211 views

Fitting known size polygons into irregular polygons using ArcGIS Desktop?

I have a task that sounds simple, but I just can't get through the last step. I need to find suitable areas where wind farms that have a size of 500x150 meters, could be placed. The restrictions are ...
3
votes
1answer
84 views

Determining validity of odd polygon using ArcObjects?

Using ArcGIS 10.4.1 a user in our department created a polygon and saved it to a feature class as shown below. The area covered is correct as at times it could overlap itself. I have calculated the ...
1
vote
2answers
177 views

Leaflet popup disappear or moved over drawn polygon

If I would like to popup something over an actually drawn polygon, then it sometimes disappear or moved to the first point of the polygon. https://jsfiddle.net/o149mgwj/19/ var drawnItems = new L....
0
votes
1answer
72 views

Find the intersecting polygons between 2 tags in OpenStreetMap using Overpass API?

I need to find in Italy all the intersecting polygons of: all airport terminals of the tag["aeroway"="terminal"] that are inside only international airports of the tag["aerodrome"="international"] I ...
1
vote
0answers
25 views

Automatic slice of polygon

I have a data source, that sometimes returns geometries which are not properly cleaned e.g. the pink polygon is only 0.02 cm wide and is always on the edge of the whole geometry which consists of the ...
1
vote
1answer
44 views

Osm2pgsql - Lines instead of polygons that represent buildings

So I am using a PostgreSQL database with the PostGIS extension to extract building data with addresses from osm data. I just discovered that in my dataset, imported with osm2pgsql of the german city ...
1
vote
1answer
68 views

Get pixel values from a raster using a multipartpolygon

I'm trying to get the mean value of pixels from an NDVI raster, that intersect the geometry of a FeatureCollection, that is a multipart polygon which represents my sample area, but I can't find the ...
1
vote
0answers
35 views

Find points from list that satisfy particular rule AND are within a shape/polygon

I have a list of points which I have plotted using rule-based symbology as 4 categories. I want to produce (and export) a list of the points that satisfy a certain rule (e.g. "pUXO" = 'Y') AND lie ...
1
vote
0answers
54 views

Dealing with a hole (or inner ring) at the intersection of two MultiPolygon polygons in Python Shapely

I have a problem with Shapely geometry object MultiPolygon (the exact data is shown below) in Python. I need to find a way to merge the small grid cell polygon with the larger polygon but after ...
6
votes
1answer
88 views

The longest straight line (L) within a polygon and the longest perpendicular line (T) to L

I'm mapping elongated glaciological features within QGIS 2.18.22 and I need to measure the longest straight line (L) and the longest perpendicular line (T) to L (as illustrated in the picture) within ...
0
votes
1answer
148 views

Draw polygon on load not working - OpenLayers

The following code should have 3 features: Draw a polygon on load On draw end send coordinates On modify end send coordinates 2&3 work as expected. I added the drawn polygon last, there is no ...
4
votes
1answer
214 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 ...
0
votes
1answer
46 views

Intersecting polygons from different layers based on common values using ArcPy? [closed]

I have two polygon shapefiles (ShapeA and ShapeB) that share some areas. The shapefiles have one attribute in common (CODE) and I would like to do a selection, where I select all the polygons in one ...
1
vote
0answers
200 views

Generating a single geohash for a bounding box in python

the following code generates bounding box for the coordinates that are given in the input but currently it generates geohashes for all the 4 coordinates of the polygon. i want to be able to generate a ...
1
vote
1answer
108 views

Disappearing polygons when zooming in QGIS 3.0

I am using QGIS 3.0 and loaded a polygon layer from a shapefile containing more than 300,000 polygons. When zooming in some polygons are not drawn (not the entire layer).
1
vote
1answer
270 views

Setting cell size on “Polygon to Raster” tool, in ArcGIS?

How do I properly set the cell size that I want when converting polygons to raster files? Also on the raster file Layer Properties what exactly does the Cell Size indicate, as it doesn't seem to ...
1
vote
1answer
50 views

Selecting all polygons along northern edge of shapefile in R

I have a shapefile of Mexico composed of Admin 2 polygons. I am trying to create a buffer along the Mexico-US border, in R considering this is a shapefile of Mexico only and I want to retain the ...