Questions tagged [polygonize]

The process of producing a polygon feature layer from a raster or from lines.

Filter by
Sorted by
Tagged with
1
vote
0answers
19 views

Distinguish between filled polygon and boundary

I am trying to convert the raster images to vector and get the inner filled polygon. But the filled polygon and its boundary are wrongly detected for some cases. Below is the code where I tried to ...
0
votes
0answers
42 views

What's the theory (principle) behind shapely.ops.polygonize?

I am learning Python package Shapely, but quite confused about the principle behind the polygonize function --- shapely.ops.polygonize. How does this function work to polygonize a set of lines (...
3
votes
2answers
50 views

Converting/expanding line into 2D polygon using QGIS

I am brand new to GIS and am attempting to use QGIS to take an existing line from a shapefile and create a 2D polygon based on it i.e. I want to take a line and fatten it out a bit so it has an area. ...
7
votes
1answer
92 views

Cannot select input layers for the “Polygonize” tool in QGIS

I am trying to convert a raster layer to a polygon layer using QGIS 3.16. 2. When I open the polygonize tool, the program does not allow me to select any existing raster layers from the 'Input layer' ...
1
vote
0answers
42 views

QGIS does not polygonize [closed]

I have a .tif which I want to have polygonized. I take the Raster/Conversion/Raster to Polygon. QGIS 3.12 starts the process but never ends (once I waited half an hour). I maybe don't see a mistake. ...
1
vote
0answers
46 views

Converting lines to polygon based on matching attribute

In QGIS, is there a Plugin or a geoalgorithm that allows you to convert lines to polygons but incorporates a particular attribute? I have roadside kerbs which have a field for road name, and if ...
0
votes
0answers
22 views

Iteratively polygonize MultiLineString

I have an implementation of alpha-shape below. My goal is to compute the polygons for a list of alphas but do it as fast as possible. LineProfiler showed that almost all of the time is spent in list(...
2
votes
1answer
57 views

Polygonize area surrounded by buffer in QGIS

I have an automated system in QGIS that separates loops from GPX traces and works out their centroid using 'Polygonize' >> 'Keep N biggest parts' >> 'Centroids'. However, quite often it ...
5
votes
2answers
105 views

Merging cluster of points into polygons

This is my project: I want to convert all points that touch each other into polygons, something like this (I know I missed some of them): I tried using dissolve and convex hull to do that, but they ...
3
votes
1answer
48 views

Smoothing zone edges

I am currently recreating a hazard map that was processed by another program. Is there a tool/plugin available that can be used to smoothen out the rough edges of the grids? Attached is the current ...
2
votes
0answers
21 views

Polygonize RGB mage considering all 3 bands simultaneously

I'm using the rasterio.features.shapes method to generate GeoJSON information from a PNG file. This answer shows what I'm trying to do, except I need to analyze the RGB bands simultaneously otherwise ...
4
votes
1answer
80 views

Transforming line into polygon with Geometry Generator

I would like to turn my line into polygon in the symbology. I found some hint here: https://anitagraser.com/2017/04/08/a-guide-to-geometry-generator-symbol-layers/ but I am not sure of the expression, ...
0
votes
0answers
30 views

How do I draw polygons from aerial imagery?

I will be working on a project to automatically identify ponds from satellite imagery. I have uploaded the basemap into ArcMap 10.7, but I can't create a feature layer to start editing. How do I add a ...
0
votes
0answers
23 views

Clipping vector polygonised from raster

I have vector created by conversion of a raster to vector operation. I want to clip this vector file. While I am trying to do that, I am getting the below mentioned error: Feature (355) has invalid ...
0
votes
0answers
32 views

Which algorithm is being used in NetTopologySuite-1.15-pre2 for polygonization?

NetTopologySuite-1.15-pre2 (GeoAPI-1.7.4) has an implementaion of Polygonizer() as follows: using System.Collections.Generic; using GeoAPI.Geometries; namespace NetTopologySuite.Operation.Polygonize ...
0
votes
0answers
77 views

Which algorithm can I use to detect polygons from a set of line segments?

Say, I have a set of line segments. I need to check to see if they intersect to form any polygon or not. If they form any polygon, I need to detect and return them as a list. Say, I represent a line ...
1
vote
1answer
137 views

Error while converting raster to ploygon using stars package

I am trying to convert raster to polygon using stars package as suggested in this and this. I have used the following code library(raster) library(stars) library(sf) library(magrittr) #read raster r1&...
1
vote
1answer
29 views

QGIS, clip my vector data with a DEM raster

I know that I cannot simply clip vector data with raster data. I'm working in QGIS and I have vector point data of earthquakes (XYZ), and I have it projected on top of my raster data (.tif). However, ...
3
votes
2answers
332 views

Divide a polygon into multiple small polygons using a MultiLineString

I'm trying to divide a polygon grid into multiple smaller polygons basis their intersection with a MultiLineString using Shapely. Following code works good for LineString but not for intersecting ...
1
vote
0answers
27 views

QGIS polygonize TIFF results in strange vector

I used an open access data set of GeoTIFFs and used polygonize to transform them into vectors. For the majority of TIFFs this went well, except for two, which create strange longitudinal bars (see ...
0
votes
0answers
43 views

Polygonized a land use map (raster) in QGIS but the output is just a black shapefile. How do I fix this?

So, I have a land use map that I need to digitize. The changes in the map is very fine so it will take a long time to manually digitize it. When I used the Raster > Conversion > Polygonize (Raster to ...
0
votes
2answers
39 views

Two-value raster to generalized polygons (join pixels close together into one polygon) with short computation time in QGIS or ArcMap [closed]

I want to create application map for agriculture based on NDVI map. I have theoretical way how to do it. My raster has two values (1 - red, 0 - green), the raster is quite big (100 hectares with 6 ...
1
vote
0answers
24 views

Keeping same color when using “gdalogr:polygonize” function to polygonize segmented image

This is one example of images that I have: Now I want to polygonize it to get shapefile of different polygons. Every time I run this algorithm I get polygons of different colors but I want to keep ...
2
votes
0answers
29 views

Differences in counted population between raster and polygonized values - QGIS

I'm slightly puzzled with the "polygonize" tool in QGIS. I'm working on population data, and therefore have clipped the NASA SEDAC Population count raster to my country of interest (Mozambique). ...
1
vote
1answer
123 views

GDAL polygonize processing

I am a bit of a GIS beginner here. I've got an image mask in .jpg format that I'm trying to convert to a shapefile .shp format. To do so, I use the GDAL polygonize function. This is what the input ...
2
votes
0answers
54 views

Polygonize every single pixel of a raster

How can I get every pixel separated? When I calc unique values, if two pixels have the same value, it converts in one row in the final shape. I need every single pixel converted into one unique ...
0
votes
0answers
120 views

Using polygonizer to convert raster to shapefile in R

From https://ghsl.jrc.ec.europa.eu/download.php?ds=pop I have downloaded a .TIF file, that I am trying to convert into a .SHP file using R. I have loaded the file in R (as italy_raster and am trying ...
3
votes
1answer
80 views

Polygonizing LineString features to Polygon features and keeping Attribute table values using PyQGIS

I am trying to create a circular raster in Qgis3.8.3-Zanzibar with the Python console. I am able to make it with LineStrings (combine of Polyline and Circular String) and fill each feature with ...
1
vote
1answer
55 views

Conversion TIFF to shp, duplicates polygons [closed]

The purpose of my project is 512 KML tiles which represents an entire map. By editing the KML files I realized that there is redundancy of the polylines. So I look for why and it happens to the ...
2
votes
2answers
91 views

Erode islands of pixels while polygonizing a raster

I am polygonizing a single band raster. I am using gdal.Polygonize() function to vectorize the raster. img= r"C:\Users\aoi2.tif" src_ds = gdal.Open(img) srcband = src_ds.GetRasterBand(1) # create ...
2
votes
2answers
152 views

Densify and smooth out categorical raster with diagonal neighbors

I'm classifying vegetation types in QGIS (3.10). I have a pretty coarse raster that I want to smooth out. The standard approach seems to be to polygonize and then apply various smoothing algorithms (e....
1
vote
1answer
87 views

Error while running gdal:polygonize as a background task

I am trying to run gdal:polygonize as a background task, but I am getting QGIS crashing and giving me this error: QGIS died on signal 11ptrace: Operation not permitted. No thread selected No stack. ...
1
vote
1answer
162 views

How to make a polygon from contour lines extracted from a raster QGIS 3.6?

I'm trying polygonize the elevation level 200 m of Europe map from raster GeoTIFF (The raster is projected in EPSG:3120). At first I tried with Raster > Extraction > Contour, but the lines are ...
4
votes
3answers
224 views

Using QGIS polygonize tool to create discreet slope polygons

I am trying to create a shapefile with polygons representing areas of different slopes. I am running into some problems using the following workflow. I start with a digital elevation model and using ...
1
vote
1answer
136 views

Create polygons from raster with only a selected amount of features (not each pixel a different polygon)?

I am trying to convert a raster into different polygons. The raster is based on a DEM and only contains three classes (each pixel has value 1, 2 or 3, obtained by using the raster calculator). I want ...
0
votes
0answers
66 views

Converting multiple points to multiple polygons - ArcGIS Desktop 10.6.1

How can I convert multiple points to multiple (tiny polygons)? I need to execute a merge function and I need the points to be polygons so that the toolbox can do its job and join multiple polygon ...
3
votes
2answers
262 views

Polygonize specific raster values QGIS

I have a raster of 36 classes of the land cover in South Africa. However, I only need 4 of these classes and create a polygon out of these 4 classes combined. I have now used the raster calculator to ...
1
vote
0answers
45 views

How to display changes in lake's surface area over time in a polygon bounded region, in a table in earth engine?

The problem statement is that a region of interest is given. I need to find all the lakes in a polygon bounded region using the NDWI index for water bodies, which are at a height of more than 1500m. ...
1
vote
0answers
86 views

Coverting TIFF file by Raster Calculator in QGIS

My ultimate goal is same as here Here is my steps: The image is created using Python and saved as PNG format: Import the image into QGIS using Georeferencing tool and saved as TIFF: ...
1
vote
0answers
275 views

Convert a raster to a polygon with gdal in command line

I want to convert a raster (agric.tif) to a polygon layer (agric.shp). I want to use gdal in command line since the QGIS (raster to polygon) seems to takes for ever (still running over an hour). I am ...
1
vote
1answer
227 views

Invalid geometry error after polygonizing a GeoTIFF file

I wanted to clip an OSM vector layer with the boundaries of a raster image--a GeoTIFF file. I was able to polygonize the raster and obtain its boundary in a vector format. But I am getting a error ...
1
vote
0answers
233 views

GDAL - Polygonize multiband raster and save pixel values of each band to corresponding attribute fields

I'm trying to polygonize 2 band raster(which was previously reclassified) and put values of each band into seperate attribute table column. Both bands overlap each other perfectly. This piece of code ...
1
vote
1answer
115 views

ST_Polygonize/Shapely cannot polygonize when overlapping with shared node/point

I'm trying to use both polygonize_full (Shapely, python) and ST_Polygonize (postgis) to get all polygons from a set of line strings. There is one case where it fails: when there is an "overlapping ...
3
votes
1answer
691 views

Create polygons (representing boundaries) from lines

I received a file of municipality boundaries, where the boundaries are represented as lines. I would like to convert this to a set of polygons, each representing a municipality. In other words, from ...
2
votes
0answers
79 views

Unable to truly polygonize raster in QGIS [duplicate]

I've used QGIS's Polygonize to convert the following raster into outlines. The polygonize tool does produce a vector output, but it isn't in plain polygon form but some thousands of single pixel ...
2
votes
1answer
303 views

QGIS: Dissolve after raster-to-polygon not working correctly, only dissolving a portion of the vector layer

I am working with QGIS and am trying to convert a raster layer into a vector layer. I have converted it to a polygon from raster (image below), and then wish to dissolve this polygon into a single ...
0
votes
1answer
565 views

Constructing polygons from GDAL Polygonize?

I have a geotiff file, which, for each cell ( pixel), it contains a discrete value ( you can think of this value as the "fitness" value of the cell). For the neighboring cells, they can consist of the ...
2
votes
1answer
297 views

Finding a boundary with a collection of lines and a point

Given a collection of lines and a point how can I discover the closest boundary around the point. In the image below A represents a collection of disconnected lines and B is the boundary I want to ...
1
vote
1answer
1k views

Defining convex-hull of (clouds of) points using R? [closed]

I have multiple (clouds of) points, and would like to take the outer envelope of these points. This will allow me to polygonize my points. Using the convex-hull would help me, but in some cases, my ...
4
votes
3answers
783 views

Smoothing raster with binary cell values

Main question towards the end. Details follow now: I have a slope raster Region: Bern, Switzerland CRS: EPSG:2056 - CH1903+ / LV95 - Projected Extent: 2587757,...