Giter VIP home page Giter VIP logo

go-whosonfirst-edtf's Introduction

go-whosonfirst-edtf

Go package for working with Extended DateTime Format (EDTF) strings in Who's On First documents.

Tools

> make cli
go build -mod vendor -o bin/find-invalid cmd/find-invalid/main.go
go build -mod vendor -o bin/update-unknown-uncertain cmd/update-unknown-uncertain/main.go

find-invalid

$> ./bin/find-invalid -h
Usage of ./bin/find-invalid:
  -include-key
    	Include edtf: property of relevant Who's On First record in output. (default true)
  -include-path
    	Include path of relevant Who's On First record in output. (default true)
  -iterator-uri string
    	A valid whosonfirst/go-whosonfirst-iterate/emitter URI. Supported emitter URI schemes are: directory://,featurecollection://,file://,filelist://,geojsonl://,repo:// (default "repo://")

For example:

$> ./bin/find-invalid -include-path=false /usr/local/data/whosonfirst-data-admin-ca | sort | uniq
edtf:cessation,open
edtf:cessation,uuuu
edtf:inception,uuuu

update-open-unknown

Update edtf: properties with pre-ISO-8601:1-2 "open" or "unknown" values (open and uuuu respectively).

$> ./bin/update-unknown-uncertain -h
Usage of ./bin/update-unknown-uncertain:
  -exporter-uri string
    	A valid whosonfirst/go-whosonfirst-export URI. (default "whosonfirst://")
  -iterator-uri string
    	A valid whosonfirst/go-whosonfirst-iterate/emitter URI. Supported emitter URI schemes are: directory://,featurecollection://,file://,filelist://,geojsonl://,repo:// (default "repo://")
  -writer-uri string
    	A valid whosonfirst/go-writer URI. (default "null://")

For example:

$> ./bin/update-unknown-uncertain \
	-writer-uri file:///usr/local/data/sfomuseum-data-architecture/data \
	/usr/local/data/sfomuseum-data-architecture/
	
2021/02/02 16:26:55 Updated 1376996231 (/usr/local/data/sfomuseum-data-architecture/data/137/699/623/1/1376996231.geojson)
2021/02/02 16:26:55 Updated 1159162825 (/usr/local/data/sfomuseum-data-architecture/data/115/916/282/5/1159162825.geojson)
2021/02/02 16:26:55 Updated 1159160869 (/usr/local/data/sfomuseum-data-architecture/data/115/916/086/9/1159160869.geojson)
2021/02/02 16:26:55 Updated 1477863281 (/usr/local/data/sfomuseum-data-architecture/data/147/786/328/1/1477863281.geojson)
2021/02/02 16:26:55 Updated 1159162827 (/usr/local/data/sfomuseum-data-architecture/data/115/916/282/7/1159162827.geojson)
2021/02/02 16:26:55 Updated 1477863283 (/usr/local/data/sfomuseum-data-architecture/data/147/786/328/3/1477863283.geojson)
2021/02/02 16:26:55 Updated 1477863285 (/usr/local/data/sfomuseum-data-architecture/data/147/786/328/5/1477863285.geojson)
2021/02/02 16:26:55 Updated 1477855661 (/usr/local/data/sfomuseum-data-architecture/data/147/785/566/1/1477855661.geojson)
2021/02/02 16:26:55 Updated 1477855663 (/usr/local/data/sfomuseum-data-architecture/data/147/785/566/3/1477855663.geojson)
2021/02/02 16:26:55 Updated 1477855821 (/usr/local/data/sfomuseum-data-architecture/data/147/785/582/1/1477855821.geojson)
2021/02/02 16:26:55 Updated 1477855823 (/usr/local/data/sfomuseum-data-architecture/data/147/785/582/3/1477855823.geojson)
2021/02/02 16:26:55 Updated 1477855831 (/usr/local/data/sfomuseum-data-architecture/data/147/785/583/1/1477855831.geojson)
... and so on

See also

go-whosonfirst-edtf's People

Contributors

thisisaaronland avatar tomtaylor avatar

Watchers

 avatar  avatar  avatar

go-whosonfirst-edtf's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.