-
Notifications
You must be signed in to change notification settings - Fork 17
Description
The Axis class in PROJ-JNI currently retrieves the axis direction using the search method:
final String dir = impl.getStringProperty(Property.DIRECTION);
return search(AxisDirection.class, dir);
If the property is missing or unrecognized, search returns null. Consequently, Axis.getDirection() can return null, which violates the CoordinateSystemAxis GeoAPI contract that expects a valid AxisDirection. This can lead to NullPointerException in downstream code that relies on a non-null direction, breaking transformations or coordinate operations.
Expected Behavior:
getDirection() should never return null. A sensible default such as AxisDirection.OTHER should be returned when the axis direction is unknown.
Impact:
Potential runtime crashes in any application using PROJ-JNI CRS objects.
Violates GeoAPI interface guarantees.
Makes debugging silent failures difficult.