| 1 | = GEOS RFC 8: Improve CoordinateSequence API (WIP) |
| 2 | |
| 3 | ||RFC 7: ||Improve CoordinateSequence API|| |
| 4 | ||Author: ||Martin Davis || |
| 5 | ||Contact:||martin-dot-davis at crunchydata.com || |
| 6 | ||Status: || || |
| 7 | |
| 8 | This document proposes to modify the CoordinateSequence API to improve performance and adaptiveness. |
| 9 | These improvements are (likely to be) breaking changes to the C++ API. |
| 10 | These may require extensions to the C API to be externally available, but should not result in breaking the current C API. |
| 11 | |
| 12 | === Background |
| 13 | |
| 14 | The CoordinateSequence API as it stands imposes a large cost on clients. |
| 15 | * It requires copying coordinate list structures one or more times |
| 16 | * It imposes the cost of a Z ordinate even if not required by the client |
| 17 | |
| 18 | The API also has some functional limitations: |
| 19 | * it does not support M values |
| 20 | |
| 21 | === Goals |
| 22 | |
| 23 | * Allow using external coordinate list structures with no copying (except as needed by GEOS algorithms, e.g. removing repeated points) |
| 24 | * Prevent mutating of external coordinate structures |
| 25 | * Support XY, XYM, XYZ, XYZM efficiently |