Query map

Stephen Lime steve.lime at dnr.state.mn.us
Wed Dec 1 13:36:18 EST 1999


Hi Ross: QueryMaps are actually the last detail I'm hammering out with 3.3 before
the beta. They are fully implemented for ITEMQUERY, ITEMNQUERY and QUERY
mode. I've attached the test suite files for the itemquery example. Hopefully that will
help. I'll fill out that section of the mapfile docs on the main website tonite.

In general QueryMaps are mean't as a way to visualize a set of query results. Here
are the basic params:

QUERYMAP
  STATUS ON|OFF - the usual
  STYLE SELECTED|HILITE|NORMAL - style of map, see below
  COLOR r g b - hilite color
END

Here's what the styles mean:

SELECTED - draws layers normally but only draws selected features in queried layers
HILITE - same as SELECTED but selected features are drawn with the hilite color
NORMAL - draws all layers normally. this would be used for generating a map based on
                  the extents of the selected features.

To use the extent(s) of the selected features to create the map you would set mapext=shapes.
This causes a normal query with the query map generated for the area covering only the
selected shapes.

I should also note that all of the query modes also/will support a map only mode that will
allow you to generate maps based solely on, say item values. These modes are
ITEMQUERYMAP, QUERYMAP, ITEMNQUERYMAP and so on... They are just like
mode=MAP and return just an image. I believe case 3 or 4 in the included file shows
this functionality.

Steve

BTW I'm looking into the JOIN problem...

Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Searle Ross <Ross.Searle at dnr.qld.gov.au> 12/01/99 02:15AM >>>
Has anyone worked out how to get the querymap stuff working yet. I am using
V3.3 (downloaded today)

I have tried to copy the info at
http://arachnid.dnr.state.mn.us/ms_test/itemquery/test.html but I must be
missing something. My map file is attached below. When I query the map a
reference to an image is substituted into the returned template but no image
is actually created. I have no idea how this is meant to be setup so any
hints would be appreciated

On another topic, has anyone had any luck with relational joins. I can get a
join to work no worries (as per attached map file - the relevant section is
commented out) but it is only returning the first row of the joined table
(ie one to one) even though the type is set to multiple.


Thanks
Ross


#
# Start of map file
#
NAME NRmeta
STATUS ON
SIZE 600 600
SHADESET /data4/WWW/mapserver/symbols/shade.sym
MARKERSET /data4/WWW/mapserver/symbols/marker.sym
LINESET /data4/WWW/mapserver/symbols/line.sym
EXTENT 224000 7012000 445400 7310000
UNITS METERS
SHAPEPATH "/data4/WWW/develop/NRmeta/gis"
IMAGECOLOR 255 255 255


#
# Start of web interface definition
#
WEB
  IMAGEPATH /data4/WWW/tmp/
  IMAGEURL /tmp/
  TEMPLATE nrmain.html
  #LOG test.log
  footer "sel.html"

END

QUERYMAP
  status on
  STYLE HILITE
  COLOR 255 255 0
END


#
# Start of layer definitions
#

LAYER
  NAME test2
  TYPE POLYGON
  STATUS DEFAULT
  DATA test2
  CLASS
    SYMBOL 0
    OUTLINECOLOR 0 0 0
    COLOR 248 248 95
  END



    HEADER "qry_test_header.html"
    FOOTER "qry_test_footer.html"


 QUERY

TEMPLATE qry_test_main.html

#TEMPLATE jointest2.html
#     JOIN 
#        type multiple
#	from ID
#	name test1
#	table jointable.dbf
#	TEMPLATE jointest.html
#	to TEST
	
#     END




end
#  END
END
END
END





Ross Searle
Natural Resource Information Management Officer
Department of Natural Resources
PO Box 1143 
Bundaberg QLD 4670. Australia
Ph : 0741 537 888 Fax : 0741 537 823


-------------- next part --------------
A non-text attachment was scrubbed...
Name: itemquery.tar.gz
Type: application/octet-stream
Size: 2752 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/19991201/b2ad6ddc/itemquery.tar.obj


More information about the mapserver-users mailing list