Skip to main content

Questions tagged [gdal-polygonize]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
65 views

How could I set 8CONNECTED into gdal.Polygonize()

I've seen in several web pages and examples the next snippet: gdal.Polygonize(band, maskband, polygonizedLayer, ndField, [], callback=None) but I don't understand how to use the options parameter. In ...
Francisco Ruiz's user avatar
3 votes
1 answer
130 views

Chain the output of gdal_polygonize to ogr2ogr

I am doing a two step process: Polygonize a PNG raster via gdal_polygonize.py Add a custom field named id Upload the resulting vector to PostGIS via ogr2ogr I am currently doing it in two steps, ...
illpack's user avatar
  • 91
1 vote
1 answer
134 views

no feature ID when polygonizing raster with python GDAL

I'm trying to polygonize the following binary raster: The output is a polygon layer (ESRI shapefile) that looks good, however, doesn't have FIDs for the features and thus I am not able to iterate ...
mnowatzki's user avatar
2 votes
0 answers
240 views

Polygonize tool error "Process gdal_polygonize.bat failed to start"

I am trying to use the Polygonize (Raster to Vector) tool on QGIS-LTR on Windows 11. When I launch the tool on a layer I get the following error. Input parameters: { 'BAND' : 1, 'EIGHT_CONNECTEDNESS' :...
Elia's user avatar
  • 21
1 vote
0 answers
156 views

QGIS - converting categorical raster to polygon includes raster boundary

I am using the QGIS Raster Convert Raster to Polygon tool (which calls gdal_polygonize under the hood), to convert a raster in a netcdf file to a polygon. The raster is a binary mask. The issue is ...
Brendan's user avatar
  • 93
0 votes
1 answer
187 views

Unable to extract all points when converting TIFF file to shapefile using gdal_polygonize.py

UPDATE I came to know that the gdal_polygonize.py is not the right tool for my purpose. My aim is to convert the TIFF file to shapefile, so that I can get the elevation points. I already did the ...
Abhilash's user avatar
1 vote
0 answers
73 views

Trying to run gdal:polygonize on all .img files in directory

In QGIS PY console, I'm attempting to run gdal:polygonize as a subprocess in order convert all files in a directory into ESRI shapefiles. Using the code below and receiving the error that follows. ...
actualJeff's user avatar
2 votes
1 answer
288 views

gdal_polygonize not converting raster values

I am trying to convert a weather radar geoTIF to geoJSON using gdal_polygonize. I am sharing the original .tif on google drive : https://drive.google.com/file/d/1p2eE0QUtNypNjs5Qb9JBfXrDdMd8Ifpb/view?...
David 's user avatar
  • 242
0 votes
1 answer
310 views

Gdal_polygonize and gdaltindex error

I'm trying to convert .tif file to .geojson using following cmd: gdal_polygonize.py flowdirection.tif -f "ESRI Shapefile" flowdirection_shp.shp After which I'm getting error: Program '...
Omkar Kadlag's user avatar
1 vote
1 answer
428 views

Converting .tif files to vector MBTiles by using gdal_polygonize

I am trying to use GDAL 2.2.2 and the gdal_polygonizecommand to convert a TIF into vector MBtiles from the link: https://github.com/geostarters/gdal_snipets I run the following command on the tif as ...
Ian23's user avatar
  • 75
1 vote
1 answer
347 views

gdal_polygonize slow

I am trying to convert 1400 tiff files to GeoJson..tif file size ranges from 20 mb to 1Gb. gdal_polygonize.py is taking 24 hours for Big files 5 hours for small files. Any way to improve performance?
vishal's user avatar
  • 11
0 votes
0 answers
263 views

Negative areas after polygonize in QGIS

I have been trying to convert this raster data using QGIS's Polygonize function: https://daac.ornl.gov/VEGETATION/guides/Decadal_LULC_India.html The converted geopackage is returning many geometries ...
ishi's user avatar
  • 1
5 votes
2 answers
6k views

Converting raster pixels to polygons with GDAL python

I want to convert raster pixels to vector polygons as below image that is output of "Processing Toolbox--> Vector Creation--> Raster pixels to polygons" in QGIS 3.8: I tried to do this vectorize with ...
HMadadi's user avatar
  • 1,046