Re: [gdal-dev] GDALPolygonize using float buffers

2011-05-18 Thread Frank Warmerdam

On 11-05-18 06:44 AM, Jorge Arévalo wrote:

I'm using the AlmostEqual2sComplement function from
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
to float comparison. Do you think it's a good approach?


Jorge,

The approach seems good though somewhat computationally expensive.

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] GDALPolygonize using float buffers

2011-05-18 Thread Jorge Arévalo
Hello,


On Fri, May 13, 2011 at 4:00 PM, Frank Warmerdam  wrote:
> 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?
>

I'm using the AlmostEqual2sComplement function from
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
to float comparison. Do you think it's a good approach?


> 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.
>

Of course. I've created new algorithms for this (most of the parts
cloning the original ones). I'ts kinda duplicating code, but I don't
want to interfere with the original functions.

> That said, I'm ok with extending the function to support floating point
> bands.
>

Good :)


> Best regards,
> --
> ---+--
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmer...@pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>

Best regards,

-- 
Jorge Arévalo
Internet & Mobilty Division, DEIMOS
jorge.arev...@deimos-space.com
http://es.linkedin.com/in/jorgearevalo80
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] GDALPolygonize using float buffers

2011-05-13 Thread Frank Warmerdam

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, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev