Opened 11 years ago
Closed 11 years ago
#5335 closed enhancement (fixed)
GPKG driver for OGR
Reported by: | pramsey | Owned by: | pramsey |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | geopackage |
Cc: | Even Rouault |
Description
Adds "geopackage" support for OGR. Separate from the SQLite driver, for better or worse (there's a lot going on in there) but uses same SQLite detection from autoconf. Basic implementation, requires improved spatial filter support (the "index" extension in the GPKG standard) still, but passes ogr tests and has a small/ auto test suite.
Attachments (2)
Change History (14)
by , 11 years ago
Attachment: | gpkg_autotest_1.patch added |
---|
by , 11 years ago
Attachment: | gpkg_gdal_1.patch added |
---|
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Cc: | added; removed |
---|
comment:3 by , 11 years ago
Cc: | added; removed |
---|
Actually my Trac login is "rouault".
Regarding autotest patch, there will be failures if SQLite is not available. There should be a "if gdaltest.gpkg_dr is None: return 'skip'" at the beginning of each function. You can try running the tests with OGR_SKIP=GPKG.
Regarding main patch,
- the Windows makefiles are missing (actually moving the files from ogr/ogrsf_frmts/gpkg to ogr/ogrsf_frmts/sqlite would simplify that, and make a potential further unification with "standard" SQLite driver easier)
- CheckApplicationId() might segfault if trying to open a .gpkg file that exists, but has not read permissions. The return value of VSIFOpenL() should be checked.
- there are a few commented methods in ogr_geopackage.h
- drv_geopackage.html seems to be in progress
- the GetExtent() and GetFeatureCount() methods could likely be implemented be for efficient "ogrinfo the.gpkg -so -al"
- Looking at base SQLite driver, I can see that we use "sqlite3_last_insert_rowid( hDB )" that seems shorter than the OGRGeoPackageLayer::GetLastFid() method.
comment:4 by , 11 years ago
Draft GPKG driver committed at r26860
Should support enough features for basic read/write usage.
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
http://gisinternals.com/sdk/ shows that there's a breakage for MSVC builds. I can try fixing it with the current file structure, but I wanted to know if you plan letting the files in the gpkg subdirectory or move them in sqlite.
comment:9 by , 11 years ago
Not sure if you saw my yesterday note on IRC : [02:14] <EvenR> pramsey: valgrind on ogr_gpkg.py indicates a few errors (use after free) and memory leaks [02:18] <EvenR> pramsey: here's the interesting extract of the valgrind log : https://gist.github.com/rouault/8532608
comment:10 by , 11 years ago
comment:12 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Work can also be reviewed on github at https://github.com/pramsey/gdal/tree/gpkg