[Mapserver-users] problem with PostGIS layers with a bit() column

Perry Casson perry.casson at waypointinfo.com
Fri Apr 30 10:13:52 EDT 2004


I'm quite new to all this MapServer stuff but there appears to be a bug 
when calling layer->getShape() on a PostGIS layer that contains columns 
that are of of type bit().  I see the code in mappostgis.c that builds 
this query but I'm not up to speed enough to know if the problem should 
be fixed there or farther up stream.   I'm running 4.0.2 (Linux)

Here's the error:
Fatal error: [MapServer Error]: msPOSTGISLayerGetShape(): Error 
executing POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor2 BINARY 
CURSOR FOR SELECT 
esn::text,gmuid::text,messageid::text,timestamp::text,recievedat::text,devicetype::text,identifier::text,isgps::text,longitude::text,latitude::text,gpsvalid::text,gpstime::text,v1::text,v2::text,v3::text,max1::text,max2::text,max3::text,actuator_previous::text,actuator_current::text,userdata::text,battery::text,asbinary(force_collection(force_2d(geo)),'NDR') 
from wp_point WHERE OID = 27497 -ERROR: Cannot cast type bit to text

and here how the table being queried is created:
CREATE TABLE wp_point(ESN varchar(12), gmUID varchar(40), messageID 
varchar(40), TimeStamp timestamp, RecieveDat timestamp, DeviceType 
varchar(32), Identifier varchar(32), IsGPS varchar(2), Longitude float8, 
Latitude float8, GPSValid varchar(2), GPSTime timestamp, V1 int2, V2 
int2, V3 int2, Max1 int2, Max2 int2, Max3 int2, Actuator_Previous bit(8) 
, Actuator_Current bit(8) ,UserData varchar(64), Battery varchar(8));
SELECT AddGeometryColumn('sentinel', 'wp_point', 'geo', 4326, 
'GEOMETRY', 2);

Perry Casson




More information about the mapserver-users mailing list