public GeometryColumns getGeometryColumns ( ) { GeometryColumns result = null ; if ( geometryColumns . size ( ) > 1 ) { // This shouldn't happen with the unique table name constraint on // geometry columns throw new GeoPackageException ( "Unexpected state. More than one GeometryColumn has a foreign key to the Contents. Count: " + geometryColumns . size ( ) ) ; } else if ( geometryColumns . size ( ) == 1 ) { CloseableIterator < GeometryColumns > iterator = geometryColumns . closeableIterator ( ) ; try { result = iterator . next ( ) ; } finally { try { iterator . close ( ) ; } catch ( IOException e ) { throw new GeoPackageException ( "Failed to close the Geometry Columns iterator" , e ) ; } } } return result ; }
Get the Geometry Columns should only return one or no value