[mapserver-users] METADATA part with postgis?
Twan Kogels
twan at twansoft.com
Fri Dec 7 04:53:20 PST 2001
Goodmorning,
This morning i converted the popplace.shp shapefile from the gmap demo to
postgresql with the shp2pgsql program. I needed to manual delete 2 columns
named UNIQUE_KEY from the popplace.dbf file, otherwise shp2pgsql could not
create the table and insert the data.
After this i changed the .map file and added a postgis layer:
==================================
LAYER
CONNECTIONTYPE postgis
NAME "popplace"
METADATA
"DESCRIPTION" "Cities"
"RESULT_FIELDS" "NAME"
END
# Connect to a remote spatial database
CONNECTION "user=postgres dbname=testdb host=10.0.0.2"
# Get the lines from the 'geom' column of the 'roads' table
DATA "the_geom from popplace_table"
STATUS ON
TYPE POINT
LabelItem "Name"
CLASSITEM "Capital"
CLASS
EXPRESSION "1"
TEMPLATE "ttt_query.html"
SYMBOL 2
SIZE 8
...
==================================
It all works very well ! The points that represent the cities appear on the
map, but when i try to query a city, i don't see any data.
I suspect that the METATAG part in the .map file are wrong:
==================================
METADATA
"DESCRIPTION" "Cities"
"RESULT_FIELDS" "NAME"
END
==================================
I searched the mapserver archive online and the postgis (yahoo) archive,
but could not find anything that explains (even mention) the METADATA
format that is needed for a postgis layer.
Has anybody got a idea what the correct format of the METADATA part is?
Best regards,
- twan
--
http://www.twansoft.com
More information about the MapServer-users
mailing list