[postgis-users] Get more polygon's exterior boundary

Obe, Regina robe.dnd at cityofboston.gov
Mon Mar 31 04:01:34 PDT 2008


The second one ST_Union(geometry set) is the right one to use, but right now it does the same thing as GeomUnion you are using so no biggie except that GeomUnion is deprecated and eventually will be phased out(just a note for future).  

If you were upgrading from a version of PostGIS prior to 1.2.2 then the ST_Union(geometry set) and other new aggreagate functions may not have been created because of a bug in the upgrade that it doesn't create new aggregate functions.  I think that is still an outstanding issue and a tricky one to fix.  You can do a hard upgrade to fix the issue or just load the missing aggregates.

Someone released the sql script to build the missing aggregates, but I for one can't find the thread - so here is my best guess at what you may be missing.

-- Availability: 1.2.2
CREATE AGGREGATE ST_accum (
	sfunc = ST_geom_accum,
	basetype = geometry,
	stype = geometry[]
	);

-- Availability: 1.2.2
CREATE AGGREGATE ST_Extent(
	sfunc = ST_combine_bbox,
	basetype = geometry,
	stype = box2d
	);

-- Availability: 1.2.2
CREATE AGGREGATE ST_Extent3d(
	sfunc = ST_combine_bbox,
	basetype = geometry,
	stype = box3d
	);

CREATE OR REPLACE FUNCTION ST_collect(geometry, geometry) 
	RETURNS geometry
	AS '$libdir/liblwgeom', 'LWGEOM_collect'
	LANGUAGE 'C' IMMUTABLE;

-- Availability: 1.2.2
CREATE AGGREGATE ST_memcollect(
	sfunc = ST_collect,
	basetype = geometry,
	stype = geometry
	);

-- Availability: 1.2.2
CREATE AGGREGATE ST_MakeLine (
	sfunc = geom_accum,
	basetype = geometry,
	stype = geometry[],
	finalfunc = ST_makeline_garray
	);

-- Availability: 1.2.2
CREATE AGGREGATE ST_Polygonize (
	sfunc = ST_geom_accum,
	basetype = geometry,
	stype = geometry[],
	finalfunc = ST_polygonize_garray
	);

-- Availability: 1.2.2
CREATE AGGREGATE ST_MemUnion (
	basetype = geometry,
	sfunc = ST_union,
	stype = geometry
	);

-- Availability: 1.2.2
CREATE AGGREGATE ST_Union (
	sfunc = ST_geom_accum,
	basetype = geometry,
	stype = geometry[],
	finalfunc = ST_unite_garray
	);



Hope that helps,
Regina

 

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Kis János Tamás
Sent: Monday, March 31, 2008 2:37 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Get more polygon's exterior boundary

péntek 28 március 2008 14.13 dátummal "Obe, Regina" 
<robe.dnd at cityofboston.gov> ezt írta:
>
> Probably because its been more or less deprecated.
>
> For newer versions of PostGIS use ST_Union instead of geomunion.
>

When I was looking for a corresponsive function I saw the 
ST_Union(geometry,geometry) and ST_Union(geometry set).
I think the 1st function use only two geometry so is not too good...
and I couldn't to use the 2nd function...
If you guess that I need either for me, will you help?

Regards,
kjt


McAfee SCM 4.1 által ellenrizve!
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.




More information about the postgis-users mailing list