Classes for GeoJSON to make working with GeoJSON easier
The above are assigned two classes. All of them are class geojson, but also have a class name that is geo plus the name of the geometry, e.g., geopolygon for polygon.
properties_get- Add or get properties
geo_bbox- calculate a bounding box for any GeoJSON object
geo_pretty- pretty print any GeoJSON object
geo_type- get the object type for any GeoJSON object
geo_write- easily write any GeoJSON to a file
More complete GeoJSON operations are provdied in the package geoops
from_geobuf- Geobuf to GeoJSON
to_geobuf- GeoJSON to Geobuf
Check out https://github.com/mapbox/geobuf for inormation on the Geobuf format
Coordinate Reference System
According to RFC 7946
(https://tools.ietf.org/html/rfc7946#page-12) the CRS for all GeoJSON
objects must be WGS-84, equivalent to
And lat/long must be in decimal degrees.
Given the above, but considering that GeoJSON blobs exist that have CRS attributes in them, we provide CRS helpers in this package. But moving forward these are not likely to be used much.
According to RFC 7946 (https://tools.ietf.org/html/rfc7946#section-11.2) consider that 6 decimal places amoutns to ~10 centimeters, a precision well within that of current GPS sytems. Further, A GeoJSON text containing many detailed Polygons can be inflated almost by a factor of two by increasing coordinate precision from 6 to 15 decimal places - so consider whether it is worth it to have more decimal places.