RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
Hmm, based on your comments about extent below, I just noticed that if I expand the extents well outside the area of interest, it renders more of the missing areas! Not all of them though. So it does seem extent related. You were right that it seems to favor the areas on the very interior of the extents. Unfortunately I then get a map that is too zoomed-out to be usable. But this seems to be the sensitivity! john -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Wednesday, December 09, 2009 6:33 AM To: 'Steve Lime'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem Hi Steve, Ok, I took the time to clean up the map file and make a simpler case for you to look at. Here is the archive: http://CoyoteTechnology.com/ms/shape.zip It's about 4 meg. If you unzip that to C:\ all the paths in the mapfile should work (except the MS4w path to Apache's temp directory). Otherwise it should be pretty straight-forward to get it going. I left 4 example layers that exhibit the problem. Each layer has an example URL to use to get it to render the map. Let me know if I missed anything. Thanks for the help! john -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Steve Lime Sent: Tuesday, December 08, 2009 9:26 AM To: guin...@earthlink.net; mapserver-users@lists.osgeo.org; steve.l...@state.mn.us Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Seems like an extent problem to me - the way the results are clustered in the center of the image. MapServer does apply a spatial pre-filter for attribute queries. However, the searchmap=true should compute a proper extent based on your image properties (extent, size) before doing the query. John, what are the changes you could zip up your data and mapfile for me? Steve W.John Guineau guin...@earthlink.net 12/08/09 7:05 AM Ok, try this: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:57 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Do the ones not selected fall at the end of your qstring? I'm wondering if something is getting truncated. I'd think you'd get a parsing error in that case, but perhaps not. Can you label the polygons with the value for MLRARSYM? Steve On 12/7/2009 at 6:19 PM, in message 01dc01ca779c$2c19eae0$844dc0...@net, W.John Guineau guin...@earthlink.net wrote: Hi Steve, OK, I added the QUERYMAP section and changed the URL: http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m mode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+-89+49mapsize =600+400qitem=MLRARSYMqstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10 2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D ,111E,112,113,114A,114B,115A,115B,115C%22) qlayer=coe_mmode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+- 89+49mapsize=600+400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,102B ,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1 11D,111E,112,113,114A,114B,115A,115B,115C) Now I get the map with some of the items highlighted in yellow, and the rest green: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:04 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Just add a querymap object to your mapfile, like so: QUERYMAP STATUS ON END Then change your URL to use the mode itemnquerymap and that should return just an image with the selected features highlighted in yellow. Steve On 12/7/2009 at 5:56 PM, in message 01ce01ca7798$dd4b89d0$97e29d...@net, W.John Guineau guin...@earthlink.net wrote: I'm new to mapserver, how do I quickly generate a querymap? I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also tried 5.2.1 that I compiled myself. john -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 6:40 PM To: 'W.John Guineau'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem GDAL's not in play here at all. If you generate a query map instead of an html image map
RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
Yup, that was it. I had some crazy extents defined for the URL strings. Apparently the center of gravity of my URL extents combined with the map image size gave me the false impression in the rendered map image that I had the region covered. It showed the region of interest, but selected a small area for actual query. Thanks for the critical bit of insight Steve - extents. And the querymap piece to easily show me what was actually being selected from the URL itemlist. john -Original Message- From: W.John Guineau [mailto:guin...@earthlink.net] Sent: Wednesday, December 09, 2009 6:51 AM To: 'W.John Guineau'; 'Steve Lime'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem Hmm, based on your comments about extent below, I just noticed that if I expand the extents well outside the area of interest, it renders more of the missing areas! Not all of them though. So it does seem extent related. You were right that it seems to favor the areas on the very interior of the extents. Unfortunately I then get a map that is too zoomed-out to be usable. But this seems to be the sensitivity! john -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Wednesday, December 09, 2009 6:33 AM To: 'Steve Lime'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem Hi Steve, Ok, I took the time to clean up the map file and make a simpler case for you to look at. Here is the archive: http://CoyoteTechnology.com/ms/shape.zip It's about 4 meg. If you unzip that to C:\ all the paths in the mapfile should work (except the MS4w path to Apache's temp directory). Otherwise it should be pretty straight-forward to get it going. I left 4 example layers that exhibit the problem. Each layer has an example URL to use to get it to render the map. Let me know if I missed anything. Thanks for the help! john -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Steve Lime Sent: Tuesday, December 08, 2009 9:26 AM To: guin...@earthlink.net; mapserver-users@lists.osgeo.org; steve.l...@state.mn.us Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Seems like an extent problem to me - the way the results are clustered in the center of the image. MapServer does apply a spatial pre-filter for attribute queries. However, the searchmap=true should compute a proper extent based on your image properties (extent, size) before doing the query. John, what are the changes you could zip up your data and mapfile for me? Steve W.John Guineau guin...@earthlink.net 12/08/09 7:05 AM Ok, try this: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:57 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Do the ones not selected fall at the end of your qstring? I'm wondering if something is getting truncated. I'd think you'd get a parsing error in that case, but perhaps not. Can you label the polygons with the value for MLRARSYM? Steve On 12/7/2009 at 6:19 PM, in message 01dc01ca779c$2c19eae0$844dc0...@net, W.John Guineau guin...@earthlink.net wrote: Hi Steve, OK, I added the QUERYMAP section and changed the URL: http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m mode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+-89+49mapsize =600+400qitem=MLRARSYMqstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10 2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D ,111E,112,113,114A,114B,115A,115B,115C%22) qlayer=coe_mmode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+- 89+49mapsize=600+400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,102B ,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1 11D,111E,112,113,114A,114B,115A,115B,115C) Now I get the map with some of the items highlighted in yellow, and the rest green: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:04 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Just add a querymap object to your mapfile, like so: QUERYMAP STATUS ON END Then change your URL to use the mode itemnquerymap and that should return just an image with the selected features highlighted in yellow
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-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Friday, December 04, 2009 8:12 AM To: 'W.John Guineau'; mapserver-users@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@01CA7719.0F845920] From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Thursday, December 03, 2009 3:11 PM To: mapserver-users@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.mapqlayer=coe_mmode=itemnquerysearchmap=truelayer=statesmapext=-91+34+-89+49mapsize=600+400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,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 inline: image001.png___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
From: W.John Guineau [mailto:guin...@earthlink.net] Sent: Monday, December 07, 2009 7:20 PM To: 'Steve Lime'; 'mapserver-users@lists.osgeo.org' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Hi Steve, OK, I added the QUERYMAP section and changed the URL: http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m mode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+-89+49mapsize =600+400qitem=MLRARSYMqstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10 2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D ,111E,112,113,114A,114B,115A,115B,115C%22) qlayer=coe_mmode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+- 89+49mapsize=600+400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,102B ,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1 11D,111E,112,113,114A,114B,115A,115B,115C) Now I get the map with some of the items highlighted in yellow, and the rest green: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:04 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Just add a querymap object to your mapfile, like so: QUERYMAP STATUS ON END Then change your URL to use the mode itemnquerymap and that should return just an image with the selected features highlighted in yellow. Steve On 12/7/2009 at 5:56 PM, in message 01ce01ca7798$dd4b89d0$97e29d...@net, W.John Guineau guin...@earthlink.net wrote: I'm new to mapserver, how do I quickly generate a querymap? I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also tried 5.2.1 that I compiled myself. john -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 6:40 PM To: 'W.John Guineau'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem GDAL's not in play here at all. If you generate a query map instead of an html image map does the output map look ok? What version are you using? Steve On 12/4/2009 at 8:11 AM, in message 04e001ca74eb$bc473400$34d59c...@net, W.John Guineau guin...@earthlink.net wrote: 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 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Thursday, December 03, 2009 3:11 PM To: mapserver-users@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.mapqlayer=coe_m; mode=itemnquerysearchmap=truelayer=statesmapext=-91+34+-89+49mapsize=600 +400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,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
RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem
Seems like an extent problem to me - the way the results are clustered in the center of the image. MapServer does apply a spatial pre-filter for attribute queries. However, the searchmap=true should compute a proper extent based on your image properties (extent, size) before doing the query. John, what are the changes you could zip up your data and mapfile for me? Steve W.John Guineau guin...@earthlink.net 12/08/09 7:05 AM Ok, try this: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:57 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Do the ones not selected fall at the end of your qstring? I'm wondering if something is getting truncated. I'd think you'd get a parsing error in that case, but perhaps not. Can you label the polygons with the value for MLRARSYM? Steve On 12/7/2009 at 6:19 PM, in message 01dc01ca779c$2c19eae0$844dc0...@net, W.John Guineau guin...@earthlink.net wrote: Hi Steve, OK, I added the QUERYMAP section and changed the URL: http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m mode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+-89+49mapsize =600+400qitem=MLRARSYMqstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10 2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D ,111E,112,113,114A,114B,115A,115B,115C%22) qlayer=coe_mmode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+- 89+49mapsize=600+400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,102B ,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1 11D,111E,112,113,114A,114B,115A,115B,115C) Now I get the map with some of the items highlighted in yellow, and the rest green: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:04 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Just add a querymap object to your mapfile, like so: QUERYMAP STATUS ON END Then change your URL to use the mode itemnquerymap and that should return just an image with the selected features highlighted in yellow. Steve On 12/7/2009 at 5:56 PM, in message 01ce01ca7798$dd4b89d0$97e29d...@net, W.John Guineau guin...@earthlink.net wrote: I'm new to mapserver, how do I quickly generate a querymap? I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also tried 5.2.1 that I compiled myself. john -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 6:40 PM To: 'W.John Guineau'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem GDAL's not in play here at all. If you generate a query map instead of an html image map does the output map look ok? What version are you using? Steve On 12/4/2009 at 8:11 AM, in message 04e001ca74eb$bc473400$34d59c...@net, W.John Guineau guin...@earthlink.net wrote: 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 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Thursday, December 03, 2009 3:11 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Shapefile
RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
Hi Steve. The missing data is not always clustered. It just happens on that map. I'll get you the map file and data tonight. I'm away from my pc now. -- Sent from my Verizon Wireless mobile phone --Original Message-- From: Steve Lime steve.l...@state.mn.us To: mapserver-users@lists.osgeo.org,steve.l...@state.mn.us Date: Tue, Dec 8, 8:26 AM -0600 Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Seems like an extent problem to me - the way the results are clustered in the center of the image. MapServer does apply a spatial pre-filter for attribute queries. However, the searchmap=true should compute a proper extent based on your image properties (extent, size) before doing the query. John, what are the changes you could zip up your data and mapfile for me? Steve W.John Guineau guin...@earthlink.net 12/08/09 7:05 AM Ok, try this: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:57 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Do the ones not selected fall at the end of your qstring? I'm wondering if something is getting truncated. I'd think you'd get a parsing error in that case, but perhaps not. Can you label the polygons with the value for MLRARSYM? Steve On 12/7/2009 at 6:19 PM, in message 01dc01ca779c$2c19eae0$844dc0...@net, W.John Guineau guin...@earthlink.net wrote: Hi Steve, OK, I added the QUERYMAP section and changed the URL: http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m mode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+-89+49mapsize =600+400qitem=MLRARSYMqstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10 2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D ,111E,112,113,114A,114B,115A,115B,115C%22) qlayer=coe_mmode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+- 89+49mapsize=600+400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,102B ,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1 11D,111E,112,113,114A,114B,115A,115B,115C) Now I get the map with some of the items highlighted in yellow, and the rest green: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:04 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Just add a querymap object to your mapfile, like so: QUERYMAP STATUS ON END Then change your URL to use the mode itemnquerymap and that should return just an image with the selected features highlighted in yellow. Steve On 12/7/2009 at 5:56 PM, in message 01ce01ca7798$dd4b89d0$97e29d...@net, W.John Guineau guin...@earthlink.net wrote: I'm new to mapserver, how do I quickly generate a querymap? I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also tried 5.2.1 that I compiled myself. john -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 6:40 PM To: 'W.John Guineau'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem GDAL's not in play here at all. If you generate a query map instead of an html image map does the output map look ok? What version are you using? Steve On 12/4/2009 at 8:11 AM, in message 04e001ca74eb$bc473400$34d59c...@net, W.John Guineau guin...@earthlink.net wrote: 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
RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
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.fawc...@state.mn.us To: mapserver-users@lists.osgeo.org mapserver-users@lists.osgeo.org,Fawcett, David (MPCA) david.fawc...@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-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Friday, December 04, 2009 8:12 AM To: 'W.John Guineau'; mapserver-users@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@01CA7719.0F845920] From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Thursday, December 03, 2009 3:11 PM To: mapserver-users@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.mapqlayer=coe_mmode=itemnquerysearchmap=truelayer=statesmapext=-91+34+-89+49mapsize=600+400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,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 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem
GDAL's not in play here at all. If you generate a query map instead of an html image map does the output map look ok? What version are you using? Steve On 12/4/2009 at 8:11 AM, in message 04e001ca74eb$bc473400$34d59c...@net, W.John Guineau guin...@earthlink.net wrote: 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 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Thursday, December 03, 2009 3:11 PM To: mapserver-users@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.mapqlayer=coe_m; mode=itemnquerysearchmap=truelayer=statesmapext=-91+34+-89+49mapsize=600 +400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,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,1 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C ) END METADATA qstring_validation_pattern .* END END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem
Do the ones not selected fall at the end of your qstring? I'm wondering if something is getting truncated. I'd think you'd get a parsing error in that case, but perhaps not. Can you label the polygons with the value for MLRARSYM? Steve On 12/7/2009 at 6:19 PM, in message 01dc01ca779c$2c19eae0$844dc0...@net, W.John Guineau guin...@earthlink.net wrote: Hi Steve, OK, I added the QUERYMAP section and changed the URL: http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m mode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+-89+49mapsize =600+400qitem=MLRARSYMqstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10 2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D ,111E,112,113,114A,114B,115A,115B,115C%22) qlayer=coe_mmode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+- 89+49mapsize=600+400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,102B ,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1 11D,111E,112,113,114A,114B,115A,115B,115C) Now I get the map with some of the items highlighted in yellow, and the rest green: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:04 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Just add a querymap object to your mapfile, like so: QUERYMAP STATUS ON END Then change your URL to use the mode itemnquerymap and that should return just an image with the selected features highlighted in yellow. Steve On 12/7/2009 at 5:56 PM, in message 01ce01ca7798$dd4b89d0$97e29d...@net, W.John Guineau guin...@earthlink.net wrote: I'm new to mapserver, how do I quickly generate a querymap? I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also tried 5.2.1 that I compiled myself. john -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 6:40 PM To: 'W.John Guineau'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem GDAL's not in play here at all. If you generate a query map instead of an html image map does the output map look ok? What version are you using? Steve On 12/4/2009 at 8:11 AM, in message 04e001ca74eb$bc473400$34d59c...@net, W.John Guineau guin...@earthlink.net wrote: 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 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Thursday, December 03, 2009 3:11 PM To: mapserver-users@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.mapqlayer=coe_m; mode=itemnquerysearchmap=truelayer=statesmapext=-91+34+-89+49mapsize=600 +400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,102B,102C,103,104,105 ,106,107A,107B,108A,108B
RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
I think the missing ones are from random places n the query string. I have tried putting just one of the missing MLRA in the query string and it still does not generate area How do I label? (I am really new to MapServer!) john -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:57 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Do the ones not selected fall at the end of your qstring? I'm wondering if something is getting truncated. I'd think you'd get a parsing error in that case, but perhaps not. Can you label the polygons with the value for MLRARSYM? Steve On 12/7/2009 at 6:19 PM, in message 01dc01ca779c$2c19eae0$844dc0...@net, W.John Guineau guin...@earthlink.net wrote: Hi Steve, OK, I added the QUERYMAP section and changed the URL: http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m mode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+-89+49mapsize =600+400qitem=MLRARSYMqstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10 2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D ,111E,112,113,114A,114B,115A,115B,115C%22) qlayer=coe_mmode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+- 89+49mapsize=600+400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,102B ,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1 11D,111E,112,113,114A,114B,115A,115B,115C) Now I get the map with some of the items highlighted in yellow, and the rest green: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:04 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Just add a querymap object to your mapfile, like so: QUERYMAP STATUS ON END Then change your URL to use the mode itemnquerymap and that should return just an image with the selected features highlighted in yellow. Steve On 12/7/2009 at 5:56 PM, in message 01ce01ca7798$dd4b89d0$97e29d...@net, W.John Guineau guin...@earthlink.net wrote: I'm new to mapserver, how do I quickly generate a querymap? I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also tried 5.2.1 that I compiled myself. john -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 6:40 PM To: 'W.John Guineau'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem GDAL's not in play here at all. If you generate a query map instead of an html image map does the output map look ok? What version are you using? Steve On 12/4/2009 at 8:11 AM, in message 04e001ca74eb$bc473400$34d59c...@net, W.John Guineau guin...@earthlink.net wrote: 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 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Thursday, December 03, 2009 3:11 PM To: mapserver-users@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
RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
If I reduce the query string to just one that does work: http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m; mode=itemnquerysearchmap=truelayer=statesmapext=-91+34+-89+49mapsize=600 +400qitem=MLRARSYMqstring=(%22[MLRARSYM]%22%20in%20%22105%22) I get a map with jus the one MLRA (#105) in yellow. If I select on that does not work (#112): http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m; mode=itemnquerysearchmap=truelayer=statesmapext=-91+34+-89+49mapsize=600 +400qitem=MLRARSYMqstring=(%22[MLRARSYM]%22%20in%20%22112%22) I get this error in the browser: msQueryByAttributes(): Search returned no results. No matching record(s) found. msSearchDiskTree(): Search returned no results. Unable to open spatial index for c:\shape\MLRA_42_low_res/mlra_v42.qix. In most cases you can safely ignore this message, otherwise check file names and permissions But 112 is clearly rendering in the CLASS of the LAYER. john -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Monday, December 07, 2009 8:50 PM To: 'Steve Lime'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem I think the missing ones are from random places n the query string. I have tried putting just one of the missing MLRA in the query string and it still does not generate area How do I label? (I am really new to MapServer!) john -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:57 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Do the ones not selected fall at the end of your qstring? I'm wondering if something is getting truncated. I'd think you'd get a parsing error in that case, but perhaps not. Can you label the polygons with the value for MLRARSYM? Steve On 12/7/2009 at 6:19 PM, in message 01dc01ca779c$2c19eae0$844dc0...@net, W.John Guineau guin...@earthlink.net wrote: Hi Steve, OK, I added the QUERYMAP section and changed the URL: http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m mode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+-89+49mapsize =600+400qitem=MLRARSYMqstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10 2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D ,111E,112,113,114A,114B,115A,115B,115C%22) qlayer=coe_mmode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+- 89+49mapsize=600+400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,102B ,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1 11D,111E,112,113,114A,114B,115A,115B,115C) Now I get the map with some of the items highlighted in yellow, and the rest green: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:04 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Just add a querymap object to your mapfile, like so: QUERYMAP STATUS ON END Then change your URL to use the mode itemnquerymap and that should return just an image with the selected features highlighted in yellow. Steve On 12/7/2009 at 5:56 PM, in message 01ce01ca7798$dd4b89d0$97e29d...@net, W.John Guineau guin...@earthlink.net wrote: I'm new to mapserver, how do I quickly generate a querymap? I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also tried 5.2.1 that I compiled myself. john -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 6:40 PM To: 'W.John Guineau'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem GDAL's not in play here at all. If you generate a query map instead of an html image map does the output map look ok? What version are you using? Steve On 12/4/2009 at 8:11 AM, in message 04e001ca74eb$bc473400$34d59c...@net, W.John Guineau guin...@earthlink.net wrote: 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
RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
Using the MS4W tools: C:\ ogrinfo mlra_v42.shx -sql select LRR_NAME,MLRARSYM FROM mlra_v42 where MLRARSYM in ('105','112') Returns data for both regions. C:\ ogrinfo -summary mlra_v42.shp mlra_v42 INFO: Open of `mlra_v42.shp' using driver `ESRI Shapefile' successful. Layer name: mlra_v42 Geometry: Polygon Feature Count: 2748 Extent: (-179.130478, -14.381652) - (179.788041, 71.397535) Layer SRS WKT: GEOGCS[GCS_North_American_1983, DATUM[North_American_Datum_1983, SPHEROID[GRS_1980,6378137.0,298.257222101]], PRIMEM[Greenwich,0.0], UNIT[Degree,0.0174532925199433]] MLRARSYM: String (4.0) MLRA_ID: Integer (3.0) MLRA_NAME: String (200.0) LRRSYM: String (2.0) LRR_NAME: String (135.0) -Original Message- From: W.John Guineau [mailto:guin...@earthlink.net] Sent: Monday, December 07, 2009 9:08 PM To: 'W.John Guineau'; 'Steve Lime'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem If I reduce the query string to just one that does work: http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m; mode=itemnquerysearchmap=truelayer=statesmapext=-91+34+-89+49mapsize=600 +400qitem=MLRARSYMqstring=(%22[MLRARSYM]%22%20in%20%22105%22) I get a map with jus the one MLRA (#105) in yellow. If I select on that does not work (#112): http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m; mode=itemnquerysearchmap=truelayer=statesmapext=-91+34+-89+49mapsize=600 +400qitem=MLRARSYMqstring=(%22[MLRARSYM]%22%20in%20%22112%22) I get this error in the browser: msQueryByAttributes(): Search returned no results. No matching record(s) found. msSearchDiskTree(): Search returned no results. Unable to open spatial index for c:\shape\MLRA_42_low_res/mlra_v42.qix. In most cases you can safely ignore this message, otherwise check file names and permissions But 112 is clearly rendering in the CLASS of the LAYER. john -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Monday, December 07, 2009 8:50 PM To: 'Steve Lime'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem I think the missing ones are from random places n the query string. I have tried putting just one of the missing MLRA in the query string and it still does not generate area How do I label? (I am really new to MapServer!) john -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:57 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Do the ones not selected fall at the end of your qstring? I'm wondering if something is getting truncated. I'd think you'd get a parsing error in that case, but perhaps not. Can you label the polygons with the value for MLRARSYM? Steve On 12/7/2009 at 6:19 PM, in message 01dc01ca779c$2c19eae0$844dc0...@net, W.John Guineau guin...@earthlink.net wrote: Hi Steve, OK, I added the QUERYMAP section and changed the URL: http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.mapqlayer=coe_m mode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+-89+49mapsize =600+400qitem=MLRARSYMqstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10 2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D ,111E,112,113,114A,114B,115A,115B,115C%22) qlayer=coe_mmode=itemnquerymapsearchmap=truelayer=statesmapext=-91+34+- 89+49mapsize=600+400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,102B ,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1 11D,111E,112,113,114A,114B,115A,115B,115C) Now I get the map with some of the items highlighted in yellow, and the rest green: -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us] Sent: Monday, December 07, 2009 7:04 PM To: W.John Guineau; mapserver-users@lists.osgeo.org; 'Steve Lime' Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem Just add a querymap object to your mapfile, like so: QUERYMAP STATUS ON END Then change your URL to use the mode itemnquerymap and that should return just an image with the selected features highlighted in yellow. Steve On 12/7/2009 at 5:56 PM, in message 01ce01ca7798$dd4b89d0$97e29d...@net, W.John Guineau guin...@earthlink.net wrote: I'm new to mapserver, how do I quickly generate a querymap? I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also tried 5.2.1 that I compiled myself. john -Original Message- From: Steve Lime [mailto:steve.l...@state.mn.us
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 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of W.John Guineau Sent: Thursday, December 03, 2009 3:11 PM To: mapserver-users@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.mapqlayer=coe_m; mode=itemnquerysearchmap=truelayer=statesmapext=-91+34+-89+49mapsize=600 +400qitem=MLRARSYMqstring=([MLRARSYM]%20in%20102A,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,1 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C ) END METADATA qstring_validation_pattern .* END END image001.png___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users