I am trying to use r.in.wms to get elevation data from wms.jpl.nasa.gov, but I have been running into two different problems. I have been using the gui on a mac with 6.3, although I also tried 6.4 RC2 and got similar results. The files do download but then I can't seem to work with them properly. I have tried geotiff and png. I have tried a bunch of other combinations as well.
The first problem seems to be with how temporary files are being named so that patching is not working properly. Here is the command that is being generated by the gui:
r.in.wms output=elev_us_ned2 mapserver=wms.jpl.nasa.gov/wms.cgi layers=us_ned format=png wmsquery=version=1.1.1 maxcols=1024 maxrows=1024 {wgetoptions=-c -t 5 -nv} {curloptions=-C - --retry 5 -s -S} method=cubic v=1
This is followed by this long list of errors:
Calculating tiles
Requesting 2 tiles.
Downloading tiles
Tile already downloaded
All tiles downloaded successfully
Creating output file that is 972P x 558L.
Processing input file /Users/dersh/grass/wms_download/elev_us_ned2__0.png.
Using band 2 of source image as alpha.
0...10...20...30...40...50...60...70...80...90...100 - done.
Invalid map <elev_us_ned2_tile_0_tmp.alpha>
Parse error
Raster map <elev_us_ned2_tile_0.1> not found
Invalid map <elev_us_ned2_tile_0_tmp.alpha>
Parse error
Raster map <elev_us_ned2_tile_0.2> not found
Illegal filename. Character <
> not allowed.
Illegal filename. Character <
> not allowed.
Illegal filename. Character <
> not allowed.
Raster map <elev_us_ned2_tile_0_tmp.1
elev_us_ned2_tile_0_tmp.2> not found
Illegal filename. Character <
> not allowed.
raster: couldn't be removed
Illegal filename. Character <
> not allowed.
header: couldn't be removed
Illegal filename. Character <
> not allowed.
category: couldn't be removed
Illegal filename. Character <
> not allowed.
color: couldn't be removed
Illegal filename. Character <
> not allowed.
history: couldn't be removed
Illegal filename. Character <
> not allowed.
misc: couldn't be removed
Illegal filename. Character <
> not allowed.
fcell: couldn't be removed
Illegal filename. Character <
> not allowed.
g3dcell: couldn't be removed
Illegal filename. Character <
> not allowed.
colr2/PERMANENT: couldn't be removed
<elev_us_ned2_tile_0_tmp.1
elev_us_ned2_tile_0_tmp.2> nothing removed
Creating output file that is 971P x 560L.
Processing input file /Users/dersh/grass/wms_download/elev_us_ned2__1.png.
Using band 2 of source image as alpha.
0...10...20...30...40...50...60...70...80...90...100 - done.
Invalid map <elev_us_ned2_tile_1_tmp.alpha>
Parse error
Raster map <elev_us_ned2_tile_1.1> not found
Invalid map <elev_us_ned2_tile_1_tmp.alpha>
Parse error
Raster map <elev_us_ned2_tile_1.2> not found
Illegal filename. Character <
> not allowed.
Illegal filename. Character <
> not allowed.
Illegal filename. Character <
> not allowed.
Raster map <elev_us_ned2_tile_1_tmp.1
elev_us_ned2_tile_1_tmp.2> not found
Illegal filename. Character <
> not allowed.
raster: couldn't be removed
Illegal filename. Character <
> not allowed.
header: couldn't be removed
Illegal filename. Character <
> not allowed.
category: couldn't be removed
Illegal filename. Character <
> not allowed.
color: couldn't be removed
Illegal filename. Character <
> not allowed.
history: couldn't be removed
Illegal filename. Character <
> not allowed.
misc: couldn't be removed
Illegal filename. Character <
> not allowed.
fcell: couldn't be removed
Illegal filename. Character <
> not allowed.
g3dcell: couldn't be removed
Illegal filename. Character <
> not allowed.
colr2/PERMANENT: couldn't be removed
<elev_us_ned2_tile_1_tmp.1
elev_us_ned2_tile_1_tmp.2> nothing removed
Patching [.1] channel
r.patch - elev_us_ned2_tile_0.1 not found
r.patch - elev_us_ned2_tile_1.1 not found
One or more input maps not found
Raster map <elev_us_ned2_tile_0.1> not found
<elev_us_ned2_tile_0.1> nothing removed
Raster map <elev_us_ned2_tile_1.1> not found
<elev_us_ned2_tile_1.1> nothing removed
Patching [.2] channel
r.patch - elev_us_ned2_tile_0.2 not found
r.patch - elev_us_ned2_tile_1.2 not found
One or more input maps not found
Raster map <elev_us_ned2_tile_0.2> not found
<elev_us_ned2_tile_0.2> nothing removed
Raster map <elev_us_ned2_tile_1.2> not found
<elev_us_ned2_tile_1.2> nothing removed
Raster map <elev_us_ned2> not found in current mapset
The odd thing is that I am left with four temporary maps in the mapset: elev_us_ned2_tile_0_tmp.1 elev_us_ned2_tile_0_tmp.2 elev_us_ned2_tile_1_tmp.1 elev_us_ned2_tile_1_tmp.1 so it seems that the script can't find these maps for some reasons.
The second problem, that might or might not be related, is that if I open the temporary files, there is a "slot" between them. It appears as though they just don't line up properly. Instead they are at an angle to each other. The tiles that are being selected are a top and bottom tile. They join at the right edge, but at the left edge there is a gap. So I am ending up with a black triangle through the middle of the image. Perhaps I have done something wrong so that the tile selection code is not working correctly.
I am using a UTM projection with an nad83 datum.
Perhaps this second problem is something that should be taken care of by the patching that is not happening because of the first problem?
Anyway, help would be greatly appreciated.
Thanks,
--Adam