Hi,<br><br>is chile_comuna a table with the_geom column?<br><br>"Postgresql reports the error as 'ERROR: column "NAME" does not exist LINE 1"<br>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.<br>
<br>Did you create that column with addgeometrycolumn(...) function?<br>se if you have a entry in geometry_columns table.<br><br>[]'s<br><br><br><div class="gmail_quote">2009/1/12 Valeria Muņoz <span dir="ltr"><<a href="mailto:valemunoz@gmail.com">valemunoz@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>HI</div>
<div> </div>
<div> I am trying to connect postgres with my Mapfile, but I get the following error:</div>
<div> </div>
<div>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 <a href="http://postgis.refractions.net/documentation/" target="_blank">http://postgis.refractions.net/documentation/</a> Mappostgis.c - version of Jan 23/2004. </div>
<div> </div>
<div>
<div dir="ltr" style="text-align: left;">I use the command shp2pgsql to pass the information of the shapefile to postgres table.</div>
<div dir="ltr" style="text-align: left;"> </div>
<div dir="ltr" style="text-align: left;">MapFile</div>
<div dir="ltr" style="text-align: left;"> LAYER<br> NAME 'chile_comuna'<br> TYPE POLYGON <br> #DATA 'chile_comuna.shp'<br> CONNECTIONTYPE postgis<br> CONNECTION "user=postgres password=1234 dbname=geo_referencia host=localhost"<br>
DATA "the_geom from chile_comuna"<br>.....</div>
<div dir="ltr" style="text-align: left;"> </div>
<div dir="ltr" style="text-align: left;">
<div dir="ltr" style="text-align: left;">can anyone help me? pleasee...</div>
<div dir="ltr" style="text-align: left;">rgs</div></div></div>
<br>_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Luigi Castro Cardeles<br>