[mapserver-users] WMS GetFeatureInfo - how do I get the geometry?
Stephen Woodbridge
woodbri at swoodbridge.com
Sat Nov 21 07:59:38 PST 2009
I using a WMS GetFeatureInfo request that is returning GML and seems to
be working except I need the geometry and all I'm getting is the
bounding box of the the object.
I have read through the "WMS Server" but I'm not seeing any clues there
that might help.
Thanks,
-Steve
http://example.com/cgi-bin/mapserv?map=/maps/test-900913-wms.map&&service=WMS&version=1.1.0&request=GetFeatureInfo&layers=Parcels&query_layers=Parcels&styles=&bbox=-10739792.365943%2C3773437.912618%2C-10739165.343461%2C3774064.9351&srs=EPSG%3A900913&feature_count=10&x=236&y=462&height=525&width=525&info_format=application%2Fvnd.ogc.gml
<?xml version="1.0" encoding="ISO-8859-1"?>
<msGMLOutput
xmlns:gml="http://www.opengis.net/gml"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parcels_layer>
<Parcels_feature>
<gml:boundedBy>
<gml:Box srsName="EPSG:900913">
<gml:coordinates>-10739641.347221,3773434.931311
-10739364.637001,3773760.627503</gml:coordinates>
</gml:Box>
</gml:boundedBy>
</Parcels_feature>
</Parcels_layer>
</msGMLOutput>
LAYER defined like:
LAYER
NAME "Parcels"
METADATA
wms_title "Parcels"
#gml_include_items "all" # tried with/without commented
END
TRANSPARENCY ALPHA
STATUS ON
CONNECTIONTYPE postgis
CONNECTION "user=**** dbname=mytest_data host=localhost"
DATA "the_geom from (select * from parcels) as foo using
SRID=900913 using unique gid"
TYPE POLYGON
LABELITEM "parcel_id"
MAXSCALEDENOM 4000
HEADER "/template/parcels_hdr.html"
TEMPLATE "/template/parcels_tpl.html"
FOOTER "/template/parcels_ftr.html"
DUMP TRUE
PROJECTION
"init=epsg:900913"
END
CLASS
STYLE
COLOR -1 -1 -1
WIDTH 2
OUTLINECOLOR 255 0 255
END
LABEL
TYPE TRUETYPE
FONT "arial"
SIZE 7
COLOR "#000000"
PARTIALS FALSE
END
END
END
More information about the MapServer-users
mailing list