Opened 6 years ago

Closed 5 years ago

#7263 closed enhancement (wontfix)

Add gdal_fpolygonize.py

Reported by: afantini Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

The gdal_polygonize.py script provides a handy interface to the function GDALPolygonize.

By default this truncates float data to integer. It would be nice to have a gdal_fpolygonize.py script (or a flag to gdal_polygonize.py) that does the same using the function GDALFPolygonize, which does not truncate floats.

It's extremely easy to modify gdal_polygonize.py to make it output float data. It's sufficient to replace Polygonize with FPolygonize everywhere, GetRasterBand(int(src_band_n[len('mask,'):])) with GetRasterBand(src_band_n[len('mask,'):]) and ogr.OFTInteger with ogr.OFTReal.

Change History (3)

comment:1 by Even Rouault, 6 years ago

I'd be in favor of a -real flag to existing gdal_polygonize.py. Feel free to submit a pull request against https://github.com/OSGeo/gdal

comment:2 by afantini, 6 years ago

I agree that would be the best solution.

comment:3 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.