Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add precision parameter to all toGeoJSON functions #5444
Hi and thanks a lot for looking into this!
I have three points I'd like to see addressed before merging this:
- As it is now, the coordinates output by
toGeoJSONwill be strings, not numbers; for example
["-87.359296", "35.00118"]rather than the expected
[-87.359296, 35.00118]- this looks wrong and might possibly trip up some receivers that care about data types; it is also against the RFC 7947 which says: "A position is an array of numbers"
- The GeoJSON spec gives the precision as number of decimals, while this PR gives the precision as number of significant digits; as it is now, it is not possible to give a number that adheres to the GeoJSON spec's recommendation of six decimals
- Not necessarily important, but I think it might also be a good idea to default to the GeoJSON specs recommendation, so that we use six decimals unless something else is specified.
added a commit
this pull request
May 3, 2017
referenced this pull request
May 27, 2017
May 31, 2017
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passedDetails