[GRASS-user] Error on importing ESRI grid into GRASS 7

Hi,

I receive the following error on importing an ESRI binary grid file into
GRASS 7.

I guess that the error can be ignored as the imported file type is float32
so there is no .vat file? I'm not sure if related to GRASS or GDAL?

Cheers,
Richard

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Error-on-importing-ESRI-grid-into-GRASS-7-tp5175645.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Sun, Nov 30, 2014 at 6:18 AM, RichardCooper <richtcooper@hotmail.com> wrote:

Hi,

I receive the following error on importing an ESRI binary grid file into
GRASS 7.

Since nabble didn't propagate the error to the list (at least for me),
here a copy:

r.in.gdal input=../GRUMP/ESRIGRID/tha_grumpv1_pdens_00_grid_30/thauds00ag/w001001.adf
output=w001001
ERROR 3: EOF encountered in ../GRUMP/ESRIGRID/tha_grumpv1_pdens_00_grid_30/thau
ds00ag/../info/arc.dir after reading 0 bytes while trying to
read 32 bytes. File may be corrupt.
ERROR 4: Failed to open table thauds00ag.VAT
Raster map <w001001> created.
r.in.gdal complete.

I guess that the error can be ignored as the imported file type is float32
so there is no .vat file? I'm not sure if related to GRASS or GDAL?

The error is related to GDAL: Perhaps
https://trac.osgeo.org/gdal/ticket/2447
https://trac.osgeo.org/gdal/ticket/3031

Your GDAL version GDAL/OGR: 1.9.2
(Platform: Linux-3.2.0-31-generic-pae-i686-with-LinuxMint-13-maya)

is perhaps a bit old. Any chance that you update to GDAL 1.11.x?

Markus

On Tue, 2 Dec 2014, Markus Neteler wrote:

Your GDAL version GDAL/OGR: 1.9.2 is perhaps a bit old. Any chance that
you update to GDAL 1.11.x?

   1.11.1 is now available ... at least for Slackware. So I assume the source
is readily available for all to build regardless of distribution.

Regards,

Rich

I upgraded GDAL to 1.10.0 (via the Ubuntu repository) and the GRASS instance,
but the error still persists.

I'll try compiling GDAL from source (1.11.1) but will need to investigate
configure options, which appear numerous, before applying to my system,
e.g.,
http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#GDAL

Richard

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Error-on-importing-ESRI-binary-grid-into-GRASS-7-tp5175645p5175941.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Tue, Dec 2, 2014 at 10:39 AM, RichardCooper <richtcooper@hotmail.com> wrote:

I upgraded GDAL to 1.10.0 (via the Ubuntu repository) and the GRASS instance,
but the error still persists.

Could you make the file (offlist) available for testing?

Markus

On Tue, Dec 2, 2014 at 10:49 AM, Markus Neteler <neteler@osgeo.org> wrote:

On Tue, Dec 2, 2014 at 10:39 AM, RichardCooper <richtcooper@hotmail.com> wrote:

I upgraded GDAL to 1.10.0 (via the Ubuntu repository) and the GRASS instance,
but the error still persists.

Could you make the file (offlist) available for testing?

Thanks, got it.

So, it also fails with GDAL 1.10.x but works ok with GDAL 1.11.x:

[neteler@giscluster grumpv1]$ gdal-config --version
1.11.0

[neteler@giscluster grumpv1]$ gdalinfo thauds00g
Driver: AIG/Arc/Info Binary Grid
Files: thauds00g
       thauds00g.aux
       thauds00g/w001001x.adf
       thauds00g/metadata.xml
       thauds00g/prj.adf
       thauds00g/w001001.adf
       thauds00g/log
       thauds00g/dblbnd.adf
       thauds00g/hdr.adf
       thauds00g/sta.adf
Size is 1320, 1920
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        TOWGS84[0,0,0,0,0,0,0],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9108"]],
    AUTHORITY["EPSG","4326"]]
Origin = (96.000000000000000,20.999999999936001)
Pixel Size = (0.008333333333300,-0.008333333333300)
Corner Coordinates:
Upper Left ( 96.0000000, 21.0000000) ( 96d 0' 0.00"E, 21d 0' 0.00"N)
Lower Left ( 96.0000000, 5.0000000) ( 96d 0' 0.00"E, 5d 0' 0.00"N)
Upper Right ( 107.0000000, 21.0000000) (107d 0' 0.00"E, 21d 0' 0.00"N)
Lower Right ( 107.0000000, 5.0000000) (107d 0' 0.00"E, 5d 0' 0.00"N)
Center ( 101.5000000, 13.0000000) (101d30' 0.00"E, 13d 0' 0.00"N)
Band 1 Block=256x4 Type=Float32, ColorInterp=Undefined
  Description = thauds00g
  Min=0.000 Max=32565.402
  NoData Value=-3.4028234663852886e+38
  Metadata:
    LAYER_TYPE=athematic

[neteler@giscluster grumpv1]$ gdalinfo thauds00ag
Driver: AIG/Arc/Info Binary Grid
Files: thauds00ag
       thauds00ag.aux
       thauds00ag/w001001x.adf
       thauds00ag/metadata.xml
       thauds00ag/prj.adf
       thauds00ag/w001001.adf
       thauds00ag/log
       thauds00ag/dblbnd.adf
       thauds00ag/hdr.adf
       thauds00ag/sta.adf
Size is 1320, 1920
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        TOWGS84[0,0,0,0,0,0,0],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9108"]],
    AUTHORITY["EPSG","4326"]]
Origin = (96.000000000000000,20.999999999936001)
Pixel Size = (0.008333333333300,-0.008333333333300)
Corner Coordinates:
Upper Left ( 96.0000000, 21.0000000) ( 96d 0' 0.00"E, 21d 0' 0.00"N)
Lower Left ( 96.0000000, 5.0000000) ( 96d 0' 0.00"E, 5d 0' 0.00"N)
Upper Right ( 107.0000000, 21.0000000) (107d 0' 0.00"E, 21d 0' 0.00"N)
Lower Right ( 107.0000000, 5.0000000) (107d 0' 0.00"E, 5d 0' 0.00"N)
Center ( 101.5000000, 13.0000000) (101d30' 0.00"E, 13d 0' 0.00"N)
Band 1 Block=256x4 Type=Float32, ColorInterp=Undefined
  Description = thauds00ag
  Min=0.000 Max=32764.812
  NoData Value=-3.4028234663852886e+38
  Metadata:
    LAYER_TYPE=athematic

--> all fine.

In the Fedora/RPM world there is "mock" to easily recompile a newer
package for a local machine.
Something similar will exist for Mint/Ubuntu etc. in order to avoid to
mess around manually with configure options.

hope this helps,
Markus

I'll take a look at 'mock'.

To confirm, I also tried importing into my Windows installation with GDAL
1.11.0 and no errors were output.

Although errors were output in the Linux installation (GDAL 1.10.0), a
comparison of univariate statistics from the imported file in the Windows
machine indicates that the entire file imported without error.

Cheers,
Richard

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Error-on-importing-ESRI-binary-grid-into-GRASS-7-tp5175645p5176479.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Thu, Dec 4, 2014 at 3:26 PM, RichardCooper <richtcooper@hotmail.com> wrote:

I'll take a look at 'mock'.

Should be as easy as that:

1) take a build:
Information for build gdal-1.11.1-3.fc22
http://koji.fedoraproject.org/koji/buildinfo?buildID=596164
--> src gdal-1.11.1-3.fc22.src.rpm ... (download)

2) Download it

3) check which architecture you want:
    ls -la /etc/mock/

4 ) compile the RPMs for your architecture (eg Fedora 20, 64bit):

mock -r fedora-20-x86_64 --rebuild gdal-1.11.1-3.fc22.src.rpm

This will compile the binaries and create the RPM files.

5) Install them:
   cd /var/lib/mock/fedora-20-x86_64/result/
    yum localinstall gdal....rpm

done.

To confirm, I also tried importing into my Windows installation with GDAL
1.11.0 and no errors were output.

Excellent.

Although errors were output in the Linux installation (GDAL 1.10.0), a
comparison of univariate statistics from the imported file in the Windows
machine indicates that the entire file imported without error.

OK fine.

Markus