Geometry: add getLinearized(), getCurved()#1382
Conversation
9b03e93 to
a4e5105
Compare
78207c4 to
ea99660
Compare
2311650 to
58da56f
Compare
|
I've updated the C API to provide for manual or automatic conversion between curved and linear geometry types. Manual conversionUses the curve conversion functions
Each of these tolerances is set with a separate function: GEOSLineToCurveParams_setRadiusTolerance To me, this better indicates that the three tolerances apply simultaneously, unlike the Automatic conversionFunctions that do not natively support curved types have been modified to optionally convert inputs/outputs from/to curved types. This allows a client like QGIS to delegate an operation to GEOS without having to know if the linked version of GEOS supports curved inputs for that operation. Curve conversion is enabled at the context handle level. Setting the curve-to-line parameters on the context ( Setting line-to-curve parameters on the context ( Automatic curve conversion is not enabled on the non-reentrant API. (Should it be?) |
b6e0782 to
ade21a3
Compare
…ntrol point in interpolation
rouault
left a comment
There was a problem hiding this comment.
I only (quickly) looked at the capi/ changes
| extern void GEOS_DLL GEOSCurveToLineParams_destroy(GEOSCurveToLineParams* params); | ||
|
|
||
| /** Set the tolerance type and value to use when converting curves to lines. | ||
| * |
There was a problem hiding this comment.
Perhaps the doc could be a bit more explicit that you cannot call this function several times with different toleranceType value, hoping they would cumulate. I only figured that out by comparing with the LineToCurve API where there are different functions for the different parameters
There was a problem hiding this comment.
Maybe I should scrap the enum, add separate functions GEOSCurveToLineParams_setMaxAngle, and GEOSCurveToLineParams_setMaxDeviation, and pick the most restrictive tolerance during linearization ?
There was a problem hiding this comment.
Maybe I should scrap the enum, add separate functions GEOSCurveToLineParams_setMaxAngle, and GEOSCurveToLineParams_setMaxDeviation, and pick the most restrictive tolerance during linearization ?
Yes, even more natural/obvious for users
TODO:
ogr_geom.py