4

Where is the track of a ship when it is shipping always in the center of the English Channel between the coasts of Great Britain and France?

  1. I started with 2 linestrings and I created a lot of points on the linestring with a postgis query.
  2. After that I created a distance matrix with Raster/Analysis/Proximity in QGIS.
  3. Finally I created an aspect raster from the output raster.

enter image description here

Is the red line really the "center line" between these two linestrings?

Is there a more efficient way to do this?

2

If you can convert your area where you want the medial axis to an areal geometry, you can try the ST_ApproximateMedialAxis function, which builds upon the straight skeleton of the geometry. I'd say this is more efficient, as it means you no longer have to create a set of intermediate points or even leave vector geometry or PostGIS.

0

Yes, the solution you obtain is indeed what you are looking for - an approximation of the medial axis of the channel, up to the resolution of the raster used. For practical purposes, however, I'd use Richard's solution as you already use PostGIS. The SFCGAL library it builds upon is robust and fast.

If you'd have to provide a solution not based on PostGIS, I'd suggest going by the definition of medial axis:

  • Use the generated shoreline points to build a Voronoi diagram (Create Thiessen Polygons in ArcGIS).
  • Convert the Voronoi cell polygon borders to lines.
  • Remove all lines intersecting landmass.

What you obtain is a jagged line, an another approximation of a medial axis, the precision of which is determined by the density of the generated shoreline points.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.