-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix UTM, LCC, Krovak and Stere projections #71
Conversation
…ect proj4-epsg tests and update them up to date
@@ -100,6 +100,66 @@ public void testExplicitTransform() { | |||
assertTrue(isInTolerance(p2, 33, 42, 0.000001)); | |||
} | |||
|
|||
@Test | |||
public void lccToUtmBidirectionalTransform() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This manual test was added, since it was the initial test case that led into this issue discovery.
// this test is asjusted to match proj4s behavior | ||
checkTransformAndInverse( | ||
"EPSG:4326", -126.54, 54.15, | ||
"EPSG:3005", 964813.103719, 1016486.305862, | ||
0.0001, 0.2 * APPROX_METRE_IN_DEGREES); | ||
|
||
checkTransformAndInverse( | ||
"EPSG:32633", 249032.839239894, 7183612.30572229, | ||
"EPSG:4326", 9.735465995810884, 64.68347938257097, | ||
"EPSG:4326", 9.735465995870696, 64.68347938261206, | ||
0.000001, 0.3 * APPROX_METRE_IN_DEGREES); | ||
|
||
checkTransformAndInverse( | ||
"EPSG:32636", 500000, 4649776.22482, | ||
"EPSG:32636", 500000, 4649776.224819178, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slighlty adjusted test, it matches Pro4JS behavior.
MetaCRSTestFileReader reader = new MetaCRSTestFileReader(file); | ||
List<MetaCRSTestCase> tests = reader.readTests(); | ||
for (MetaCRSTestCase test : tests) { | ||
Assert.assertTrue(runTest(test)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, tests were not checking the exit code before this PR :D
register("urmfps", UrmaevFlatPolarSinusoidalProjection.class, "Urmaev Flat-Polar Sinusoidal"); | ||
register("utm", TransverseMercatorProjection.class, "Universal Transverse Mercator (UTM)"); | ||
register("utm", ExtendedTransverseMercatorProjection.class, "Universal Transverse Mercator (UTM)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the UTM projection fix itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tests done lie.
Note: added test cases came from Proj4JS
Summary
Test resurrection results
Before this PR proj4-epsg.csv contained the following amount of tests:
After:
ExtendedTransverseMercatorProjection
)UPD
After (with LCC projection fix):
UPD2
After (with Krovak projection fix):
Closes #25
Closes #58
Closes #61