ngageoint / geopackage-java

GeoPackage Java Library
http://ngageoint.github.io/geopackage-java
MIT License
81 stars 26 forks source link

Case sensitive geometry column name comparison causes exception #42

Closed asammartin closed 6 years ago

asammartin commented 6 years ago

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

Version Information:

Expected Results:

Observed Results:

Output:

Steps to Reproduce:

  1. Download test file (see link below)

  2. Load the gpkg

  3. Attempt to get dao for one of the feature tables

  4. Open test file in a db viewer

  5. View table gpkg_geometry_columns

  6. Note the column_name values are of shape

  7. View the table rad_303d_p

  8. Note the name of the geometry column is Shape

Relevant Code:

String tableName = "rad_303d_p";
geoPackage.getFeatureDao(tableName);

Test Files:

Additional Information:

bosborn commented 6 years ago

Made this change for case insensitive comparison of the geometry column name. Was able to iterate through the feature rows on your test GeoPackage. Will release as part of 3.0.3+.

If you want to fix that GeoPackage using the current version, you can run the following: geoPackage.execSQL("update gpkg_geometry_columns set column_name = 'Shape' where column_name = 'shape'");

Let me know if you want dev builds of the 3.0.3 jars.

asammartin commented 6 years ago

that change looks great. don't need the dev builds. have a temporary adapter to work around issues until 3.0.3. thanks.

bosborn commented 6 years ago

Fixed in 3.1.0