GeoJSON#
MapJS uses a GeoJSON formatted file for both nest polygons and scan areas. While both of these features are optional the placeholder json files must exist.
Nests#
This is generated via the external PMSFnestScript project and support is
given via the PMSF Discord. Once the script is ran move the nest.json
file to /path/to/MapJS/static/custom/nests.json.
Scan Area#
This areas.json file is used to show city/region boundaries on the map. You can
generate it yourself via multiple free online websites, a few are listed below:
- geojson.io
- geoman.io
- RDM Tools (self hosted)
Convert INI to GeoJSON#
To easily convert INI sytle geofence format files to GeoJSON format you can use the
following method. This is mainly used for the areas.json file to show scan areas.
- Create
geofencesdirectory in root of project (with src folder) - Copy your
.txtINI format geofence files to thegeofencesfolder - Run
npm run convert -- ./geofences/which will convert your INI geofences to oneareas.jsonGeoJSON format file in the root of the project - Copy
areas.jsonto/path/to/MapJS/static/custom/areas.jsonto show the scan areas on the map
Convert Porcale geofence to GeoJSON#
To easily convert from PoracleJS geofence formated file into GeoJSON run the method.
This is mainly used for the areas.json file to show scan areas.
- Copy your
geofence.jsonfile from Poracle to the root of the project folder (with src folder) - Run
npm run convert-poracle -- geofence.jsonwhich will convert the file to anareas.jsonGeoJSON format file in the root of the project folder - Copy
areas.jsonto/path/to/MapJS/static/custom/areas.jsonto show the scan areas on the map