[Mapserver-users] Querying Postgis attributes

Nicolas Boretos nicolas at maich.gr
Tue Dec 9 05:08:35 PST 2003


Hi,

trying to get used to postgis/ms, and wonder as how to displya some 
attributes resulting from a query.
Using shapefiles, the attribute values are returned ok. Using postgis, 
it seems my query template is returned
literally, e.g no substitution..

Below is part of my query template and a snip from my mapfile..

Summarizing, shape files display and query correctly, postgis displays 
correctly, but does not query correctly.


LAYER # Land Units
  NAME "landunits"
  STATUS DEFAULT
  TYPE POLYGON
  CONNECTIONTYPE POSTGIS
  CONNECTION "dbname=testdb user=postgis host=localhost"
  DATA "the_geom from landunits"
  DUMP true
  HEADER "landunits_header.html"
  FOOTER "landunits_footer.html"
  CLASS # Land units
        NAME "Land Units"
        ##An expression here draws the the main map accordingly
        #EXPRESSION ([PERIMETER] > 10000)
        COLOR 55 0 255
        OUTLINECOLOR 0 0 0
        TEMPLATE "landunits_query.html"
END # end of Land units class object
END # end of Land units layer object


Query template....

<HTML>
    <h3>Record Number : [rn]</h3>
    <li>Area : [AREA]</li>
    <li>Perimeter : [PERIMETER]</li>
    <li>Slope_id : [SLOPE_ID]</li>
etc....


regards,

nicolas  boretos





More information about the MapServer-users mailing list