[MAPSERVER-USERS] mapserver connection database

nickthegreek- nickthegreek_ at hotmail.com
Mon Mar 31 22:19:19 EDT 2008


hello to everyone ... what i wanna is a help and tell me what exactly to do
...
i have made an enviroment who it shows me a map , i can move in the map,
zoom in the map , select layers to show and some otheres... in the mapfile
all the data that are be shown are declared with the path eg :
 ''c:\ms4w\apps\roads.shp"

what i wanna is to put all these files in a database and to connect to the
database and as a result to be shown

first.., what database to use, the easiest 
second, how i can add these files... shp,shx.dbf  ..how i can create these
tables with the fields ,cause the shp and shx files cannot see what they
have inside..

i wanna a big help, cause i can't understand how to indert all these files
in a database and then to be shown... many thanks to everyone

from a try i did.. i insert in the postgresql  the file country.shp..
then i try to connect to it from the mapfile and in this layer i write
.....................
CONNECTIONTYPE postgis
          CONNECTION "host=localhost dbname=postgis user=postgres
password=d3klw7 port=5432"
          STATUS ON
	    DATA "the_geom FROM province"
....................

the result i take is 

Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named 'canada
states'. in C:\ms4w\Apache\htdocs\canada.php on line 203

Warning: [MapServer Error]: prepare_database(): Error executing POSTGIS
DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR
SELECT asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from
province WHERE the_geom && setSRID('BOX3D(-179.041698235478
25.406659782504,179.75431737052 89.1495117937299)'::BOX3D,
find_srid('','province','the_geom') )' Postgresql reports the error as
'ERROR: column "oid" does not exist LINE 1:
...inary(force_collection(force_2d(the_geom)),'NDR'),OID::text ... ^ ' More
Help: Error with POSTGIS data variable. You specified 'check your .map
file'. Standard ways of specifiying are : (1) 'geometry_column from
geometry_table' (2) 'geometry_column from (sub query) as foo using unique
column name using SRID=srid#' Make sure you put in the 'using unique column
name' and 'using SRID=#' clauses in. For more help, please see
http://postgis.refractions.net/documentation/ Mappostgis.c - version of Jan
in C:\ms4w\Apache\htdocs\canada.php on line 203

Warning: [MapServer Error]: msPOSTGISLayerRetrievePGVersion(): Error
executing POSTGIS statement (msPOSTGISLayerRetrievePGVersion():select
substring(version() from 12 for (position('on' in version()) - 13)) in
C:\ms4w\Apache\htdocs\canada.php on line 203

Fatal error: Call to a member function saveImage() on a non-object in
C:\ms4w\Apache\htdocs\canada.php on line 204



can u understand wht is the problem??pls ..it is my diploma and i have to do
it until the end of the week 
-- 
View this message in context: http://www.nabble.com/mapserver-connection-database-tp16404505p16404505.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list