Given a peninsula stretching north south and the two coast lines connecting in the south, I want to find out which is the place, or rather line, which is furthest away from both coastlines on the peninsula? What I am looking for is the red line in the below image. The black and pink lines are the eastern and western coastlines.

enter image description here

One way could be to generate a polygon and do a negative buffer. An other one could be to add the longitudinal values, and divide by two. The latter one seems more rational - still it demands some programming and coordinate handling.

But perhaps there is a third way? Any suggestions? ArcGIS and QGIS are both relevant tools of the trade here.

  • Perhaps it is just because it's Friday and I'm tired, but I'm having a hard time visualizing what it is you're looking for. Could you perhaps reword your question or include a graphic?
    – bluefoot
    Commented Nov 2, 2012 at 22:12

4 Answers 4


I want to find out which is the place, or rather line, which is furthest away from both coastlines on the peninsula?

Almost by definition, this is the medial axis of the peninsula. Quoting wikipedia

The medial axis of an object is the set of all points having more than one closest point on the object's boundary.

which means that a point on the medial axis is indeed furthest away from both boundary lines. For otherwise, one would be closer than the other.

See the example from the PostGIS ST_ApproximateMedialAxis function's documentation. enter image description here

(This means also that the function is available to QGIS users via connection to PostGIS.)

  • Amazon does not support the extension that does that function, is there another way?
    – Luffydude
    Commented Jun 13, 2018 at 16:11

I recently worked on a project which involved deriving the medial axis (distinct from centerline, but similar) of stream features by using stream bank polyline features extracted from high-res imagery. It was important for us to make the distinction for our purposes, as the medial axis was to be used for orthogonal generation, and thus needed to be a generalized center of our stream features and not the exact middle of the stream.

The method we ended up using was a python script which took in our two polyline features, added verteces at a given interval (~5m), and then looped through each vertex in one polyline, and searched for the nearest vertex in the other polyline. There were some specific situations that were handled differently (extreme bends in the stream that would find a vertex closer than the true corresponding one on the opposite bank), but I didn't write the code so I would have to get a hold of it to understand what was really going on.

Before we decided on our method, the guy working on the scripting toyed with some alternatives and used Euclidean Allocation using the bank polylines as input, and then created a contour from the resulting raster. It was a brilliant way to get the centerline, but not what we were looking for. This might work for you, though.

You should spend some time thinking through what you will be using the centerline for, and if you should be looking for a centerline or generalized medial axis.


You can convert the line vertices to points and then create Voronoi diagram from them. It will show the centerline quite well, which you can draw as a line over the diagram.

Also, ArcScan extension has automatic centerline vectorization method (if you convert the peninsula to polygon, then to raster).


From this Geospatial Analyst blog it looks like ET GeoWizards offers a function called Create Centerlines which "Creates centerlines from polygon features. Can be created inside polygons (from polygon rivers and streets) our [sic] outside polygons (from parcel data)."

I am guessing that the process it uses would involve creating a Triangulated Irregular Network first because I did something like that many years ago to create road centerlines in rural areas (which is probably a little easier than what you are trying to do).

Also, I'm not sure whether the Collapse Polygon To Centerline tool announced on the ArcGIS Blog ever made it into a version - maybe it is there by another name?

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