Skip to content

Cleanup ElevationProvider interface #2374

Closed

Description

@otbutz

The ElevationProvider interface carries methods which only make sense for certain implementations. We should move all methods except for getEle(double, double) into a fitting abstract baseclass for file/tile based providers.

Activity

  1. otbutz commented on Jul 27, 2021

    @otbutz
    ContributorAuthor

    Based on @easbar draft in #2373 (comment)

    public interface ElevationProvider {
    
        double getEle(double lat, double lon);
    
        default double getEle(ReaderNode node) {
             return getEle(node.getLat(), node.getLon());
        }
    
        boolean isInterpolating();
    }
  2. easbar commented on Jul 27, 2021

    @easbar
    Member

    Yes. We might need to keep void release() as well. Maybe canInterpolate instead of isInterpolating? And regarding the other setters I wonder why they even should be setters, they could just be constructor parameters. Anyway the most important part is cleaning up the interface.

  3. otbutz commented on Jul 27, 2021

    @otbutz
    ContributorAuthor

    I'd rather replace release() with extending the AutoCloseable interface.

  4. easbar commented on Jul 27, 2021

    @easbar
    Member

    Ok, but maybe this is something for another issue, because we do not do this for our other resources (DataAccess etc.) yet either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions