SRSInfo { public static final Boolean checkAxisXY(CoordinateReferenceSystem crs) { AxisDirection axisDirection = crs.getCoordinateSystem().getAxis(0).getDirection(); if (axisDirection.equals(AxisDirection.NORTH) || axisDirection.equals(AxisDirection.SOUTH)) { return false; } else if (axisDirection.equals(AxisDirection.EAST) || axisDirection.equals(AxisDirection.WEST)) { return true; } else { return !OTHER_Y_AXIS_DIRECTIONS.contains(axisDirection); } } SRSInfo(String srsURI);  SRSInfo(int srid); private  SRSInfo(String srsURI, CoordinateReferenceSystem crs, boolean isSRSRecognised); static final Boolean checkAxisXY(CoordinateReferenceSystem crs); static final Envelope buildDomainEnvelope(CoordinateReferenceSystem crs, Boolean isAxisXY); static final String convertSRID(BigInteger srid); static final String convertSRID(int srid); String getSrsURI(); CoordinateReferenceSystem getCrs(); UnitsOfMeasure getUnitsOfMeasure(); Boolean isAxisXY(); Boolean isSRSRecognised(); Boolean isGeographic(); Boolean isWktDefault(); Envelope getDomainEnvelope(); double getDomainRangeX(); static final SRSInfo getDefaultWktCRS84(String srsURI); static final SRSInfo getUnrecognised(String srsURI); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static final String DEFAULT_WKT_CRS84_CODE; static final SRSInfo DEFAULT_WKT_CRS84; }
@Test public void testCheckAxisXY_WGS84() throws FactoryException { CoordinateReferenceSystem crs = CRS.forCode(SRS_URI.WGS84_CRS); Boolean expResult = false; Boolean result = SRSInfo.checkAxisXY(crs); assertEquals(expResult, result); }
@Test public void testCheckAxisXY_CRS84() throws FactoryException { CoordinateReferenceSystem crs = CRS.forCode("CRS:84"); Boolean expResult = true; Boolean result = SRSInfo.checkAxisXY(crs); assertEquals(expResult, result); }
@Test public void testCheckAxisXY_OSGB36() throws FactoryException { CoordinateReferenceSystem crs = CRS.forCode(SRS_URI.OSGB36_CRS); Boolean expResult = true; Boolean result = SRSInfo.checkAxisXY(crs); assertEquals(expResult, result); }