Hi,

I tried to make a WMS layer from OGC API Features service but I did not 
success. This is my best trial so far:

I am using Mapserver from MS4W 5.0.0 RC1
I wrote this ORG VRT file (ogcfeat.vrt)

<OGRVRTDataSource>
    <OGRVRTLayer name="building">
        
<SrcDataSource>OAPIF:https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/</SrcDataSource>
        <SrcLayer>building</SrcLayer>
    </OGRVRTLayer>
</OGRVRTDataSource>

The GDAL included in MS4W reads the vrt OK with
ogrinfo ogcfeat.vrt -al -so --debug on
(there are 5 millions polygons so hit Ctrl-C if you are just testing)

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

msDrawMap(): Image handling error. Failed to draw layer named 'building'.
msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `building'. 
 File not found or unsupported format. Check server logs.
Open failed for OGR connection in layer `building'.

Am I missing something from my configuration? My LAYER is like this

LAYER
        NAME "building"
        STATUS ON
        CONNECTIONTYPE OGR
                          CONNECTION "c:/ms4w_data/oapif.vrt"
        DATA "building"
        TYPE POLYGON
#        DEBUG 5
        UNITS METERS
        SIZEUNITS PIXELS
       MAXSCALEDENOM  60000
       TOLERANCE 3
        TOLERANCEUNITS PIXELS
        METADATA
        "wms_title" "OGCFeat-building"
        "wms_include_items" "all"
        END #metadata
        PROJECTION
                                "init=epsg:3067"   ##recommended
                          END
                          CLASS
                            NAME "building"
                                STYLE
                                  COLOR 200 255 200
                                  OUTLINECOLOR 120 120 120
                                END # Style
        END # Class
    TEMPLATE "empty" ##recommended (enable GetFeatureInfo / can point to valid 
.html template)

 END # Layer

-Jukka Rahkonen-
_______________________________________________
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to