PostGIS Layer Failing

Fawcett, David David.Fawcett at STATE.MN.US
Sat Dec 1 23:40:32 EST 2007


Thanks Ivan.  

This line is now working for me:  

DATA "the_geom FROM ten_points_layer using srid=26915"


-----Original Message-----
From: UMN MapServer Users List on behalf of ivan minc(ík
Sent: Sat 12/1/2007 5:02 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] PostGIS Layer Failing
 
I think this line DATA "the_geom FROM ten_points_layer using unique
the_geom"
    should be  DATA "the_geom FROM ten_points_layer using unique gid"

Ivan

William Kyngesburye wrote:
> Which version of PostGIS are you using?  There is a bug in PostGIS
> 1.3.1 and SVN that was fixed a few days ago that affects Leopard. 
> PostGIS had a function with a commonly used name, and this function
> was added to the Leopard libSystem.  This gets used in PostGIS instead
> of its own, causing Postgres to crash.
>
> Either install PostGIS from the latest SVN, or install my latest
> PostGIS if you are using my binaries.
>
>
> If that's not the problem, try looking in the console and system logs,
> as well as the Apache logs.  A library problem may just appear as an
> unidentified error at the PHP level, and digging into system logs may
> be needed to identify the problem.
>
>
> On Dec 1, 2007, at 1:52 PM, Fawcett, David wrote:
>
>> I am testing out a new install of PostGIS and MapServer on OS X
>> Leopard.  I built a map file to display a simple ten point layer
>> coming from PostGIS.
>>
>> I get the following error:
>>
>> msDrawMap(): Image handling error. Failed to draw layer named
>> 'basemap'. prepare_database(): Query error. Couldnt recover from a
>> bad query: 'DECLARE mycursor BINARY CURSOR FOR SELECT
>> asbinary(force_collection(force_2d(the_geom)),'NDR'),the_geom::text
>> from ten_points_layer WHERE the_geom && setSRID('BOX3D(146545.5
>> 4814000,804891.5 5472346)'::BOX3D,
>> find_srid('','ten_points_layer','the_geom') )'
>>
>> Here is the layer definition:
>> LAYER
>>    NAME basemap
>>    STATUS DEFAULT
>>    TYPE POLYGON
>>    CONNECTIONTYPE POSTGIS
>>    CONNECTION "host=localhost dbname=mydb user=myuser password=mypass
>> port=5432"
>>    DATA "the_geom FROM ten_points_layer using unique the_geom"
>>
>>    CLASS
>>        COLOR 255 255 255
>>       OUTLINECOLOR 181 181 181   #An OUTLINECOLOR with no COLOR gives
>> same effect as old POLYLINE
>>    END
>>
>>    PROJECTION
>>      "init=epsg:26915"
>>    END
>> END
>>
>> Any ideas?  I am also having trouble getting QGIS to display the layer.
>>
>> Thanks,
>>
>> David.
>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> "Time is an illusion - lunchtime doubly so."
>
> - Ford Prefect
>



More information about the mapserver-users mailing list