<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Jukka,<br>
<br>
Sometimes there are problems when the actual filenames in the vrt
are relative pathnames. Especially with the new mapscript.php
include file. Perhaps you could try that.<br>
<br>
Jan<br>
<br>
<div class="moz-cite-prefix">On 13/11/2023 22:48, Rahkonen Jukka via
MapServer-users wrote:<br>
</div>
<blockquote type="cite"
cite="mid:AM0PR09MB32191464268247E587A9816CFDB3A@AM0PR09MB3219.eurprd09.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator"
content="Microsoft Word 15 (filtered medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}span.Shkpostityyli17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I tried to make a WMS
layer from OGC API Features service but I did not success.
This is my best trial so far:<br>
<br>
I am using Mapserver from MS4W 5.0.0 RC1 <br>
I wrote this ORG VRT file (ogcfeat.vrt)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><OGRVRTDataSource><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <OGRVRTLayer
name="building"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<SrcDataSource>OAPIF:<a class="moz-txt-link-freetext" href="https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/">https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/</a></SrcDataSource><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<SrcLayer>building</SrcLayer><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </OGRVRTLayer><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"></OGRVRTDataSource><br>
<br>
The GDAL included in MS4W reads the vrt OK with<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ogrinfo ogcfeat.vrt -al
-so --debug on<br>
(there are 5 millions polygons so hit Ctrl-C if you are just
testing)<br>
<br>
I wrote a layer that can be at the bottom of this message
below. The WMS GetCapabilities show the new layer but
GetMaps fail. The log file collects these errors<br>
<br>
msDrawMap(): Image handling error. Failed to draw layer
named 'building'.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">msOGRFileOpen(): OGR
error. Open failed for OGR connection in layer `building'.
File not found or unsupported format. Check server logs.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Open failed for OGR
connection in layer `building'.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Am I missing something
from my configuration? My LAYER is like this<br>
<br>
LAYER<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> NAME "building"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> STATUS ON<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> CONNECTIONTYPE
OGR<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
CONNECTION "c:/ms4w_data/oapif.vrt"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> DATA "building"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> TYPE POLYGON<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># DEBUG 5<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> UNITS METERS<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> SIZEUNITS PIXELS<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> MAXSCALEDENOM
60000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> TOLERANCE 3<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> TOLERANCEUNITS
PIXELS<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> METADATA<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "wms_title"
"OGCFeat-building"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
"wms_include_items" "all" <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> END #metadata<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> PROJECTION<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
"init=epsg:3067" ##recommended<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
END<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
CLASS<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
NAME "building"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
STYLE<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
COLOR 200 255 200<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
OUTLINECOLOR 120 120 120<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
END # Style<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> END # Class<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> TEMPLATE "empty"
##recommended (enable GetFeatureInfo / can point to valid
.html template)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> END # Layer<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
MapServer-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
</blockquote>
<br>
</body>
</html>