[MapServer-users] How to cascade data from OGC API Features service?
Richard Greenwood
richard.greenwood at gmail.com
Mon Nov 13 19:37:49 PST 2023
Are you sure that you don't just have a typo? Your file is named
"*ogcfeat*.vrt"
but your CONNECTION "c:/ms4w_data/*oapif*.vrt"
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:
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
On Mon, Nov 13, 2023 at 2:48 PM Rahkonen Jukka via MapServer-users <
mapserver-users at lists.osgeo.org> 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
>
--
Richard W. Greenwood
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20231113/5f7eb566/attachment.htm>
More information about the MapServer-users
mailing list