I am using QGIS.

I have a polygon file of area boundaries and I want to measure part of the polygon lines in each area which next to the sea.

Is there a way to do this?

In theory I guess I could edit and make individual polylines between each edge and then measure them.....it's a bit time consuming though.

  • There are many ways to measure polygons, can you add a screenshot showing what you want to measure?
    – BERA
    Dec 29, 2020 at 15:23

1 Answer 1


This is the workflow that I would follow:

  1. First [buffer your sea][1] by a small amount, the value of small depends on the spatial reference units you're working in and how well the polygon data follows your coast. Try to use the smallest number you can.

  2. If you don't already have a unique polygon ID then add a [unique polygon ID field][2].

  3. Degenerate your [polygons into lines][3], the generated lines will have all the attributes of the contributing polygon (which includes the unique ID).

  4. [Clip the polygon lines][4] with the sea buffer to extract the part that is adjacent to the sea only.

  5. [Calculate the lengths of lines][5] into the attribute table, there may be multiple sections from a the same source polygon within the clip but that's ok for now.

  6. [Generate statistics from the clipped lines][6] using the unique ID as a classification field and length as a statistic field, this will give you the SUM of all the lengths adjacent to the sea for each polygon unique ID. This table can then be [joined][7] back to the original polygons if that is your requirement.

I would use the same process in Esri or any other GIS software, all that would change is the links to the instructions. [1]: https://docs.qgis.org/2.8/en/docs/gentle_gis_introduction/vector_spatial_analysis_buffers.html [2]: Filling column with consecutive numbers in QGIS? [3]: Transforming polygon to linestring in QGIS [4]: Cropping Shapefiles in QGIS? [5]: https://www.qgistutorials.com/en/docs/calculating_line_lengths.html [6]: Getting tabular statistics from table using QGIS? [7]: https://www.qgistutorials.com/en/docs/performing_table_joins.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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