| Constructor and Description |
|---|
EtsAssert() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertCrsHeader(String crsHeaderValue,
CoordinateSystem expectedCrs,
String failureMsg) |
static CoordinateSystem |
assertDefaultCrs(List<String> valueToAssert,
String failureMsg)
Assert that one of the default CRS
|
static void |
assertDefaultCrs(String crsHeaderValue,
String failureMsg)
Assert that the passed string is one of the the default CRS
|
static void |
assertDefaultCrsAtFirst(List<String> valueToAssert,
String failureMsg)
Assert that the first is one of the default CRS
|
static void |
assertDefaultCrsHeader(String crsHeaderValue,
String failureMsg)
Assert that one of the default CRS
|
static void |
assertFalse(boolean valueToAssert,
String failureMsg) |
static void |
assertInCrs84(org.locationtech.jts.geom.Geometry geometry,
String failureMsg)
Assert that the passed geometry is in the valid area of CRS84.
|
static void |
assertTrue(boolean valueToAssert,
String failureMsg) |
static void |
assertValidCrsIdentifier(CoordinateSystem coordinateSystem,
String failureMsg)
1.
|
public static void assertTrue(boolean valueToAssert,
String failureMsg)
valueToAssert - the boolean to assert to be truefailureMsg - the message to throw in case of a failure, should not be nullpublic static void assertFalse(boolean valueToAssert,
String failureMsg)
valueToAssert - the boolean to assert to be falsefailureMsg - the message to throw in case of a failure, should not be nullpublic static void assertValidCrsIdentifier(CoordinateSystem coordinateSystem, String failureMsg)
1. For http-URIs (starting with http:) validate that the string conforms to the syntax specified
by RFC 7230, section 2.7.1.
2. For https-URIs (starting with https:) validate that the string conforms to the syntax specified
by RFC 7230, section 2.7.2.
3. For URNs (starting with urn:) validate that the string conforms to the syntax specified
by RFC 8141, section 2.
4. For OGC URNs (starting with urn:ogc:def:crs:) and OGC http-URIs (starting with http://www.opengis.net/def/crs/)
validate that the string conforms to the syntax specified by OGC Name Type Specification - definitions - part 1 – basic name.
coordinateSystem - the coordinate system to assert as valid identifier (see above). If null an
AssertionError is thrown.failureMsg - the message to throw in case of a failure, should not be nullpublic static CoordinateSystem assertDefaultCrs(List<String> valueToAssert, String failureMsg)
* http://www.opengis.net/def/crs/OGC/1.3/CRS84 (for coordinates without height) * http://www.opengis.net/def/crs/OGC/0/CRS84h (for coordinates with height)is in the list of passed crs.
valueToAssert - list of CRS which should contain the default crs, never nullfailureMsg - the message to throw in case of a failure, should not be nullpublic static void assertDefaultCrsAtFirst(List<String> valueToAssert, String failureMsg)
* http://www.opengis.net/def/crs/OGC/1.3/CRS84 (for coordinates without height) * http://www.opengis.net/def/crs/OGC/0/CRS84h (for coordinates with height)
valueToAssert - list of CRS which should contain the default crs, never nullfailureMsg - the message to throw in case of a failure, should not be nullpublic static void assertDefaultCrs(String crsHeaderValue, String failureMsg)
* http://www.opengis.net/def/crs/OGC/1.3/CRS84 (for coordinates without height) * http://www.opengis.net/def/crs/OGC/0/CRS84h (for coordinates with height)
crsHeaderValue - CRS which should be the default crs, never nullfailureMsg - the message to throw in case of a failure, should not be nullpublic static void assertCrsHeader(String crsHeaderValue, CoordinateSystem expectedCrs, String failureMsg)
crsHeaderValue - the value from the header, never nullexpectedCrs - th expected value, never nullfailureMsg - the message to throw in case of a failure, should not be nullpublic static void assertDefaultCrsHeader(String crsHeaderValue, String failureMsg)
* http://www.opengis.net/def/crs/OGC/1.3/CRS84 (for coordinates without height) * http://www.opengis.net/def/crs/OGC/0/CRS84h (for coordinates with height)
crsHeaderValue - the value from the header, never nullfailureMsg - the message to throw in case of a failure, should not be nullpublic static void assertInCrs84(org.locationtech.jts.geom.Geometry geometry,
String failureMsg)
geometry - to check, may be nullfailureMsg - the message to throw in case of a failure, should not be nullCopyright © 2024 Open Geospatial Consortium. All rights reserved.