All Forums Database
jesse.eichar 5 posts Joined 03/11
29 Mar 2011
Calculating the bounding box of several geometries.

I am trying to find out how to get the bounding box of several geometries in teradata. I am currently working with 13.00 and have tried the following:

select SYSSPATIAL.AggGeomUnion(cast(geom.ST_Envelope() as VARBYTE(64000))) from road;
select SYSSPATIAL.AggGeomUnion(geom.ST_Envelope()) from road;

both of these statements return a byte array which is not wkb. The docs says it is a varbyte and can be cast to an ST_Geometry which I tried with the following statment:

select cast(SYSSPATIAL.AggGeomUnion(cast(geom.ST_Envelope() as VARBYTE(64000))) as ST_GEOMETRY) from road;

But this either never finishes or crashes. Any suggestions on how to do this?

Ideally I want to do this:

select AggGeomUnion(geom.ST_Envelope()).ST_Envelope() from road

Thank you


TDshyam 3 posts Joined 09/12
01 Oct 2012

This i smy second error which I am runing into aprat form TdGeoExport, how can we over come the following restriction?
The input geometry cannot be larger than 64000 bytes.
If the WKB representation of the resulting geometry becomes larger than 64000 bytes during
the aggregation, Teradata Database reports an error.
My requirement is to aggragte all the zipcodes of territory(i.e. county, A county will have many cities with different zipcodes,)so I need to agggreate all those zipcodes to draw the boundry of that territy in map.
Any help would be really appreciated.

You must sign in to leave a comment.