Opened 12 years ago

Closed 5 years ago

#4480 closed enhancement (wontfix)

gdal_rasterize with -clump option

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

Description

Dear all,

I've tried to use gdal_rasterize to re-label n polygons of a shapefile as 1....n during the burning process. As far as I understood, the current version can use attribute fields and -burn option to pass the output values. However, this was not sufficient in this case as the internal unique polygon ID (feature/record number) is not visible as an attribute neither to gdal_rasterize nor ogrinfo.

To solve the problem, I modified gdal_rasterize.cpp and added -clump option. Please find the code attached. It complies and seems to produce the desired output, but I haven't tested it thoroughly.

Would it make sense to include this functionality in the forthcoming versions?

Best,

anssi

Attachments (1)

gdal_rasterize.cpp (33.6 KB ) - added by anssi 12 years ago.
gdal_rasterize with -clump option

Download all attachments as: .zip

Change History (2)

by anssi, 12 years ago

Attachment: gdal_rasterize.cpp added

gdal_rasterize with -clump option

comment:1 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.