File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,26 @@ public void TestAngularUnitsEqualParamsIssue()
224224 //check equality of angular units
225225 Assert . AreEqual ( true , pcs1 . GeographicCoordinateSystem . AngularUnit . EqualParams ( pcs2 . GeographicCoordinateSystem . AngularUnit ) ) ;
226226 }
227-
227+
228+ [ Test , Description ( "transformation somehow is wrong" ) , Category ( "Question" ) ]
229+ public static void TestGitHubIssue53 ( )
230+ {
231+ // arrange
232+ CoordinateSystemFactory csFact = new CoordinateSystemFactory ( ) ;
233+ CoordinateTransformationFactory ctFact = new CoordinateTransformationFactory ( ) ;
234+ ICoordinateSystem csWgs84 = GeographicCoordinateSystem . WGS84 ;
235+ IProjectedCoordinateSystem csUtm35N = ProjectedCoordinateSystem . WGS84_UTM ( 35 , true ) ;
236+ ICoordinateTransformation csTrans = ctFact . CreateFromCoordinateSystems ( csWgs84 , csUtm35N ) ;
237+ ICoordinateTransformation csTransBack = ctFact . CreateFromCoordinateSystems ( csUtm35N , csWgs84 ) ;
238+
239+ // act
240+ double [ ] point = new [ ] { 42.5 , 24.5 } ;
241+ var r = csTrans . MathTransform . Transform ( point ) ;
242+ var rBack = csTransBack . MathTransform . Transform ( r ) ;
243+
244+ // assert
245+ Assert . AreEqual ( point [ 0 ] , rBack [ 0 ] , 1e-5 ) ;
246+ Assert . AreEqual ( point [ 1 ] , rBack [ 1 ] , 1e-5 ) ;
247+ }
228248 }
229249}
You can’t perform that action at this time.
0 commit comments