metteo / javageomodel

Automatically exported from code.google.com/p/javageomodel
0 stars 0 forks source link

Assertion errors in Point #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new point with valid lattitude,longitude - eg. lat=55,lng=7

What is the expected output? What do you see instead?
I expect it to be valid- but I am told that 57 is not between -90 and 90

What version of the product are you using? On what operating system?
any

Please provide any additional information below.
This should fix it:
Change:
Validate.isTrue(lat > 90.0 || lat < -90.0, "Latitude must be in [-90, 90] but 
was ", lat);
Validate.isTrue(lon > 180.0 || lon < -180.0, "Longitude must be in [-180, 180] 
but was ", lon);

To:
Validate.isTrue(lat > -90.0 || lat < 90.0, "Latitude must be in [-90, 90] but 
was ", lat);
Validate.isTrue(lon > -180.0 || lon < 180.0, "Longitude must be in [-180, 180] 
but was ", lon);

I have other minor errors - I would be happy to contribute with fixes and junit 
tests if I could join the project

Original issue reported on code.google.com by morten.h...@gmail.com on 30 Sep 2010 at 12:33

GoogleCodeExporter commented 9 years ago
What I meant was

Validate.isTrue(lat > -90.0 && lat < 90.0, "Latitude must be in [-90, 90] but 
was ", lat);
Validate.isTrue(lon > -180.0 && lon < 180.0, "Longitude must be in [-180, 180] 
but was ", lon);

Original comment by morten.h...@gmail.com on 30 Sep 2010 at 12:34

GoogleCodeExporter commented 9 years ago

Original comment by edgar.da...@gmail.com on 5 Nov 2010 at 10:13