Skip to content
 
 

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoJSON

Clojure utilities for using GeoJSON.

Installation

Add the following dependency to your project.clj:

[com.farmlogs/geojson "1.1.0"]

Usage

This library's utilities act on clojure maps structured as GeoJSON.

The validation namespace verifies that a given GeoJSON is valid, following the details of the geojson spec.

(require '[geojson.validate :as gv])

(gv/valid? {:type "Point" :coordinates [0 0]})
(gv/valid? {:type "Feature"
            :properties {:name "Null Island"}
            :geometry {:type "Point" :coordinates [0 0]}})
(gv/valid? {:type "GeometryCollection"
            :geometries [{:type "Point" :coordinates [0 0]}
                         {:type "Polygon" :coordinates [[[0 0] [0 1] [1 1] [1 0] [0 0]]]}
                         {:type "LineString" :coordinates [[0 0] [1 1] [1 2]]}]})

About

Libraries and utilities for using GeoJSON in Clojure.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages