[mapserver-users] Re: [postgis-users] sql works, but not as layer?

Dave Blasby dblasby at refractions.net
Tue Jun 4 09:43:51 PDT 2002


> CONNECTION "user=postgres dbname=food host=10.0.0.2"
> DATA "the_geom from objecteigenschappen o left join pc6punten p on
> p.pc6=o.eigenschap_3"
> FILTER "(the_geom && GeometryFromText('BOX3D(109258 559953,115258
> 565953)'::box3d,-1) and distance(the_geom, GeometryFromText('POINT(112258
> 562953)',-1)) < 3000)"


You're using the DATA parameter incorrectly - its a bit confusing.

The generic templates are:

DATA "<geom column name> from <table name>"
	or 
DATA "<geom column name> from (<sql statement>) as foo"

In your case, use:

DATA "the_geom from (SELECT * from objecteigenschappen o left join
pc6punten p on p.pc6=o.eigenschap_3) as foo"

hope that works,

dave



More information about the MapServer-users mailing list