0

I am trying to make vector tile base on Mapbox pbf standard.

First, convert data from EPSG4326 to EPSG3857 and export as .json. By using QGIS to export data and set CRS as EPSG3857.

Second, use mapbox/tippecanoe to generate vector tile in pbf format.

Third, use mapbox/pbf, @mapbox/vector-tile and zlib, and use toGeoJSON.

Finally, I got the following results:

geojson {
    type: 'Feature',
    geometry: {
        type: 'LineString',
        coordinates: [[Array], [Array], [Array], [Array], [Array] ]
    },
    properties: {
        FNODE_: 27,
        TNODE_: 27,
        LPOLY_: 9,
        RPOLY_: 1,
        LENGTH: 1.567,
        HYD1_4M_: 278,
        HYD1_4M_ID: 1454,
        GBCODE: 23010,
        NAME: '濂庡悲娌',
        LEVEL_RIVE: 5,
        LEVEL_LAKE: 1
    }
}

and in the coordinates:

[ -48.427734375, 74.74118495548183 ]    
[ -48.7353515625, 74.78737860165961 ]    
[ -48.6474609375, 74.74118495548183 ]    
[ -48.4716796875, 74.71803680830911 ]    
[ -48.427734375, 74.74118495548183 ]

This coordinate is very strange, the origin data is in EPSG4326 and I convert the data in EPSG3857, but the above data is obviously not EPSG4326 or EPSG3857. I know the exact location of my data, so this data will not show negative latitude and longitude under EPSG4326.

Does anyone know why this is?

0

1 Answer 1

1

The GeoJSON data that you feed into Tippecanoe should be in EPSG:4326. There is no need to project it.

0

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.