Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong clip results #118

Open
ThFischer opened this issue Dec 13, 2018 · 3 comments
Open

wrong clip results #118

ThFischer opened this issue Dec 13, 2018 · 3 comments
Labels

Comments

@ThFischer
Copy link

ThFischer commented Dec 13, 2018

I switched from version 2.4.0 to 3.2.1 because of a fixed issue with polygon clipping.
Unfortunately version 3.2.1 has another polygon clipping issue:

myData = {
  type: "FeatureCollection",
  features: [
    {
      type: "Feature",
      geometry: {
        type: "Polygon",
        coordinates: [[[-90, -90], [0, -90], [90, -90], [0, 0], [-90, -90]]]
        // This coordinates would be clipped correct:
        // coordinates: [[[-90, -90], [90, -90], [0, 0], [-90, -90]]]
      }
    }
  ]
};
myOptions = {
  indexMaxZoom: 0,
  maxZoom: 24,
  tolerance: 1.5,
  extent: 4096,
  buffer:0
};
geojsonvt(myData, myOptions).getTile(1, 1, 1).features[0].geometry;

Expected
The half of the shape on the eastern hemisphere
like: [[[0, 4096], [2048, 4096], [0,0], [0, 4096]]]

Results
v2.4.0: [[[0, 4096], [0,0], [0,0], [2048, 4096], [0, 4096]]] okayish
v3.2.1: [[[2048, 4096], [0, 0], [0, 0]]] wrong

@mourner mourner added the bug label Dec 13, 2018
@ThFischer
Copy link
Author

BTW:
The geojson-vt demo page seems to not use the current version 3.2.1

@AbelVM
Copy link

AbelVM commented Dec 22, 2020

Facing to this bug too :(

image

@leegee
Copy link

leegee commented Aug 10, 2022

Is it fair to say this project is dead, if such old bugs remain un-fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants