Overview
This article explains how to create a GeoJSON file for a Service area by using city or postal code borders.
Find the right geographical area
To find a geographical area that you’d like to use as a Service area on MotionTools, visit the Nominatim service. On Nominatim, you can view the borders of a city or a postal code. Here's an example of the borders of Berlin:
Click on the Details button, scroll down to the OSM row, and copy the relation ID number.
Download the area as GeoJSON
Go to http://polygons.openstreetmap.fr/ and enter the relation ID
Click on the first GeoJSON link.
Format the GeoJSON file
The GeoJSON is in the MultiPolygon format which is not accepted by MotionTools.
To change this download this example geojson file.
Use a simple text editor to paste in the json content and save.
Go to https://geojson.io/.
Click Open and choose your GeoJSON file.
If you want to merge multiple zip codes into one Service Area, do this step for all of your zip codes.
Export the final GeoJSON file which will give you the right format.
Import the Service Area
Open the MotionTools Dashboard and attach the GeoJSON file to the Service area (Settings → Service Areas). For more information, refer to Manage Service Areas.
How to reduce the file size
If your GeoJSON file size exceeds the 20kb limit, follow these steps:
Remove the inner zones if they exist
Import the geoJSON file, open the Vector menu, select Geoprocessing Tools, click Dissolve, and then click Run.
The inner border should now be gone. Right-click on the layer on the bottom left and select Export → Save Features As.
Next to the File name click on the “…” button and choose a name and directory. Click Save.
Simplify the GeoJSON file
Use Mapshaper to simplify the GeoJSON file. Follow this guide for details.