[Mapserver-users] POSTGIS mapserver difficulties for point data in latlong.
Ross, Troy D
tdross at sandia.gov
Fri Dec 12 10:30:54 PST 2003
Hello,
I'm trying to use PostGIS to store latitude and longitude and place names
around the world. I would then like to use mapserver to display a subset of
those place names.
I got the data for the place names from the GEOnet Name server
http://earth-info.nima.mil/gns/html/.
I've written my own php script that essentially works in many ways like the
mapserv cgi script included with mapserver. I'm running the latest
Mapserver 4.0.1 on Solaris. I have another table(world map) in the database
which I imported using shp2pgsql and it works without any problems.
The point that I've created isn't showing up on my generated map, It seems
to me that I'm having either a projection problem or I'm failing to do
something related to my table creating in postgis. Currently the layer
shows up in my layer list, but when I enable it the symbol associated with
petropalv isn't displayed.
Thank you,
Troy
Here are the last few steps I've taken:
I've created the following table in my postgis database
* "CREATE TABLE test (id INTEGER PRIMARY KEY, name VARCHAR(40) NOT NULL);"
* "SELECT AddGeometryColumn ('[dbname]', 'test', 'geom', -1, 'GEOMETRY',
2);"
* "CREATE INDEX test_geom_idx ON test USING GIST (geom
GIST_GEOMETRY_OPS);"
And inserted the following into the test table:
id | name | geom
----------+-----------+--------------------------------------
-2342388 | Petropavl | SRID=-1;POINT(54.8752778 69.1627778)
My mapfile has the following layer definition:
LAYER
NAME "Places"
TYPE point
CONNECTIONTYPE postgis
CONNECTION "user=[removed] password=[removed] dbname=[removed]"
DATA "geom from test"
STATUS OFF
CLASS
TITLE "Places"
COLOR 0 200 0
OUTLINECOLOR 255 0 0
SYMBOL 3
SIZE 10
END
PROJECTION
"proj=latlong"
"ellps=WGS84"
END
END #LAYER
More information about the MapServer-users
mailing list