File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 44
55raw (coords:: CRS ) = coords. x, coords. y
66raw (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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments