Dealing with geospatial affine transformations

My goal is to produce a map like the attachment, in which the affine adjustments were done in Postgres/PostGIS, within Julia.


This is a standard cartographic convention for maps of the United States.

The attached map uses the identical shapefile that I cannot successfully transform using various combinations of Shapefile to bring in as typeof polygons, GeoDataFrame to bring in as typeof IGeometry. I’ve tried using GeometryBasics, LibGEOS, ArchGDAL and others. The most common error is that object conversion returns typeof nothing.

For present purposes, I can export by PostGIS derived geometry as GeoJSON to allow users without a PostGIS server to prepare maps, but I would prefer to be able to script it.

It would be helpful to hear the community’s experience.

  1. Is it possible?
  2. Has it been done?
  3. If it has, can you point me to a script?
  4. If there is no public script, is there a workflow known to work

Thanks for any help.

You can do that with GMT. The fig would be made with 3 layers: mainland, Hawaii and Alaska. The trick is to pick the map limits of the Hawaii and Alaska layers such that, when plotted at the same map scale (I imagine you want this), they have the same paper width.

1 Like

An example with a colder Hawaii and a warmer Alaska

using GMT

coast(R="-147/-109/29/51", proj=(name=:lambertConic, center=[-130 40], parallels=[35 45]),
          figsize=15, borders=2, area=500, shore=true)

# Alaska
coast!(R="-167.17/-131.72/53/72.9", figsize=4, borders=2, area=500, shore=true, xshift=2, yshift=1)

# Hawaii
coast!(R="-161/-154/17/24", figsize=2.5, shore=true, xshift=3, yshift=5, show=1)