Expand description
§WOF
Who’s On First is a gazetteer of all the places in the world from continents to neighbourhoods and venues.
This project gather some utilities to work with WOF documents in rust. Some of them are already available in Go-lang.
use wof::*;
// Create and validate a WOF GeoJSON object from string
let buf = r#"{
    "id": 0,
    "type": "Feature",
    "properties": { "name:eng_x_preferred":[ "Null Island" ], "name:fra_x_preferred":[ "Null Island" ], "wof:id":0, "wof:lang":[ "eng" ] },
    "bbox": [ 0, 0, 0, 0 ],
    "geometry": {"coordinates":[0, 0],"type":"Point"}
  }"#.to_string();
let json = parse_string_to_json(&buf).unwrap();
let geojson = WOFGeoJSON::as_valid_wof_geojson(&json).unwrap();
assert_eq!(geojson.id, 0);Re-exports§
- pub use self::expression::*;
Modules§
- export
- expression
- fix
- postgres
- repo
- Work with WOF repository folders. Walk through directories.
- shapefile
- sqlite
- Module to create and add documents to WOF SQLites databases.
- types
- utils
- Utilities for the WOF ecosystem.
Structs§
- JsonObject 
- A binary tree implementation of a string -> JsonValuemap. You normally don’t have to interact with instances ofObject, much more likely you will be using theJsonValue::Objectvariant, which wraps around this struct.
- WOFGeoJSON
- Representation of a WOF GeoJSON, contains all required properties.
Enums§
Functions§
- json_to_ writer 
- Serialize a JsonValueas a JSON into the IO stream.
- json_to_ writer_ pretty 
- Serialize a JsonValueas a WOF pretty-printed JSON into the IO stream.
- object_to_ writer 
- Serialize an Objectas a JSON into the IO stream.
- object_to_ writer_ pretty 
- Serialize an Objectas a WOF pretty-printed JSON into the IO stream.
- parse_file_ to_ json 
- Open a file, read the content and return the JsonValue.
- parse_string_ to_ json 
- Parse the String buffer and return the associated JsonValue.
- read_file_ to_ string 
- Read a file and write the content in a String.
- wof_to_ writer 
- Serialize a WOFGeoJSONas a JSON into the IO stream.
- wof_to_ writer_ pretty 
- Serialize a WOFGeoJSONas a WOF pretty-printed JSON into the IO stream.