mapserver-postgis centroid function

Matthew Perry perrygeo at GMAIL.COM
Tue Sep 20 17:33:24 EDT 2005


On 9/20/05, Kumar <kumar at> wrote:
>  Hi all,
> I am trying to get the centroid of the parcels using postgis to get the
> centroid of each parcel. I have pasted the layer definition below.
> DATA "the_geom FROM (select centroid(the_geom) AS the_geom,* from
> cal_parcel) AS foo USING UNIQUE gid USING SRID=26929"
Postgresql reports the error as 'ERROR: column reference "the_geom" is
> ambiguous '

Your subquery is returning two columns with the name "the_geom". There's
really not much need to include all the columns in the DATA string so you
might try to remove the ,* and see if that works.

Matt Perry
perrygeo at
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the mapserver-users mailing list