ShapeFileEPSGHelper { public static String getDeclaredEPSGFromWKT(final String wkt) throws FactoryException { return ShapeFileEPSGHelper.getDeclaredEPSGFromWKT(wkt, true); }  static String getDeclaredEPSGFromPrj(final File prjFile); static String getDeclaredEPSGFromWKT(final String wkt); static String getDeclaredEPSGFromWKT(final String wkt, boolean useBaseCRSFailover);  }
@Test public void testGetEpsgFromWkt() { System.out.println("getEpsgFromWkt"); String result = null; try { result = ShapeFileEPSGHelper.getDeclaredEPSGFromWKT(wkt_ProjCRSKnown_GeogCRSKnown); } catch (FactoryException ex) { Logger.getLogger(ShapeFileEPSGHelperTest.class.getName()).log(Level.SEVERE, null, ex); } String expResult = "EPSG:5070"; assertEquals(expResult, result); }
@Test public void testGetEpsgFromWktWithUnknownProjectedCRS() { System.out.println("getEpsgFromWkt"); String result = null; try { result = ShapeFileEPSGHelper.getDeclaredEPSGFromWKT(wkt_ProjCRSUnknown_GeogCRSKnown); } catch (FactoryException ex) { Logger.getLogger(ShapeFileEPSGHelperTest.class.getName()).log(Level.SEVERE, null, ex); } String expResult = "EPSG:4269"; assertEquals(expResult, result); }