Package gov.nasa.worldwind.geom

Examples of gov.nasa.worldwind.geom.Position


      _addPath_(geom.getCoordinates());
   }
  
   private void _addPoint_(GeoJSONPoint geom) throws Exception
   {
      Position pos = geom.getPosition();
      Point2D.Double dblGeometry = new Point2D.Double();

      dblGeometry.y = pos.latitude.degrees;
      dblGeometry.x = pos.longitude.degrees;
View Full Code Here


            return;
         }
        
         if (lyr instanceof GfrRlrObjTloRndSngPntAbs)
         {
            Position posNew = ((GfrRlrObjTloRndSngPntAbs) lyr).getPositionRenderableObject();
            Point2D.Double dou = new Point2D.Double();
            dou.x = posNew.longitude.degrees;
            dou.y = posNew.latitude.degrees;
        
            // beg ecl
View Full Code Here

         System.exit(1);
      }

      Point2D.Double p2d = GfrUtilPoint2D.s_parse(strGeom);
      //Memo Reading Lon Lat, but LatLon necessary for Position
      Position pos = Position.fromDegrees(p2d.getY(), p2d.getX());
      return pos;
   }
View Full Code Here

           throws Exception
   {
      super(strId);
     
      List<Position> lstPosition = new ArrayList<Position>();
      Position pos = GfrWrpBasSynObjNameTloEclPnt.getInstance().getGeometry(strId);
      lstPosition.add(pos);
      super.setLocations(lstPosition);
     
      super._ann_ = new GfrScreenAnnotationDimTloOnePointCirclePnt(lstShouldRedraw, strId);
     
View Full Code Here

         System.exit(1);
      }

      Point2D.Double p2d = GfrUtilPoint2D.s_parse(strGeom);
      //Memo Reading Lon Lat, but LatLon necessary for Position
      Position pos = Position.fromDegrees(p2d.getY(), p2d.getX());
      return pos;
   }
View Full Code Here

    {
        // Find the closest points between the rays through each screen point, and the ray from the control point
        // and in the direction of the globe's surface normal. Compute the elevation difference between these two
        // points, and use that as the change in polygon height.

        Position referencePos = this._pol_.getReferencePosition();
       
        if (referencePos == null)
            return;

        Vec4 referencePoint = super._wwd.getModel().getGlobe().computePointFromPosition(referencePos);

        Vec4 surfaceNormal = super._wwd.getModel().getGlobe().computeSurfaceNormalAtLocation(referencePos.getLatitude(),
            referencePos.getLongitude());
        Line verticalRay = new Line(referencePoint, surfaceNormal);
        Line screenRay = super._wwd.getView().computeRayFromScreenPoint(mousePoint.getX(), mousePoint.getY());
        Line previousScreenRay = super._wwd.getView().computeRayFromScreenPoint(previousMousePoint.getX(),
            previousMousePoint.getY());

        Vec4 pointOnLine = AirspaceEditorUtil.nearestPointOnLine(verticalRay, screenRay);
        Vec4 previousPointOnLine = AirspaceEditorUtil.nearestPointOnLine(verticalRay, previousScreenRay);

        Position pos = super._wwd.getModel().getGlobe().computePositionFromPoint(pointOnLine);
        Position previousPos = super._wwd.getModel().getGlobe().computePositionFromPoint(previousPointOnLine);
        double elevationChange = pos.getElevation() - previousPos.getElevation();

        java.util.List<Position> boundary = new ArrayList<Position>();
       
        for (LatLon ll : ((ExtrudedPolygon) super._pol_).getOuterBoundary())
        {
            boundary.add(new Position(ll, ((Position) ll).getElevation() + elevationChange));
        }

        ((ExtrudedPolygon) super._pol_).setOuterBoundary(boundary);
    }
View Full Code Here

                    nearestDistance = d;
                }
            }
        }

        Position newPosition = super._wwd.getModel().getGlobe().computePositionFromPoint(pickPoint);

        // Copy the outer boundary list
        ArrayList<Position> positionList = new ArrayList<Position>(this._lstMarkerControlPoints.size());
        for (LatLon position : ((ExtrudedPolygon) super._pol_).getOuterBoundary())
        {
View Full Code Here

      ArrayList<Point2D.Double> lstP2d = (ArrayList<Point2D.Double>) evt.getGeometry();
      List<Position> lstPosition = new ArrayList<Position>();
     
      for (Point2D.Double p2dCur: lstP2d)
      {
         Position posCur = Position.fromDegrees(p2dCur.y, p2dCur.x);
         lstPosition.add(posCur);
      }

      super.setLocations(lstPosition);
   }
View Full Code Here

          List<Point2D.Double> lstP2d = (List<Point2D.Double>) evt.getGeometry();
          List<Position> lstPosition = new ArrayList<Position>();
         
          for (Point2D.Double p2dCur: lstP2d)
          {
             Position posCur = Position.fromDegrees(p2dCur.y, p2dCur.x);
             lstPosition.add(posCur);
          }
         
          super.setLocations(lstPosition);
          this.firePropertyChange(GfrShouldRedrawRnd.STR, null, null);
View Full Code Here

          List<Point2D.Double> lstP2d = (List<Point2D.Double>) evt.getGeometry();
          List<Position> lstPosition = new ArrayList<Position>();
         
          for (Point2D.Double p2dCur: lstP2d)
          {
             Position posCur = Position.fromDegrees(p2dCur.y, p2dCur.x);
             lstPosition.add(posCur);
          }
         
          super.setLocations(lstPosition);
          this.firePropertyChange(GfrShouldRedrawRnd.STR, null, null);
View Full Code Here

TOP

Related Classes of gov.nasa.worldwind.geom.Position

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.