[MapServer-users] How to cascade data from OGC API Features service?

Rahkonen Jukka jukka.rahkonen at maanmittauslaitos.fi
Mon Nov 13 13:48:21 PST 2023


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-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20231113/8be205c2/attachment.htm>


More information about the MapServer-users mailing list