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

Longitude value is out of the range #871

Open
devBaqar opened this issue Dec 18, 2023 · 1 comment
Open

Longitude value is out of the range #871

devBaqar opened this issue Dec 18, 2023 · 1 comment

Comments

@devBaqar
Copy link

{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
[
[
126.91596844872151,
-22.3046382567438
],
[
126.91596844872151,
-46.53652237354679
],
[
187.70482077200649,
-46.53652237354679
],
[
187.70482077200649,
-22.3046382567438
],
[
126.91596844872151,
-22.3046382567438
]
]
],
"type": "Polygon"
}
}
]
}

Here longitude value is out of the box which is causin trouble loading this polygon on mobile..How to resolve this?

@raviqqe
Copy link

raviqqe commented Dec 19, 2023

You have out-of-range longitudes (e.g. 187.70482077200649). So you need to normalized it. In the case of the example, you just do 187.7 - 360 = -172.3.

But I wonder whether we should do those normalization automatically if the GeoJSON spec allows that.

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

No branches or pull requests

2 participants