[Mapserver-users] RE: help with oid

Jan Hartmann jhart at frw.uva.nl
Fri Jan 31 06:13:01 PST 2003


Ryanne,

It *has* to do with OID, and a clear explanation has been added recently 
to the PostGIS documentation:

http://postgis.refractions.net/docs/x549.html#AEN607

Jan

ryanne cruz wrote:
>  
> hi list. 
>  
> does anyone here know of a site that discusses oid? or can anyone here explain 
> to me what oid is and how it is used? 
>  
> i am trying to set the data of a layer with a subselect as its argument. 
> example is: 
>  
> $wind->set(data,"geom from (select geom AS geom from wind where 
> provinceid=$provid and distance(wind.geom,(select geom from municipality where 
> munprovid=$munprovid))<=0)"); 
>  	  
>  
> but it results to an error: 
>  
> Warning: MapServer Error in msPOSTGISLayerWhichShapes(): prep_DB:Error 
> executing POSTGIS DECLARE statement (0.6 failed - retried 0.5 and it failed 
> too). DECLARE mycursor BINARY CURSOR FOR SELECT 
> watt_m2::text,asbinary(force_collection(force_2d(geom)),'NDR'),OID::text from 
> (select geom AS geom from wind where provinceid=1 and 
> distance(wind.geom,(select geom from municipality where munprovid=1))<=0) 
> WHERE geom && setSRID('BOX3D(118.267071942857 9.300063,118.638417057143 
> 9.670539)'::BOX3D, find_srid('','windcipality','geom') ) 
>  
> and when i tried this: 
>  
> 		 $wind->set(data,"geom from (select geom AS geom from wind 
> where provinceid=$provid and distance(wind.geom,(select geom from municipality 
> where munprovid=$munprovid))<=0) as new_table using unique mun using 
> SRID=-1"); 
>  
> it reults to this error: 
>  
> MapServer Error in msPOSTGISLayerWhichShapes(): prep_DB:Error executing 
> POSTGIS DECLARE statement (0.6 failed - retried 0.5 and it failed too). 
> DECLARE mycursor BINARY CURSOR FOR SELECT 
> watt_m2::text,asbinary(force_collection(force_2d(geom)),'NDR'),OID::text from 
> (select geom AS geom from wind where provinceid=1 and 
> distance(wind.geom,(select geom from municipality where munprovid=1))<=0) 
> WHERE geom && setSRID('BOX3D(118.267071942857 9.300063,118.638417057143 
> 9.670539)'::BOX3D, find_srid('','windcipality','geom') ) 
>  
> i was thinking that the solution may be with using an oid but i'm not sure 
> what it is and how it works. 
>  
> help!? 
>  
> ryanne 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 

Jan Hartmann
Department of Geography
University of Amsterdam
jhart at frw.uva.nl




More information about the MapServer-users mailing list