[mapserver-users] Shapefile, itemnquery and HTML image map generation problem
Fawcett, David (MPCA)
David.Fawcett at state.mn.us
Mon Dec 7 06:41:30 PST 2009
John,
What features are not being rendered? Are they randomly distributed? located at the outside edges of the rendered features? Any pattern to the IDs?
David.
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John Guineau
Sent: Friday, December 04, 2009 8:12 AM
To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
How would I go about debugging this?
I think this is GDAL and its query of shapefiles, right?
The bottom line is that MapServer finds all the items when it is rendering the map by layer/class EXPRESSION, but the qstring in a URL using the exact same EXPRESSION string misses some of the items.
I can also use ogrinfo from MAP4W to execute an SQL query directly on the shapefile and the items in questions are certainly there.
In the image below, the green areas are result of the mapfile layer class EXPRESSION - all are correctly rendered. However, several of them do not get generated (HTML imagemap <area> tags not generated) when using a URL and itemnquery/qstring with the identical EXPRESSION.
How do I enable debug (enabling mapfile DEBUG does not seem to give any useful info as to why GDAL is skipping certain items) Am I better off using MAP4W or similar to get debug/trace info for shapefile queries?
john
[cid:image001.png at 01CA7719.0F845920]
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John Guineau
Sent: Thursday, December 03, 2009 3:11 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
I have a basic vector shapefile that I am trying to generate HTML clickable maps from. It seems to work well for the most part, however there is a problem where some items from the shapefile do not get processed from the qstring in the browser, but they are processed fine in the mapfile layer (to color them differently).
So the map that renders shows all the items colored properly as the layer class defines. Using the exact same list of items in the HTTP query string causes several items to be ignored (the HTML image map area is not generated).
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,114A,114B,115A,115B,115C")
Below is the layer section from the mapfile. I can post whatever else is helpful.
Thanks for any help on this.
john
LAYER
NAME map_m
DATA "map_shape"
TEMPLATE "bodytemplate.html"
HEADER "imapheader.html"
FOOTER "imapfooter.html"
PROJECTION
"proj=latlong"
"ellps=GRS80"
"init=epsg:4326"
END
TYPE polygon
STATUS ON
TRANSPARENCY 70
CLASS
NAME "MLRA"
COLOR 0 200 0
OUTLINECOLOR 0 0 0
EXPRESSION( "[MLRARSYM]" in "102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
END
METADATA
qstring_validation_pattern ".*"
END
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091207/0ffbda48/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 26620 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091207/0ffbda48/attachment.png>
More information about the MapServer-users
mailing list