File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ "
2
+ An AbsoluteCoordinatesTest is a test class for testing the behavior of AbsoluteCoordinates
3
+ "
4
+ Class {
5
+ #name : #AbsoluteCoordinatesTest ,
6
+ #superclass : #TestCase ,
7
+ #category : #' GeoTools-Tests-Coordinates'
8
+ }
9
+
10
+ { #category : #tests }
11
+ AbsoluteCoordinatesTest >> testDistanceBetweenKnownAbsoluteCoordinates [
12
+
13
+ | pt1 pt2 dist az |
14
+ pt1 := AbsoluteCoordinates frBrest.
15
+ pt2 := AbsoluteCoordinates frStRenan.
16
+
17
+ dist := GeodesicUtilities
18
+ convertGeodesicToDistanceInMeterFrom: pt1
19
+ to: pt2.
20
+ az := GeodesicUtilities
21
+ convertGeodesicToAzimuthInRadiansFrom: pt1
22
+ to: pt2.
23
+ az := az radiansToDegrees.
24
+ self assert: (az - 295 ) abs < 5 .
25
+ self assert: (dist - 11500 ) abs < 1000 .
26
+
27
+ ]
Original file line number Diff line number Diff line change @@ -84,6 +84,15 @@ AbsoluteCoordinates class >> frParis [
84
84
altitudeInMeters: 79
85
85
]
86
86
87
+ { #category : #' instance creation' }
88
+ AbsoluteCoordinates class >> frStRenan [
89
+
90
+ ^ AbsoluteCoordinates
91
+ latitudeInDegrees: 48.4328
92
+ longitudeInDegrees: - 4.6219
93
+ altitudeInMeters: 60
94
+ ]
95
+
87
96
{ #category : #' instance creation' }
88
97
AbsoluteCoordinates class >> latitudeInDegrees: aLatitudeInDegrees longitudeInDegrees: aLongitudeInDegrees [
89
98
You can’t perform that action at this time.
0 commit comments