It may be my GDAL version, it’s a tad older. I will try and update that. Might
be worth thininking about supporting runtime subs in the OGR url to pass extent
values easily - where MapServer does the substitution using computed values.
Kinda like the bbox hack for PostGIS.
________________________________
From: James Klassen <[email protected]>
Sent: Friday, December 7, 2018 10:50:36 AM
To: Lime, Steve D (MNIT)
Cc: [email protected]
Subject: Re: [mapserver-users] OGR GeoJSON Layers...
The following works for me with MapServer 7.0.6/GDAL 2.2. Note it doesn't
appear to pass the bbox filter to the ESRI service so this only works with
small layers (otherwise it will timeout). With newer GDAL versions
'OGRGeoJSON' will likely need to become 'ESRIJSON'.
LAYER
NAME 'rcoffices'
TYPE POINT
CONNECTIONTYPE OGR
CONNECTION
"https://maps.co.ramsey.mn.us/arcgis/rest/services/MapRamsey/MapRamseyOperationalLayersAll/MapServer/1/query?f=json&where=1=1&outFields=*&orderByFields=OBJECTID"
DATA "OGRGeoJSON"
PROJECTION "init=epsg:200068" END
CLASS
STYLE
SYMBOL "circle"
SIZE 10
COLOR 255 0 0
OUTLINECOLOR 0 0 0
END
END
END
Note: epsg:200068 is setup locally as Ramsey County Coordinates:
+proj=lcc +lat_2=44.88333333333333 +lat_1=45.13333333333333
+lat_0=44.79111111111111 +lon_0=-93.38333333333334 +x_0=152400.3048
+y_0=30480.0610 +unit=sft +to_meter=0.30480060960122 +a=6378418.941
+b=6357033.310 +no_defs
On Mon, Dec 3, 2018 at 3:13 PM Lime, Steve D (MNIT)
<[email protected]<mailto:[email protected]>> wrote:
Hi all: I’m running into an issue with GeoJSON service URLs vs local GeoJSON
files. If I setup a connection like so:
CONNECTIONTYPE OGR
CONNECTION “http://...some arcgis server.../arcgis/rest/services...?...query
string…”
and try to draw the layer it seems like it’s fetching features yet nothing is
drawn. With CONFIG “CPL_DEBUG” “ON” I see an OGR message that it was able to
open the URL successfully as GeoJSON . Using ogrinfo at the command line also
works with the URL.
If I first save the URL response using wget and reference the local file, e.g.:
CONNECTIONTYPE OGR
CONNECTION “foo.json”
then the layer is drawn successfully. I know this has come up at least once
before on the list but with no resolution.
This is running MapServer 6.4.5.
--Steve
_______________________________________________
mapserver-users mailing list
[email protected]<mailto:[email protected]>
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users