Package chunmap.model.coord

Examples of chunmap.model.coord.CPoint


        , List<MonotonyChain> chains, int from)
    {
        MonotonyChain chain = new MonotonyChain();
        for (int i = from, n = points.size(); i < n; i++)
        {
            CPoint p = points.getCoordinate(i);
            if (!chain.add(p))
            {
                chains.add(chain);
                return i - 1;
            }
View Full Code Here


        , List<MonotonyChain> chains, int from)
    {
        MonotonyChain chain = new MonotonyChain();
        for (int i = from, n = points.size(); i < n; i++)
        {
            CPoint p = points.getCoordinate(i);
            if (!chain.insert(p))
            {
                chains.add(chain);
                return i - 1;
            }
View Full Code Here

                    continue;
                else if (g instanceof CPoint[])
                    return false;
                else if (g instanceof CPoint)
                {
                    CPoint p = (CPoint)g;
                    if (!isNodePoint(ls1, ls2, p))
                    {
                        return false;
                    }
                }
View Full Code Here

        {
            return !hasOverPoint(points);
        }
        for (int i = 1, n = points.size() - 1; i < n; i++)
        {
            CPoint p = points.getCoordinate(i);
            if (set.contains(p))
            {
                return false;
            }
            else
View Full Code Here

        }
    }
    private void createLeaf()
    {
        subNode = new QuartNode[4];
        CPoint p=envelope.getCenter();

        Envelope env;
        env=new Envelope(envelope.getMinPoint(),p);
        subNode[0] = new QuartNode(env, deep + 1, maxDeep);
View Full Code Here

public class EnvelopeAlgorithm {
  public static boolean hasIntersect(Envelope env,Geometry geom)
    {
        if (geom instanceof GeoPoint)
        {
          CPoint p = ((GeoPoint)geom).getCoordinate();
            return env.contain(p);
        }
        else if (geom instanceof LineString)
        {
            LineString ls = (LineString)geom ;
View Full Code Here

    return new Vector(x, y, z);
  }

  public double computeAngle(Vector v2) {
    CPoint p = new Coordinate2D(0, 0);
    Angle angle = new Angle(point, p, v2.point);
    return angle.computeAngle();
  }
View Full Code Here

  public ArrowSymbol(Color color,int w,int h) {
    this.color = color;
   
    List<CPoint> points = new ArrayList<CPoint>();
    CPoint p1 = new Coordinate2D(-w, h);
    CPoint p2 = new Coordinate2D(0, 0);
    CPoint p3 = new Coordinate2D(-w, -h);
    points.add(p1);
    points.add(p2);
    points.add(p3);

    LineString ls = new LineString(points);
View Full Code Here

  private void drawLineSymbol(Graphics2D g, LineString ls) {

    g.setPaint(color);
    for (int i = 0, n = ls.size() - 1; i < n; i++) {
      CPoint p1 = ls.getPoint(i);
      CPoint p2 = ls.getPoint(i + 1);

      // 距离过小时不画
      LineSegment lseg = new LineSegment(p1, p2);
      if (lseg.taxiDistance() < dis)
        continue;
View Full Code Here

  private GeneralPath toGeneralPath(LineString ls) {
    GeneralPath path = new GeneralPath();
    path.moveTo(ls.firstPoint().getX(), ls.firstPoint().getY());
    for (int i = 1, n = ls.size(); i < n; i++) {
      CPoint p = ls.getPoint(i);
      path.lineTo(p.getX(), p.getY());
    }
    return path;
  }
View Full Code Here

TOP

Related Classes of chunmap.model.coord.CPoint

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.