[mapserver-users] map file syntax for geojson file formats
Lime, Steve D (MNIT)
steve.lime at state.mn.us
Fri Jan 11 12:24:51 PST 2019
It's actually GDAL/OGR that provides GeoJson read support. So assuming you have a file called cemeteries.geojson it should be as simple as replacing:
DATA './cemeteries.shp'
with:
CONNECTIONTYPE OGR
CONNECTION './cemeteries.geojson'
See https://mapserver.org/input/vector/ogr.html for additional information on OGR support.
--Steve
From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of e.arapostathis at gmail.com
Sent: Friday, January 11, 2019 11:24 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] map file syntax for geojson file formats
Hello,
As few years have passed since the time that I was using mapserver constantly (before geojson file format started emerging) I would like to ask if there is any basic difference while creating the map files.
It would be of great help if you could provide me an example in the following map file which loads a shape file. What differences must be done in order to load the file cemetery.geojson instead of the cemetery.shp?
MAP
INCLUDE '../../geomoose_globals.map'
WEB
METADATA
'ows_title' 'Cemeteries'
INCLUDE '../../common_metadata.map'
'wfs_getfeature_formatlist' 'gml,geojson'
END
END
DEBUG 5
LAYER
NAME cemeteries
GROUP cemeteries
STATUS ON
METADATA
'ows_title' 'cemeteries'
'ows_include_items' 'all'
'gml_include_items' 'all'
END
TYPE POINT
DATA './cemeteries.shp'
TOLERANCE 4
PROJECTION
'init=epsg:4326'
END
CLASS
STYLE
SYMBOL 'cemetery.png'
SIZE 13
END
END
TEMPLATE 'dummy'
END
END ## end Map
Thank you for your help.
[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon>
Virus-free. www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20190111/8d6708a9/attachment.htm>
More information about the MapServer-users
mailing list