<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:10pt">Purtroppo a me da errore.<br>Mi sorge un dubbio: uso FWTools (windows), sarà per questo???<br>gdalinfo failed - unable to open 'WMS:http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/Vettoriali/Carta_geologica.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=GE.CARTAGEOLOGICA&SRS=EPSG:4326&BBOX=6,34.5,19,49'<br><br>Non mi serve il valore RGB della cella, ma sapere la dimensione in pixel dell'immagine di origine...<br>Vito<br><div><span><br></span></div><div><br></div>  <div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">Da:</span></b> Paolo Corti <pcorti@gmail.com><br> <b><span style="font-weight:
 bold;">A:</span></b> Vito Borneo <vitoborneo@yahoo.it> <br><b><span style="font-weight: bold;">Cc:</span></b> GFOSS.it <gfoss@lists.gfoss.it> <br> <b><span style="font-weight: bold;">Inviato:</span></b> Martedì 5 Marzo 2013 9:53<br> <b><span style="font-weight: bold;">Oggetto:</span></b> Re: [Gfoss] gdallocationinfo<br> </font> </div> <br>2013/3/5 Vito Borneo <<a ymailto="mailto:vitoborneo@yahoo.it" href="mailto:vitoborneo@yahoo.it">vitoborneo@yahoo.it</a>>:<br>> Potreste aiutarmi a capire la sintassi di gdallocationinfo?<br>> <a href="http://www.gdal.org/frmt_wms.html" target="_blank">http://www.gdal.org/frmt_wms.html</a><br>> vorrei interrogare un server wms per conoscerne SizeX e SizeY.<br>> ad esempio della carta geologica<br>> <a href="http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/Vettoriali/Carta_geologica.map&service=wms&request=getCapabilities"
 target="_blank">http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/Vettoriali/Carta_geologica.map&service=wms&request=getCapabilities</a><br>><br>> Vito<br><br>Ciao<br>la sintassi corretta, come da esempio nella pagina di documentazione<br>da te indicata, sarebbe questa:<br><br>$ gdallocationinfo<br>"WMS:<a href="http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/Vettoriali/Carta_geologica.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=GE.CARTAGEOLOGICA&SRS=EPSG:4326&BBOX=6,34.5,19,49" target="_blank">http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/Vettoriali/Carta_geologica.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=GE.CARTAGEOLOGICA&SRS=EPSG:4326&BBOX=6,34.5,19,49</a>"<br>-geoloc 10.0 40.0 -xml -b 1<br><Report pixel="-1" line="-1"><br>  <Alert>Location is off this file! No further details to report.</Alert><br></Report><br><br>Come
 vedi per qualche motivo non mi restituisce il valore della cella.<br>La stessa sintassi mi funziona su altri servizi (ho appena verificato).<br><br>Il motivo secondo me e' che nel mapfile non e' abilitata la<br>GetFeatureInfo per quello che in questo caso e' un grouplayer.<br>Infatti provando la getfeatureinfo (che e' quello che gdallocationinfo<br>fa dietro le quinte):<br><br>wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/Vettoriali/Carta_geologica.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&WIDTH=100&HEIGHT=100&LAYERS=GE.CARTAGEOLOGICA&BBOX=6,34.5,19,49&SRS=EPSG:4326&x=10&y=40&QUERY_LAYERS=GN:Predefinito<br><br><ServiceExceptionReport version="1.1.1"><ServiceException<br>code="LayerNotDefined"><br>msWMSFeatureInfo(): WMS server error. Layer(s) specified in<br>QUERY_LAYERS parameter is not offered by the service
 instance.<br></ServiceException></ServiceExceptionReport><br><br>Ad ogni modo, cosa te ne fai del valore RGB della cella? In questo<br>caso non ci sono bande esposte sul raster che contengano valori da<br>utilizzare, ma le sole tre bande RGB:<br><br>$ gdalinfo "WMS:<a href="http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/Vettoriali/Carta_geologica.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=GE.CARTAGEOLOGICA&SRS=EPSG:4326&BBOX=6,34.5,19,49" target="_blank">http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/Vettoriali/Carta_geologica.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=GE.CARTAGEOLOGICA&SRS=EPSG:4326&BBOX=6,34.5,19,49</a>"<br>Driver: WMS/OGC Web Map Service<br>Files: none associated<br>Size is 962592768, 1073741824<br>Coordinate System is:<br>GEOGCS["WGS 84",<br>    DATUM["WGS_1984",<br>        SPHEROID["WGS
 84",6378137,298.257223563,<br>            AUTHORITY["EPSG","7030"]],<br>        AUTHORITY["EPSG","6326"]],<br>    PRIMEM["Greenwich",0,<br>        AUTHORITY["EPSG","8901"]],<br>    UNIT["degree",0.0174532925199433,<br>        AUTHORITY["EPSG","9122"]],<br>    AUTHORITY["EPSG","4326"]]<br>Origin = (6.000000000000000,49.000000000000000)<br>Pixel Size = (0.000000013505192,-0.000000013504177)<br>Image Structure Metadata:<br>  INTERLEAVE=PIXEL<br>Corner Coordinates:<br>Upper Left  (   6.0000000,  49.0000000) (  6d 0' 0.00"E, 49d 0' 0.00"N)<br>Lower Left  (   6.0000000,  34.5000000) (  6d 0' 0.00"E, 34d30' 0.00"N)<br>Upper Right (  19.0000000,  49.0000000) ( 19d 0' 0.00"E, 49d 0' 0.00"N)<br>Lower Right (  19.0000000,  34.5000000) ( 19d 0' 0.00"E, 34d30' 0.00"N)<br>Center 
     (  12.5000000,  41.7500000) ( 12d30' 0.00"E, 41d45' 0.00"N)<br>Band 1 Block=1024x1024 Type=Byte, ColorInterp=Red<br>  Overviews: 481296384x536870912, 240648192x268435456,<br>120324096x134217728, 60162048x67108864, 30081024x33554432,<br>15040512x16777216, 7520256x8388608, 3760128x4194304, 1880064x2097152,<br>940032x1048576, 470016x524288, 235008x262144, 117504x131072,<br>58752x65536, 29376x32768, 14688x16384, 7344x8192, 3672x4096,<br>1836x2048, 918x1024<br>Band 2 Block=1024x1024 Type=Byte, ColorInterp=Green<br>  Overviews: 481296384x536870912, 240648192x268435456,<br>120324096x134217728, 60162048x67108864, 30081024x33554432,<br>15040512x16777216, 7520256x8388608, 3760128x4194304, 1880064x2097152,<br>940032x1048576, 470016x524288, 235008x262144, 117504x131072,<br>58752x65536, 29376x32768, 14688x16384, 7344x8192, 3672x4096,<br>1836x2048, 918x1024<br>Band 3 Block=1024x1024 Type=Byte, ColorInterp=Blue<br>  Overviews:
 481296384x536870912, 240648192x268435456,<br>120324096x134217728, 60162048x67108864, 30081024x33554432,<br>15040512x16777216, 7520256x8388608, 3760128x4194304, 1880064x2097152,<br>940032x1048576, 470016x524288, 235008x262144, 117504x131072,<br>58752x65536, 29376x32768, 14688x16384, 7344x8192, 3672x4096,<br>1836x2048, 918x1024<br><br>ciao<br>p<br><br>-- <br>Paolo Corti<br>Geospatial software developer<br>web: <a href="http://www.paolocorti.net/" target="_blank">http://www.paolocorti.net</a><br>twitter: @capooti<br>skype: capooti<br><br><br> </div> </div>  </div></body></html>