dartclub / turf_dart

A turf.js-like geospatial analysis library working with GeoJSON, written in pure Dart.
https://pub.dev/packages/turf
MIT License
62 stars 28 forks source link

line intersection polygon gives center for an irregular polygon #150

Open surapallikarthik opened 8 months ago

surapallikarthik commented 8 months ago

finding intersection points for an irregular polygon gives center point as intersection point

lukas-h commented 8 months ago

Hi @surapallikarthik, thanks for submitting this bug report. Do you have any data to reproduce this?

surapallikarthik commented 8 months ago

Polygon Points: [LatLng(latitude:45.526625, longitude:-122.679157), LatLng(latitude:45.526819, longitude:-122.672673), LatLng(latitude:45.521169, longitude:-122.679971), LatLng(latitude:45.521344, longitude:-122.673694),LatLng(latitude:45.526625, longitude:-122.679157),]

Line Points :line: [LatLng(latitude:45.519416, longitude:-122.674283), LatLng(latitude:45.52658, longitude:-122.670574)]

Got intersectionpoiints :[LatLng(latitude:45.521337, longitude:-122.67397), LatLng(latitude:45.521519, longitude:-122.673875), LatLng(latitude:45.523945, longitude:-122.676384)]