Skip to content

Instantly share code, notes, and snippets.

@migtorres
Created July 8, 2014 13:03
Show Gist options
  • Save migtorres/2b25b6e5d13b52136285 to your computer and use it in GitHub Desktop.
Save migtorres/2b25b6e5d13b52136285 to your computer and use it in GitHub Desktop.
Geometries for countries
CREATE Table countries_geometries as
SELECT ST_UNION(ST_MakeValid(wkb_geometry)) as the_geom,
unnest(string_to_array(iso3, '/')) as iso_3, type from wvc_ts_eez_abnj_2011 group by iso3, type;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment