[GRASS-dev] improving v.in.wms

Vincent Bain bain at toraval.fr
Tue Sep 18 03:30:43 PDT 2012


OK, great !

first you need to register here :
http://api.ign.fr/moncompte/creer
(sorry, IGN web site was redesigned this summer and they dropped the
english version formerly available...)

Then from your account page, you can create a contract (choose the 'Sig'
key type, in french 'Type de clé' set to GIS).
http://api.ign.fr/jsp/site/Portal.jsp?page=myapi&action=createkey&keytype=SIG_MODEL&keylabel=Nom%20d%27usage%20de%20la%20cl%C3%A9
Don't forget to pick items you need from the list of available
ressources (e.g. orthoimagery, maps,...)

You're sent a confirmation email, delivering an APIKey.
With the login/password/APIKey triplet you can run r.in.ign

To avoid getting empty response, I suggest you to create a location
matching some covered territories : for example you can make a location
from epsg code 27572 ("Lambert II étendu"), then set up a region with
these params :

north:      2095180
south:      2094980
west:       920650
east:       920850
nsres:      1
ewres:      1


To obtain orthoimagery on the place :
r.in.ign -m --overwrite apikey=$APIKEY user=$USER password=$PASSWORD
wmtslayer=ORTHOIMAGERY.ORTHOPHOTOS output=test

If you try the -c flag to obtain server capabilities don't be surprised
by the very long delay of the server to return the xml file (depends,
but can be more than one minute)

Here it is,
good luck.

Vincent


Le mardi 18 septembre 2012 à 11:19 +0200, Štěpán Turek a écrit : 
> Hi Vincent,
> 
> WMTS support and username/passoword would be useful. I will look at WMTS 
> standard and try to implement it.
> 
> It would be very useful for testing to show me where to register for access.
> 
> Stepan
> 
> 
> 
> On 09/18/2012 07:53 AM, Vincent Bain wrote:
> > Stepan,
> >
> > a short reply offlist, just to react to your improvments to r.in.wms.
> > First, thanks for involving in Grass...
> > Last spring I told you I was making heavy use of french cartographic
> > ressources (www.geoportail.gouv.fr). Last month they set up a new wmts
> > architecture (replacing a wms-c service), which allows to retrieve
> > raster data such as orthoimagery, elevation data, and so on.
> > Unfortunately I could not use your python addon (tell me if I'm wrong)
> > because wmts queries are based on an APIkey/login/password
> > authentification system.
> >
> > I wrote a shell script that does the job, partly running gdal tools. Of
> > course it's designed for private use, very rough, not much optimized,
> > but it has the ability to build sequential https requests containing the
> > right login/password header.
> >
> > I guess it would be easy to implement that "restricted access header
> > option" to your module; The thing is I ignore nearly everything of
> > Python ! let me know if you are interested in developing in this
> > direction. If so, I can show you where to register for access to ign web
> > data services, so that you can make tests. Attached is my shell script,
> > fyi.
> >
> > Bye,
> > Vincent
> >
> 





More information about the grass-dev mailing list