[geos-devel] Exposing Precision model through C-API

Rémi Cura remi.cura at gmail.com
Mon Feb 17 07:49:43 PST 2014


Hey Olivier,

I must admit the thread you gave is well over my head with so detailled
postgres internal,
but such functionnality (avoiding serialization) would be incredibly
beneficial for a lot of functions
(I'm thinking Paul Ramsey PointCloud extension).

Also all the raster system seems to rely on passing the raster, which is
totally inefficient at best when chaining functions.

Cheers,

Rémi-C


2014-02-17 15:59 GMT+01:00 Varun Saraf <varunsaraf14 at gmail.com>:

> On Mon, Feb 17, 2014 at 5:10 PM, Sandro Santilli <strk at keybit.net> wrote:
>
>> On Mon, Feb 17, 2014 at 03:53:29PM +0530, Varun Saraf wrote:
>> > Hi,
>> >
>> > I am not sure if I have understood the solution, but this is what I
>> think.
>> >
>> > For exposing PrecisionModel through the C-API, we need to write a
>> function
>> > in the geos_ts_c.cpp file which takes the required arguments for the
>> > precision model. It constructs a new GeometryFactory with appropriate
>> > arguments which in turn calls PrecisionModel with those arguments.
>>
>> What needs to be done is really to be decided, and deciding that is
>> part of the task. You should make an RFC document and sollicit comments
>> from this mailing list until some kind of consensus is found, basically.
>>
>> Note that anything you construct in that function needs to have a way
>> to be destroyed.
>
>
>> > My doubt is what all arguments need to be passed to this C-API function
>> and
>> > is that what we are supposed to design. Also we will have to make
>> > appropriate changes to the GeometryFactory constructor.
>>
>> I don't think any change in the C++ interface is required.
>>
>
> Consider this for an example. We want to create a precision model using
> the C-API using the following arguments [1] PrecisionModel (double
> newScale, double newOffsetX, double newOffsetY). Now the wrapper calls [2]
> GeometryFactory with these arguments but it has no constructor to accept
> them. Or is it that GeometryFactory need not be called at all and the
> wrapper directly calls existing PrecisionModel interface. Please clarify.
>
> Regards,
> Varun Saraf
>
> [1] http://geos.osgeo.org/doxygen/classgeos_1_1geom_1_1PrecisionModel.html
> [2]
> http://geos.osgeo.org/doxygen/classgeos_1_1geom_1_1GeometryFactory.html
>
>>
>> > Please tell me if I am in the right direction.
>>
>> Yes, I think you are.
>>
>> --strk;
>> _______________________________________________
>> geos-devel mailing list
>> geos-devel at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geos-devel
>>
>
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20140217/1149baf0/attachment-0001.html>


More information about the geos-devel mailing list