Class binding = g.getClass();
CoordinateReferenceSystem crs = null;
if (g.getSRID() > 0) {
// see if the dialect can handle this one
crs = store.getSQLDialect().createCRS(g.getSRID(), cx);
tb.userData(JDBCDataStore.JDBC_NATIVE_SRID, g.getSRID());
}
if (crs == null) {
crs = gd.getCoordinateReferenceSystem();
}
tb.add(ad.getLocalName(), binding, crs);