[geos-devel] Gsoc 2013

Sandro Santilli strk at keybit.net
Wed Apr 3 00:37:12 PDT 2013

On Tue, Apr 02, 2013 at 11:29:58PM +0530, vishal tiwari wrote:
> Hey,
> I have some doubts. I see that there is only one class that is,
> VoronoiDiagramBuilder that is required for the voronoi class. And what is
> the purpose of the other class, as i don't see them inside the code of the
> VoronoiDiagramBuilder class. The classes that is needed in
> VoronoiDiagramBuilder class are already ported. I think the rest of the
> class correspond to Conforming Delauny triangulation. So i need to know
> what all needs to be ported as the part of the gsoc project?

Only VoronoiDiagramBuilder and the classes it needs are required for the GSoC

> Today i was trying to port the VoronoiDiagramBuilder.java class. and while
> porting i noticed that a method
> DelaunayTriangulationBuilder::unique(DelaunayTriangulationBuilder::unique)
> is of type "void".
> But the corresponding method in  DelaunayTriangulationBuilder.java in JTS
> returns a CoordinateList. I want to know is it some error, or i am going
> wrong?

Nothing wrong, in GEOS the porter decided to take the CoordinateList as
an input/output parameter. You'll have to keep this in mind while porting
the rest of the code. If you _need_ a copy you can make one from the caller.

> I made the VoronoiDiagramBuilder.h file, was thinking if you could just
> give it a look(attached to the mail). I have written some part of the .cpp
> file as well, before i got suck in the problem.

Prefer taking parameters by reference rather than pointer, unless you have
a clear semantic for accepting a NULL value. Also add const modifiers when
possible. It'll save a lot of future work.



More information about the geos-devel mailing list