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

strange coordinates after parser mapbox pbf #119

Closed
yasongguo opened this issue Mar 12, 2020 · 1 comment
Closed

strange coordinates after parser mapbox pbf #119

yasongguo opened this issue Mar 12, 2020 · 1 comment

Comments

@yasongguo
Copy link

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

First, convert data from EPSG4326 to EPSG3857 and export as .json.
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.

Does anyone know why this is?
Thanks in advance

@yasongguo
Copy link
Author

Code error caused by my own negligence, close this issue.
Thank you very much for developing this tool, it is very easy to use.

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

1 participant