I would like to calculate the aggregated bounding box of multiple features using OGC Simple Feature SQL or SQL API of ArcSDE. The following statement will only query the bounding box of each feature:

select ST_Boundary (shape) from polygon_table where country like '%usa%'

What I needed is one bounding box aggregated over all features, resulting to the condition in the where clause.

2 Answers 2


Got the answer at ArcGIS Forum. One can use ST_Aggr_Union


In Postgres\Postgis you can use St_Extent as an aggregation function. The benefits over something like ST_Aggr_Union is the fact that all steps are made using the boundary boxes instead of real geometries, which is much faster.

SELECT ST_Extent(shape)
FROM polygon_table
WHERE country like '%usa%'

Maybe there is something alike that you can use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.