postGIS problems
Tim Tsai
ttsai at POBOX.COM
Tue Sep 14 02:07:13 PDT 2004
I installed mapserver/postgis a few days ago but I can't seem to get
a simple example working. Is somebody willing to send me an example
postGIS map file as well as an SQL dump of their test database?
I just need a working demo - even if all it does is draw one line on
the screen.
This is the mapfile I've used so far. I believe the extent is
right judging from the SQL result below. All I get is just a gray
background on the PNG - no line segments at all. I've also tried
TYPE LINES and same problem.
I have verified that database connection is successful and queries
were made.
Thanks,
Tim
-- extent query --
ogc=# select extent(centerline) from road_segments;
extent
----------------------
BOX3D(0 0 0,84 48 0)
(1 row)
-- mapserver.log --
Tue Sep 14 03:55:16 2004,50497,69.244.27.248,DEMO,3,-0.140300 -4.060000 84.140300 52.060000,-1.000000 -1.000000,DEMO ,normal execution
-- mapfile --
MAP
NAME DEMO
SIZE 600 400
IMAGETYPE PNG
IMAGECOLOR 240 240 240
EXTENT 0 0 84 48
WEB
LOG /tmp/mapserver.log
END
DEBUG ON
LAYER
CONNECTIONTYPE postgis
NAME "DEMO"
# Connect to a remote spatial database
CONNECTION "user=user dbname=db host=127.0.0.1"
DATA "centerline from road_segments"
TYPE POLYGON
STATUS DEFAULT
END
END
More information about the MapServer-users
mailing list