1

I'm fairly new to geodata. I got some data (coming from mapbox api from scraping a website) with all geometry points. I'm trying to convert these points to long/lat so I can use it in my project (and couple the datasets). The geoJSON data consists of points, lines and polygons. I understand what they are to a certain level, but I need some help figuring out what coordinate system is used, so I can convert it to long/lat.

An example is of this city in the Netherlands, Arnhem:

"geometry": {
                    "type": "Point",
                    "coordinates": [
                        417,
                        2912
                    ]
                },
                "properties": {
                    "worldview": "all",
                    "text_anchor": "bottom",
                    "type": "city",
                    "name_vi": "Arnhem",
                    "name_de": "Arnheim",
                    "name_zh-Hant": "阿納姆",
                    "iso_3166_2": "NL-GE",
                    "class": "settlement",
                    "name_fr": "Arnhem",
                    "capital": 4,
                    "name_zh-Hans": "阿纳姆",
                    "disputed": "false",
                    "name_ar": "أرنهيم",
                    "iso_3166_1": "NL",
                    "name_en": "Arnhem",
                    "symbolrank": 9,
                    "name_ko": "아른험",
                    "name_es": "Arnhem",
                    "name_it": "Arnhem",
                    "name_ja": "アーネム",
                    "name": "Arnhem",
                    "name_pt": "Arnhem",
                    "filterrank": 1,
                    "name_ru": "Арнем"
                },
                "id": 447288300,
                "type": 1           }

The Latitude of Arnhem 51.9851034 Longitude of Arnhem 5.8987296

Another example from a german town:

{
                "geometry": {
                    "type": "Point",
                    "coordinates": [
                        1693,
                        -173
                    ]
                },
            "properties": {
                "worldview": "all",
                "text_anchor": "bottom",
                "symbolrank": 11,
                "type": "town",
                "name_vi": "Euskirchen",
                "name_de": "Euskirchen",
                "name_zh-Hant": "奧伊斯基興",
                "iso_3166_2": "DE-NW",
                "name_en": "Euskirchen",
                "class": "settlement",
                "name_fr": "Euskirchen",
                "name_zh-Hans": "奥伊斯基兴",
                "disputed": "false",
                "name_ar": "أويسكيرشن",
                "iso_3166_1": "DE",
                "name_es": "Euskirchen",
                "name_it": "Euskirchen",
                "name_ja": "エウシュキルヒェン",
                "name": "Euskirchen",
                "name_pt": "Euskirchen",
                "filterrank": 1,
                "name_ru": "Ойскирхен"
            },
            "id": 300142700,
            "type": 1
        },

The long, lat for this town: 50.66057, 6.78722

I first thought it was slippy map tiles, but converting it what that gives me a point in the Antartic Ocean :) I tried google search of course but got no luck.

How do I figure out how to translate these coordinates?

2
  • Oops, thanks. I added them!
    – why_not
    Jan 7, 2022 at 14:27
  • It might help if you provide website address from where you got this GeoJSON features.
    – TomazicM
    Jan 7, 2022 at 15:54

1 Answer 1

1

By the information that the GeoJSON contains it is impossible to know the georeferenced location of the features. "coordinates": [ 417,2912] are in some units but because GeoJSON does not tell the coordinate system they are just plain numbers. Mapbox has probably documented their API, try to find the information from there. But because the numbers are such small I guess that you are reading some vector tile API and coordinates are relative to that certain tile. Find how this works from https://docs.mapbox.com/vector-tiles/specification/#encoding-geometry. Therefore you should know the name of the tile (x/y/z) and tiling schema first. The application on the website that you are scraping knows and therefore it can show the map correctly.

1
  • Thanks for the information and tips. I will look into the encoding page of mapbox! The website tells me the scheme is scheme: "xyz" which is the Slippy map tilenames scheme. That is why i figured it might be worthwhile to decode them using that scheme, but that gave me some weird lat/lon answers that didnt fit.
    – why_not
    Jan 7, 2022 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.