Skip to content

Change polygon columns to Geometry instead of Geography

Jeremy M Fee requested to merge github/fork/jmfee-usgs/world-polygons into master

This, combined with data updates already uploaded to hazards, addresses issues with world default polygons. Updated data and this branch are currently running on staging systems.

updated data sets

  • admin
  • auth
  • FE
  • neic
  • tectonic
  • timezones

explicit srid

Within each dataset i used the EWKT format to specify an SRID explicitly:

"POLYGON(...)"
"MULTIPOLYGON(...)"

Is now:

"SRID=4326;POLYGON(...)"
"SRID=4326;MULTIPOLYGON(...)"

new world polygon

Additionally the default world polygons only included the southern hemisphere: Old:

MULTIPOLYGON(
  ((-180 0,-90 0,-90 -90,-180 -90,-180 0)),
  ((-90 0,0 0,0 -90,-90 -90,-90 0)),
  ((0 0,90 0,90 -90,0 -90,0 0)),
  ((90 0,180 0,180 -90,90 -90,90 0)),
  ((-180 0,-90 0,-90 -90,-180 -90,-180 0)),
  ((-90 0,0 0,0 -90,-90 -90,-90 0)),
  ((0 0,90 0,90 -90,0 -90,0 0)),
  ((90 0,180 0,180 -90,90 -90,90 0))
)

New, note the last four polygons are now in the northern hemisphere:

SRID=4326;MULTIPOLYGON(
  ((-180 0,-90 0,-90 -90,-180 -90,-180 0)),
  ((-90 0,0 0,0 -90,-90 -90,-90 0)),
  ((0 0,90 0,90 -90,0 -90,0 0)),
  ((90 0,180 0,180 -90,90 -90,90 0)),
  ((-180 90,-90 90,-90 0,-180 0,-180 90)),
  ((-90 90,0 90,0 0,-90 0,-90 90)),
  ((0 90,90 90,90 0,0 0,0 90)),
  ((90 90,180 90,180 0,90 0,90 90))
)

Merge request reports