OracleDataStore createCRS does not fail through to MDSYS.CS_SRS table
---------------------------------------------------------------------
Key: GEOT-2703
URL: http://jira.codehaus.org/browse/GEOT-2703
Project: GeoTools
Issue Type: Bug
Components: data jdbc-ng
Affects Versions: 2.6-M2
Reporter: Jody Garnett
Thanks to Ugo for the report.
{panel}
FINE: Could not decode 8307 using the built-in EPSG database
org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:8307" from
authority "European Petroleum Survey Group" found for object of type
"CoordinateReferenceSystem".
...
at
org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferenceSystem(DefaultAuthorityFactory.java:179)
at org.geotools.referencing.CRS.decode(CRS.java:421)
at org.geotools.referencing.CRS.decode(CRS.java:349)
at org.geotools.jdbc.SQLDialect.createCRS(SQLDialect.java:494)
at
org.geotools.data.oracle.OracleDialect.createCRS(OracleDialect.java:521)
at
org.geotools.jdbc.JDBCFeatureSource.buildFeatureType(JDBCFeatureSource.java:295)
{panel}
The code:
{code}
public CoordinateReferenceSystem createCRS(int srid, Connection cx) throws
SQLException {
// if the official EPSG database has an answer, use that one
CoordinateReferenceSystem crs = super.createCRS(srid, cx);
if(crs != null)
return crs;
// otherwise try to decode the WKT, most of the time it's invalid, but
// for new codes they learned the proper WKT syntax
String sql = "SELECT WKTEXT FROM MDSYS.CS_SRS WHERE SRID = " + srid;
{code}
Is set to check for a null result- but not an exception.
{code}
CoordinateReferenceSystem crs=null;
try {
crs = uper.createCRS(srid, cx);
} catch (org.opengis.referencing.NoSuchAuthorityCodeException notFound ){
// check oracle in the next section
}
...
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel