Class HonuaSpatialReference
Represents a spatial reference by WKID, authority/code, or WKT.
public sealed record HonuaSpatialReference : IEquatable<HonuaSpatialReference>
- Inheritance
-
HonuaSpatialReference
- Implements
- Inherited Members
Properties
Authority
Gets the spatial reference authority, such as EPSG.
public string? Authority { get; }
Property Value
Code
Gets the authority code.
public int? Code { get; }
Property Value
- int?
Identifier
Gets the stable display identifier for the spatial reference.
public string Identifier { get; }
Property Value
LatestVcsWkid
Gets the latest vertical coordinate system WKID when one is available.
public int? LatestVcsWkid { get; }
Property Value
- int?
LatestWkid
Gets the latest well-known ID when one is available.
public int? LatestWkid { get; }
Property Value
- int?
VcsWkid
Gets the vertical coordinate system WKID when one is available.
public int? VcsWkid { get; }
Property Value
- int?
WebMercator
Gets the Web Mercator spatial reference.
public static HonuaSpatialReference WebMercator { get; }
Property Value
Wgs84
Gets the WGS84 longitude/latitude spatial reference.
public static HonuaSpatialReference Wgs84 { get; }
Property Value
Wkid
Gets the well-known ID when one is available.
public int? Wkid { get; }
Property Value
- int?
Wkt
Gets the Well-Known Text definition when one is available.
public string? Wkt { get; }
Property Value
Methods
FromAuthorityCode(string, int)
Creates a spatial reference from an authority/code pair.
public static HonuaSpatialReference FromAuthorityCode(string authority, int code)
Parameters
Returns
- HonuaSpatialReference
The spatial reference.
FromWkid(int, int?)
Creates a spatial reference from a well-known ID.
public static HonuaSpatialReference FromWkid(int wkid, int? latestWkid = null)
Parameters
Returns
- HonuaSpatialReference
The spatial reference.
FromWkt(string, string?, int?)
Creates a spatial reference from Well-Known Text.
public static HonuaSpatialReference FromWkt(string wkt, string? authority = null, int? code = null)
Parameters
wktstringThe WKT coordinate system definition.
authoritystringOptional authority name.
codeint?Optional authority code.
Returns
- HonuaSpatialReference
The spatial reference.
Parse(string)
Parses a common CRS identifier such as EPSG:4326, WKID:3857, or an OGC CRS URI.
public static HonuaSpatialReference Parse(string value)
Parameters
valuestringThe CRS identifier.
Returns
- HonuaSpatialReference
The parsed spatial reference.
ToOgcCrsIdentifier()
Converts the spatial reference to an OGC CRS identifier when an authority/code pair is available.
public string? ToOgcCrsIdentifier()
Returns
- string
The OGC CRS identifier, or null when the spatial reference is WKT-only.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
TryParse(string?, out HonuaSpatialReference?)
Tries to parse a common CRS identifier.
public static bool TryParse(string? value, out HonuaSpatialReference? spatialReference)
Parameters
valuestringThe CRS identifier.
spatialReferenceHonuaSpatialReferenceThe parsed spatial reference when parsing succeeds.
Returns
- bool
True when parsing succeeds.
WithVerticalWkid(int, int?)
Returns a copy of this spatial reference with the specified vertical coordinate system WKID.
public HonuaSpatialReference WithVerticalWkid(int vcsWkid, int? latestVcsWkid = null)