Can I access the raw coordinates?

Access to the raw coordinates of geometries stored in the geometry column is discouraged. If you make good use of the high-level transforms provided by the framework, you will be more productive.

Rigid motion

Coordinates are often called for when the application requires rigid motion. We provide optimized Translate, Rotate and Scale transforms for that purpose:

data = georef((; z=rand(1000, 1000)))
999990 rows omitted
1000000×2 GeoTable over 1000×1000 CartesianGrid
z geometry
Continuous Quadrangle
[NoUnits] 🖈 Cartesian{NoDatum}
0.726071 Quadrangle((x: 0.0 m, y: 0.0 m), ..., (x: 0.0 m, y: 1.0 m))
0.119281 Quadrangle((x: 1.0 m, y: 0.0 m), ..., (x: 1.0 m, y: 1.0 m))
0.423174 Quadrangle((x: 2.0 m, y: 0.0 m), ..., (x: 2.0 m, y: 1.0 m))
0.932221 Quadrangle((x: 3.0 m, y: 0.0 m), ..., (x: 3.0 m, y: 1.0 m))
0.0183966 Quadrangle((x: 4.0 m, y: 0.0 m), ..., (x: 4.0 m, y: 1.0 m))
0.665103 Quadrangle((x: 5.0 m, y: 0.0 m), ..., (x: 5.0 m, y: 1.0 m))
0.626417 Quadrangle((x: 6.0 m, y: 0.0 m), ..., (x: 6.0 m, y: 1.0 m))
0.278945 Quadrangle((x: 7.0 m, y: 0.0 m), ..., (x: 7.0 m, y: 1.0 m))
0.734067 Quadrangle((x: 8.0 m, y: 0.0 m), ..., (x: 8.0 m, y: 1.0 m))
0.672515 Quadrangle((x: 9.0 m, y: 0.0 m), ..., (x: 9.0 m, y: 1.0 m))
data |> Translate(10u"m", 8u"ft")
999990 rows omitted
1000000×2 GeoTable over 1000×1000 CartesianGrid
z geometry
Continuous Quadrangle
[NoUnits] 🖈 Cartesian{NoDatum}
0.726071 Quadrangle((x: 10.0 m, y: 2.4384 m), ..., (x: 10.0 m, y: 3.4384 m))
0.119281 Quadrangle((x: 11.0 m, y: 2.4384 m), ..., (x: 11.0 m, y: 3.4384 m))
0.423174 Quadrangle((x: 12.0 m, y: 2.4384 m), ..., (x: 12.0 m, y: 3.4384 m))
0.932221 Quadrangle((x: 13.0 m, y: 2.4384 m), ..., (x: 13.0 m, y: 3.4384 m))
0.0183966 Quadrangle((x: 14.0 m, y: 2.4384 m), ..., (x: 14.0 m, y: 3.4384 m))
0.665103 Quadrangle((x: 15.0 m, y: 2.4384 m), ..., (x: 15.0 m, y: 3.4384 m))
0.626417 Quadrangle((x: 16.0 m, y: 2.4384 m), ..., (x: 16.0 m, y: 3.4384 m))
0.278945 Quadrangle((x: 17.0 m, y: 2.4384 m), ..., (x: 17.0 m, y: 3.4384 m))
0.734067 Quadrangle((x: 18.0 m, y: 2.4384 m), ..., (x: 18.0 m, y: 3.4384 m))
0.672515 Quadrangle((x: 19.0 m, y: 2.4384 m), ..., (x: 19.0 m, y: 3.4384 m))

Projections

Map projections are examples of coordinate transforms. The Proj function can be used to "reproject" a GeoTable into a new coordinate reference system (CRS):

data |> Proj(Polar)
999990 rows omitted
1000000×2 GeoTable over 1000×1000 TransformedGrid
z geometry
Continuous Quadrangle
[NoUnits] 🖈 Polar{NoDatum}
0.726071 Quadrangle((ρ: 0.0 m, ϕ: 0.0 rad), ..., (ρ: 1.0 m, ϕ: 1.5708 rad))
0.119281 Quadrangle((ρ: 1.0 m, ϕ: 0.0 rad), ..., (ρ: 1.41421 m, ϕ: 0.785398 rad))
0.423174 Quadrangle((ρ: 2.0 m, ϕ: 0.0 rad), ..., (ρ: 2.23607 m, ϕ: 0.463648 rad))
0.932221 Quadrangle((ρ: 3.0 m, ϕ: 0.0 rad), ..., (ρ: 3.16228 m, ϕ: 0.321751 rad))
0.0183966 Quadrangle((ρ: 4.0 m, ϕ: 0.0 rad), ..., (ρ: 4.12311 m, ϕ: 0.244979 rad))
0.665103 Quadrangle((ρ: 5.0 m, ϕ: 0.0 rad), ..., (ρ: 5.09902 m, ϕ: 0.197396 rad))
0.626417 Quadrangle((ρ: 6.0 m, ϕ: 0.0 rad), ..., (ρ: 6.08276 m, ϕ: 0.165149 rad))
0.278945 Quadrangle((ρ: 7.0 m, ϕ: 0.0 rad), ..., (ρ: 7.07107 m, ϕ: 0.141897 rad))
0.734067 Quadrangle((ρ: 8.0 m, ϕ: 0.0 rad), ..., (ρ: 8.06226 m, ϕ: 0.124355 rad))
0.672515 Quadrangle((ρ: 9.0 m, ϕ: 0.0 rad), ..., (ρ: 9.05539 m, ϕ: 0.110657 rad))

Raw coordinates

If you really need access to the coordinates, use the coords function:

quad = data.geometry[1]
Quadrangle
├─ Point(x: 0.0 m, y: 0.0 m)
├─ Point(x: 1.0 m, y: 0.0 m)
├─ Point(x: 1.0 m, y: 1.0 m)
└─ Point(x: 0.0 m, y: 1.0 m)
point = centroid(quad)
Point with Cartesian{NoDatum} coordinates
├─ x: 0.5 m
└─ y: 0.5 m
coords(point)
Cartesian{NoDatum} coordinates
├─ x: 0.5 m
└─ y: 0.5 m

It returns a CRS object. The type of this object can be retrieved with the crs function, which works with any GeoTable, geospatial Domain or individual Geometry:

crs(data)
Cartesian2D{NoDatum, Quantity{Float64, 𝐋, FreeUnits{(m,), 𝐋, nothing}}} (alias for Cartesian{NoDatum, 2, Quantity{Float64, 𝐋, Unitful.FreeUnits{(m,), 𝐋, nothing}}})

Very often the coordinates are LatLon in degrees. These cannot be used in linear algebra routines. The function to converts any CRS object into a static vector with Cartesian coordinates for algebraic manipulation:

to(Point(LatLon(0, 0)))
Vec(6.378137e6 m, 0.0 m, 0.0 m)