Struct gdal::vector::Geometry

source ·
pub struct Geometry { /* private fields */ }
Expand description

OGR Geometry

Implementations

Create a new Geometry without a C pointer

Safety

This method returns a Geometry without wrapped pointer

Set the wrapped C pointer

Safety

This method operates on a raw C pointer

Create a geometry by parsing a WKT string.

Creates a geometry by parsing a slice of bytes in WKB (Well-Known Binary) format.

Create a rectangular geometry from West, South, East and North values.

Serialize the geometry as JSON.

Serialize the geometry as WKT.

Serializes the geometry to WKB (Well-Known Binary) format.

Returns a C pointer to the wrapped Geometry

Safety

This method returns a raw C pointer

Returns the C pointer of a Geometry

Safety

This method returns a raw C pointer

Compute the convex hull of this geometry.

Compute buffer of geometry

The distance parameter the buffer distance to be applied. Should be expressed into the same unit as the coordinates of the geometry. n_quad_segs specifies the number of segments used to approximate a 90 degree (quadrant) of curvature.

Returns the n-th sub-geometry as a non-owned Geometry.

Safety

Don’t keep this object for long.

Get a reference to the geometry at given index

Transforms a geometrys coordinates into another SpatialRef

May or may not contain a reference to a SpatialRef: if not, it returns an Ok(None); if it does, it tries to build a SpatialRef. If that succeeds, it returns an Ok(Some(SpatialRef)), otherwise, you get the Err.

Create a copy of self as a geo-types geometry.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
Compute intersection. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.