mapserver-postgis centroid function

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


Kumar,

On 9/20/05, Kumar <kumar at newfields.com> 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 gmail.com
http://www.perrygeo.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050920/af8661c9/attachment.html


More information about the mapserver-users mailing list