} else {
throw new RuntimeException("Shouldnt happen!: Unnkown SeCoordSys type: "
+ coordSys.getClass().getName());
}
int seEpsgCode;
PeCoordinateSystem candidate;
for( int i = 0; i < seEpsgCodes.length; i++ ) {
try {
seEpsgCode = seEpsgCodes[i];
candidate = (PeCoordinateSystem) PeFactory.factory(seEpsgCode);
// in ArcSDE 9.2, if the PeFactory doesn't support a projection it claimed to
// support, it returns 'null'. So check for it.
if (candidate != null && candidate.getName().trim().equals(peCoordSysName)) {
epsgCode = seEpsgCode;
break;
}
} catch (PeProjectionException pe) {
// Strangely SDE includes codes in the projcsCodeList() that