Reading Predefined GeoRegion
s
The most basic functionality is to retrieve the information of a GeoRegion
. There are several sets of predefined GeoRegions in GeoRegions.jl, listed here.
You can read and retrieve the properties of a GeoRegion
using the function GeoRegion()
for a given ID
, which is a String
type.
julia
geo = GeoRegion(ID)
For example, the default GeoRegion
spans the whole globe. Its ID is ID = "GLB"
.
julia
using GeoRegions
geo = GeoRegion("GLB")
The GeoRegion GLB has the following properties:
Region ID (ID) : GLB
Parent ID (pID) : GLB
Name (name) : Globe
Bounds (N,S,E,W) : 90.0, -90.0, 360.0, 0.0
Rotation (θ) : 0.0
File Path (path) : /home/runner/work/GeoRegions.jl/GeoRegions.jl/src/.files/GLB.json
Centroid (geometry.centroid) : [180.0, -0.0]
Shape (geometry.shape) : Vector{Point{2, Float64}}(5)
This is the most basic, and yet the most important, functionality of GeoRegions.jl. For the full API of the function GeoRegion()
that talks about more advanced uses, see the section on reading custom GeoRegions
See the API here