tyrasd / osmtogeojson

convert osm to geojson
http://tyrasd.github.io/osmtogeojson/
MIT License
686 stars 112 forks source link

optimize point-in-polygon test #93

Open tyrasd opened 6 years ago

tyrasd commented 6 years ago

Here the first iteration of the loop is unnecessary, because in OSM, a polygon's start end end vertex are equal: see https://beta.observablehq.com/@tmcw/understanding-point-in-polygon#values-of-i-j-in-each-iteration