[mapserver-users] Shapefile, itemnquery and HTML image map generation problem

guineau at earthlink.net guineau at earthlink.net
Mon Dec 7 10:08:19 EST 2009


Hi Dave, the missing id's seem randomly distributed spatially. There is no obvious pattern to the id's - they are of the form NNN or NNNL (where N is a number, L is  letter. I can even restrict the URL to a single (missing) id and it still does not emit the <area> tag, but does render the class layer in the image.

john

----------
Sent from my Verizon Wireless mobile phone

------Original Message------
From: Fawcett, David (MPCA) <David.Fawcett at state.mn.us>
To: "mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org>,"Fawcett, David (MPCA)" <David.Fawcett at state.mn.us>
Date: Mon, Dec 7, 8:41 AM -0600
Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem

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



More information about the mapserver-users mailing list