Skip to content

What is a GeoRegion?

In essence, a GeoRegion is:

  • a geographical region of interest

  • identified by an ID

  • a subregion of a parent GeoRegion (identified by pID, which must also be a valid ID)

Default GeoRegions

When using GeoRegions.jl, the default GeoRegion should generally be the global domain, specified by GLB and given by the [N,S,E,W] coordinates [90,-90,360,0]. The Global GeoRegion GLB is considered to be a subset of itself.

GeoRegions.AbstractGeoRegion Type
julia
AbstractGeoRegion

Abstract supertype for geographical regions. All AbstractGeoRegion types contain the following fields:

  • ID - A String Type, the identifier for the GeoRegion.

  • pID - A String Type, the identifier for the parent GeoRegion.

  • name - A String Type, the full name of the GeoRegion.

  • path - A String Type, the path of the file containing information on this GeoRegion.

  • N - A Float Type, contains the northernmost latitude bound.

  • S - A Float Type, contains the southernmost latitude bound.

  • E - A Float Type, contains the easternmost longitude bound.

  • W - A Float Type, contains the westernmost longitude bound.

  • θ - A Float Type, the rotation projection for the data in the GeoRegion

  • geometry - A Geometry or Vector{Geometry} Type

source

The GeoRegion Type

In GeoRegions.jl v8 and above, we have standardized the usage of the struct type GeoRegion for all simple polygonal shapes.

Current Limitations:

  • A GeoRegion supports only one shape/polygon per GeoRegion

  • A GeoRegion shape/polygon cannot have holes within it

Work is currently in progress to determine how best to include multiple shapes in a single GeoRegion type.

Types of GeoRegions for versions ≤v7

Previous versions of GeoRegions.jl used to differentiate between Rectilinear (RectRegion) and Polygonal (PolyRegion) Types of GeoRegions. This is no longer supported in ≥v8.

GeoRegions.GeoRegion Type
julia
GeoRegion

A struct containing geometric information on a geographic regions defined in Geometry. We note the following:

  • geometry - currently is a singular Geometry
source

The Geometry Type

All GeoRegions are defined based on a Geometry struct type that contains information on the geometry of a GeoRegion.

GeoRegions.Geometry Type
julia
Geometry

Struct containing the geometry/shape properties of a GeoRegion. All Geometry types contain the following fields:

  • shape - A vector of Point2 (see GeometryBasics.jl) Types, defining a non-rectilinear shape of the GeoRegion.

  • centroid - A Point2 Type, defining the centroid of the GeoRegion.

  • polygon - A Polygon Type (see GeometryBasics.jl), which is useful when doing checks on polygons using GeometryOps.jl.

source

GeoRegions.jl extracts the Polygon and Vector{Point} information from this Geometry type and use the functionalities of GeometryOps.jl to perform checks on polygons.