Class GeoHashEncoder
Inheritance
System.Object
GeoHashEncoder
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Common
Assembly: Mars.Common.dll
Syntax
public class GeoHashEncoder
Constructors
| Improve this Doc View SourceGeoHashEncoder()
Creates a new instanceof of the GeoHashEncoder class
with default bits precision and base32 character collection from Mars.Common.SpatialHashHelper
Declaration
public GeoHashEncoder()
GeoHashEncoder(Int32[], Char[])
Declaration
public GeoHashEncoder(int[] bits, char[] base32Chars)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | bits | |
System.Char[] | base32Chars |
Methods
| Improve this Doc View SourceEncode(Position, in GeoHashPrecision)
Declaration
public string Encode(Position geoCoord, in GeoHashPrecision precision = GeoHashPrecision.Level12)
Parameters
Type | Name | Description |
---|---|---|
Position | geoCoord | |
GeoHashPrecision | precision |
Returns
Type | Description |
---|---|
System.String |
Encode(Double, Double, GeoHashPrecision)
Declaration
public string Encode(double latitude, double longitude, GeoHashPrecision precision = GeoHashPrecision.Level12)
Parameters
Type | Name | Description |
---|---|---|
System.Double | latitude | |
System.Double | longitude | |
GeoHashPrecision | precision |
Returns
Type | Description |
---|---|
System.String |
EncodeInt(Double, Double, GeoHashPrecision)
Encode a coordinate
Creates a GeoHash out of the latitude and longitude that is Declaration
public long EncodeInt(double latitude, double longitude, GeoHashPrecision bitDepth = GeoHashPrecision.Level12)
Parameters
Type | Name | Description |
---|---|---|
System.Double | latitude | The latitude value of the coordinate. |
System.Double | longitude | The longitude value of the coordinate. |
GeoHashPrecision | bitDepth | The number of bits to use for the precision of the encoded coordinate.. |
Returns
Type | Description |
---|---|
System.Int64 | Returns a hash string for the passed coordinate |