Using geopackage tile occur SQLiteException
See original GitHub issueAccording to the example, I write the following code:
Set<File> mapFiles = new HashSet<>();
mapFiles.add(new File("data/data/com.imagesky.app/123.gpkg"));
File[] maps = new File[mapFiles.size()];
maps = mapFiles.toArray(maps);
GeoPackageProvider geoPackageProvider = new GeoPackageProvider(maps, this);
List<GeopackageRasterTileSource> sources = geoPackageProvider.geoPackageMapTileModuleProvider().getTileSources();
XYTileSource tileSource = geoPackageProvider.getTileSource(sources.get(0).getDatabase(),
sources.get(0).getTableDao());
BoundingBox bbox = sources.get(0).getBounds();
mMapView.setTileProvider(geoPackageProvider);
mMapView.setTileSource(tileSource);
There was an exception:
After debugging, it was found that there is a problem here:
Is it a bug?
Version Info
Version Info:
implementation 'org.osmdroid:osmdroid-android:6.1.5'
implementation 'org.osmdroid:osmdroid-geopackage:6.1.5'
I need help, thank you!!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Getting Started With GeoPackage
For using direct SQL access, start with the empty geopackage template ... The GeoPackage Tiles option specifies a mechanism for storing raster data...
Read more >How to create a spatial index in a GeoPackage with GeoTools?
I want to write a GeoPackage file with GeoTools and create a spatial ... SQLiteException: [SQLITE_CONSTRAINT_UNIQUE] A UNIQUE constraint ...
Read more >osmdroid - Bountysource
I'm dealing with a small test App to load and display a GeoPackage raster layer. The source .gpkg file archive is on getExternalFilesDir(null) ......
Read more >mil.nga.geopackage.tiles.user.TileDao.delete java code examples ...
Best Java code snippets using mil.nga.geopackage.tiles.user.TileDao.delete (Showing top 5 results out of 315). origin: ngageoint/geopackage-android ...
Read more >GeoPackage Plugin — GeoTools 29-SNAPSHOT User Guide
Access to a GeoPackage can be performed either low level, using the GeoPackage ... The high level coverage reader can access all tile...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello. Testing with Android 25 works fine, but I have the same issue with:
@spyhunter99 It´s not related with permissions or accessibility to filesystems. Same issue here:
I made debug and found that:
All of this classes are from NGA Geopackage Library (https://github.com/ngageoint/GeoPackage) and this issue was found and fixed in the 3.3.0 version (see https://github.com/ngageoint/geopackage-android/issues/56)
OsmDroid Geopackage uses “mil.nga.geopackage:geopackage-core:2.0.1” but the current version is “5.1.0”. Do you have any chance to update the NGA Geopackage Library? (Related with: https://github.com/osmdroid/osmdroid/issues/1707). It will fix this issue and maybe other future issues.
@hello-willy Please, did you find any workaround?
Thanks.
@spyhunter99 I don’t know which version you attempted to upgrade to, but perhaps the gap is not that big from version
2.0.1
to version3.3.0
, which would be good enough for us, at least for this issue.