ParseGeometryPointFromGeoHash converts a GeoHash to a Geometry Point using a Lng/Lat Point representation of the GeoHash.
(g string, precision int)
| 201 | // ParseGeometryPointFromGeoHash converts a GeoHash to a Geometry Point |
| 202 | // using a Lng/Lat Point representation of the GeoHash. |
| 203 | func ParseGeometryPointFromGeoHash(g string, precision int) (Geometry, error) { |
| 204 | box, err := parseGeoHash(g, precision) |
| 205 | if err != nil { |
| 206 | return Geometry{}, err |
| 207 | } |
| 208 | point := box.Center() |
| 209 | geom, gErr := MakeGeometryFromPointCoords(point.Lon, point.Lat) |
| 210 | if gErr != nil { |
| 211 | return Geometry{}, gErr |
| 212 | } |
| 213 | return geom, nil |
| 214 | } |
| 215 | |
| 216 | // ParseCartesianBoundingBoxFromGeoHash converts a GeoHash to a CartesianBoundingBox. |
| 217 | func ParseCartesianBoundingBoxFromGeoHash(g string, precision int) (CartesianBoundingBox, error) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…