/** * Add the geometry type constraint and the SRID */ private void setGeometryTypeConstraints() throws SQLException { if(isH2){ connection.createStatement().execute(String.format("ALTER TABLE %s ALTER COLUMN the_geom %s", tableLocation.toString(), firstGeometryType)); SFSUtilities.addTableSRIDConstraint(connection, tableLocation, parsedSRID); } else{ connection.createStatement().execute(String.format("ALTER TABLE %s ALTER COLUMN the_geom SET DATA TYPE geometry(%s,%d)", tableLocation.toString(), firstGeometryType, parsedSRID)); } } }
SFSUtilities.addTableSRIDConstraint(connection, parse, srid);
SFSUtilities.addTableSRIDConstraint(connection, parse, srid);
SFSUtilities.addTableSRIDConstraint(connection, parse, srid);
SFSUtilities.addTableSRIDConstraint(connection, parse, srid);