Java Code Examples for mil.nga.geopackage.core.srs.SpatialReferenceSystem#setDefinition_12_063()

The following examples show how to use mil.nga.geopackage.core.srs.SpatialReferenceSystem#setDefinition_12_063() . 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: GeoPackageExample.java    From geopackage-android with MIT License 5 votes vote down vote up
private static void createCrsWktExtension(GeoPackage geoPackage)
        throws SQLException {

    CrsWktExtension wktExtension = new CrsWktExtension(geoPackage);
    wktExtension.getOrCreate();

    SpatialReferenceSystemDao srsDao = geoPackage
            .getSpatialReferenceSystemDao();

    SpatialReferenceSystem srs = srsDao.queryForOrganizationCoordsysId(
            ProjectionConstants.AUTHORITY_EPSG,
            ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM);

    SpatialReferenceSystem testSrs = new SpatialReferenceSystem();
    testSrs.setSrsName("test");
    testSrs.setSrsId(12345);
    testSrs.setOrganization("test_org");
    testSrs.setOrganizationCoordsysId(testSrs.getSrsId());
    testSrs.setDefinition(srs.getDefinition());
    testSrs.setDescription(srs.getDescription());
    testSrs.setDefinition_12_063(srs.getDefinition_12_063());
    srsDao.create(testSrs);

    SpatialReferenceSystem testSrs2 = new SpatialReferenceSystem();
    testSrs2.setSrsName("test2");
    testSrs2.setSrsId(54321);
    testSrs2.setOrganization("test_org");
    testSrs2.setOrganizationCoordsysId(testSrs2.getSrsId());
    testSrs2.setDefinition(srs.getDefinition());
    testSrs2.setDescription(srs.getDescription());
    srsDao.create(testSrs2);

}
 
Example 2
Source File: GeoPackageExample.java    From geopackage-java with MIT License 5 votes vote down vote up
private static void createCrsWktExtension(GeoPackage geoPackage)
		throws SQLException {

	CrsWktExtension wktExtension = new CrsWktExtension(geoPackage);
	wktExtension.getOrCreate();

	SpatialReferenceSystemDao srsDao = geoPackage
			.getSpatialReferenceSystemDao();

	SpatialReferenceSystem srs = srsDao.queryForOrganizationCoordsysId(
			ProjectionConstants.AUTHORITY_EPSG,
			ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM);

	SpatialReferenceSystem testSrs = new SpatialReferenceSystem();
	testSrs.setSrsName("test");
	testSrs.setSrsId(12345);
	testSrs.setOrganization("test_org");
	testSrs.setOrganizationCoordsysId(testSrs.getSrsId());
	testSrs.setDefinition(srs.getDefinition());
	testSrs.setDescription(srs.getDescription());
	testSrs.setDefinition_12_063(srs.getDefinition_12_063());
	srsDao.create(testSrs);

	SpatialReferenceSystem testSrs2 = new SpatialReferenceSystem();
	testSrs2.setSrsName("test2");
	testSrs2.setSrsId(54321);
	testSrs2.setOrganization("test_org");
	testSrs2.setOrganizationCoordsysId(testSrs2.getSrsId());
	testSrs2.setDefinition(srs.getDefinition());
	testSrs2.setDescription(srs.getDescription());
	srsDao.create(testSrs2);

}