Repository navigation
Story - Report recognized spatial types that are not yet implemented #34
Description
Report recognized spatial types that are not yet implemented
As a user of the spatial decoder,
I want to receive a dedicated exception when the decoder recognizes a
valid spatial type that cannot yet be represented by spatial-types,
so that I can distinguish an unsupported implementation from invalid
spatial input.
Context
A decoding strategy may recognize an instantiable spatial type defined by the
format or its reference specification while spatial-types does not yet
provide the corresponding spatial object.
Such input is not invalid and must not be reported as an unknown, malformed, or
non-instantiable spatial type. The decoder needs a dedicated,
format-independent exception representing this temporary implementation
limitation.
This exception is part of the decoder exception model and can be used by any
decoding strategy, including WKT, EWKT, WKB, and EWKB.
GeometryTypeEnum currently defines fifteen instantiable geometry types. Their
implementation status in spatial-types is:
| Geometry type | Implemented by spatial-types |
|---|---|
POINT |
Yes |
LINESTRING |
Yes |
POLYGON |
Yes |
TRIANGLE |
Yes |
POLYHEDRALSURFACE |
Yes |
MULTIPOINT |
Yes |
MULTILINESTRING |
Yes |
MULTIPOLYGON |
Yes |
GEOMETRYCOLLECTION |
Yes |
CIRCULARSTRING |
No |
COMPOUNDCURVE |
No |
CURVEPOLYGON |
No |
MULTICURVE |
No |
MULTISURFACE |
No |
TIN |
No |
Consequently, CIRCULARSTRING, COMPOUNDCURVE, CURVEPOLYGON,
MULTICURVE, MULTISURFACE, and TIN are recognized instantiable geometry
types for which the decoder cannot currently create a corresponding
SpatialInterface.
This situation is distinct from geometry types declared as non-instantiable by
GeometryTypeEnum.
Acceptance Criteria
- A public
NotYetImplementedExceptionis available in the decoder
exception model. -
NotYetImplementedExceptionimplementsDecoderExceptionInterface. - The exception is independent of any specific decoding strategy or input
format. - The exception carries the recognized spatial type that could not be
instantiated. - The recognized spatial type is accessible to consumers of the exception.
- The exception message identifies the recognized spatial type and clearly
indicates that its decoding is not yet implemented. - Decoding strategies can throw the exception without introducing a
dependency on a format-specific exception. - When the shared lexer recognizes
CIRCULARSTRING,COMPOUNDCURVE,
CURVEPOLYGON,MULTICURVE,MULTISURFACE, orTIN, the factory,
parser, or other component responsible for creating the corresponding
spatial object throwsNotYetImplementedException. - The exception identifies the
GeometryTypeEnumvalue recognized by the
lexer. - The same behavior applies when the recognized type is encountered while
decoding WKT or EWKT. - A geometry type already implemented by
spatial-typesdoes not cause
NotYetImplementedException. - A geometry type declared as non-instantiable by
GeometryTypeEnumdoes
not causeNotYetImplementedException. - An unknown geometry type does not cause
NotYetImplementedException. - Malformed input does not cause
NotYetImplementedException. - Automated tests verify the exception contract, the retained spatial
type, and its public message. - Automated tests verify WKT and EWKT behavior for each currently
recognized but not yet implemented geometry type. - Existing decoding behavior for implemented geometry types remains
unchanged.
Out of Scope
- Implementing the missing spatial types in
spatial-types. - Defining the implementation roadmap for missing spatial types.
- Adding support for these geometry types beyond recognizing them and reporting
that their decoding is not yet implemented.
Activity
[-]Epic - Report recognized spatial types that are not yet implemented[/-][+]Story - Report recognized spatial types that are not yet implemented[/+]