Hallo,
I'm sending new version of r.in.wms. I added new option "-l" for listing
avaliable layers on the server (very primitive). I also made safer cleaning of temporary
files -- it should not harm any more ...
I hope, it will work on other servers -- it worked for two, which are
iteresting for me, very well.
I hope, this script is good start for basic support of WMS in GRASS.
If nobody will have any objections, I would add it to GRASS-Addons site.
Jachym
On Mon, Jan 16, 2006 at 04:00:46PM +1300, Hamish wrote:
> For every body, who is using this script: it could destroy your .*
> files! I'm really sorry, for annoucing this.
>
> If the variable $IMAGEFILE is not set, the script could start to
> remove all '.*' files in current directory -- see line 67 of the
> script. It should not happen. But it could, I'm not by the linux
> machine now, to test the conditions...
>
> I'm working on new version, which is able to pool avaliable layers
> from the server first (GetCapabilities) and in this version, I will
> take more care about it.
If it is possible, it is good to create, cd, and install files into a TMP
grass directory using the g.tempfile module. This makes it harder to make
these sorts of mistakes and if the script is aborted any left over files
are automatically cleaned when you leave grass.
see the v.in.garmin and r.in.srtm scripts for examples.
> If you are using the script, pleace, change the line 67 for example to
>
> if [ "${IMAGEFILE}" != "" ]; then
> rm -iv ${IMAGEFILE}.*
> fi
better for cross-platform portability:
if [ -n "${IMAGEFILE}" ]; then
(-n means non-zero, == "" is -z)
[SUBMITTING_SCRIPTS file updated in 6.1 CVS]
Hamish
_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5
--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
(attachments)
r.in.wms.tgz (3.85 KB)