mapbox / leaflet-pip

point in polygon intersections for leaflet
https://mapbox.github.io/leaflet-pip/
BSD 2-Clause "Simplified" License
199 stars 46 forks source link

Feature request, expose working centroid function #9

Closed jmaxxz closed 10 years ago

jmaxxz commented 10 years ago

gju.centroid for the following shape outputs a point 1/2mi away from the polygon.

"geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -87.84772709012032,
              41.095232882536514
            ],
            [
              -87.84772709012032,
              41.09527128838847
            ],
            [
              -87.84766271710394,
              41.09527128838847
            ],
            [
              -87.84766271710394,
              41.095232882536514
            ],
            [
              -87.84772709012032,
              41.095232882536514
            ]
          ]
        ]
      }
    }
tmcw commented 10 years ago

Hm, this is out of scope of this project - this project does point-in-polygon operations for leaflet. Please file an issue with geojson-utils if there's a bug there.