pub struct CityJSON {
pub thetype: String,
pub version: String,
pub transform: Transform,
pub city_objects: HashMap<String, CityObject>,
pub vertices: Vec<Vec<i64>>,
pub metadata: Option<Metadata>,
pub appearance: Option<Appearance>,
pub geometry_templates: Option<GeometryTemplates>,
pub extensions: Option<Value>,
pub other: Value,
/* private fields */
}Fields§
§thetype: String§version: String§transform: Transform§city_objects: HashMap<String, CityObject>§vertices: Vec<Vec<i64>>§metadata: Option<Metadata>§appearance: Option<Appearance>§geometry_templates: Option<GeometryTemplates>§extensions: Option<Value>§other: ValueImplementations§
Source§impl CityJSON
impl CityJSON
Sourcepub fn get_metadata(&self) -> Self
pub fn get_metadata(&self) -> Self
Get the “first line” (aka metadata or header) of a CityJSONSeq
Sourcepub fn get_cjfeature(&self, i: usize) -> Option<CityJSONFeature>
pub fn get_cjfeature(&self, i: usize) -> Option<CityJSONFeature>
Getter for the features in a CityJSON dataset. Starts at 0, and return Option::None if the index is out of bounds.
Sourcepub fn add_transform_correction(&mut self, t: Transform)
pub fn add_transform_correction(&mut self, t: Transform)
Used when many CityJSONSeq are used, the “transform” can be modified (the new value is a “correction”).
pub fn add_cjfeature(&mut self, cjf: &mut CityJSONFeature)
pub fn remove_duplicate_vertices(&mut self)
pub fn update_geographicalextent(&mut self)
pub fn update_transform(&mut self)
pub fn number_of_city_objects(&self) -> usize
Sourcepub fn sort_cjfeatures(&mut self, ss: SortingStrategy)
pub fn sort_cjfeatures(&mut self, ss: SortingStrategy)
When getting the CityJSONFeatures, this controls the order in which they are returned. By default they are returned in the order they were added.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CityJSON
impl<'de> Deserialize<'de> for CityJSON
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CityJSON
impl RefUnwindSafe for CityJSON
impl Send for CityJSON
impl Sync for CityJSON
impl Unpin for CityJSON
impl UnwindSafe for CityJSON
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more