User Tools

Site Tools


lovergine:wms_at_pcn

WMS service at PCN via GRASS

A list of WMS available catalogs is available at

http://www.pcn.minambiente.it/PCNDYN/catalogowms.jsp?lan=it

Each URI can be used to access a layer and download data possibly by any WMS client (e.g. Qgis). It is convenient using the GRASS module r.in.wms to download tiles and convert them in rasters within one of the supported location. So, for instance from a UTM/WGS84/33 location one can issue a command like:

r.in.wms -c mapserver="http://wms.pcn.minambiente.it/cgi-bin/mapserv.exe?map=/ms_ogc/service/ortofoto_colore_06_f33.map" \
output=ortofoto layers="ortofoto_colore_06" format="png" srs="EPSG:32633"  wgetoptions="--wait=10"

to get an ortophoto of 2006 in the current computational region. Note the —wait option for wget used to be more as nice as possible against the PCN webserver and possibly avoiding to be banned for too aggressive downloads.

WFS service at PCN via GRASS

The WFS is more tricky. Essential you need to not trust about v.in.wfs to parse capabilities and provide the right URL instead. So for instance:

v.in.wfs --o wfs="http://wms.pcn.minambiente.it/cgi-bin/mapserv.exe?map=/ms_ogc/wfs/regioni_wfs_f33.map&REQUEST=GetFeature&SERVICE=WFS&VERSION=1.0.0&TYPENAME=regioni_f33" \
output=regioni_f33

is the command to get the right feature set for one of the PCN strata. This is radically different from what you use in Qgis, which is able to parse and get the right layer. A list of available layers is here:

http://www.pcn.minambiente.it/PCNDYN/catalogowfs.jsp?lan=it

If you have a look at each capability, the very first word just after the map name is the required TYPE_NAME to provide in the v.in.wfs argument. Of course, this is due currently up to 6.4.1 version, and could change in future versions.

lovergine/wms_at_pcn.txt · Last modified: 2011/05/26 12:45 by frankie