Hello list!
For me the d.wms in the gui works perfect. But when I script, I need to download the wms layer (?) and for that I use r.in.wms which works, but gives not as pleasant image. The image looks distorted in some way. I can adjust it some with different ‘g.region res=’
When I in the gui (using d.wms) choose the save the layer - I get the same as for r.in.wms - which I guess is used for saving.
I looked into the d.wms.py script to try to reproduce what d.wms does, but I can not get the right input to wms.GetMap(options,flags) - And I can’t find any good documentation.
from wms_drv import WMSDrv
wms = WMSDrv()
I don’t really need to dowload the wms, but I want to use it as a background when scripting.
Is there maybe a way to use d.wms when scripting?
Martin
Le Wed, 25 May 2016 09:16:29 +0000,
Martin Album Ytre-Eide <Martin.Album.Ytre-Eide@nrpa.no> a écrit :
Hello list!
For me the d.wms in the gui works perfect. But when I script, I need
to download the wms layer (?) and for that I use r.in.wms which
works, but gives not as pleasant image. The image looks distorted in
some way. I can adjust it some with different 'g.region res='
When I in the gui (using d.wms) choose the save the layer - I get the
same as for r.in.wms - which I guess is used for saving.
I would guess that d.wms does not take into account the current region
settings for display, but whenever you write a new raster map, either
with r.in.wms or by saving through d.wms, the current region's
resolution is used. By adjusting this resolution, you should be able to
get higher quality output.
I don't really need to dowload the wms, but I want to use it as a
background when scripting.
If you want to open a monitor and display maps during a script run, try
d.mon.
Moritz
I have tried using the the same display geometry and it helps some -
but it seems to me that the zoom level of the wms call is different for the d.wms and r.in.wms, or maybe the reprojection method is different (which should be equal (nearest)). At least I get "sharper" edges with r.in.wms.
I attach the result from the two different methods, to illustrate the difference. Note that the resolution appears to be equal, but the file size is not......?
Martin
________________________________________
Fra: Moritz Lennert [mlennert@club.worldonline.be]
Sendt: 25. mai 2016 18:30
Til: Martin Album Ytre-Eide
Kopi: grass-user@lists.osgeo.org
Emne: Re: [GRASS-user] r.in.wms and d.wms difference
Le Wed, 25 May 2016 09:16:29 +0000,
Martin Album Ytre-Eide <Martin.Album.Ytre-Eide@nrpa.no> a écrit :
Hello list!
For me the d.wms in the gui works perfect. But when I script, I need
to download the wms layer (?) and for that I use r.in.wms which
works, but gives not as pleasant image. The image looks distorted in
some way. I can adjust it some with different 'g.region res='
When I in the gui (using d.wms) choose the save the layer - I get the
same as for r.in.wms - which I guess is used for saving.
I would guess that d.wms does not take into account the current region
settings for display, but whenever you write a new raster map, either
with r.in.wms or by saving through d.wms, the current region's
resolution is used. By adjusting this resolution, you should be able to
get higher quality output.
I don't really need to dowload the wms, but I want to use it as a
background when scripting.
If you want to open a monitor and display maps during a script run, try
d.mon.
Moritz
(attachments)

