Git Product home page Git Product logo

geopackage-ios's People

Contributors

bosborn avatar danielbarela avatar newmanw avatar restjohn avatar rghosh0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geopackage-ios's Issues

GeoPackage with Vector Tiles (PBF) inside based on new Extensions

Describe the documentation issue
https://github.com/opengeospatial/OGC-OS-Sprint-04-2020/tree/master/Shared_Datasets
https://github.com/jerstlouis/developer-events/blob/patch-1/2023/Tiling-Interfaces-Code-Sprint/README.md

https://github.com/jerstlouis/developer-events/blob/patch-1/2023/Tiling-Interfaces-Code-Sprint/GeoPackage%20Vector%20Tiles%20Extensions.pdf

Additional context
Army Geospatial Center and NGA want to distribute data in GPKG format with vector tiles inside using new extension to gpkg sqlite
Protocol buffer format
Tiles can be 3395 or 3857 or other SRS/CRS

Undefined Symbol

Please fill out as much known and relevant information as possible.

Version Information:

  • GeoPackage iOS Version: 7.0.2
  • GeoPackage iOS Source: (e.g. CocoaPods, Source Code Build) CocoaPods
  • CocoaPods Version: 1.10.2
  • Xcode Version: 13.1
  • Device or Emulator: N/A
  • iOS Version: N/A
  • Other Relevant Libraries:

Expected Results:

  • What did you expect to happen?
    Project to build successfully.

Observed Results:

  • What happened instead?
    Getting numerous errors, and all of them are to do with "Undefined symbol"

image

  • How often does this occur?
    Every time I try to build the project

Output:

  • Any logs, errors, or output messages?
    Undefined symbols for architecture x86_64: "_PROJ_WEB_MERCATOR_MIN_LAT_RANGE", referenced from: +[GPKGTileBoundingBoxUtils toWebMercatorWithBoundingBox:] in GPKGTileBoundingBoxUtils.o +[GPKGTileBoundingBoxUtils boundDegreesBoundingBoxWithWebMercatorLimits:] in GPKGTileBoundingBoxUtils.o -[GPKGTileDao isXYZTiles] in GPKGTileDao.o -[GPKGTileGenerator adjustXYZBounds] in GPKGTileGenerator.o "_PROJ_WEB_MERCATOR_MAX_LAT_RANGE", referenced from: +[GPKGTileBoundingBoxUtils toWebMercatorWithBoundingBox:] in GPKGTileBoundingBoxUtils.o +[GPKGTileBoundingBoxUtils boundDegreesBoundingBoxWithWebMercatorLimits:] in GPKGTileBoundingBoxUtils.o -[GPKGTileDao isXYZTiles] in GPKGTileDao.o -[GPKGTileGenerator adjustXYZBounds] in GPKGTileGenerator.o "_PROJ_EPSG_WORLD_GEODETIC_SYSTEM_GEOGRAPHICAL_3D", referenced from: -[GPKGSpatialReferenceSystemDao createIfNeededWithSrs:andOrganization:andCoordsysId:] in GPKGSpatialReferenceSystemDao.o "_PROJ_AUTHORITY_NONE", referenced from: -[GPKGSpatialReferenceSystemDao createIfNeededWithSrs:andOrganization:andCoordsysId:] in GPKGSpatialReferenceSystemDao.o "_PROJ_UNDEFINED_CARTESIAN", referenced from: -[GPKGSpatialReferenceSystemDao createIfNeededWithSrs:andOrganization:andCoordsysId:] in GPKGSpatialReferenceSystemDao.o "_PROJ_UNDEFINED_GEOGRAPHIC", referenced from: -[GPKGSpatialReferenceSystemDao createIfNeededWithSrs:andOrganization:andCoordsysId:] in GPKGSpatialReferenceSystemDao.o "_OBJC_CLASS_$_PROJProjections", referenced from: objc-class-ref in GPKGOAPIFeatureGenerator.o "_PROJ_OGC_CRS84", referenced from: +[GPKGOAPIFeatureGenerator initialize] in GPKGOAPIFeatureGenerator.o "_PROJ_MERCATOR_RADIUS", referenced from: +[GPKGMapUtils currentZoomWithMapView:] in GPKGMapUtils.o "_OBJC_CLASS_$_SFPolyhedralSurface", referenced from: objc-class-ref in GPKGMapShapeConverter.o "_OBJC_CLASS_$_SFMultiPolygon", referenced from: objc-class-ref in GPKGMapShapeConverter.o "_OBJC_CLASS_$_SFMultiLineString", referenced from: objc-class-ref in GPKGMapShapeConverter.o "_OBJC_CLASS_$_SFGeometryTypes", referenced from: objc-class-ref in GPKGFeatureColumn.o objc-class-ref in GPKGGeometryColumns.o objc-class-ref in GPKGGeometryExtensions.o objc-class-ref in GPKGMapShapeConverter.o objc-class-ref in GPKGStyleMappingDao.o objc-class-ref in GPKGStyleMappingRow.o objc-class-ref in GPKGTableInfo.o ... "_OBJC_CLASS_$_SFMultiPoint", referenced from: objc-class-ref in GPKGMapShapeConverter.o "_OBJC_CLASS_$_SFCompoundCurve", referenced from: objc-class-ref in GPKGMapShapeConverter.o "_OBJC_CLASS_$_SFGeometryUtils", referenced from: objc-class-ref in GPKGIcons.o objc-class-ref in GPKGMapShapeConverter.o objc-class-ref in GPKGStyles.o "_PROJ_EPSG_WEB_MERCATOR", referenced from: -[GPKGBoundedOverlay setBoundingBox:inProjection:] in GPKGBoundedOverlay.o -[GPKGBoundedOverlay boundingBoxInProjection:] in GPKGBoundedOverlay.o -[GPKGFeaturePreview draw] in GPKGFeaturePreview.o -[GPKGFeatureTileGenerator boundingBoxAtZoom:] in GPKGFeatureTileGenerator.o -[GPKGFeatureTiles initWithGeoPackage:andFeatureDao:andScale:andWidth:andHeight:] in GPKGFeatureTiles.o -[GPKGFeatureTiles queryIndexedFeaturesWithWebMercatorBoundingBox:] in GPKGFeatureTiles.o -[GPKGFeatureTiles expandBoundingBox:inProjection:] in GPKGFeatureTiles.o ... "_OBJC_CLASS_$_SFByteWriter", referenced from: objc-class-ref in GPKGGeometryData.o "_OBJC_CLASS_$_SFGeometryPrinter", referenced from: objc-class-ref in GPKGFeatureInfoBuilder.o "_OBJC_CLASS_$_SFByteReader", referenced from: objc-class-ref in GPKGGeometryData.o objc-class-ref in GPKGGeoPackageManager.o "_SF_GEOMETRY_NAME", referenced from: -[GPKGFeatureColumns updateColumns] in GPKGFeatureColumns.o "_PROJ_EPSG_WORLD_GEODETIC_SYSTEM", referenced from: +[GPKGFeatureGenerator initialize] in GPKGFeatureGenerator.o -[GPKGFeatureOverlayQuery queryFeaturesWithColumns:andBoundingBox:inProjection:] in GPKGFeatureOverlayQuery.o -[GPKGFeatureTiles initWithGeoPackage:andFeatureDao:andScale:andWidth:andHeight:] in GPKGFeatureTiles.o -[GPKGGeoPackageOverlay initHelperWithRetriever:] in GPKGGeoPackageOverlay.o -[GPKGMapShapeConverter initWithProjection:] in GPKGMapShapeConverter.o -[GPKGPlatteCarreOptimize projection] in GPKGPlatteCarreOptimize.o -[GPKGSpatialReferenceSystemDao createIfNeededWithSrs:andOrganization:andCoordsysId:] in GPKGSpatialReferenceSystemDao.o ... "_PROJ_WGS84_HALF_WORLD_LON_WIDTH", referenced from: -[GPKGBoundingBox init] in GPKGBoundingBox.o -[GPKGBoundingBox center] in GPKGBoundingBox.o -[GPKGBoundingBox complementaryWgs84] in GPKGBoundingBox.o -[GPKGBoundingBox boundWgs84Coordinates] in GPKGBoundingBox.o -[GPKGBoundingBox expandWgs84Coordinates] in GPKGBoundingBox.o -[GPKGFeatureShapes removeShapesNotWithinMapView:withBoundingBox:inDatabase:withTable:] in GPKGFeatureShapes.o +[GPKGGeometryUtils toRadiansWithDegrees:] in GPKGGeometryUtils.o ... "_PROJ_WGS84_HALF_WORLD_LAT_HEIGHT", referenced from: -[GPKGBoundingBox init] in GPKGBoundingBox.o +[GPKGTileBoundingBoxUtils boundingBoxWithX:andY:andZoom:] in GPKGTileBoundingBoxUtils.o +[GPKGTileBoundingBoxUtils tileGridWithWgs84BoundingBox:andZoom:] in GPKGTileBoundingBoxUtils.o +[GPKGTileBoundingBoxUtils wgs84BoundingBoxWithTileGrid:andZoom:] in GPKGTileBoundingBoxUtils.o +[GPKGTileBoundingBoxUtils tileSizeLatWithWgs84TilesPerSide:] in GPKGTileBoundingBoxUtils.o "_OBJC_CLASS_$_SFCircularString", referenced from: objc-class-ref in GPKGMapShapeConverter.o "_OBJC_CLASS_$_SFGeometryEnvelope", referenced from: objc-class-ref in GPKGBoundingBox.o objc-class-ref in GPKGGeometryData.o objc-class-ref in GPKGRTreeIndexExtension.o "_OBJC_CLASS_$_SFPolygon", referenced from: objc-class-ref in GPKGMapShapeConverter.o "_OBJC_CLASS_$_SFGeometryEnvelopeBuilder", referenced from: objc-class-ref in GPKGFeatureIndexer.o objc-class-ref in GPKGGeometryData.o "_OBJC_CLASS_$_SFPointFiniteFilter", referenced from: objc-class-ref in GPKGGeometryData.o "_OBJC_CLASS_$_SFPoint", referenced from: objc-class-ref in GPKGFeatureInfoBuilder.o objc-class-ref in GPKGFeatureOverlayQuery.o objc-class-ref in GPKGFeatureTiles.o objc-class-ref in GPKGMapShapeConverter.o objc-class-ref in GPKGTileBoundingBoxUtils.o "_OBJC_CLASS_$_SFGeometryCollection", referenced from: objc-class-ref in GPKGMapShapeConverter.o "_OBJC_CLASS_$_PROJProjectionFactory", referenced from: objc-class-ref in GPKGFeatureGenerator.o objc-class-ref in GPKGFeatureOverlayQuery.o objc-class-ref in GPKGFeaturePreview.o objc-class-ref in GPKGFeatureTiles.o objc-class-ref in GPKGGeoPackageTileRetriever.o objc-class-ref in GPKGOAPIFeatureGenerator.o objc-class-ref in GPKGPlatteCarreOptimize.o ... "_PROJ_AUTHORITY_OGC", referenced from: +[GPKGOAPIFeatureGenerator initialize] in GPKGOAPIFeatureGenerator.o -[GPKGOAPIFeatureGenerator crsFromProjection:] in GPKGOAPIFeatureGenerator.o "_OBJC_CLASS_$_SFLineString", referenced from: objc-class-ref in GPKGMapShapeConverter.o "_PROJ_AUTHORITY_EPSG", referenced from: -[GPKGSpatialReferenceSystemDao srsWithEpsg:] in GPKGSpatialReferenceSystemDao.o -[GPKGSpatialReferenceSystemDao createIfNeededWithSrs:andOrganization:andCoordsysId:] in GPKGSpatialReferenceSystemDao.o +[GPKGTileBoundingBoxUtils projectedBoundingBoxWithEpsg:andX:andY:andZoom:] in GPKGTileBoundingBoxUtils.o +[GPKGTileBoundingBoxUtils projectedBoundingBoxWithAuthority:andCode:andX:andY:andZoom:] in GPKGTileBoundingBoxUtils.o +[GPKGTileBoundingBoxUtils projectedBoundingBoxWithEpsg:andTileGrid:andZoom:] in GPKGTileBoundingBoxUtils.o +[GPKGTileBoundingBoxUtils projectedBoundingBoxWithAuthority:andCode:andTileGrid:andZoom:] in GPKGTileBoundingBoxUtils.o +[GPKGTileBoundingBoxUtils projectedBoundingBoxFromWGS84WithEpsg:andX:andY:andZoom:] in GPKGTileBoundingBoxUtils.o ... "_PROJ_WEB_MERCATOR_HALF_WORLD_WIDTH", referenced from: +[GPKGBoundingBox worldWebMercator] in GPKGBoundingBox.o -[GPKGBoundingBox complementaryWebMercator] in GPKGBoundingBox.o -[GPKGBoundingBox boundWebMercatorCoordinates] in GPKGBoundingBox.o -[GPKGBoundingBox expandWebMercatorCoordinates] in GPKGBoundingBox.o +[GPKGTileBoundingBoxUtils webMercatorBoundingBoxWithTileGrid:andZoom:] in GPKGTileBoundingBoxUtils.o +[GPKGTileBoundingBoxUtils tileGridWithWebMercatorBoundingBox:andZoom:] in GPKGTileBoundingBoxUtils.o +[GPKGTileBoundingBoxUtils tileSizeWithTilesPerSide:] in GPKGTileBoundingBoxUtils.o ... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Steps to Reproduce:

  1. Create a new Xcode project
  2. Initialise Pod
  3. Add pod 'geopackage-ios', :git => 'https://github.com/ngageoint/geopackage-ios.git', :tag => '7.0.2' to Podfile
  4. Pod install
  5. Open .xcworkspace file
  6. Create Header file
  7. Add #import "geopackage-ios-Bridging-Header.h"
  8. Add the header file in Build Settings -> Swift Compiler General -> Objective-C Bridging Header
  9. Build project

Relevant Code:

// Code to reproduce the problem?

Test Files:

  • Links to any files needed for testing?

Additional Information:

  • Any additional configuration, data, or information that might help with the issue?

aclocal: command not found + cocoapods

Even if I have install all the required commands (automake, autoconf, etc), getting this error while building.

#######
Running aclocal

Something went wrong, giving up!

./autogen.sh: line 29: aclocal: command not found

#######

I checked in the terminal and able to run "aclocal" from there.

I am working on macOS Mojave. Using this repository with CocoaPods.

TileFeature Misaligned

I'm trying to insert the zoom level 0 of osm (attached) to a tiletable with following values:

tileMatrixSet.minX = -180
tileMatrixSet.minY = -85
tileMatrixSet.maxX = 180
tileMatrixSet.maxY = 85

Unfortunately the result look misaligned. What is the proper value for minX, minY, maxX and maxY?
tile
screen shot 2018-07-28 at 09 00 04

Table Index Extension invalid foreign key

When using the table index extension, the table is created with an invalid SQLite foreign key to the extensions table. The GeoPackage continues to function but does not pass the SQLite foreign key check.

spatial function support

I was wondering if there is a plan to add spatial function to geopackage? I'm developing an offline application rely on geopackage library but miss some spatial function such as:

  1. ST_Transform to perform coordinate system transformation between projection system
  2. ST_Area to calculate area
  3. ST_Intersect to find some feature within given bounding box
  4. ST_PointOnSurface to find a point on 2D Surface
  5. ST_Distance
    Thank you in advance

Tile DAO get Bounding Box and Tile Grid at a zoom level

Add methods to query for the Tile Grid and Bounding Box of the existing tiles at a Tile Matrix zoom level. This could be the entire Tile Matrix Set bounding box or grid, or a subset if tiles are missing around the edges.

Build Failed

  • GeoPackage iOS Version: 1.2
  • GeoPackage iOS Source: CocoaPods
  • CocoaPods Version: 1.2.0
  • Xcode Version: 8.0
  • Device or Emulator: 7plus
  • iOS Version: 10.0
  • Other Relevant Libraries:

I am relatively new to this, so please feel free to correct me if I am wrong. My project has other pods written in swift, so when I include use_frameworks! in my Podfile and install the pods, I get a build error! I tried using GeoPackage iOS Version: 1.2.1, I still get the same problem.

screen shot 2017-02-24 at 4 28 10 pm

Steps to Reproduce:

  1. Create a new xcode project
  2. run $pod init in the terminal in the project directory
  3. add "pod 'geopackage-ios', '~> 1.2.1'" in the Podfile
  4. run $ pod install

If i try to build the project(.xcworkspace) after installing the pods, there is a build error. If i remove use_frameworks! from the Podfile, it builds fine. So, I am not sure if there is some compatibility issue with proj4, but I would definitely appreciate your help!

Project Build Failed

Hi,

I added pod with pod 'geopackage-ios', '~> 7.4.2' to my project and try to build it, but got this error, and don't know what the cause
I also try another versions of geopackage-ios down to 6.0.0 and always the same error

Screenshot 2023-03-01 at 13 04 28

in the Podfile: platform :ios, '12.0'
Xcode: Version 14.0.1 (14A400)
CocoaPods : 1.11.3

In case it's important, I also had an error with geopackage-ios-geopackage-ios and proj-ios-proj-ios Signing & Capabilities, cause they required a team, so I assign my project's team there.

Please let me know if you need more info
Thanks in advance

NGA NSG PROFILE

Has ios SDK been updated to support NGA NSG TILING SCHEMA/profile?

releasing GPKGTileDao resources

How does one release the resources of a GPKGTileDao object? The following code leaks memory, but commenting out the tileDao line removes the leak. But I didn't find a close method in GPKGTileDao or its super-classes.

for (int i=0; i<50; i++) {
    gpkg = [_gpkgGeoPackageManager open:geopackageItem.filename];
    GPKGTileDao *tileDao = [gpkg getTileDaoWithTableName:@"DNCBASEMAP12_16"];
    [gpkg close];
}

I had a similar experience with GPKGFeatureDao.

Result count computation fails

The +[GPKGSqlUtils countWithDatabase:andStatement:andArgs:] method fails to provide the number of rows matching the given SQL query if the table being queried has a column with the letters "from" in its name.

For example, if the statement equals select "id", "convertFrom", "type" from "myTable" where "id" = ?, the count query will be determined to be SELECT COUNT(*) From", "type" from "myTable" where "id" = ? and thus fail to be executed.

Use Cocoa's Error Pattern

The GeoPackage iOS library throws exceptions of type NSException to signal that an operation could not be completed. This may occur, for instance, if a file system operation has failed.

Unlike Java or other programming languages, however, exceptions in Objective-C are not meant to stop execution due to an uncontrollable error at runtime, but are used to point out an unrecoverable mistake in the code:

When you’re writing code with Objective-C, exceptions are used solely for programmer errors, like out-of-bounds array access or invalid method arguments. These are the problems that you should find and fix during testing before you ship your app.
(Programming with Objective-C: Dealing with Errors)

The general pattern is that exceptions are reserved for programmer error only, and the program catching such an exception should quit soon afterwards.
(Exception Programming Topics: Exceptions and the Cocoa Frameworks)

Catching exceptions is not safe for use with automatic reference counting and may lead to memory leaks:

[ARC] does not end the lifetime of __strong variables when their scopes are abnormally terminated by an exception.

It does not perform releases which would occur at the end of a full-expression if that full-expression throws an exception.
(LLVM: ARC, 7.7 Exceptions)

And there is no real way to catch NSExceptions in Swift:

In Swift, you can recover from errors passed using Cocoa’s error pattern, as described above in Catch Errors. However, there’s no safe way to recover from Objective-C exceptions in Swift. To handle Objective-C exceptions, write Objective-C code that catches exceptions before they reach any Swift code.
(Swift: Handling Cocoa Errors in Swift)

Instead, one should use Cocoa's error pattern:

Every program must deal with errors as they occur at runtime. The program, for example, might not be able to open a file, or perhaps it cannot parse an XML document. Often errors such as these require the program to inform the user about them. And perhaps the program can attempt to get around the problem causing the error.

Cocoa (and Cocoa Touch) offer developers programmatic tools for these tasks: the NSError class in Foundation and new methods and mechanisms in the Application Kit to support error handling in applications.
(Error Handling Programming Guide: Introduction to Error Handling Programming Guide for Cocoa)

For example, the method

- (BOOL)importGeoPackageFromPath:(NSString *)path

on GPKGGeoPackageManager will throw an exception if a file could not be moved or copied or if a directory already exists. Instead, it should be converted to a method with the following signature

- (BOOL)importGeoPackageFromPath:(NSString *)path error:(NSError **)error

and set the error parameter in the case of those events. This would also allow it to be translated to a throwing void function in Swift. In Swift, it would have the signature

func importGeoPackage(fromPath path: String!) throws

allowing any errors to be caught. Similarly, the method

- (GPKGFeatureTable *)createFeatureTableWithMetadata:(GPKGFeatureTableMetadata *)metadata

on GPKGGeoPackage should be converted to

- (GPKGFeatureTable *)createFeatureTableWithMetadata:(GPKGFeatureTableMetadata *)metadata error:(NSError **)error

allowing it to be translated to

func createFeatureTable(with metadata: GPKGFeatureTableMetadata!) throws -> GPKGFeatureTable

(For more information, see Swift: About Imported Cocoa Error Parameters.)

(EDIT: It would also be great if the library made use of nullability specifiers (Designating Nullability in Objective-C APIs).)

(This issue has been motivated by the two Stack Overflow posts Catching Both Objective-C and Swift Exceptions and Catching Both Objective-C and Swift Exceptions with Support for Return Values.)

GeoPackage import and open validation

Header and integrity checks will be supported on imports and opens. Due to the extra time constraint these can cause, the only check on by default will be import header checks. The remaining can be enabled on the GeoPackage manager.

We should also allow validation, both header and integrity on an existing database file. In case something has corrupted the file after it was added.

Why cocoapods installs 3.2.0?

When I put geopackage-ios~> 3.3.0 in the Pod file it show error

"[!] Unable to find a specification for geopackage-ios~> 3.3.0"

When I removed '~> 3.3.0' from Pod file it automatically takes version 3.2.0.

Please help.

insert a feature

Hi, i'm very new to geopackage. Pls help me how to insert a feature on geopackage ios. Thing i've done so far:

let featureTables : NSArray = geoPackage.getFeatureTables() as NSArray;
let featureName: String = featureTables.object(at: featureTables.index(of: "Parks")) as! String;
let featureTable: GPKGFeatureDao = geoPackage.getFeatureDao(withTableName: featureName);

let featureRow: GPKGFeatureRow = featureTable.newRow();
let geomData: GPKGGeometryData = GPKGGeometryData(srsId: 4326);

let polygon: SFPolygon = SFPolygon(hasZ: false, andHasM: false);

let myLineString: SFLineString = getLineString(points: [[-90,38],[-90.001,38.001],[-90.002,38],[-90,38]]);
polygon.addRing(myLineString);

geomData.geometry = polygon;
featureRow.setGeometry(geomData);

featureRow.setValueWithColumnName("name", andValue: "test" as NSObject);
let tes: Int64 = featureTable.insert(featureRow);
print(tes);

and getLineString function

func getLineString(points: [[Decimal]] ) -> SFLineString {
        let lineString: SFLineString = SFLineString(hasZ: false, andHasM: false);
        for i in 0...points.count-1
        {
            let point: SFPoint = SFPoint(hasZ: false, andHasM: false, andX: points[i][0] as NSDecimalNumber, andY: points[i][1] as NSDecimalNumber);//(false, false, points[i][0], points[i][1]);
            lineString.addPoint(point);
        }
        return lineString;
    }

there is no error generated from my code but also no record inserted. Pls let me know how to fix the code. thank you in advance

Column ordering fix when creating user tables (features and tiles)

This problem occurs only when creating a user table for features or tiles and the created columns are not presorted by their column index. The column names are stored in the sorted order by the columns themselves are not. This causes problems when using those columns based upon their index location.

Get the bounding box of a Tile Grid

Provide functionality to retrieve the bounding box of a Tile Grid based upon the total bounding box and the matrix dimensions. This will be used to retrieve the minimum bounding box of existing tiles at a tile matrix zoom level.

Is it possible to check that Geopackage table was opened and ready for work?

I want to check if Geopackage database was opened in the right way and ready for querying.
I don't see any public property wich allows checking clear database object. I am looking for something like this:
if db.opened {..(any query processing)..}
From GPKGConnection there is no chance to do this.

Additional context
Crash logs:


[logging-persist] cannot open file at line 44596 of [02c344acea]
[logging-persist] os_unix.c:44596: (0) open(/Users/Library/Developer/CoreSimulator/Devices/B374378D-E308-4113-B547-5E10211B17D8/data/Containers/Data/Application/A2508A93-4249-4D9B-B8A4-E4B0DDB6C2B6/Documents/GeopackageFiles/2020-10-07-1602091304.gpkg) - Undefined error: 0
 *** Terminating app due to uncaught exception 'Open Database Failure', reason: 'Failed to open database: file:///Users/Library/Developer/CoreSimulator/Devices/B374378D-E308-4113-B547-5E10211B17D8/data/Containers/Data/Application/A2508A93-4249-4D9B-B8A4-E4B0DDB6C2B6/Documents/GeopackageFiles/2020-10-07-1602091304.gpkg, Error: unable to open database file'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff2043a126 __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007fff20177f78 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff2043a004 -[NSException initWithCoder:] + 0
	3   TestAppNameGP                       0x00000001039427e5 -[GPKGConnectionPool openConnection] + 293
	4   TestAppNameGP                       0x0000000103940211 -[GPKGConnectionPool sqliteConnection] + 513
	5   TestAppNameGP                       0x0000000103940566 -[GPKGConnectionPool resultConnection] + 342
	6   TestAppNameGP                       0x000000010393a964 -[GPKGConnection queryWithTable:andColumns:andWhere:andWhereArgs:andGroupBy:andHaving:andOrderBy:andLimit:] + 420
	7   TestAppNameGP                       0x000000010393a704 -[GPKGConnection queryWithTable:andColumns:andWhere:andWhereArgs:andGroupBy:andHaving:andOrderBy:] + 356
	8   TestAppNameGP                       0x00000001039211cf -[GPKGBaseDao queryForEqWithColumns:andField:andValue:andGroupBy:andHaving:andOrderBy:] + 463
	9   TestAppNameGP                       0x0000000103920d3a -[GPKGBaseDao queryForEqWithColumns:andField:andValue:] + 170
	10  TestAppNameGP                       0x0000000103920c43 -[GPKGBaseDao queryForEqWithField:andValue:] + 147
	11  TestAppNameGP                       0x000000010394a28d -[GPKGContentsDao contentsOfTypeName:] + 77
	12  TestAppNameGP                       0x000000010394a06f -[GPKGContentsDao tablesOfTypeName:] + 63
	13  TestAppNameGP                       0x00000001039d2424 -[GPKGGeoPackage tablesByTypeName:] + 100
	14  TestAppNameGP                       0x00000001039d238c -[GPKGGeoPackage tablesByType:] + 92
	15  TestAppNameGP                       0x00000001039d220b -[GPKGGeoPackage featureTables] + 43
	16  TestAppNameGP                       0x00000001021bb1ca $s13 TestAppNameGP 16GeoPackageSearchC9search_v2_13layerSettings10completionySS_SayAA22GetAllOrgProjectsQueryC4DataV0M0V7ProjectV4NodeV19FeatureLayerSettingVAOVGySS_SayAA0cdE12CategoryItemVGSgtctFyycfU_ + 2218
	17  TestAppNameGP                       0x0000000102059c30 $sIeg_IeyB_TR + 48
	18  Foundation                          0x00007fff2080d348 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
	19  Foundation                          0x00007fff2080d240 -[NSBlockOperation main] + 98
	20  Foundation                          0x00007fff2081025e __NSOPERATION_IS_INVOKING_MAIN__ + 17
	21  Foundation                          0x00007fff2080c465 -[NSOperation start] + 785
	22  Foundation                          0x00007fff20810be3 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 17
	23  Foundation                          0x00007fff208106f6 __NSOQSchedule_f + 182
	24  libdispatch.dylib                   0x0000000107ede6a9 _dispatch_block_async_invoke2 + 83
	25  libdispatch.dylib                   0x0000000107ecfa88 _dispatch_client_callout + 8
	26  libdispatch.dylib                   0x0000000107ed6356 _dispatch_lane_serial_drain + 796
	27  libdispatch.dylib                   0x0000000107ed7027 _dispatch_lane_invoke + 439
	28  libdispatch.dylib                   0x0000000107ee2e90 _dispatch_workloop_worker_thread + 882
	29  libsystem_pthread.dylib             0x00007fff5dcd8a3d _pthread_wqthread + 290
	30  libsystem_pthread.dylib             0x00007fff5dcd7b77 start_wqthread + 15
)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'Open Database Failure', reason: 'Failed to open database: file:///Users/Library/Developer/CoreSimulator/Devices/B374378D-E308-4113-B547-5E10211B17D8/data/Containers/Data/Application/A2508A93-4249-4D9B-B8A4-E4B0DDB6C2B6/Documents/GeopackageFiles/2020-10-07-1602091304.gpkg, Error: unable to open database file'
terminating with uncaught exception of type NSException
CoreSimulator 732.17 - Device: iPhone 11 (B374378D-E308-4113-B547-5E10211B17D8) - Runtime: iOS 14.0 (18A372) - DeviceType: iPhone 11
(Recorded stack frame) 

Add full Geometry projection transform functionality

Currently you can do projection transformations on single wkb points. It would be useful to have a full Geometry projection transformation which iterates through all parts of the Geometry and transforms it.

Build failed

there is link error during build in Xcode 8.2

Create Feature Table With Metadata Methods

Additional create feature table methods that create the geometry columns table if needed, the user feature table, contents row, and insert the geometry columns.

Additional methods should support specifying the name of the id column and/or additional columns. This is currently possible by using the base create feature table method, but requires everything to be created by the caller.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.