[gdal-dev] How do I find the anchor point in file?

Todd Smith smith.todd at gmail.com
Wed Nov 17 13:37:00 EST 2010

Looking into it more closely, a setting was incorrect in my parameter file
that my code was referencing.  It was allocating the wrong size buffer
because it was thinking it was creating RGB data instead of elevation data.
No bug, and now no more problems.



On Wed, Nov 17, 2010 at 10:32 AM, Frank Warmerdam <warmerdam at pobox.com>wrote:

> Todd Smith wrote:
>> Yeah and a little more investigation on my part showed me that Arc/Info
>> ASCII Grid files have their origin in the upper left anyway, even though
>> they have their lat/long coords in the lower left.  This is from
>> gCore\rasterio.cpp (line 243in 1.6.2).  In my RGB reads, with a nPixelSpace
>> of 3 and a nBufDataSize of 1, I could get away get away with having GDAL
>> "flip" my file data for me by using a negative value for nLineSpace because
>> GDALCopyWords handled that.  Memcpy doesn't do well with a negative value
>> for nLineSpace :).  It looks like I'll have to have another function flip my
>> buffer from top to bottom after my RasterIO call.
> Todd,
> Negative values are supposed to be accepted for line spacings.  If you have
> found a case where it fails please file a ticket on the issue.
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20101117/b8547cf9/attachment.html

More information about the gdal-dev mailing list