<div dir="ltr">Are you sure that you don't just have a typo? Your file is named "<b>ogcfeat</b>.vrt" but your CONNECTION "c:/ms4w_data/<b>oapif</b>.vrt"<div><br><div>I set up a quick test and I haven't gotten a map (it timed out 504 error after several minutes) but I didn't get an error. Maybe you could share a smaller test data set and a reasonable bounding box. My test:</div></div><div><a href="http://localhost/cgi-bin/mapserv?map=MAP_TEST&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=building&WIDTH=696&HEIGHT=870&CRS=EPSG:3067&BBOX=-359700,6615190,-359500,6615199&FORMAT=png">http://localhost/cgi-bin/mapserv?map=MAP_TEST&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=building&WIDTH=696&HEIGHT=870&CRS=EPSG:3067&BBOX=-359700,6615190,-359500,6615199&FORMAT=png</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 13, 2023 at 2:48 PM Rahkonen Jukka via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-8928766936215543767">
<div lang="FI" style="overflow-wrap: break-word;">
<div class="m_-8928766936215543767WordSection1">
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></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)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><OGRVRTDataSource><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <OGRVRTLayer name="building"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <SrcDataSource>OAPIF:<a href="https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/" target="_blank">https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/</a></SrcDataSource><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <SrcLayer>building</SrcLayer><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> </OGRVRTLayer><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"></OGRVRTDataSource><br>
<br>
The GDAL included in MS4W reads the vrt OK with<u></u><u></u></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'.<u></u><u></u></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.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Open failed for OGR connection in layer `building'.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Am I missing something from my configuration? My LAYER is like this<br>
<br>
LAYER<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> NAME "building"<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> STATUS ON<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> CONNECTIONTYPE OGR<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> CONNECTION "c:/ms4w_data/oapif.vrt"<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> DATA "building"<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> TYPE POLYGON<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"># DEBUG 5<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> UNITS METERS<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> SIZEUNITS PIXELS<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> MAXSCALEDENOM 60000<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> TOLERANCE 3<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> TOLERANCEUNITS PIXELS<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> METADATA<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> "wms_title" "OGCFeat-building"<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> "wms_include_items" "all" <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> END #metadata<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> PROJECTION<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> "init=epsg:3067" ##recommended<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> END<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> CLASS<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> NAME "building"<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> STYLE<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> COLOR 200 255 200<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> OUTLINECOLOR 120 120 120<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> END # Style<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> END # Class<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> TEMPLATE "empty" ##recommended (enable GetFeatureInfo / can point to valid .html template)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> END # Layer<br>
<br>
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-<u></u><u></u></span></p>
</div>
</div>
_______________________________________________<br>
MapServer-users mailing list<br>
<a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Richard W. Greenwood<br><a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a></div></div>