[geos-devel] Exposing PrecisionModel, GeometryPrecisionReducer in the C API

Sandro Mani manisandro at gmail.com
Tue Jan 13 02:21:34 PST 2015


On 08.01.2015 13:08, Sandro Mani wrote:
> So to wrap up, things currently look as follows (which I actually 
> think is quite neat!):
>
>
> /** GEOSContextHandle_t internally keeps a reference count, set to 1 
> on creation
>  * - *All* methods producing a GEOSGeom increase the reference count
>  * - GEOSGeom_destroy decreses the GeometryFactory reference count, if 
> 0, it destroys the context
>  * - finishGEOS_r decreses the reference count, if 0, it destroys the 
> context
>  */
>
> /** GEOSGeom_clone() clones the geometry and applies 
> PrecisionReducer::reduce
>  *  if the PrecisionModel of the current context is different than the 
> that of
>  *  the passed geometry
>  */
>
> /** Set context handle precision model **/
> void GEOSContextHandle_t 
> GEOSContext_setPrecisionDouble(GEOSContextHandle_t* handle);
> void GEOSContextHandle_t 
> GEOSContext_setPrecisionFixed(GEOSContextHandle_t* handle, double scale);
>
So, what do you think? Worth pursuing this approach?




More information about the geos-devel mailing list