[postgis-users] ST_Union does not exist
Dylan Beaudette
debeaudette at ucdavis.edu
Thu May 28 13:30:07 PDT 2009
On Thursday 28 May 2009, Brent Wood wrote:
> Hi Dylan,
>
> I hoticed a similar problem (with st_area) a couple of days ago. In my case
> I removed the BEGIN; & END; from the lwpostgis_upgrade.sql script & re-ran
> it, which fixed the problem.
>
> However, given the state of this particular database, I wasn't surprised to
> have problems, it has been the subject of a bit of experimentation.
>
> Running the script as a transaction, there was an error early on, so no
> other commands were completed after the error. Removing the transaction
> wrapper meant that each command succeeded after the error, which fixed my
> immediate problems.
>
> Probably not a recommended approach, but if it works...
>
>
> Cheers,
>
> Brent Wood
Hi Brent,
Thanks for the tips. I was able to run lwpostgis_upgrade.sql without errors,
however it looks like something was missed: ST_Union was not yet defined.
I fixed this by removing transaction commands from lwpostgis.sql, and ran
that-- it complained several times, but after re-running the
lwpostgis_upgrade.sql (not sure if this mattered) I now had access to
ST_Union().
Could it be that upgrading from postgis-1.3.3 ---> 1.3.6 doesn't pick up
everything when using the lwpostgis_upgrade.sql script?
Unfortunately, I should probably be using Postgis-1.4 so that I can use the
Cascading Union approach...
Cheers,
Dylan
> --- On Fri, 5/29/09, Dylan Beaudette <debeaudette at ucdavis.edu> wrote:
> > From: Dylan Beaudette <debeaudette at ucdavis.edu>
> > Subject: [postgis-users] ST_Union does not exist
> > To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> > Date: Friday, May 29, 2009, 7:13 AM
> > Hi,
> >
> > Noticed this today:
> >
> > -- basic query
> > SELECT ST_Buffer(ST_UNION(wkb_geometry), 0.1) as
> > wkb_geometry
> > FROM
> > (
> > SELECT 1 as id, wkb_geometry
> > FROM map
> > ) as a
> > GROUP BY a.id;
> >
> > -- error message
> > ERROR: function st_union(geometry) does not exist
> >
> > -- software version (Postgresql 8.3.7)
> > POSTGIS="1.3.6" GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 4.6.0,
> > 21 Dec 2007"
> > USE_STATS
> >
> > Could this be related to my recent upgrade from postgis
> > 1.3.3 ? Other postgis
> > queries seem to work.
> >
> > I was able to get a result using GeomUnion(geometry)--- but
> > for anything more
> > than a couple features this would take > 1 hour, not
> > finishing, and could not
> > be canceled by the user.
> >
> > Grepping through the source reveals:
> > /src/postgresql-8.3.7/contrib/postgis-1.3.6$ grep -R -i
> > 'st_union(geometry)' *
> >
> > postgis_comments.sql:COMMENT ON AGGREGATE
> > ST_Union(geometry) IS 'args:
> > g1field - Returns a geometry that represents the point set
> > union of the
> > Geometries.';
> >
> > Ideas?
> >
> > Dylan
> >
> >
> > --
> > Dylan Beaudette
> > Soil Resource Laboratory
> > http://casoilresource.lawr.ucdavis.edu/
> > University of California at Davis
> > 530.754.7341
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
More information about the postgis-users
mailing list