WOFGeoJSON

Struct WOFGeoJSON 

Source
pub struct WOFGeoJSON<'a> {
    pub id: i32,
    pub type: String,
    pub properties: &'a JsonObject,
    pub bbox: Vec<f64>,
    pub geometry: &'a JsonObject,
    /* private fields */
}
Expand description

Representation of a WOF GeoJSON, contains all required properties.

Fields§

§id: i32

This is the id of the document.

§type: String

This is the type of the document, should be Feature.

§properties: &'a JsonObject

All properties of the document, contains names, hierarchy…

§bbox: Vec<f64>

The BBox of the document.

§geometry: &'a JsonObject

The raw Geometry, it’s an inner GeoJSON. Types are Point, MultiPoint, LineString, MultiLineString, Polygon and MultiPolygon.

Implementations§

Source§

impl<'a> WOFGeoJSON<'a>

Source

pub fn as_valid_wof_geojson(json: &'a JsonValue) -> Result<Self, String>

Source

pub fn pretty(&self, writer: &mut dyn Write) -> Result<(), Error>

Source

pub fn dump(&self, writer: &mut dyn Write) -> Result<(), Error>

Source

pub fn is_doc_deprecated(&self) -> bool

Source

pub fn is_alt_geom(&self) -> bool

Source

pub fn is_current(&self) -> bool

Source

pub fn is_deprecated(&self) -> bool

Source

pub fn is_ceased(&self) -> bool

Source

pub fn is_superseded(&self) -> bool

Source

pub fn is_superseding(&self) -> bool

Source

pub fn get_source(&self) -> String

Source

pub fn get_last_modified(&self) -> i32

Source

pub fn get_parent_id(&self) -> i32

Source

pub fn get_placetype(&self) -> String

Source

pub fn get_name(&self) -> String

Source

pub fn get_names(&self) -> Vec<WofName<'_>>

Source

pub fn get_country(&self) -> String

Source

pub fn get_ancestors(&self) -> Vec<(i32, String)>

Source

pub fn get_concordances(&self) -> Vec<(i32, String)>

Source

pub fn get_repo(&self) -> String

Source

pub fn get_lat(&self) -> f64

Source

pub fn get_lon(&self) -> f64

Source

pub fn get_min_lat(&self) -> f64

Source

pub fn get_min_lon(&self) -> f64

Source

pub fn get_max_lat(&self) -> f64

Source

pub fn get_max_lon(&self) -> f64

Source

pub fn get_superseded_by(&self) -> String

Source

pub fn get_supersedes(&self) -> String

Source

pub fn get_belongs_to(&self) -> Vec<i32>

Trait Implementations§

Source§

impl<'a> Clone for WOFGeoJSON<'a>

Source§

fn clone(&self) -> WOFGeoJSON<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for WOFGeoJSON<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Evaluate for WOFGeoJSON<'_>

Auto Trait Implementations§

§

impl<'a> Freeze for WOFGeoJSON<'a>

§

impl<'a> RefUnwindSafe for WOFGeoJSON<'a>

§

impl<'a> Send for WOFGeoJSON<'a>

§

impl<'a> Sync for WOFGeoJSON<'a>

§

impl<'a> Unpin for WOFGeoJSON<'a>

§

impl<'a> UnwindSafe for WOFGeoJSON<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V