Tuesday, 16 January 2018

postgis - Curved point-to-point "route maps"


I have recently been looking at airlines web pages that display their routes departing a certain city to all other cities they service. I would like to be able to create similar curved routes between points. Has anyone created scripts or functions that will generate the curved arcs like those displayed in this example?


Flight Paths


In PostGIS, is there an implementation of the ST_MakeLine that would allow you to specify the amount of curve to use when connecting 2 points?


While I am currently using PostGIS and QGIS, I would welcome hearing about other software options that might be able to create the same appearance.



Answer



Creating great circles could give you the desired effect.


Maybe something like discussed on http://lists.osgeo.org/pipermail/postgis-users/2008-February/018620.html


Update:



I've followed up on this idea in "Visualizing Global Connections". It's a purely PostGIS-based solution using reprojection to create arcs.


SELECT ST_Transform(
ST_Segmentize(
ST_MakeLine(
ST_Transform(a.the_geom, 953027),
ST_Transform(b.the_geom, 953027)
),
100000),
4326)


(The CRS definition for 953027 can be found here: http://spatialreference.org/ref/esri/53027/)


enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...