Package chunmap.model.coord

Examples of chunmap.model.coord.Coordinate2D


            else if (y < -Mercator.maxDis)
            {
                y = -Mercator.maxDis;
            }

      return new Coordinate2D(x, y);
    }
View Full Code Here


            double L = getL(p.getX());

            double b = Math.toDegrees(B);//weidu
            double l = Math.toDegrees(L);//jidu

            return new Coordinate2D(l, b);
        }
View Full Code Here

    draging = true;
    x = e.getX();
    y = e.getY();

    lse.addPointToLast(map.getView().screen2World().convert(
        new Coordinate2D(x, y)));
  }
View Full Code Here

    }

    private void addWeiXian(List<Geometry> geometrys, double weidu)
    {
        LineString ls = new LineString(
            new CPoint[] { new Coordinate2D(-180, weidu), new Coordinate2D(180, weidu) });
        geometrys.add(ls);
    }
View Full Code Here

    }

    private void addJingXian(List<Geometry> geometrys, double jingdu)
    {
        LineString ls = new LineString(
            new CPoint[] { new Coordinate2D(jingdu, -90), new Coordinate2D(jingdu, 90) });
        geometrys.add(ls);
    }
View Full Code Here

    Line l = sl.toLine();
    double a = Math.atan(l.getVerticalK());// 角度
    double dx = distance * Math.cos(a);
    double dy = distance * Math.sin(a);

    CPoint p1 = new Coordinate2D(sl.getStartPoint().getX() - dx, sl.getStartPoint()
        .getY()
        - dy);
    CPoint p2 = new Coordinate2D(sl.getStartPoint().getX() + dx, sl.getStartPoint()
        .getY()
        + dy);
    CPoint p3 = new Coordinate2D(sl.getEndPoint().getX() + dx, sl.getEndPoint()
        .getY()
        + dy);
    CPoint p4 = new Coordinate2D(sl.getEndPoint().getX() - dx, sl.getEndPoint()
        .getY()
        - dy);

    CoordSeqEditor ls = new CoordSeqEditor();
    ls.addPointToLast(p1);
View Full Code Here

    int xIndex = text.indexOf(' ');

    double x = Double.parseDouble(text.substring(0, xIndex));
    double y = Double.parseDouble(text.substring(xIndex));

    CPoint p = new Coordinate2D(x, y);
    return p;
  }
View Full Code Here

    sour.set(0, 1, p.getY());
    sour.set(0, 2, 1);
    Matrix result = sour.matrixMulti(m);
    double x = result.get(0, 0);
    double y = result.get(0, 1);
    return new Coordinate2D(x, y);
  }
View Full Code Here

        return new LineString(nca);
    }

    public CPoint createPoint(double x, double y)
    {
        return new Coordinate2D(precision.format(x), precision.format(y));
    }
View Full Code Here

  public CPoint readPoint(RandomAccessFile br) throws IOException {
    double x = reverseBytes(br.readDouble());
    double y = reverseBytes(br.readDouble());

    return new Coordinate2D(x, y);
  }
View Full Code Here

TOP

Related Classes of chunmap.model.coord.Coordinate2D

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.