gov.nasa.worldwind.util.RasterControlPointList Maven / Gradle / Ivy
The newest version!
/*
* Copyright (C) 2012 United States Government as represented by the Administrator of the
* National Aeronautics and Space Administration.
* All Rights Reserved.
*/
package gov.nasa.worldwind.util;
import gov.nasa.worldwind.avlist.*;
import gov.nasa.worldwind.geom.LatLon;
import java.util.*;
import java.beans.*;
/**
* @author dcollins
* @version $Id: RasterControlPointList.java 1171 2013-02-11 21:45:02Z dcollins $
*/
public class RasterControlPointList extends java.util.ArrayList implements AVList
{
public static class ControlPoint extends AVListImpl
{
private final double wx;
private final double wy;
private final double rx;
private final double ry;
public ControlPoint(double worldX, double worldY, double rasterX, double rasterY)
{
this.wx = worldX;
this.wy = worldY;
this.rx = rasterX;
this.ry = rasterY;
}
public java.awt.geom.Point2D getWorldPoint()
{
return new java.awt.geom.Point2D.Double(this.wx, this.wy);
}
public LatLon getWorldPointAsLatLon()
{
return LatLon.fromDegrees(this.wy, this.wx);
}
public java.awt.geom.Point2D getRasterPoint()
{
return new java.awt.geom.Point2D.Double(this.rx, this.ry);
}
}
private AVList avList = new AVListImpl();
public RasterControlPointList(java.util.Collection extends ControlPoint> c)
{
super(c);
}
public RasterControlPointList()
{
}
public Object setValue(String key, Object value)
{
return this.avList.setValue(key, value);
}
public AVList setValues(AVList avList)
{
return this.avList.setValues(avList);
}
public Object getValue(String key)
{
return this.avList.getValue(key);
}
public Collection
© 2015 - 2024 Weber Informatics LLC | Privacy Policy