Java Code Examples for mil.nga.geopackage.features.columns.GeometryColumns#getContents()

The following examples show how to use mil.nga.geopackage.features.columns.GeometryColumns#getContents() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FeatureDao.java    From geopackage-android with MIT License 6 votes vote down vote up
/**
 * Constructor
 *
 * @param database        database name
 * @param db              connection
 * @param geometryColumns geometry columns
 * @param table           feature table
 */
public FeatureDao(String database, GeoPackageConnection db, GeometryColumns geometryColumns,
                  FeatureTable table) {
    super(database, db, new FeatureConnection(db), table);

    this.featureDb = (FeatureConnection) getUserDb();
    this.geometryColumns = geometryColumns;
    if (geometryColumns.getContents() == null) {
        throw new GeoPackageException(GeometryColumns.class.getSimpleName()
                + " " + geometryColumns.getId() + " has null "
                + Contents.class.getSimpleName());
    }
    if (geometryColumns.getSrs() == null) {
        throw new GeoPackageException(GeometryColumns.class.getSimpleName()
                + " " + geometryColumns.getId() + " has null "
                + SpatialReferenceSystem.class.getSimpleName());
    }

    projection = geometryColumns.getProjection();
}
 
Example 2
Source File: FeatureDao.java    From geopackage-java with MIT License 6 votes vote down vote up
/**
 * Constructor
 * 
 * @param database
 *            database name
 * @param db
 *            GeoPackage connection
 * @param geometryColumns
 *            geometry columns
 * @param table
 *            feature table
 */
public FeatureDao(String database, GeoPackageConnection db,
		GeometryColumns geometryColumns, FeatureTable table) {
	super(database, db, new FeatureConnection(db), table);

	this.featureDb = (FeatureConnection) getUserDb();
	this.geometryColumns = geometryColumns;
	if (geometryColumns.getContents() == null) {
		throw new GeoPackageException(GeometryColumns.class.getSimpleName()
				+ " " + geometryColumns.getId() + " has null "
				+ Contents.class.getSimpleName());
	}
	if (geometryColumns.getSrs() == null) {
		throw new GeoPackageException(GeometryColumns.class.getSimpleName()
				+ " " + geometryColumns.getId() + " has null "
				+ SpatialReferenceSystem.class.getSimpleName());
	}

	projection = geometryColumns.getProjection();
}