[mapserver-users] How can I read Z coordinates in a shape file ?
Heyser Sylvain
sig at themis.nc
Wed Jan 7 18:46:11 PST 2015
Dear Mapserver community,
I try to read the value of the Z coordinate in an Esri Shape file
without success.
I want to get the Z values through an url request (WFS) like this :
http://my_server_ip/cgi-bin/mapserv?map=/var/www/data/mapfile.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG:3163&BBOX=458692.315380274,394716.36951207,460607.98862158,395413.707691068&TYPENAME=Piste
But I only get output data without Z values.
<gml:featureMember><ms:Piste fid="Piste.1"><gml:boundedBy><gml:Box
srsName="EPSG:3163"><gml:coordinates>459689.471118,394821.251944
459699.341118,394828.476944</gml:coordinates></gml:Box></gml:boundedBy><ms:msGeometry><gml:LineString
srsName="EPSG:3163"><gml:coordinates>459699.341118,394821.251944
459693.717118,394828.476944 459689.471118,394825.098944
</gml:coordinates></gml:LineString></ms:msGeometry><ms:PISTAER_ID>1</ms:PISTAER_ID></ms:Piste></gml:featureMember><gml:featureMember>
The OGRINFO of the data is :
Layer name: PISTAERO_line
Geometry: 3D Line String
Feature Count: 2
Extent: (459349.927521, 394583.151000) - (460037.901778, 395483.896917)
Layer SRS WKT:
(unknown)
PISTAER_ID: Integer (5.0)
I have configure my map file as follow :
MAP
NAME DACDEV_map
STATUS ON
SIZE 900 700
EXTENT 150000 150000 650000 650000
UNITS METERS
SHAPEPATH "shape"
IMAGECOLOR 255 255 0
SYMBOLSET "symbols-dac.sym"
PROJECTION
'init=epsg:3163'
END
CONFIG 'MS_ERRORFILE' '/var/www/tmp/ms_error.log'
OUTPUTFORMAT
NAME "OGRGML"
DRIVER "OGR/GML"
FORMATOPTION "STORAGE=filesystem"
FORMATOPTION "FORM=multipart"
FORMATOPTION "FILENAME=/var/www/tmp/result.gml"
END
WEB
TEMPLATE "template.html"
IMAGEPATH "/var/www/tmp/"
IMAGEURL "/tmp/"
METADATA
'wms_title' 'DAC_DATA'
'wms_srs' 'EPSG:3163'
'wfs_title' 'DEMO'
'wfs_olineressource' 'http://192.168.10.108/cgi-bin/mapserv?'
'wfs_srs' 'EPSG:3163'
'wfs_enable_request' '*'
END
END
LAYER
NAME "Piste"
DEBUG 5
METADATA
'wfs_title' 'Piste'
'wfs_srs' 'EPSG:3163'
'gml_featureid' 'PISTAER_ID'
'gml_include_items' 'all'
'wfs_enable_request' '*'
'wms_enable_request' '*'
'ows_geomtype' 'LineString25D'
'wfs_geomtype' 'LineString25D'
'wfs_getfeature_formatlist' 'OGRGML'
END
CONNECTION "PISTAERO_line.shp"
CONNECTIONTYPE OGR
DATA 'PISTAERO_line'
STATUS ON
DUMP true
TYPE LINE25D
CLASS
NAME "line_color"
COLOR 255 215 0
END
END
END
I don't understand why the /var/www/tmp/result.gml file is never
created. It looks like that the OGRGML OUTPUTFORMAT is not used by mapserv.
Kind regards,
Sylvain
More information about the MapServer-users
mailing list