Skip to content

Commit

Permalink
add envelope
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahParry committed Mar 22, 2024
1 parent f34fd7e commit a076578
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ pub enum EsriGeometry<const N: usize> {
MultiPoint(EsriMultiPoint<N>),
Polygon(EsriPolygon<N>),
Polyline(EsriPolyline<N>),
Envelope(EsriEnvelope)
}

impl<const N: usize> EsriGeometry<N> {
Expand All @@ -226,7 +227,7 @@ impl<const N: usize> EsriGeometry<N> {
_ => None
}
}

/// Returns a polyline if possible
pub fn as_polyline(self) -> Option<EsriPolyline<N>> {
match self {
Expand All @@ -246,3 +247,19 @@ impl<const N: usize> EsriGeometry<N> {

// Completed: esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline | esriGeometryPolygon |
// TODO: esriGeometryEnvelope.


#[allow(non_snake_case)]
#[derive(Clone, Deserialize, Serialize, Debug)]
#[skip_serializing_none]
pub struct EsriEnvelope {
xmin: f64,
ymin: f64,
xmax: f64,
ymax: f64,
zmin: Option<f64>,
zmax: Option<f64>,
mmin: Option<f64>,
mmax: Option<f64>,
spatialReference: Option<spatialReference>
}

0 comments on commit a076578

Please sign in to comment.