CoordinateReferenceSystem crs = featureType.getDefaultGeometry().getCoordinateSystem();
Set idents = crs.getIdentifiers();
Iterator it = idents.iterator();
while (it.hasNext())
{
Identifier id = (Identifier) it.next();
if (id.toString().indexOf("EPSG:") != -1) // this should probably use the Citation, but this is easier!
{
//we have an EPSG #, so lets use it!
String str_num = id.toString().substring(id.toString().indexOf(':')+1);
int num = Integer.parseInt(str_num);
ftConfig.setSRS(num);
break; // take the first EPSG
}
}