Pseudo-code would be great. This functionality is probably going to end
up being all new code, so don't worry about looking at how to adapt it
to existing JTS code.
Ronan Crowley wrote:
Hi Frank,
I implemented the code as part of a commercial product (iSMART from
eSpatial),
so as such I cannot provide the direct source code.
Also, I implemented the code directly on a custom extension of the
GeneralPath class
and not on a Geometry.
I will have a look at the JTS Geometry class and see how easily the
code could
be ported, but I cannot promise the provision of this code. Maybe just
some decent
Pseudocode.
FYI ... It took about 2 days to write the code, given the algorithms
previously posted.
Ro
---------- Forwarded message ----------
From: "Frank Hardisty" <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
To: "JTS Topology Suite Development" <jts-devel@lists.jump-project.org
<mailto:jts-devel@lists.jump-project.org>>
Date: Mon, 11 Jun 2007 08:49:52 -0400
Subject: Re: [jts-devel] Quick geometry clipper?
Ro (and List),
Sorry, I hit "send" a bit hastily there... let me try again.
Ro, if you could share your code that would be a great help to all
developers that use JTS, and to the users that in turn rely on them.
The most likely person to implement such an algorithm soon is Martin,
and he already asked for help in this list. Is there any chance you
could donate your implementation?
many thanks,
-Frank
On 6/11/07, Ronan Crowley < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
>
> Hi,
>
> I recently had to write such a Geometry Clipper,
> implementing the Sutherland - Hodgman Clipping Algorithm.
>
> See:
> http://www.cs.helsinki.fi/group/goa/viewing/leikkaus/intro2.html
> and
> http://www.codeguru.com/Cpp/misc/misc/graphics/article.php/c8965/
> for good explanations of the algorithm.
>
> The algorithm has a few open source implementations
> that you can find on open source software repository's,
> such as: http://www.google.com/codesearch
> & http://www.krugle.com/ , but after experimenting with
> these I found that they did not clip Complex Geometries
> correctly. In the end I had to write my own implementation
> of the Algorithm. The above URL's were of great help
> while writing the code.
>
> Ro
------------------------------------------------------------------------
_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel
--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022
_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel