[OpenMap Users] Creating a shape from intersecting circles?

From: Oystein E. Thorvaldsen <oysteine_at_pvv.org>
Date: Tue, 01 Aug 2006 23:31:36 +0200

Hi,

I'm trying to calculate and display a geographic region defined by the
intersection of a number of overlapping circles. (See
http://folk.ntnu.no/oysteine/om/venn.jpg, the red area) I know the
coordinates of the center of all the circles, and their radi. How do I
best go about doing this in OpenMap?

I've perused the list archives, and API and have some possible starting
points. I would appreciate feedback on the feasibility of these, and
which one is best suited. Of course I'm open to entirely different ways
of doing this.

1) Create the circles as OMCircles. Using getShape to extract the Shape
of every OMCircle and create Areas using Area(Shape). Intersecting the
created Areas to obtain my desired region in the form of an Area. Using
getPathIterator(),possibly with flattening, to create a GeneralPath and
create an OMPoly (or OMGraphicsList?) from it. I know this would be
costly performance wise, but that is not an issue for me.

One post (
http://openmap.bbn.com/mailArchives/openmap-users/2005-12/4466.html )
mentioned the need for Projection.forward() in a similar situation. In
http://openmap.bbn.com/mailArchives/openmap-users/2004-08/3276.html
.forward() is not mentioned. And this situation also is similar to my
problem. Is the usage of Graphics2D straightforward, or do I have to use
forward(), and take screen resolution etc into account?

2) The .geo-package seems to deal with this type of functionality, but
I'm unable to find the specific functions I need. Additionally the
classes in the package are somewhat less well documented than the rest
of OpenMap.

3) Try to do the intersection algebraically and store the resulting
region in some kind of data structure containing the vertices and arcs
between them. Then create an OMPoly or OMGraphicsList based on the data
structure. This would still involve calculating the geographical
coordinates of the vertices somehow. (If anyone could point me to an
elegant way of doing the intersection algebraically I would appreciate it.)

Regards,
Øystein E. Thorvaldsen

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Aug 01 2006 - 17:59:27 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT