Classic ARC/INFO Commands in PostGIS: DISSOLVE
- artlembo
- 10 hours ago
- 1 min read
Another ARC/INFO function that we often use is DISSOLVE. This is an easy one, as PostGIS has the command ST_Union. An example from the Esri manual shows how counties in Iowa are dissolved:

But I'm going to use an example of counties in the Northeast United States:

The query to do this is simply:
This is simply performing a Union operation on the geometry field, and then grouping that union on a field name. You can group by multiple names, or even make other conditions. The results are the state polygons for the northeast:

and of course, don't forget we can apply other things we've learned in this series. If there is a [population] field in the counties, you can issue something like Sum([population]) AS TotalPop, and that field will be aggregated in the GROUP BY command.