omanges / turfpy

A Python library for performing geospatial data analysis which reimplements turf.js.
MIT License
120 stars 26 forks source link

Added Line Slice and Nearest Point on Line functionalities #85

Closed kapitan-iglu closed 3 years ago

kapitan-iglu commented 3 years ago

Finally I implemented lineSlice() functionality and nearestPointOnLine() (as a dependency) based on turfjs idea to fulfill requirements in my project (#82).

What is missing:

  1. Examples - I'm not familiar with documentation platform (sphinx, jupyter, ...), so if you like, add example(s)
  2. I'm quite new in turf* and geojson world, so if you see possible optimizations in my code, please modify it so I can learn something new
  3. Tests - same as above - never done any pytest but I'll be glad to see how it should be done
omanges commented 3 years ago

Please update your PR with latest changes

omanges commented 3 years ago

@kapitan-iglu try to add a test for the new functionality in test_misc.py, just add a new test function in the test_misc.py and that test will br automatically executed by pytest, you can refer other test functions in it, it is quite simple 😉

kapitan-iglu commented 3 years ago

Synced with upstream repo and added tests as requested. After fixing #86 test_nearest_point_on_line() can be adapted to use MultiLineString.