[Mapserver-users] MapServer and PostGIS....
Nick Ton
nton at photon.com
Wed May 28 07:32:10 PDT 2003
Hi Everyone,
I am a newbie to MapServer. I have read the PostGIS information page on
how to connect MapServer to PostGIS. I have used the shp2pgsql function
to dump some data into PostGIS. Everything seems to be ok on the PostGIS
side.
I have created a test map file to see if I can connect to PostGIS. Here is
my map file that is being referenced by my test html page:
-------------------- map file---------------------------------
NAME S3EX3
WEB
TEMPLATE /home/nton/public_html/tutorial35/geo_test/s3ex3.html
IMAGEURL "/~nton/public_html/tutorial35/geo_test/"
END
EXTENT -90. -30 20. 90
SIZE 600 600
LAYER
CONNECTIONTYPE postgis
NAME "airports_tbl"
# Connect to a remote spatial database
CONNECTION "user=postgres dbname=geo_db host=172.16.3.82"
# Get the lines from the 'the_geom' column of the 'airports_tbl' table
DATA "the_geom from airports_tbl"
STATUS ON
TYPE LINE
CLASS
COLOR 0 0 0
END
END
END # end of map file
-------------------- map file---------------------------------
I had modified one of the tutorial html file to see if I can make it work.
The
html page returns properly but no image shows up in the designated area.
I used "View Source" on the web browser to see where the image is generated
and it seems to generate the .png file name for the image reference like
this:
<input type="image" name="img"
src="/~nton/tutorial35/geo_test/S3EX31054076682716.png" border="0">
But when I try to locate that image on the local directory it's not there.
Has anyone experienced the same problems? Can some one tell me what
I am doing wrong?
Thanks In Advance,
Nick
More information about the MapServer-users
mailing list