Hi GeoTools-Community,

I fired the mail below some time ago. Isn't there anybody who knows the
implementation of GeodeticCalculator?


Best regards
/roman


> Hi,
> 
> 
> we have some problems with a Java-assert in
> GeodeticCalculator.getOrthodromicDistance(). In our test environment,
> where assertions are enabled by default, the assert
> 
>       assert checkOrthodromicDistance() : this;
> 
> is not satisfied in some cases and an AssertionError is thrown.
> 
> We are using the WGS84 (4326) coordinate system. The AssertionError can
> be reproduced as follows:
> 
> GeodeticCalculator gc;
> gc.setStartingGeographicPoint(2.999999999999576, 6.164186437786902E-17);
> gc.setDestinationGeographicPoint(3.0, 0.0);
> 
> gc.getOrthodromicDistance();
> 
> The values of distance and check variables in checkOrthodromicDistance()
> are:
> 
> distance 6.816004513875801E-12;
> check: 4.701319714368261E-8:
> (distance+1) * TOLERANCE_CHECK (1e-8) = 1.0000000000068162E-8
> 
> That is, the assert tends to be not satisfied in cases where the
> distance is very close to zero. The maximal allowed deviation is more or
> less 1e-8 in this case, which because of numeric aspects is a very
> ambitious assumption.
> 
> Unfortunately our test runner (maven-surefire) does only allow to
> disable or enable all assertions and not selectively by package. So we
> are forced to disable assertions in order to get our tests running.
> 
> What is the reasons and meaning for such a hard assert? Is it possible
> to put this in some test class, write a log message instead of throwing
> an AssertionError or implement the assert, such that it is satisfied in
> all cases?
> 
> 
> Best regards
> /Roman Klähne
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_jan
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 


------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to