[mapserver-users] Conexion with postgres-postgis

Luigi Castro Cardeles luigi.cardeles at gmail.com
Mon Jan 12 10:39:04 PST 2009


Hi,

is chile_comuna a table with the_geom column?

"Postgresql reports the error as 'ERROR: column "NAME" does not exist LINE
1"
the "NAME"::text,asbinary(force_collection(force_2d(the_geom)),'NDR')" doest
not exist, so maybe your table do not have a the geom column.

Did you create that column with addgeometrycolumn(...) function?
se if you have a entry in geometry_columns table.

[]'s


2009/1/12 Valeria Muñoz <valemunoz at gmail.com>

> HI
>
>   I am trying to connect postgres with my Mapfile, but I get the following
> error:
>
> msDrawMap(): Image handling error. Failed to draw layer named
> 'chile_comuna'. prepare_database(): Query error. Error executing POSTGIS
> DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR
> SELECT
> "NAME"::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text
> from chile_comuna WHERE the_geom && setSRID('BOX3D(-71.2556639435156
> -29.9271886101172,-71.2540857172265 -29.9256103838281)'::BOX3D,
> find_srid('','chile_comuna','the_geom') )' Postgresql reports the error as
> 'ERROR: column "NAME" does not exist LINE 1: DECLARE mycursor BINARY CURSOR
> FOR SELECT "NAME"::text,asbin... ^ ' 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 23/2004.
>
>  I use the command shp2pgsql to pass the information of the shapefile to
> postgres table.
>
> MapFile
>  LAYER
>     NAME 'chile_comuna'
>     TYPE POLYGON
>     #DATA 'chile_comuna.shp'
>     CONNECTIONTYPE postgis
>   CONNECTION "user=postgres password=1234 dbname=geo_referencia
> host=localhost"
>   DATA "the_geom from chile_comuna"
> .....
>
>  can anyone help me? pleasee...
> rgs
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>


-- 
Luigi Castro Cardeles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090112/d38c8473/attachment.htm>


More information about the MapServer-users mailing list