# LightOSM : reading GeoJSON files

**URL:** <https://discourse.julialang.org/t/lightosm-reading-geojson-files/87131>\
**Category:** Specific Domains\
**Created:** [September 12, 2022, 12:58pm UTC](https://discourse.julialang.org/t/lightosm-reading-geojson-files/87131 "2022-09-12T12:58:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![imantha](https://avatars.discourse-cdn.com/v4/letter/i/6a8cbe/32.png) [@imantha](https://discourse.julialang.org/u/imantha)\
**Post date:** [September 12, 2022, 12:58pm UTC](https://discourse.julialang.org/t/lightosm-reading-geojson-files/87131/1 "2022-09-12T12:58:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![empet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/empet/32/221303_2.png) [@empet](https://discourse.julialang.org/u/empet)\
**Post date:** [September 12, 2022, 1:22pm UTC](https://discourse.julialang.org/t/lightosm-reading-geojson-files/87131/2 "2022-09-12T13:22:42Z")

</div>

A geojson file can be read as a json file:

```julia
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:

```julia
geojdata = JSON.parsefile("path_to/filename.geojson")

```
