[geos-devel] re:GEOS

strk at refractions.net strk at refractions.net
Fri Mar 11 15:37:15 EST 2005


Dear Artem,
Thank you for your interest, GEOS needs some storming at the moment. 
About boost, I'd prefer to keep things simple and requirements low.
Proposal for template application are welcome. I've been thinking
about them as well, but I'm not sure how, when and if we can keep
outlining the JTS counterpart with them.

--strk;

On Fri, Mar 11, 2005 at 07:48:06PM +0000, Artem Pavlenko wrote:
> Dear List,
> 
> Firstly, thanks for all your efforts to provide an opensource 
> implementation of spatial algorithms.
> I am the developer of  http://mapnik.berlios.de  project and am at the 
> moment thinking about having a go at implementing OGCs Filter/SLD (or 
> subset of it) in C++ . So I'm very into GEOS becoming more robust, 
> standard and easier to integrate ... (I guess that is the point of the 
> project).
> 
> I hope you don't mind me butting in; I'm just a potential user and I 
> don't claim any great authority in C++. My aim is simply to start using 
> GEOS ASAP. On this basis, I have a couple of comments/ suggestions.
> 
> I've noticed that there are some changes in CVS and I'm glad to see the 
> following:
> 
> LineIntersector::LineIntersector()
> {
>    precisionModel=NULL;
>    Coordinate *c=new Coordinate();
>    intPt[0].setCoordinate(*c);
>    delete c;
>    c=new Coordinate();
>    intPt[1].setCoordinate(*c);
>    delete c;
>    // alias the intersection points for ease of reference
>    pa.setCoordinate(intPt[0]);
>    pb.setCoordinate(intPt[1]);
>    result=0;
> }
> 
> becoming :
> 
> LineIntersector::LineIntersector(): pa(intPt[0]), pb(intPt[1])
> {
>    precisionModel=NULL;
>    // alias the intersection points for ease of reference
>    //pa=intPt[0];
>    //pb=intPt[1];
>    result=0;
> }
>   
> But to me, this is still a wrong use of C++. From what I can see, this 
> is one example of many, maybe as a result of translating Java into C++? 
> I would be honoured to suggest some changes/ideas, if anybody agrees 
> with me:)
> 
> I also have some questions about future directions. As I see it, there 
> can be lots to gain from introducing templates, because:
> 1. you're using them already as part of STL
> 2. they might lead to better performance
> 3. you'll able to abstract things like memory allocation and precision 
> models, allowing clients to configure the library the way they like and 
> concentrate on actual algorithms
> 4. templates are part C++ ISO!
> 
> And also there is boost.org and you will be dealing with smart pointers 
> at some point, so why not now?
> I'm also working with couple datastructures that might be beneficial to 
> GEOS.
> 
> Anyway, all this is meant to be constructive, and I'm happy to discuss 
> anything or for anybody to put me right if I'm missing something!
> 
> Cheers!
> Artem
> 
> 
> 
> 
> 
> 
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel



More information about the geos-devel mailing list