Modify direct constructors (NewPoint etc.) to no longer perform validation at all. The direct constructors are for more advanced use cases where geometries are being constructed from other geometries or raw sequences of floats. Things like custom geometric algorithms come to mind. Because these are for advanced use cases, making users validate manually is reasonable.
Modifying direct constructors removes error handling mismatch, with users no longer having to handle errors that can never occur (when validation is disabled). It also eliminates the situation where constructor options would sometimes be ignored, and simplifies the rules around what validation occurs during direct construction (i.e. now none is performed).
Benchmark results are attached. Some notes about the apparent regressions:
MultiPolygon validation is now slower, because it also validates that the Polygons in the collection are valid. This is a functionality change, so it's expected that this would be reflected in the benchmark results.
Some WKB Parsing now uses more memory (although has about the same wall time). I'm not really sure what's going on there. It's pretty minor, and I don't think worth tracking down.
Description
Modify direct constructors (
NewPoint
etc.) to no longer perform validation at all. The direct constructors are for more advanced use cases where geometries are being constructed from other geometries or raw sequences of floats. Things like custom geometric algorithms come to mind. Because these are for advanced use cases, making users validate manually is reasonable.Modifying direct constructors removes error handling mismatch, with users no longer having to handle errors that can never occur (when validation is disabled). It also eliminates the situation where constructor options would sometimes be ignored, and simplifies the rules around what validation occurs during direct construction (i.e. now none is performed).
See https://github.com/peterstace/simplefeatures/discussions/525 for more context.
Check List
Have you:
Added unit tests? Yes.
Add cmprefimpl tests? (if appropriate?) N/A.
Updated release notes? (if appropriate?) No. This will be done when all constructor option changes are complete.
Related Issue
Benchmark Results
Benchmark results are attached. Some notes about the apparent regressions:
results.txt