protected LatLonPoint assertLatLonPoint(Point2D p2d){
  if (p2d instanceof LatLonPoint) {
    return (LatLonPoint)p2d;
  }
 else {
    return new LatLonPoint.Double(p2d.getY(),p2d.getX());
  }
}

protected LatLonPoint assertLatLonPoint ( Point2D p2d ) { if ( p2d instanceof LatLonPoint ) { return ( LatLonPoint ) p2d ; } else { return new LatLonPoint . Double ( p2d . getY ( ) , p2d . getX ( ) ) ; } }
returns the point2d provided if it is a latlonpoint , otherwise it creates a latlonpoint . double and transfers the values from the provided point2d object .
