Skip to content

Instantly share code, notes, and snippets.

@kgjenkins
Last active July 18, 2016 21:48
Show Gist options
  • Save kgjenkins/b1fb746249ca2051ac80 to your computer and use it in GitHub Desktop.
Save kgjenkins/b1fb746249ca2051ac80 to your computer and use it in GitHub Desktop.
Carson projection in CartoDB PostGIS

the Carson projection

SELECT
cartodb_id,
ST_Transform(the_geom_webmercator, 2163)
  AS the_geom_webmercator,
abbrev,
name,
postal
FROM ne_50m_admin_1_states
WHERE postal NOT IN ('CT','RI','MA','NH','ME')

UNION

SELECT
cartodb_id,
ST_Transform(ST_Translate(the_geom_webmercator,170000,460000), 2163)
  AS the_geom_webmercator,
abbrev,
name,
postal
FROM ne_50m_admin_1_states
WHERE postal IN ('CT','RI','MA','NH','ME')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment