MASON-INTEREST-L Archives

January 2005

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version:
1.0 (Apple Message framework v619)
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Thu, 6 Jan 2005 17:04:34 -0500
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Subject:
From:
Tony Bigbee <[log in to unmask]>
Content-Transfer-Encoding:
7bit
In-Reply-To:
Content-Type:
text/plain; charset=US-ASCII; format=flowed
Comments:
To: MASON Multiagent Simulation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (60 lines)
A minor contribution to this topic:

Geotools supports ellipsoid great circle distance calculations, OpenMap
supports only spheroids. I ran tests comparing the numerical
differences between the two across the earth.  But this only matters
for specialized cases where high precision is required.  An BBN
engineer referred to this URL as well:

http://www.ga.gov.au/nmd/geodesy/datums/distance.jsp

Some example code comparing the two:

>> import org.geotools.cs.Ellipsoid;
>> import org.geotools.units.Unit;
>> import com.bbn.openmap.geo.Geo;
>> import com.bbn.openmap.proj.GreatCircle;
>>
>> //calculating great circle distances using ellipsoid with Geotools
>> double km = 1d/1000d;  //do the division now and use to convert
>> meters to km when desired.
>> //create an ellipsoid earth model based on WGS84
>> Ellipsoid ellip = Ellipsoid.WGS84;  //only instantiate an Ellipsoid
>> once!
>> //get the distance in meters given long1, lat1, long2, lat2.  Note
>> the order!
>> //call ellip.orthodromicDistance whenever needed to calculate distance
>> double distance = ellip.orthodromicDistance(117.5, 34,117.55,34.01);
>> System.out.println(distance*km);
>>
>> //you can also create your own ellipsoid and make it spherical if
>> desired:
>> Unit meter = Unit.METRE;
>> Ellipsoid sphere =
>> Ellipsoid.createEllipsoid("earth-sphere",6378137.0,6378137.0,meter);
>>
>> //calculate great circle distance using OpenMap spherical model
>> //note:  coordinates order is different than Geotools
>> Float om_distance =
>> GreatCircle.spherical_distance(lat1,long1,lat2,long2);

I would echo Felimon Gayanilo -- I know a fair number of projects that
have used the graphical/GUI aspects of OpenMap successfully.  I'm not
sure about the graphical/GUI aspects of GeoTools.

Tony Bigbee


On Jan 6, 2005, at 4:29 PM, Felimon Gayanilo wrote:

> How I wished you did not asked me this question...but here we go:
>
> OpenMap and GeooTools are architecturally (framework, approach)
> different.
> From my point-of-view as a software engineer, while both adheres to OGC
> (OpenGIS Consortium) standards, one has a distinct advantage over the
> other
> -- it all depends on what you want to achieve and your programming
> style (or
> preference).

ATOM RSS1 RSS2