All examples By author By category About

rgdonohue

PostGIS to include AK and HI in CartoDB

This example demonstrates the use of PostGIS to move and scale Alaska and Hawaii to fit SW off the continental US in a traditional map layout, client-side using CartoDB.js.

The continental US is first transformed out of Geo Web Mercator to an USA Contiguous Albers Equal Area Conic projection using the PostGIS function ST_Transform. Inspired by Free Your Maps From Web Mercator.

Alaska and Hawaii are then transformed using their respective projections, and then moved using St_Transform. Alaska's area is also reduced in size using the ST_Scale function.