BrokJSON
Ever struggled with huge GeoJSON-Files? BrokJSON is your space-saving alternative! Depending on your data you can save up to 80%. Withouth losing any data! Why? Because it is based on the same ideas as GeoJSON but reduces redundancies.
The idea behind BrokJSON: RAM is mightier than the bandwidth - download the small BrokJSON and convert it on runtime to GeoJSON than loading a huge GeoJSON.
Have a look at https://www.brokjson.dev!
Example
This GeoJSON with just two Points...
... looks as a BrokJSON like this:
No information lost, everything is there. Amazing!
Installation
Install via NPM
npm install brokjson
Install standalone
Download build/brokjson.min.js
Add it to your Website
Usage
Node
// Include BrokJSONbrok = // Load your GeoJSONvar geojson = "type": "FeatureCollection" "features": "type": "Feature" "geometry": "type": "Point" "coordinates": 85402473782 // Convert your Json-Object to BrokJsonconst brokjson = brok; // "brokjson" is your BrokJSON as a javascript objectconsole // Convert it backgeojson = brokconsole
JavaScript
Documentation
BrokJSON is a lightweight library, there are only two functions.
GeoJSON to BrokJSON
Parameters
GeoJSON
as a Javascript-Object
Return value
BrokJSON
as a Javascript-Object
BrokJSON to GeoJSON
Parameters
BrokJSON
as a Javascript-Object
Return value
GeoJSON
as a Javascript-Object
Full Spec and other languages
Have a look at https://www.brokjson.dev