Monday 18 November 2019

python - Why is GDALPolygonize so much slower than ArcGIS Raster to Polygon?


I am attempting to polygonize a raster using GDALPolygonize() in a Python script. The script began polygonizing yesterday at 5pm and is still polygonizing now at 9:30 am. I have no clue how far along it is, but I know it is still going because when I refresh my Windows explorer I can see the file size change for the output shapefile.


My raster is rather large, but I still don't expect it to take this long. My raster is 35,486 Columns and 23,682 Rows with a 1 meter cell size. It is a binary raster where a value of 1 represents data and 0 is NoData.


When I polygonized in ArcGIS using Raster to Polygon in the Conversion Toolbox it took 56 seconds. The resulting shapefile is 200mb while the shapefile still being created by GDALPolygonize is still only 100mb. That makes me think GDAL is about half way done after running all night.


Specs: Windows 7 64bit, 8gb RAM, GDAL 1.10 64bit, ArcGIS Desktop 10.2, 64bit Background Geoprocessing for ArcGIS Desktop, Python 2.7.3 64bit


UPDATE Day 2 - GDALPolygonize is still running. It has gone overnight 2 nights in a row and through a whole day without completing. ArcGIS took 56 seconds.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...