Geographic Information Systems Asked by Tom Shelley on June 21, 2021
I’m trying to build a graph or a map which would show the below example route as a straight line and so would require the geometries of the countries to be reprojected about each leg of the route. It would be equivalent to making the below route into the X axis of a graph where you could easily see and measure the proximity of a coastline.
I have all the data in a PostGIS database and I’m mainly working in Python.
What I would like to know is how to reproject geometries so the they are rotated about the geometry of a linestring. I have seen a lot of promising information of Proj but no way to make custom projections on the fly which I believe is what I need here.
How can I do this?
I added a horizontal line to a QGIS project and then used the Georeferencer to map a few points on your line segments to it. I had to add a few supplementary points off the line to stop the output degenerating into a thin strip. After thin-plate spline warping, I got this:
Note how your line is almost straight, some more keypoints need adding. The squishing on the right is because I didn't add supplementary points (the three red dots in southern England) out that far.
The problem is that all georeferencing is practically lost, so if you want to add any more layers... its complicated. I don't think the fitted parameters of the thin plate spline warp can be extracted for use in perhaps transforming other data to this stretched image.
But if your application is really to show the distance to the coastline, the geographic map does this just fine. I can easily see how far the coast is from the line at any point, even with the kink in it. The squashed map actually distorts this distance, and I'm not sure how to correct that.
Answered by Spacedman on June 21, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP