Convert gov.nasa.worldwind package to Kotlin #144
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR converts the
gov.nasa.worldwindpackage classes from Java to Kotlin, improving code consistency and maintainability.Changes Made
Converted to Kotlin (9 files)
The following classes have been converted from Java to Kotlin:
Implementation Details
The converted classes maintain full backward compatibility with existing Java code through:
@JvmStaticannotations on companion object methods@JvmFieldannotations on public properties@JvmOverloadsfor methods with default parametersKey improvements in the Kotlin versions:
valpropertiesbuildStringDSLFiles Remaining in Java (12 files)
The following files are still being converted:
Work is in progress to convert all remaining Java files to Kotlin.
Testing
Motivation
The
CoordinateFormatterclass in the main Kotlin codebase imports and uses these worldwind classes extensively for coordinate system conversions (MGRS, UTM, UPS). Converting them to Kotlin:Fixes #142
Original prompt
Fixes #142
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.