Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JuliaGeo/GeoJSON.jl
Utilities for working with GeoJSON data in Julia
https://github.com/JuliaGeo/GeoJSON.jl
geo geojson geospatial gis hacktoberfest io julia vector
Last synced: about 1 month ago
JSON representation
Utilities for working with GeoJSON data in Julia
- Host: GitHub
- URL: https://github.com/JuliaGeo/GeoJSON.jl
- Owner: JuliaGeo
- License: mit
- Created: 2015-01-25T01:18:27.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-05-10T01:42:19.000Z (about 2 months ago)
- Last Synced: 2024-05-10T13:40:06.236Z (about 2 months ago)
- Topics: geo, geojson, geospatial, gis, hacktoberfest, io, julia, vector
- Language: Julia
- Homepage: https://juliageo.org/GeoJSON.jl/stable/
- Size: 729 KB
- Stars: 68
- Watchers: 14
- Forks: 10
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- Awesome-Geospatial - GeoJSON.jl - This library is developed independently of, but is heavily influenced in design by the python-geojson package. (Julia)
- awesome-gis - GeoJSON.jl - This library is developed independently of, but is heavily influenced in design by the python-geojson package. (Geospatial Library / Julia)
- awesome-gis - GeoJSON.jl - This library is developed independently of, but is heavily influenced in design by the python-geojson package. (Geospatial Library / Julia)
- awesome-geospatial - GeoJSON.jl - This library is developed independently of, but is heavily influenced in design by the python-geojson package. (Julia)
README
# GeoJSON
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaGeo.github.io/GeoJSON.jl/stable)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaGeo.github.io/GeoJSON.jl/dev)
[![CI](https://github.com/JuliaGeo/GeoJSON.jl/workflows/CI/badge.svg)](https://github.com/JuliaGeo/GeoJSON.jl/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/JuliaGeo/GeoJSON.jl/branch/main/graph/badge.svg?token=ccpOaPSi08)](https://codecov.io/gh/JuliaGeo/GeoJSON.jl)Read [GeoJSON](https://geojson.org/) files using [JSON3.jl](https://github.com/quinnj/JSON3.jl), and provide the [Tables.jl](https://github.com/JuliaData/Tables.jl) interface.
This package is heavily inspired by, and borrows code from, [JSONTables.jl](https://github.com/JuliaData/JSONTables.jl), which
does the same thing for the general JSON format. GeoJSON puts the geometry in a `geometry` column, and adds all
properties in the columns individually.## Usage
GeoJSON only provides simple `read` and `write` methods.
`GeoJSON.read` takes a file path, string, IO, or bytes.```julia
julia> using GeoJSON, DataFramesjulia> fc = GeoJSON.read("path/to/a.geojson")
FeatureCollection with 171 Featuresjulia> first(fc)
Feature with geometry type Polygon and properties Symbol[:geometry, :timestamp, :version, :changeset, :user, :uid, :area, :highway, :type, :id]# use the Tables interface to convert the format, extract data, or iterate over the rows
julia> df = DataFrame(fc)# write to string
julia> write(fc)
"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-69.99693762899992...
```### HTTP access
To read JSON from a URL, use HTTP.jl
```juliajulia> using GeoJSON, HTTP
julia> resp = HTTP.get("https://path/to/file.json")
julia> fc = GeoJSON.read(resp.body)
```