Skip to content

Commit

Permalink
implement default spatial reference as wkid 3857
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahParry committed Apr 13, 2024
1 parent fdf3c12 commit 29d9cc5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/spatial_reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,23 @@ use serde_with::skip_serializing_none;

/// Read more on [Esri docs site](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#GUID-DFF0E738-5A42-40BC-A811-ACCB5814BABC)
#[skip_serializing_none]
#[derive(Serialize, Deserialize, Debug, Clone, Default)]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SpatialReference {
pub wkid: Option<u32>,
pub latest_wkid: Option<u32>,
pub vcs_wkid: Option<u32>,
pub latest_vcs_wkid: Option<u32>,
pub wkt: Option<String>,
}

impl Default for SpatialReference {
fn default() -> Self {
Self {
wkid: Some(3857_u32),
latest_wkid: None,
vcs_wkid: None,
latest_vcs_wkid: None,
wkt: None,
}
}
}

0 comments on commit 29d9cc5

Please sign in to comment.