public synchronized CoordinateSystem getCoordinateSystem(final int oracleSrid) { CoordinateSystem coordinateSystem = this.oracleCoordinateSystems.get(oracleSrid); if (coordinateSystem == null) { try { final Map<String, Object> result = JdbcUtils.selectMap(this, "SELECT * FROM MDSYS.SDO_CS_SRS WHERE SRID = ?", oracleSrid); if (result == null) { coordinateSystem = EpsgCoordinateSystems.getCoordinateSystem(oracleSrid); } else { final String wkt = (String)result.get("WKTEXT"); coordinateSystem = WktCsParser.read(wkt); coordinateSystem = EpsgCoordinateSystems.getCoordinateSystem(coordinateSystem); } } catch (final Throwable e) { Logs.error(this, "Unable to load coordinate system: " + oracleSrid, e); return null; } this.oracleCoordinateSystems.put(oracleSrid, coordinateSystem); } return coordinateSystem; }