Hamish wrote:
Richard Chirgwin wrote:
I am trying to access layers on the Geosciences Australia
OGC Web Map server:
http://www.ga.gov.au/wms/getmap?dataset=national&request=getCapabilities
.....
Hamish:
I'll be kind and say GRASS because /technically/ the other end conforms
to the WMS spec. The problem was that the other end does not accept
queries in the form of HTTP POST data.
[r.in.wms -g flag added to deal with that; this works:]
r.in.wms -l -g mapserv="http://www.ga.gov.au/wms/getmap?dataset=national&";

# search for Gold:
r.in.wms mapserv="http://www.ga.gov.au/wms/getmap?dataset=national&"; \
  -g layers=au_occdd output=au_gold format=tiff
....
ps- sorry if this email is wrapping at about char 90, yahoo as upgraded
their system & removed the "wrap at 72" compose setting, I suppose to
make things simpler for us.
[I hope to get back to using fetchyahoo.pl+cron and a sane client soon]

Richard:
I didn't notice the mail wrapping issue ...

yours is missing newlines- even worse!  :)
(hint: don't post as HTML/rich formatted)


Thanks for all your efforts. There's still something strange at the
Geosciences Australia end; I have repeated your test with the Gold
layer (success). But other layers show errors like "wms_roads__0.png
not recognised as a supported file format".

if you look in that file you will see text not an image:
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM 
"http://schemas.opengeospatial.net/wms/1.1.1/exception_1_1_1.dtd";>
<ServiceExceptionReport version="1.1.1">
<ServiceException code="InvalidSRS">
msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must be 
valid for all requested layers.
</ServiceException>
</ServiceExceptionReport>


be sure to delete those old files from $GISDBASE/wms_downloads/ or they will be 
cached and it'll try to reuse them. ('r.in.wms -c' helps)


'r.in.wms -l' and  http://www.ga.gov.au/map/broker/wms_info.php state that the 
roads layer is in EPSG:3112, so you need to provide that on the command line:

# from a latlon/wgs84 location
g.region n=9S s=46S w=112E e=155E res=0:01 -p
r.in.wms mapserv="http://www.ga.gov.au/wms/getmap?dataset=national&"; \
  -g layers=roads output=au_roads format=tiff srs=EPSG:3112
Richard:
You're right; so the trick is to be careful!

I hope this is the last maddening issue; working with:
g.region n=33S s=34S w=150 e=151 nsres=00:00:05 ewres=00:00:05
r.in.wms -c mapserv="http://www.ga.gov.au/wms/getmap?dataset=national&"; -g layers=dem_9sec output=dem_9sec format=png srs=EPSG:3112
(The small region keeps the the tile size down)

I get the 9-second DEM. It looks and displays okay, but the elevation data is wild.
r.what -f [EMAIL PROTECTED] east_north=150.8177882,-33.785157971
produces:
150.8177882|-33.785157971||31407|

Since I can reasonably assume that the elevation isn't 31,407 metres, nor that the elevation in the mountains is lower than near the ocean, something's awry with the elevation... I will test it later with TIFF to see if that works better on elevation, I'm getting called away at the moment...

Richard




So the server would have to be considered "a little flaky" on a good day.

naw, blame r.in.wms. the server is limited in what it will provide and r.in.wms 
is not handling the error messages well. (the error can come in the form of a 
web page, XML, or empty output, and success is a real image, so it is hard to 
pick how to recognize and pass on the error)


devs: One problem is that I don't know how to test for r.in.gdalwarp's exit 
code. it is called from r.in.wms with eval- the exit code returned is eval's 
not r.in.gdalwarp's.



The tiles download okay - the directory shows files with .wget, .png
(or tiff or whatever), .proj4 and .tfw formats, so I guess something is
breaking / broken in the files GA is sending.

no, open the tile in a text editor and see



with the extra "srs=EPSG:3112" on the command line I could download the roads 
layer and it looks good.



Hamish



_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to