Questions tagged [polygonize]

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

Filter by
Sorted by
Tagged with
2
votes
0answers
26 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
22 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
35 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
34 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 ...
2
votes
1answer
41 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
43 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
1answer
30 views

Erode islands of pixels while polygozing 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
29 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
54 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
61 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
94 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
63 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
33 views

Combining Multiples Linestrings into Polygon (Turf.js)

My main goal is to combine linestrings into a polygon. Is there a way to accomplish this using a library like Turf.js, or are there any geometrical rules to follow ? I Tried building the concave hull ...
0
votes
0answers
58 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 ...
1
vote
0answers
33 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
48 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: ...
0
votes
0answers
160 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
103 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
144 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
0answers
52 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 ...
1
vote
1answer
241 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
68 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
168 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
379 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 ...
1
vote
1answer
716 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 ...
3
votes
3answers
352 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,...
0
votes
1answer
199 views

Translating gdal.polygonize from qgis 2 to 3

I was using this simple code to polygonize rasters using qgis 2.18: general.runalg('gdalogr:polygonize', inRaster, 'DN', outShape) I've tried converting it to use in qgis 3.2 like so: general.run('...
1
vote
0answers
272 views

Polygonizing raster cells in rasterio regardless of value?

I would like to polygonize every single cell of a raster dataset using rasterio. I have been experimenting with the following function based on this question: def polygonize_raster(dataset): # ...
1
vote
0answers
42 views

Enable additional providers?

I try to apply the apply the function of raster to vector from "Raster -> Conversion -> Polygonize", but it appears like follows: An error has occurred while executing Python code: UnicodeDecodeError:...
1
vote
1answer
222 views

Vectorize raster

I'd like to vectorise the Natural Earth II raster in order to be able to change its colours and display it with as a vector map. Using gdal_polygonize.py won't help as it will create 1 polygon per ...
2
votes
0answers
33 views

Processing tool to fill all voids within a lines layer

I'm trying to convert a lines layer from Ordnance Survey which is made up of field boundaries, river banks, woodland boundaries and houses etc into a polygon layer, but only 'polygonise' the fields. ...
2
votes
2answers
515 views

How to polygonise a large and detailed raster into a single valid polygon with QGIS?

I am doing research on the protected areas of the Amazon rainforest and I need to create a single polygon layer that has all the forested non-protected areas in one attribute row. I have tried using ...
1
vote
0answers
57 views

Polygonize lines and retain attribute

I need to apply Polygonize tool to several hundred shapefiles with Graphic Modeler tool. However, the Polygonize tool empties the attribute table - and I need to retain at least one of the attributes. ...
0
votes
0answers
52 views

Store Huge Polygonized Raster Files

I have the following requirement, currently I have 100 Raster files with precipitation data for each week represented in 52 layers. I have to load these Raster files in a system that can only work ...
2
votes
1answer
342 views

Gdal Polygonize, empty attribute table

I am trying to polygonize one of my rasters with PyGIS. I do this with the below script. sourceRaster = gdal.Open('RASTER.tiff') sr_proj=sourceRaster.GetProjection() raster_proj = osr....
2
votes
2answers
299 views

Polygonize a multi-band raster

I have a polygon and I want to estimate areas of different types of land cover tha falls within the polygon. The problem is that the only freely available land cover data I found is https://catalogue....
3
votes
1answer
735 views

QGIS 3.0.3 python error “/bin/sh: gdal_polygonize.py: command not found”

I have recently downloaded QGIS on my Mac to preform an analysis for my dissertation. I am trying to convert my raster data to polygon data using the gdal_polygonize.py tool provided by QGIS. ...
1
vote
1answer
673 views

“LineStrings must have at least 2 coordinate tuples” error in QGIS polygonize [closed]

I am using QGIS version 2.18.9. I wanted to convert DXF into polygon. First, I used the tool called "v.in.dxf" under the processing tool. Using that tool, line shapefile was created. Then I ran the "v....
1
vote
0answers
130 views

Polygonizing distinct values using QGIS?

I am using QGIS 3.0.3 and I am trying to create simulated data through two sets random points distributed along two gradients of values (photo below). Using the raster calculator I created two ...
1
vote
1answer
458 views

Polygonize tool not giving output in QGIS?

I am very new to QGIS (long time ESRI user that is making the transition). I am using QGIS 3.0.3 and I am trying to make polygons from a raster layer by value. Unfortunately every time that I ...
2
votes
1answer
466 views

Batch Polygonize rasters into shp file using gdal_polygonize.py but no result?

I'm trying to use and recreate this code from Using GDAL polygonize from Python? import subprocess, glob script = "/usr/bin/gdal_polygonize.py" for raster in glob.glob("/data/brent/GAUP/Jul21_17-...
1
vote
1answer
419 views

QGIS 2.18 Polygonize (raster to vector)

I'm a bit confused about how to use polygonize (raster to vector). Particularly what to put in the field name box. The documentation states that it "Defines the field name in which the attributes of ...
1
vote
1answer
701 views

How to create polygon from my coastline in qgis? [duplicate]

I've downloaded the data from Natural Earth (coastline at a scale 50 million), I've cut the coastline into my study area, I wanted to clip other vector datasets as well, for this I wanted to convert ...
2
votes
1answer
426 views

Polygonize tool error

I'm using Qgis 3.0.1 and trying to polygonize a raster layer. I'm getting the following error: Processing algorithm… AlgorithmDialog Input parameters: { 'INPUT' : 'crs=EPSG:4326&dpiMode=7&...
1
vote
1answer
773 views

Output field name when using gdal.Polygonize() in python

I am trying to Polygonize one raster image that previously I convert to 1s and 0s. If I do it from QGIS, there is the option to select the output field name, which stores as attributes the value of ...
1
vote
0answers
170 views

Estimating processing time for rasterize or polygonize tools in QGIS?

I often rasterize or polygonize large layers (flood modelling results). Is there a way I can estimate how long the tool will take? Sometimes, I'm not sure whether it will take 10 minutes or 10 ...
1
vote
0answers
271 views

Summarizing GPS coordinates inside polygon in Google My Maps? [closed]

I need to set up the most effective routes to visit different locations. I have several teams to visit the locations depending on where they are. I am given Latitude and Longitude of all the locations....
5
votes
1answer
257 views

Make ST_Polygonize in Postgis return dangles, cuts and invalid rings

Postgis allows using ST_Polygonize() from GEOS to make polygons out of lines. I have seen the same function available in Shapely library for Python, but in Shapely, the other method named ...
0
votes
1answer
229 views

gdal polygonize can't create .gkpg file [closed]

I'm currently trying to take a .tif file and polygonize it, I can do this if the output file format is a .shp but when I try to make a .gkpg file I get this error: Traceback (most recent call last): ...
2
votes
1answer
593 views

How to avoid self-intersections in geometry created by GDAL Polygonize in Python

I am creating geometry from a raster using GDAL Polygonize in Python. My issue is that doing this creates a lot of self intersection errors. This seems to occur due to the nature of the pixel grid. I ...