Internal API

The following functions are neither public nor exported and may be subject to change in future non-breaking releases.

Types

GeoBasics.VALID_CRSType

const VALID_CRS = Union{Type{LatLon}, Type{Cartesian}}

Union type representing the valid CRS types for the public API of this package.

source
GeoBasics.VALID_DOMAINSType

const VALID_DOMAINS{T} = Union{FastInDomainUnion{T}, FastInSubDomain{T}}

This is the union representing all domains for which fast point inclusion algorithm is defined. It contains both FastInDomain defined in this package as well as a plain GeometrySet of FastInGeometry objects as well as SubDomains of either of the previous domains

source

Helpers

GeoBasics.in_exit_earlyFunction
in_exit_early(p, geom)

Function that checks if a point is contained within the geometry geom using the fast point inclusion algorithm that relies on availability geom has valid methods for polyareas and bboxes.

It is expected that the input geom also has a valid method for BasicTypes.valuetype in order to extract the T type parameter to convert p to a valid cartesian point.

Note

This method is basically pre-filtering points by checking inclusion in the bounding box which is significantly faster than checking for the polyarea itself, especially if the polyareas is composed by a large number of points.

See also polyareas, bboxes, FastInGeometry, geoborders, GeoBorders.

source
GeoBasics.cartesian_geometryFunction
cartesian_geometry(T::Type{<:AbstractFloat}, geom)
cartesian_geometry(T::Type{<:AbstractFloat})
cartesian_geometry(geom)

Convert geometries from LatLon to Cartesian coordinate systems, optionally changing the underlying machine type of the points to T

The second method simply returns Base.Fix1(cartesian_geometry, T).

The third method, will try to extract the machine precision from geom and translates to cartesian_geometry(BasicTypes.valuetype(geom), geom).

Arguments

  • T::Type{<:AbstractFloat}: The desired machine type of the points in the output geometry. If not provided, it will default to the machine type of the input geometry.
  • geom: The geometry to convert, which can be an arbitrary Geometry either in LatLon{WGS84Latest} or Cartesian2D{WGS84Latest} coordinates.

Returns

  • The converted geometry, with points of type POINT_CART{T}.
source
GeoBasics.latlon_geometryFunction
latlon_geometry(T::Type{<:AbstractFloat}, geom)
latlon_geometry(T::Type{<:AbstractFloat})
latlon_geometry(geom)

Convert geometries from Cartesian to LatLon coordinate systems, optionally changing the underlying machine type of the points to T

The second method simply returns Base.Fix1(latlon_geometry, T).

The third method, will try to extract the machine precision from geom and translates to latlon_geometry(BasicTypes.valuetype(geom), geom).

Arguments

  • T::Type{<:AbstractFloat}: The desired machine type of the points in the output geometry. If not provided, it will default to the machine type of the input geometry.
  • geom: The geometry to convert, which can be an arbitrary Geometry either in LatLon{WGS84Latest} or Cartesian2D{WGS84Latest} coordinates.

Returns

  • The converted geometry, with points of type POINT_LATLON{T}.
source