Re: [mapserver-users] newbie: Error in first atttempt to use postgis with mapserver?

2009-02-13 Thread vikram_vap

Hello,

I have same problem as Saka. I was not able to get mapfile and
positgis working together. I am getting empty page when I am trying to
render map file containing SQL query to  postgis.  

Saka it will be great if you can share your experience personally.
Thanks everyone.

Vikram

Saka Royban wrote:
 
  
 Hi everyone.
 i've used workshop material of FOSS4G2007 (PostGIS workshop)to learn
 postgis along with its data. but there is a problem
 i got this error in first attempt to retrieve data from postgis:
 
 msDrawMap():
 Image handling error. Failed to draw layer named 'bc_municipality'.
 prepare_database(): Query error. Error declaring cursor: ERROR: column
 oid does not exist LINE 1:
 ...inary(force_collection(force_2d(the_geom)),'NDR'),OID::text ... ^
 With query string:
 DECLARE mycursor BINARY CURSOR FOR SELECT
 asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from
 bc_municipality WHERE the_geom  setSRID('BOX3D(458426.1
 260651.497368421,1943216.4
 1373313.90263158)'::BOX3D, find_srid('','bc_municipality ','the_geom')
 ) msPOSTGISLayerRetrievePGVersion(): Query error. Error executing
 POSTGIS statement (msPOSTGISLayerRetrievePGVersion():select
 substring(version() from 12 for (position('on' in version()) - 13)) 
 
 i don't know what causes the problem although it sounds easy.
 THX
 
 
 
 
 -Inline Attachment Follows-
 
 ___
 postgis-users mailing list
 postgis-us...@postgis.refractions.net
 http://postgis.refractions.net/mailman/listinfo/postgis-users
 
 
 
   
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 

-- 
View this message in context: 
http://n2.nabble.com/newbie%3A-Error-in-first-atttempt-to-use-postgis-with-mapserver--tp2161688p2323496.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] newbie: Error in first atttempt to use postgis with mapserver?

2009-01-16 Thread Saka Royban
Thanks alot
you are right. although i could understand from error message to have a OID 
column (it is gid in my table), my mistake was about ignoring 'USING' in 'USING 
UNIQUE gid).
thanks again to help me





From: Dan Little danlit...@yahoo.com
To: Venkat Rao Tammineni vtammin...@roulacglobal.com; Saka Royban 
srph...@yahoo.com; MapServer mapserver-users@lists.osgeo.org
Sent: Thursday, January 15, 2009 10:17:06 PM
Subject: Re: [mapserver-users] newbie: Error in first atttempt to use postgis 
with mapserver?


Newer versions of Postgres do not automatically create an OID column, as it was 
a limited 32-bit construct.

Try add using unique XXX where XXX is the column name of the primary key (or 
at least a unique key).  If you've uploaded the layer from a shapefile using 
ogr2ogr you can use the column ogc_fid





From: Venkat Rao Tammineni vtammin...@roulacglobal.com
To: Saka Royban srph...@yahoo.com; MapServer mapserver-users@lists.osgeo.org
Sent: Thursday, January 15, 2009 5:33:35 AM
Subject: RE: [mapserver-users] newbie: Error in first atttempt to use postgis 
with mapserver?

 
Hi,
 
  I think OID column may not be with your table…Can
you check that ..
 
Thanks
Venkat.
 
From:mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Saka
Royban
Sent: Thursday, January 15, 2009 3:36 PM
To: MapServer
Subject: [mapserver-users] newbie: Error in first atttempt to use
postgis with mapserver?
 
Hi everyone.
i've used workshop material of FOSS4G2007 (PostGIS workshop)to learn postgis
along with its data. but there is a problem
i got this error in first attempt to retrieve data from postgis:

msDrawMap(): Image handling error. Failed to draw layer named
'bc_municipality'. prepare_database(): Query error. Error declaring cursor:
ERROR: column oid does not exist LINE 1:
...inary(force_collection(force_2d(the_geom)),'NDR'),OID::text ... ^ With query 
string: DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from
bc_municipality WHERE the_geom  setSRID('BOX3D(458426.1 
260651.497368421,1943216.4 1373313.90263158)'::BOX3D,
find_srid('','bc_municipality ','the_geom') ) msPOSTGISLayerRetrievePGVersion():
Query error. Error executing POSTGIS statement
(msPOSTGISLayerRetrievePGVersion():select substring(version() from 12 for
(position('on' in version()) - 13)) 

i don't know what causes the problem although it sounds easy.
THX




-Inline Attachment Follows-

___
postgis-users mailing list
postgis-us...@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] newbie: Error in first atttempt to use postgis with mapserver?

2009-01-15 Thread Venkat Rao Tammineni
Hi,

 

  I think OID column may not be with your table.Can you check that ..

 

Thanks

Venkat.

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Saka Royban
Sent: Thursday, January 15, 2009 3:36 PM
To: MapServer
Subject: [mapserver-users] newbie: Error in first atttempt to use postgis
with mapserver?

 

Hi everyone.
i've used workshop material of FOSS4G2007 (PostGIS workshop)to learn postgis
along with its data. but there is a problem
i got this error in first attempt to retrieve data from postgis:

msDrawMap(): Image handling error. Failed to draw layer named
'bc_municipality'. prepare_database(): Query error. Error declaring cursor:
ERROR: column oid does not exist LINE 1:
...inary(force_collection(force_2d(the_geom)),'NDR'),OID::text ... ^ With
query string: DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from
bc_municipality WHERE the_geom  setSRID('BOX3D(458426.1
260651.497368421,1943216.4 1373313.90263158)'::BOX3D,
find_srid('','bc_municipality ','the_geom') )
msPOSTGISLayerRetrievePGVersion(): Query error. Error executing POSTGIS
statement (msPOSTGISLayerRetrievePGVersion():select substring(version() from
12 for (position('on' in version()) - 13)) 

i don't know what causes the problem although it sounds easy.
THX







-Inline Attachment Follows-

___
postgis-users mailing list
postgis-us...@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

 

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] newbie: Error in first atttempt to use postgis with mapserver?

2009-01-15 Thread Dan Little
Newer versions of Postgres do not automatically create an OID column, as it was 
a limited 32-bit construct.

Try add using unique XXX where XXX is the column name of the primary key (or 
at least a unique key).  If you've uploaded the layer from a shapefile using 
ogr2ogr you can use the column ogc_fid





From: Venkat Rao Tammineni vtammin...@roulacglobal.com
To: Saka Royban srph...@yahoo.com; MapServer mapserver-users@lists.osgeo.org
Sent: Thursday, January 15, 2009 5:33:35 AM
Subject: RE: [mapserver-users] newbie: Error in first atttempt to use postgis 
with mapserver?

 
Hi,
 
  I think OID column may not be with your table…Can
you check that ..
 
Thanks
Venkat.
 
From:mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Saka
Royban
Sent: Thursday, January 15, 2009 3:36 PM
To: MapServer
Subject: [mapserver-users] newbie: Error in first atttempt to use
postgis with mapserver?
 
Hi everyone.
i've used workshop material of FOSS4G2007 (PostGIS workshop)to learn postgis
along with its data. but there is a problem
i got this error in first attempt to retrieve data from postgis:

msDrawMap(): Image handling error. Failed to draw layer named
'bc_municipality'. prepare_database(): Query error. Error declaring cursor:
ERROR: column oid does not exist LINE 1:
...inary(force_collection(force_2d(the_geom)),'NDR'),OID::text ... ^ With query 
string: DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from
bc_municipality WHERE the_geom  setSRID('BOX3D(458426.1 
260651.497368421,1943216.4 1373313.90263158)'::BOX3D,
find_srid('','bc_municipality ','the_geom') ) msPOSTGISLayerRetrievePGVersion():
Query error. Error executing POSTGIS statement
(msPOSTGISLayerRetrievePGVersion():select substring(version() from 12 for
(position('on' in version()) - 13)) 

i don't know what causes the problem although it sounds easy.
THX




-Inline Attachment Follows-

___
postgis-users mailing list
postgis-us...@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users