Examples of Polyline


Examples of com.esri.core.geometry.Polyline

    if (xyPairs == null || xyPairs.length == 0 ||  xyPairs.length%2 != 0) {
      return null;
    }

    try {   
      Polyline linestring = new Polyline();
      linestring.startPath(xyPairs[0].get(), xyPairs[1].get());
   
      for (int i=2; i<xyPairs.length; i+=2) {
        linestring.lineTo(xyPairs[i].get(), xyPairs[i+1].get());
      }
   
      return GeometryUtils.geometryToEsriShapeBytesWritable(OGCGeometry.createFromEsriGeometry(linestring, null));
    } catch (Exception e) {
        LogUtils.Log_InternalError(LOG, "ST_LineString: " + e);
View Full Code Here

Examples of com.esri.core.geometry.Polyline

  public boolean isClosed() {
    return multiPath.isClosedPathInXYPlane(0);
  }

  public OGCLineString(MultiPath mp, int pathIndex, SpatialReference sr) {
    multiPath = new Polyline();
    if (!mp.isEmpty())
      multiPath.addPath(mp, pathIndex, true);
    esriSR = sr;
  }
View Full Code Here

Examples of com.esri.core.geometry.Polyline

    esriSR = sr;
  }

  public OGCLineString(MultiPath mp, int pathIndex, SpatialReference sr,
      boolean reversed) {
    multiPath = new Polyline();
    if (!mp.isEmpty())
      multiPath.addPath(mp, pathIndex, !reversed);
    esriSR = sr;
  }
View Full Code Here

Examples of com.esri.core.geometry.Polyline

    return "MultiPolygon";
  }

  @Override
  public OGCGeometry boundary() {
    Polyline polyline = new Polyline();
    polyline.add(polygon, true); // adds reversed path
    return (OGCMultiCurve) OGCGeometry.createFromEsriGeometry(polyline,
        esriSR, true);
  }
View Full Code Here

Examples of com.esri.core.geometry.Polyline

    return new OGCLinearRing(polygon, n + 1, esriSR, true);
  }

  @Override
  public OGCMultiCurve boundary() {
    Polyline polyline = new Polyline();
    polyline.add(polygon, true); // adds reversed path
    return (OGCMultiCurve) OGCGeometry.createFromEsriGeometry(polyline,
        esriSR, true);
  }
View Full Code Here

Examples of com.esri.core.geometry.Polyline

    return "MultiPolygon";
  }

  @Override
  public OGCGeometry boundary() {
    Polyline polyline = new Polyline();
    polyline.add(polygon, true); // adds reversed path
    return (OGCMultiCurve) OGCGeometry.createFromEsriGeometry(polyline,
        esriSR, true);
  }
View Full Code Here

Examples of com.esri.core.geometry.Polyline

    return new OGCLinearRing(polygon, n + 1, esriSR, true);
  }

  @Override
  public OGCMultiCurve boundary() {
    Polyline polyline = new Polyline();
    polyline.add(polygon, true); // adds reversed path
    return (OGCMultiCurve) OGCGeometry.createFromEsriGeometry(polyline,
        esriSR, true);
  }
View Full Code Here

Examples of com.esri.core.geometry.Polyline

  public boolean isClosed() {
    return multiPath.isClosedPathInXYPlane(0);
  }

  public OGCLineString(MultiPath mp, int pathIndex, SpatialReference sr) {
    multiPath = new Polyline();
    if (!mp.isEmpty())
      multiPath.addPath(mp, pathIndex, true);
    esriSR = sr;
  }
View Full Code Here

Examples of com.esri.core.geometry.Polyline

    esriSR = sr;
  }

  public OGCLineString(MultiPath mp, int pathIndex, SpatialReference sr,
      boolean reversed) {
    multiPath = new Polyline();
    if (!mp.isEmpty())
      multiPath.addPath(mp, pathIndex, !reversed);
    esriSR = sr;
  }
View Full Code Here

Examples of com.google.gwt.maps.client.overlay.Polyline

          public int compare(LatLng p1, LatLng p2) {
            return new Double(p1.getLongitude()).compareTo(new Double(
                p2.getLongitude()));
          }
        });
        Polyline pline = new Polyline(points);
        map.addOverlay(pline);
        if (pline.getVertexCount() != NUM_POINTS) {
          Window.alert("Created polyline with " + NUM_POINTS
              + " vertices, but now it has " + pline.getVertexCount());
        }
      }
        break;

      case TEST_POLYLINE_ENCODED: {
        // Add a polyline encoded in a string
        map.setCenter(LatLng.newInstance(40.71213418976525, -73.96785736083984), 15);
        Polyline pline = Polyline.fromEncoded("#3333cc", 10, 1.0,
            ENCODED_POINTS, 32, ENCODED_LEVELS, 4);
        map.addOverlay(pline);
      }
        break;
      case TEST_POLYLINE_GEODESIC: {
        LatLng nycToZurich[] = {LatLng.newInstance(40.75, -73.90), // New York
            LatLng.newInstance(47.3, 8.5) // Zurich
        };
        map.setCenter(LatLng.newInstance(40, -25), 2);
        Polyline pline = new Polyline(nycToZurich, "#FF0000", 1, .75,
            PolylineOptions.newInstance(false, true));
        map.addOverlay(pline);
      }
        break;
      case TEST_POLYLINE_ENCODED_TRANSPARENT: {
        // Add a polyline with transparency
        map.setCenter(LatLng.newInstance(40.71213418976525, -73.96785736083984), 15);
        Polyline pline = Polyline.fromEncoded(ENCODED_POINTS, 32,
            ENCODED_LEVELS, 4);
        map.addOverlay(pline);
      }
        break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.