Table of Contents

Class GrpcGeometryConverter

Namespace
Honua.Sdk.Geometry
Assembly
Honua.Sdk.Geometry.dll

Converts between Geospatial gRPC geometry messages and NetTopologySuite geometries.

[Obsolete("Use Honua.Sdk.Grpc.GrpcGeometryConverter instead. This type and the Geospatial.Grpc dependency on Honua.Sdk.Geometry will be removed in 6.0.0.")]
public static class GrpcGeometryConverter
Inheritance
GrpcGeometryConverter
Inherited Members

Methods

ReadGeometry(Geometry, HonuaGrpcGeometryReadOptions)

Reads a Geospatial gRPC geometry message using the specified decoding options.

public static Geometry ReadGeometry(Geometry geometry, HonuaGrpcGeometryReadOptions options)

Parameters

geometry Geometry
options HonuaGrpcGeometryReadOptions

Returns

Geometry

ReadGeometry(Geometry, HonuaSpatialReference?, GeometryFactory?)

Reads a Geospatial gRPC geometry message.

public static Geometry ReadGeometry(Geometry geometry, HonuaSpatialReference? spatialReference = null, GeometryFactory? geometryFactory = null)

Parameters

geometry Geometry

The gRPC geometry message.

spatialReference HonuaSpatialReference

Optional spatial reference used to set the geometry SRID.

geometryFactory GeometryFactory

Optional factory used to construct the geometry.

Returns

Geometry

The parsed geometry.

ReadSpatialReference(SpatialReference?)

Reads a Geospatial gRPC spatial reference message.

public static HonuaSpatialReference? ReadSpatialReference(SpatialReference? spatialReference)

Parameters

spatialReference SpatialReference

The gRPC spatial reference message.

Returns

HonuaSpatialReference

The parsed spatial reference, or null when the proto message is empty.

WriteGeometry(Geometry)

Writes a NetTopologySuite geometry as a Geospatial gRPC geometry message.

public static Geometry WriteGeometry(Geometry geometry)

Parameters

geometry Geometry

The geometry to write.

Returns

Geometry

The gRPC geometry message.

WriteGeometry(Geometry, HonuaGrpcGeometryWriteOptions)

Writes a NetTopologySuite geometry as a Geospatial gRPC geometry message using the specified encoding options.

public static Geometry WriteGeometry(Geometry geometry, HonuaGrpcGeometryWriteOptions options)

Parameters

geometry Geometry
options HonuaGrpcGeometryWriteOptions

Returns

Geometry

WriteSpatialReference(HonuaSpatialReference?)

Writes a spatial reference as a Geospatial gRPC spatial reference message.

public static SpatialReference? WriteSpatialReference(HonuaSpatialReference? spatialReference)

Parameters

spatialReference HonuaSpatialReference

The spatial reference to write.

Returns

SpatialReference

The gRPC spatial reference message, or null when no spatial reference is supplied.