WorldWind project shut down, this site probably will be too.

Hello all,

With the recent announcement that the NASA World Wind project has been shut down ( there is really very little reason to continue running this forum, and as NASA staff were providing most of the moderation and responses it will likely fill up with spam shortly.

Unless something changes in the near future, I will be shutting down as well as this forum, as it is no longer useful. Most of the data on WWC is referencing the legacy C# version of World Wind anyway.

See more
See less

Serializable Angle, LatLon, Position

  • Filter
  • Time
  • Show
Clear All
new posts

  • Serializable Angle, LatLon, Position

    Hi, all. I have a feature request, but wasn't sure if it's valid. Would it be possible to make Angle, LatLon, and Position implement Serializable? I find it quite handy to use them in various classes in my app as basic location types, but one requirement I have is that my classes must be serializable. I've been messing around with setting up serialization proxies for them, but can't find a solution that would be as elegant as just having an "implements Serializable" added to those three classes. If need be, I'd be happy to log an issue/pull request on GitHub, just thought I'd check here first if this made sense.

  • #2
    I second this. I've had to hack around these classes to make them serialize by making "wrapper" classes with a default constructor. Very hacky:

    class SerializablePosition implements Serializable {
        /** The Constant serialVersionUID. */
        private static final long serialVersionUID = 1L;
        transient private Position position;
        public SerializablePosition() {
        public SerializablePosition(Position positionVal) {
            this.position = positionVal;
        public Position getPosition() {
            return position;
        private void writeObject(final out)
                throws IOException {
        private void readObject(final in)
                throws IOException {
            try {
                final double lat = in.readDouble();
                final double lon = in.readDouble();
                final double alt = in.readDouble();
                position = Position.fromDegrees(lat, lon, alt);
            } catch (final ClassNotFoundException e) {
                // TODO Auto-generated catch block