Skip to content

Commit 0ead8f2

Browse files
committed
raw(::LatLonAlt)
1 parent f2fcb78 commit 0ead8f2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/conversion.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
raw(coords::CRS) = coords.x, coords.y
66
raw(coords::LatLon) = coords.lon, coords.lat
7+
raw(coords::LatLonAlt) = coords.lon, coords.lat, coords.alt
78

89
# --------------------------------------
910
# Minimum GeoInterface.jl to perform IO

src/extra/gpkg/read.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function gpkgextract(db; layer=1)
7272
metadata = first(DBInterface.execute(
7373
db,
7474
"""
75-
SELECT g.table_name AS tablename, g.column_name AS geomcolumn,
75+
SELECT g.table_name AS tablename, g.column_name AS geomcolumn, g.z as zextent,
7676
c.srs_id AS srsid, srs.organization AS org, srs.organization_coordsys_id AS code
7777
FROM gpkg_geometry_columns g, gpkg_spatial_ref_sys srs
7878
JOIN gpkg_contents c ON ( g.table_name = c.table_name )
@@ -88,7 +88,7 @@ function gpkgextract(db; layer=1)
8888
code = metadata.code
8989
srsid = metadata.srsid
9090
if srsid == 0 || srsid == 4326
91-
crs = LatLon{WGS84Latest}
91+
crs = isone(metadata.zextent) ? LatLonAlt{WGS84Latest} : LatLon{WGS84Latest}
9292
elseif srsid == -1
9393
crs = Cartesian{NoDatum}
9494
else

0 commit comments

Comments
 (0)