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 true
failureMsg
- the message to throw in case of a failure, should not be null
public static void assertFalse(boolean valueToAssert, String failureMsg)
valueToAssert
- the boolean to assert to be false
failureMsg
- the message to throw in case of a failure, should not be null
public 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 null
public 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 null
failureMsg
- the message to throw in case of a failure, should not be null
public 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 null
failureMsg
- the message to throw in case of a failure, should not be null
public 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 null
failureMsg
- the message to throw in case of a failure, should not be null
public static void assertCrsHeader(String crsHeaderValue, CoordinateSystem expectedCrs, String failureMsg)
crsHeaderValue
- the value from the header, never null
expectedCrs
- th expected value, never null
failureMsg
- the message to throw in case of a failure, should not be null
public 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 null
failureMsg
- the message to throw in case of a failure, should not be null
public static void assertInCrs84(org.locationtech.jts.geom.Geometry geometry, String failureMsg)
geometry
- to check, may be null
failureMsg
- the message to throw in case of a failure, should not be null
Copyright © 2024 Open Geospatial Consortium. All rights reserved.