LightOSM : reading GeoJSON files

Hi I am attempting to use the Agents.jl library to design ABM with OpenStreetMapSpace, which uses the features from LightOSM.jl. Unfortunately the road network require (for the country guadeloupe) is unavailable to be download through the functions of LightOSM.jl. Moreover even if I did get a copy it might be too big. I do have an edited file of the road network (where I have manually deleted large portion of the unused nodes and ways) but have no way of easily converting it to the required formats by LightOSM which are .osm, .json, .xml. I am wondering if there is a way to read GeoJSON format since its easy to conver .shp files to this format using open sources tools such as QGIS.
Thanks

A geojson file can be read as a json file:

using JSON, HTTP
url = "linkto_filename.geojson"
result = HTTP.request("GET", url)
geojdata = JSON.parse(String(result.body))

If your geojson file is a local file, then read it as:

geojdata = JSON.parsefile("path_to/filename.geojson")
1 Like