Database Reference
In-Depth Information
county | fips |
state_fips
--------------------------------------------+-----
---+-----------
Abbeville
County | 45001 |
45
Acadia
Parish | 22001
| 22
Accomack
County | 51001 |
51
...
Zapata
County | 48505
| 48
Zavala
County | 48507
| 48
Ziebach
County | 46137
| 46
(6138 rows)
2. Now,performthemergingoperationbasedonthe state_fips field,using
the ST_Union PostGIS function:
postgis_cookbook=# CREATE TABLE
chp03.states_from_counties ASSELECT
ST_Multi(ST_Union(the_geom)) as the_geom,
state_fips FROM chp03.countiesGROUP BY
state_fips;
3. The following screenshot shows how the output PostGIS layer looks in a
Desktop GIS: the aggregate counties have successfully composed their re-
spective state (thick blue border):
Search WWH ::




Custom Search