[postgis-users] Joining tables in PostGis/MapServer

Dave Blasby dblasby at refractions.net
Fri May 17 10:51:14 PDT 2002


Jan Hartmann wrote:
> Warning: MapServer Error in msPOSTGISLayerWhichShapes(): Error executing
> POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR
> SELECT
> sted::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),oid::text
> from (select the_geom,g97.oid,d97.sted from gemeenten97 as
> g97,gemeenten97_data as d97 where g97.id=d97.id) as foo WHERE the_geom &&
> setSRID('BOX3D(-12400 300000,307400 620000)'::BOX3D, find_srid('','(select
> the_geom,g97.oid,d97.sted from gemeenten97 as g97,gemeenten97_data as d97
> where g97.id=d97.id) as foo','the_geom') )

This is the patch (from Sean Gillies <sgillies at i3.com>) that I recently
mentioned I needed to apply.  

I'll see if I can do this this afternoon.

dave

ps. The problem occurs because postgis always ensures that the spatial
search is done in the same spatial referencing system as the data. 
Unfortunately, I cannot tell apriori what spatial reference an arbirary
query will return, so I cannot define the spatial reference system of
the query bounding box.  The patch allows you to specify what that
spatial reference is.




More information about the postgis-users mailing list