Skip to content

Instantly share code, notes, and snippets.

@amandabee
Created April 5, 2018 21:06
Show Gist options
  • Save amandabee/22cfe6588ae40f2f42f7c5a21588354f to your computer and use it in GitHub Desktop.
Save amandabee/22cfe6588ae40f2f42f7c5a21588354f to your computer and use it in GitHub Desktop.
UPDATE prisoners_in_florence
SET the_geom =
ST_Transform(
ST_Segmentize(
ST_MakeLine(
ST_Transform(prisoners_in_florence.the_geom, 953027),
ST_Transform(CDB_LatLng(38.3614873976, -105.1071292162), 953027)
),
100000
),
4326
)
UPDATE date_line_demo SET the_geom_webmercator = (SELECT
AXH_CrossDateLine(
cdb_latlng(date_line_demo.latitude, date_line_demo.longitude),
cdb_latlng(38.3614873976, -105.1071292162)
) AS the_geom_webmercator FROM date_line_demo) WHERE cartodb_id = 2237
, 4326)
CartoDB SQL:
UPDATE date_line_demo SET the_geom =(SELECT
AXH_CrossDateLine(
cdb_latlng(date_line_demo.latitude, date_line_demo.longitude),
cdb_latlng(38.3614873976, -105.1071292162)
) AS the_geom_webmercator FROM date_line_demo) WHERE cartodb_id = 2237
UPDATE date_line_demo SET the_geom =
(
ST_Makeline(MULTILINESTRING((SELECT
AXH_CrossDateLine(
cdb_latlng(date_line_demo.latitude, date_line_demo.longitude),
cdb_latlng(38.3614873976, -105.1071292162)
) AS the_geom_webmercator FROM date_line_demo)), 4326)
)
WHERE cartodb_id = 2237
UPDATE date_line_demo SET the_geom =
(
ST_Makeline(
(SELECT AXH_CrossDateLine(
cdb_latlng(date_line_demo.latitude, date_line_demo.longitude),
cdb_latlng(38.3614873976, -105.1071292162)
) AS the_geom_webmercator FROM date_line_demo WHERE cartodb_id = 2237), 4326
)
)
WHERE cartodb_id = 2237
UPDATE date_line_demo SET the_geom =
(
SELECT AXH_CrossDateLine(
cdb_latlng(13.47, 144.74),
cdb_latlng(38.3614873976, -105.1071292162)) AS the_geom_webmercator FROM date_line_demo
)
WHERE cartodb_id = 2237
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment