[GRASS-user] gdal - r.in.onearth

I tried to download some landsat7 pictures by r.in.onearth, but I got the following errormessage (see the end of the message).
Should I recompile the gdal (if yes, whitch option used) or any other workarounds proposed?

Thank You

Tomas

p.s.: using Grass 6.3.CVS and 6.2.1 on Ubuntu Feisty Fawn

Downloaded file is not a GeoTiff file, but will try to import
************** CHECK DATA *****************
ERROR 4: `/home/tomas/grassdata/Slovakia/PERMANENT/.tmp/thor/20010.0/Image_global_mosaic_base_visual__' not recognised as a supported file format.

GDALOpen failed - 4
`/home/tomas/grassdata/Slovakia/PERMANENT/.tmp/thor/20010.0/Image_global_mosaic_base_visual__' not recognised as a supported file format.

ERROR 4: `/home/tomas/grassdata/Slovakia/PERMANENT/.tmp/thor/20010.0/Image_global_mosaic_base_visual__' not recognised as a supported file format.

GDALOpen failed - 4
`/home/tomas/grassdata/Slovakia/PERMANENT/.tmp/thor/20010.0/Image_global_mosaic_base_visual__' not recognised as a supported file format.

!-------------------BREAK---------------------!
Downloaded file is not supported by gdal, or cannot be imported
File of Type: " XML

Message from Server http://wms.jpl.nasa.gov/wms.cgi

!------------BEGIN-ERROR-MESSGAE--------------!
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://www.digitalearth.gov/wmt/xml/exception_1_1_0.dtd ">
<ServiceExceptionReport version="1.1.0">
   <ServiceException>
     Bounding box has an invalid area
   </ServiceException>
</ServiceExceptionReport>
!-------------END-ERROR-MESSGAE---------------!

========
Finished

Tomas Lanczos wrote:

I tried to download some landsat7 pictures by r.in.onearth, but I got
the following errormessage (see the end of the message).
Should I recompile the gdal (if yes, whitch option used) or any other
workarounds proposed?

..

p.s.: using Grass 6.3.CVS and 6.2.1 on Ubuntu Feisty Fawn

Downloaded file is not a GeoTiff file, but will try to import
************** CHECK DATA *****************
ERROR 4:
`/home/tomas/grassdata/Slovakia/PERMANENT/.tmp/thor/20010.0/Image_glo
bal_mosaic_base_visual__' not recognised as a supported file format.

At least $HEIGHT and $WIDTH are missing from the name of the file.

They are set by `g.region -gb` rows,cols.

but for me (spearfish) that gives:

G63> g.region -b
pj_transform() failed
cause: failed to load NAD27-83 correction file
ERROR: Error in pj_do_proj (projection of input coordinate pair)

that doesn't look good.

do you see the same?

maybe something to do with g.region/cmd/printwindow.c Rev 2.20+
http://freegis.org/cgi-bin/viewcvs.cgi/grass6/general/g.region/cmd/printwindow.c

you say it fails with 6.2.1? that was before those changes.

for me it fails in 6.3-cvs in the same way (due to g.region bug), and
works in 6.2.1.

Ubuntu: try changing the first line of the script to #!/bin/bash

Hamish

On Fri, May 11, 2007 at 12:53:21AM +1200, Hamish wrote:
...

G63> g.region -b
pj_transform() failed
cause: failed to load NAD27-83 correction file
ERROR: Error in pj_do_proj (projection of input coordinate pair)

that doesn't look good.

(as you will know)
It indicates that
http://proj.maptools.org/
-> proj-datumgrid-1.3.zip
    ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.3.zip

wasn't expanded in nad/ before compiling proj4.

Markus

Tomas Lanczos wrote:

I tried to download some landsat7 pictures by r.in.onearth, but I got the following errormessage (see the end of the message).
Should I recompile the gdal (if yes, whitch option used) or any other workarounds proposed?

Tomas,

The error doesn't really have anything to do with GDAL. The problem is
that r.in.onearth is making an invalid request to the onearth server
as explained in the returned XML error message (which GDAL can't read
since it isn't an image).

I think you either need to review your arguments to r.in.onearth or
the r.in.onearth program has a bug.

Message from Server http://wms.jpl.nasa.gov/wms.cgi

!------------BEGIN-ERROR-MESSGAE--------------!
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://www.digitalearth.gov/wmt/xml/exception_1_1_0.dtd ">
<ServiceExceptionReport version="1.1.0">
  <ServiceException>
    Bounding box has an invalid area
  </ServiceException>
</ServiceExceptionReport>
!-------------END-ERROR-MESSGAE---------------!

--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org

Hamish:

> G63> g.region -b
> pj_transform() failed
> cause: failed to load NAD27-83 correction file
> ERROR: Error in pj_do_proj (projection of input coordinate pair)
>
> that doesn't look good.

Markus:

(as you will know)
It indicates that
http://proj.maptools.org/
-> proj-datumgrid-1.3.zip
    ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.3.zip

wasn't expanded in nad/ before compiling proj4.

The error was because I had changed the region to match a XY raster,
well outside of the location's nad grid file coverage.

### Spearfish60 location
G63> g.region rast=elevation.dem
G63> g.region -b
north longitude: 44:30:05.90947N
south longitude: 44:22:23.520696N
west latitude: 103:52:14.440271W
east latitude: 103:37:45.943809W
center latitude: 103:45:00.19204W
center longitude: 44:26:14.715083N

G63> g.region rast=xy2 -p
projection: 1 (UTM)
zone: 13
datum: nad27
ellipsoid: clark66
north: 1025
south: -1025
west: -1025
east: 1025
nsres: 50
ewres: 50
rows: 41
cols: 41
cells: 1681

G63> g.region -b
pj_transform() failed
cause: failed to load NAD27-83 correction file
ERROR: Error in pj_do_proj (projection of input coordinate pair)

I have seen this before when overlaying a geo-grid on a country-scale
zoom.

At minimum, the error message is misleading and should be changed.
It would be nicer if we could somehow know the extents of the nad file
and produce an out-of-region error instead.

r.in.onearth is not in GRASS CVS, otherwise about now I'd add a
if [ $? -ne 0 ] ; then
  echo "There was a problem"
  exit 1
fi
test just after the g.region call in the script.

Hamish

Hamish:
> > G63> g.region -b
> > pj_transform() failed
> > cause: failed to load NAD27-83 correction file
> > ERROR: Error in pj_do_proj (projection of input coordinate pair)
> >
> > that doesn't look good.

Markus:
> (as you will know)
> It indicates that
> http://proj.maptools.org/
> -> proj-datumgrid-1.3.zip
> ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.3.zip
>
> wasn't expanded in nad/ before compiling proj4.

Hamish:

The error was because I had changed the region to match a XY raster,
well outside of the location's nad grid file coverage.

this is bug #4028 by the way.
  https://intevation.de/rt/webrt?serial_num=4028

Hamish

Hi,
i have fixed this issue. A new grass6.3-cvs compatible version
available from the grass add-on page.

The reason for this behaviour was the changes of the -bg options in g.region.

Now it should work with grass6.3.

Best regards
Soeren

Tomas Lanczos schrieb:

I tried to download some landsat7 pictures by r.in.onearth, but I got the following errormessage (see the end of the message).
Should I recompile the gdal (if yes, whitch option used) or any other workarounds proposed?

Thank You

Tomas

p.s.: using Grass 6.3.CVS and 6.2.1 on Ubuntu Feisty Fawn

Downloaded file is not a GeoTiff file, but will try to import
************** CHECK DATA *****************
ERROR 4: `/home/tomas/grassdata/Slovakia/PERMANENT/.tmp/thor/20010.0/Image_global_mosaic_base_visual__' not recognised as a supported file format.

GDALOpen failed - 4
`/home/tomas/grassdata/Slovakia/PERMANENT/.tmp/thor/20010.0/Image_global_mosaic_base_visual__' not recognised as a supported file format.

ERROR 4: `/home/tomas/grassdata/Slovakia/PERMANENT/.tmp/thor/20010.0/Image_global_mosaic_base_visual__' not recognised as a supported file format.

GDALOpen failed - 4
`/home/tomas/grassdata/Slovakia/PERMANENT/.tmp/thor/20010.0/Image_global_mosaic_base_visual__' not recognised as a supported file format.

!-------------------BREAK---------------------!
Downloaded file is not supported by gdal, or cannot be imported
File of Type: " XML

Message from Server http://wms.jpl.nasa.gov/wms.cgi

!------------BEGIN-ERROR-MESSGAE--------------!
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://www.digitalearth.gov/wmt/xml/exception_1_1_0.dtd ">
<ServiceExceptionReport version="1.1.0">
  <ServiceException>
    Bounding box has an invalid area
  </ServiceException>
</ServiceExceptionReport>
!-------------END-ERROR-MESSGAE---------------!

========
Finished

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser