<b>Warning</b>: ms_newMapObj(): [MapServer Error]: msLoadMap():
MS_DEFAULT_MAPFILE_PATTERN validation failed.
in <b>C:\ms4w\Apache\htdocs\wms_capabilities_v130.php</b> on line
<b>72</b><br />
<br />
<b>Warning</b>: ms_newMapObj(): [MapServer Error]: msEvalRegex():
String failed expression test.
in <b>C:\ms4w\Apache\htdocs\wms_capabilities_v130.php</b> on line
<b>72</b><br />
<br />
<b>Fatal error</b>: Uncaught exception 'MapScriptException' with
message 'Failed to open map file
"/ms_ogc/WMS_v1.3/raster/ortofoto_colore_06.map?SERVICE=WMS"'
in C:\ms4w\Apache\htdocs\wms_capabilities_v130.php:72
Stack trace: #0 C:\ms4w\Apache\htdocs\wms_capabilities_v130.php(72):
ms_newMapObj('/ms_ogc/WMS_v1....') #1 {main}
thrown in <b>C:\ms4w\Apache\htdocs\wms_capabilities_v130.php</b> on
line <b>72</b><br />
---------- Původní zpráva ----------
Od: Ing. Pierluigi De Rosa pierluigi.derosa@gfosservices.it
Datum: 31. 5. 2013
Předmět: [GRASS-user] r.in.wms and PCN webservices
Dear GRASS User
did anyone tried to use r.in.wms to get data from pcn[1] webservices?
Warning: ms_newMapObj(): [MapServer Error]: msLoadMap():
MS_DEFAULT_MAPFILE_PATTERN validation failed.
in C:\ms4w\Apache\htdocs\wms_capabilities_v130.php on line 72
in C:\ms4w\Apache\htdocs\wms_capabilities_v130.php on line 72
Fatal error: Uncaught exception ‘MapScriptException’ with
message ‘Failed to open map file
"/ms_ogc/WMS_v1.3/raster/ortofoto_colore_06.map?SERVICE=WMS"’
in C:\ms4w\Apache\htdocs\wms_capabilities_v130.php:72
Stack trace: #0 C:\ms4w\Apache\htdocs\wms_capabilities_v130.php(72):
ms_newMapObj(‘/ms_ogc/WMS_v1…’) #1 {main}
thrown in C:\ms4w\Apache\htdocs\wms_capabilities_v130.php on
line 72
<b>Warning</b>: ms_newMapObj(): [MapServer Error]: msLoadMap():
MS_DEFAULT_MAPFILE_PATTERN validation failed.
in <b>C:\ms4w\Apache\htdocs\wms_capabilities_v130.php</b> on line
<b>72</b><br />
<br />
<b>Warning</b>: ms_newMapObj(): [MapServer Error]: msEvalRegex():
String failed expression test.
in <b>C:\ms4w\Apache\htdocs\wms_capabilities_v130.php</b> on line
<b>72</b><br />
<br />
<b>Fatal error</b>: Uncaught exception 'MapScriptException' with
message 'Failed to open map file
"/ms_ogc/WMS_v1.3/raster/ortofoto_colore_06.map?SERVICE=WMS"'
in C:\ms4w\Apache\htdocs\wms_capabilities_v130.php:72
Stack trace: #0 C:\ms4w\Apache\htdocs\wms_capabilities_v130.php(72):
ms_newMapObj('/ms_ogc/WMS_v1....') #1 {main}
thrown in <b>C:\ms4w\Apache\htdocs\wms_capabilities_v130.php</b> on
line <b>72</b><br />
Hy pierluigi
a web GET request is made of a url and, after a "?", of a set of params.
I think that r.in.wms try to put a "?" at the and of the url.
but the wms address you use already contain a "?"
so you have to use, for the url, only the http addrees and, for the
urlparams, the remaining part of the address.
hope this help..
ciao
Ivan
On Fri, 2013-05-31 at 16:59 +0200, Ing. Pierluigi De Rosa wrote:
Thanks it works!
could you explain better what is this urlparams and wht for this
services I need to use it?
maybe someone else is interested in that.
Thanks
Pierluigi
PS I'm using GRASS 7.0; I will try with GRASS 6.4.x
Il giorno ven, 31/05/2013 alle 15.16 +0200, Ivan Marchesini ha scritto:
> Hi pierluigi
>
> this should work in grass7 (don't know in grass 6.4) :
>
> r.in.wms --overwrite output=tile1 url=http://wms.pcn.minambiente.it/ogc
> urlparams="map=/ms_ogc/WMS_v1.3/raster/ortofoto_colore_06.map"
> layers="OI.ORTOIMMAGINI.2006." srs=32633 format=jpeg maxcols=2000
> maxrows=2000 method=near wms_version=1.3.0
>
> please use "urlparams"
>
> ciao
>
> ivan
>
> On Fri, 2013-05-31 at 14:11 +0200, Ing. Pierluigi De Rosa wrote:
> > Dear GRASS User
> > did anyone tried to use r.in.wms to get data from pcn[1] webservices?
> >
> > I want to download aerial photo from this URL:
> > http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/raster/ortofoto_colore_06.map
> >
> > if I run
> > r.in.wms -c
> > url=http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/raster/ortofoto_colore_06.map wms_version=1.3.0
> >
> > it retries me an error.
> > below details.
> >
> > <b>Warning</b>: ms_newMapObj(): [MapServer Error]: msLoadMap():
> > MS_DEFAULT_MAPFILE_PATTERN validation failed.
> > in <b>C:\ms4w\Apache\htdocs\wms_capabilities_v130.php</b> on line
> > <b>72</b><br />
> > <br />
> > <b>Warning</b>: ms_newMapObj(): [MapServer Error]: msEvalRegex():
> > String failed expression test.
> >
> > in <b>C:\ms4w\Apache\htdocs\wms_capabilities_v130.php</b> on line
> > <b>72</b><br />
> > <br />
> > <b>Fatal error</b>: Uncaught exception 'MapScriptException' with
> > message 'Failed to open map file
> > "/ms_ogc/WMS_v1.3/raster/ortofoto_colore_06.map?SERVICE=WMS"'
> > in C:\ms4w\Apache\htdocs\wms_capabilities_v130.php:72
> >
> > Stack trace:
> > #0 C:\ms4w\Apache\htdocs\wms_capabilities_v130.php(72):
> > ms_newMapObj('/ms_ogc/WMS_v1....')
> > #1 {main}
> > thrown in <b>C:\ms4w\Apache\htdocs\wms_capabilities_v130.php</b> on
> > line <b>72</b><br />
> >
> >
> > [1] http://www.pcn.minambiente.it/PCNDYN/catalogowms.jsp
>
>
Hy pierluigi
a web GET request is made of a url and, after a “?”, of a set of params.
I think that r.in.wms try to put a “?” at the and of the url.
but the wms address you use already contain a “?”
so you have to use, for the url, only the http addrees and, for the
urlparams, the remaining part of the address.
it worked as you described, however GetCapabilities request ignored urlparams parameter. After r56519 it should be able also to use url with “?”. GetCapabilities request should also work both ways now (r56520) (using urlparams or including parameters directly into url).
Hy pierluigi
a web GET request is made of a url and, after a “?”, of a set of params.
I think that r.in.wms try to put a “?” at the and of the url.
but the wms address you use already contain a “?”
so you have to use, for the url, only the http addrees and, for the
urlparams, the remaining part of the address.
it worked as you described, however GetCapabilities request ignored urlparams parameter. After r56519 it should be able also to use url with “?”. GetCapabilities request should also work both ways now (r56520) (using urlparams or including parameters directly into url).