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

Jan Hartmann j.l.h.hartmann at gmail.com
Tue Nov 14 08:34:37 PST 2023


Hi Jukka,

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.

Jan

On 13/11/2023 22:48, Rahkonen Jukka via MapServer-users wrote:
>
> 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 at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20231114/467ef611/attachment.htm>


More information about the MapServer-users mailing list