wmgeolab / geoContrast

Data to support the comparison tool for geoBoundaries
2 stars 1 forks source link

Fix overestimated border length and vertex counts #20

Open karimbahgat opened 3 years ago

karimbahgat commented 3 years ago

Currently, the total border length/circumference and the vertex count per source is calculated as the sum total for all admin units. However, since admin units share borders this ends up double counting border length and vertices for all internal borders and thus overestimating their numbers.

As a solution, loop through each feature, convert to multilinestring, then add to a cumulative multiline union of all admin outlines. Then calculate length and vertices on that single cumulative multiline geometry.

DanRunfola commented 3 years ago

For our purposes, not sure if this is a bias or not. Interesting question, as we're trying to get at precision of definition of each boundary.

On Thu, Jul 22, 2021 at 6:44 AM Karim Bahgat @.***> wrote:

Currently, the total border length/circumference and the vertex count per source is calculated as the sum total for all admin units. However, since admin units share borders this ends up double counting border length and vertices for all internal borders and thus overestimating their numbers.

As a solution, loop through each feature, convert to multilinestring, then add to a cumulative multiline union of all admin outlines. Then calculate length and vertices on that single cumulative multiline geometry.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wmgeolab/geoContrast/issues/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4EPFMRAV4AP4QAQH5VPL3TY7ZBFANCNFSM5AZXU7ZA .