[gdal-dev] GDALPolygonize using float buffers
Frank Warmerdam
warmerdam at pobox.com
Fri May 13 10:00:16 EDT 2011
On 11-05-13 06:51 AM, Jorge Arévalo wrote:
> Hello,
>
> Is there any reason to limit the GDALPolygonize function to read data
> in int32 buffers, instead of using 32b float or even 64b double ones?
> As I stated in ticket #4005 (http://trac.osgeo.org/gdal/ticket/4005),
> I want to code an alternative version using these kind of buffers. But
> I don't know if I'm missing something.
Jorge,
There are no *compelling* reasons to limit polygonization to integer
data, but once you get into floating point data lots of questions do
arise about value comparisons will be done - will it be a "within
epsilon" sort of test or are you looking for exact floating point matches?
If a floating point option is available, I think there will still need to
be a version of the algorithm operating on integer buffers to avoid
problems representing some integer values in floating point and potentially
more expensive comparisons.
That said, I'm ok with extending the function to support floating point
bands.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list