Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/GeoTools-Tests/GeoToolsBoundingBoxTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,21 @@ GeoToolsBoundingBoxTest >> testCenterAbsoluteCoordinates [
self assert: boundingBox centerAbsoluteCoordinates longitudeInDegrees equals: 0.
]

{ #category : #tests }
GeoToolsBoundingBoxTest >> testIsValid [

self deny: boundingBox isValid.

self setUpZeroBox.
self assert: boundingBox isValid.

self setUpSmallBox.
self assert: boundingBox isValid.

self setUpTopRightSmallBox.
self assert: boundingBox isValid
]

{ #category : #tests }
GeoToolsBoundingBoxTest >> testLeftLongitudeInDegrees [

Expand Down
9 changes: 9 additions & 0 deletions src/GeoTools/TGeoToolsBoundingBox.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ TGeoToolsBoundingBox >> centerAbsoluteCoordinates [
longitudeInDegrees: longitude
]

{ #category : #testing }
TGeoToolsBoundingBox >> isValid [

^ (self topLeftAbsoluteCoordinates notNil and: [
self topLeftAbsoluteCoordinates isValid ]) and: [
self bottomRightAbsoluteCoordinates notNil and: [
self bottomRightAbsoluteCoordinates isValid ] ]
]

{ #category : #accessing }
TGeoToolsBoundingBox >> leftLongitudeInDegrees [

Expand Down