<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 17, 2014 at 5:10 PM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">On Mon, Feb 17, 2014 at 03:53:29PM +0530, Varun Saraf wrote:<br>


> Hi,<br>
><br>
> I am not sure if I have understood the solution, but this is what I think.<br>
><br>
> For exposing PrecisionModel through the C-API, we need to write a function<br>
> in the geos_ts_c.cpp file which takes the required arguments for the<br>
> precision model. It constructs a new GeometryFactory with appropriate<br>
> arguments which in turn calls PrecisionModel with those arguments.<br>
<br>
</div>What needs to be done is really to be decided, and deciding that is<br>
part of the task. You should make an RFC document and sollicit comments<br>
from this mailing list until some kind of consensus is found, basically.<br>
<br>
Note that anything you construct in that function needs to have a way<br>
to be destroyed. </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><br>
> My doubt is what all arguments need to be passed to this C-API function and<br>
> is that what we are supposed to design. Also we will have to make<br>
> appropriate changes to the GeometryFactory constructor.<br>
<br>
</div>I don't think any change in the C++ interface is required.<br></blockquote><div><br></div><div>Consider this for an example. We want to create a precision model using the C-API using the following arguments [1] PrecisionModel<span style="color:rgb(0,0,0);font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;font-size:12px;background-color:rgb(249,250,252)"> (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.</span></div>

<div><br></div><div>Regards,</div><div>Varun Saraf</div><div><br></div><div>[1] <a href="http://geos.osgeo.org/doxygen/classgeos_1_1geom_1_1PrecisionModel.html">http://geos.osgeo.org/doxygen/classgeos_1_1geom_1_1PrecisionModel.html</a></div>

<div>[2] <a href="http://geos.osgeo.org/doxygen/classgeos_1_1geom_1_1GeometryFactory.html">http://geos.osgeo.org/doxygen/classgeos_1_1geom_1_1GeometryFactory.html</a></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div class=""><br>
> Please tell me if I am in the right direction.<br>
<br>
</div>Yes, I think you are.<br>
<br>
--strk;<br>
<div class=""><div class="h5">_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geos-devel" target="_blank">http://lists.osgeo.org/mailman/listinfo/geos-devel</a><br>
</div></div></blockquote></div><br></div></div>