SkillAgentSearch skills...

Geojson.specs

a Geojson utility for validating data using Clojure(script)'s spec (RFC 7946)

Install / Use

/learn @carocad/Geojson.specs
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

geojson.specs

Build Status Clojars Project CljDoc

a Geojson utility for validating data using Clojure(script)'s spec following RFC 7946.

(ns example
  (:require [carocad.geojson.specs :as geojson]))
            [clojure.spec.alpha :as s] 

(s/valid? ::geojson/point {:type "Point" :coordinates [1 2 3]})

(s/valid? ::geojson/linestring {:type "LineString" :coordinates [[1 2 3]
                                                                 [4 5 6]]})

The caricad.geojson.specs namespace also contains some utility functions for working with geojson. Currently, those are:

  • bbox: get or compute (if not available) the bounding box of a geojson object. Returns nil if it is not possible to compute a bbox from the geojson object.
  • uri: takes a point (or feature-point) and returns a lon,lat,height string.
  • geo-uri takes a point (or feature-point) and returns a geo:lon,lat,height string

Distributed under LGPL v3

View on GitHub
GitHub Stars18
CategoryProduct
Updated4y ago
Forks1

Languages

Clojure

Security Score

80/100

Audited on Feb 20, 2022

No findings