Opened 21 years ago

Last modified 18 years ago

#313 closed defect (fixed)

ArcInfo asciigrid maps: floats are rounded to nearest int

Reported by: e.pebesma@… Owned by: warmerdam
Priority: high Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc: Markus Neteler

Description

When reading an ArcGIS asciigrid/gridascii map, floating point values are
rounded to the nearest integer. The map I used starts with a large number
of NODATA values, coded -9999; you'll find the map at
http://www.gstat.org/test.gdal

Attachments (1)

test_minmax.cpp (952 bytes ) - added by Mateusz Łoskot 18 years ago.
Source code of the test_minmax

Download all attachments as: .zip

Change History (4)

comment:1 by neteler@…, 19 years ago

Frank,

does this problem persist? I would like to retire
r.in.arc in GRASS 5.7 *if* r.in.gdal/GDAL does the job
"lossless".

Here the related thread:

http://grass.itc.it/pipermail/grass5/2004-November/016242.html

Best regards

 Markus Neteler

comment:2 by neteler@…, 18 years ago

From the list:

Mateusz Loskot wrote:
> Christopher,
>
> After Bug 1071
> (http://bugzilla.remotesensing.org/show_bug.cgi?id=1071)
> has been fixed, the AAIGrid driver scans the whole file
> to search for floatpoint values.
> So, now it should be no difference if the float-point value is in the
> first 100 bytes or after this junk.
>
> Bryan,
>
> What version of GDAL are you using?
> Have you tested with latest 1.3.2 or CVS?
>
> Best regards
> --
> Mateusz Loskot

http://bugzilla.remotesensing.org/show_bug.cgi?id=1071

Apparently this report can be closed?

Best,
Markus

comment:3 by Mateusz Łoskot, 18 years ago

(In reply to comment #2)
> 
> http://bugzilla.remotesensing.org/show_bug.cgi?id=1071
> 
> Apparently this report can be closed?

Markus, you're right. Thank you very much for pointing this bug report.
So, I'm closing it now.

BTW, I tested attached test.gdal dataset with current
CVS version of GDAL and it works well:

mloskot:~/dev/gdal/bugs/313$ ./test_minmax test.asc
GDAL: AAIGDataset::Open() with dataset: test.asc.

GDAL: GDALOpen(test.asc) succeeds as AAIGrid.

Min: 128.434
Max: 1805.78
GDAL: GDALClose(test.asc)

The test_minmax fetches min/max value of raster and if float values are properly
returned, no matter where they are placed in the AAIGrid dataset, then it means this bug is fixed, as well as Bug 1071.
I'm attaching test_minmax.cpp program, to have it in archives.

by Mateusz Łoskot, 18 years ago

Attachment: test_minmax.cpp added

Source code of the test_minmax

Note: See TracTickets for help on using tickets.