Examples of createPoint()


Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

    coordinate.x = coordinate.y = 2.5;
    Assert.assertTrue(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = coordinate.y = 3.5;
    Assert.assertFalse(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = coordinate.y = 4.5;
    Assert.assertFalse(geometry.contains(geometryFactory.createPoint(coordinate)));

    Assert.assertFalse(securityContext.isPartlyVisibleSufficient(LAYER_ID));
  }

  private Authentication getAuthentication() {
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

    newFeatures = new ArrayList<InternalFeature>();
    feature = converterService.toInternal(new Feature());
    feature.setId("4");
    feature.setLayer(beanLayer);
    // feature needs a geometry or exceptions all over
    geometry = geometryFactory.createPoint(new Coordinate(1.5, 1.5));
    feature.setGeometry(geometry);   
    newFeatures.add(feature);
    try {
      layerService.saveOrUpdate(LAYER_ID, crs, oldFeatures, newFeatures);
      Assert.fail("create should have failed");
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

    newFeatures = new ArrayList<InternalFeature>();
    feature = converterService.toInternal(new Feature());
    feature.setId("4");
    feature.setLayer(beanLayer);
    // feature needs a geometry or exceptions all over
    geometry = geometryFactory.createPoint(new Coordinate(1.5, 1.5));
    feature.setGeometry(geometry);
    newFeatures.add(feature);
    layerService.saveOrUpdate(LAYER_ID, crs, oldFeatures, newFeatures);
    filter = filterService.createFidFilter(new String[]{"4"});
    oldFeatures = layerService.getFeatures(LAYER_ID,
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

    newFeatures = new ArrayList<InternalFeature>();
    feature = converterService.toInternal(new Feature());
    feature.setId("4");
    feature.setLayer(beanLayer);
    // feature needs a geometry or exceptions all over
    geometry = geometryFactory.createPoint(new Coordinate(5.5, 5.5));
    feature.setGeometry(geometry);
    newFeatures.add(feature);
    try {
      layerService.saveOrUpdate(LAYER_ID, crs, oldFeatures, newFeatures);
      Assert.fail("create area not checked");
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

    newFeatures = new ArrayList<InternalFeature>();
    feature = converterService.toInternal(new Feature());
    feature.setId("4");
    feature.setLayer(beanLayer);
    // feature needs a geometry or exceptions all over
    geometry = geometryFactory.createPoint(new Coordinate(1.5, 1.5));
    feature.setGeometry(geometry);
    newFeatures.add(feature);
    layerService.saveOrUpdate(LAYER_ID, crs, oldFeatures, newFeatures);
    filter = filterService.createFidFilter(new String[]{"4"});
    oldFeatures = layerService.getFeatures(LAYER_ID,
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

    GeometryFactory factory = new GeometryFactory(model, srid);
    com.vividsolutions.jts.geom.Geometry jts;

    String geometryType = geometry.getGeometryType();
    if (Geometry.POINT.equals(geometryType)) {
      jts = factory.createPoint(convertCoordinates(geometry)[0]);
    } else if (Geometry.LINEAR_RING.equals(geometryType)) {
      jts = factory.createLinearRing(convertCoordinates(geometry));
    } else if (Geometry.LINE_STRING.equals(geometryType)) {
      jts = factory.createLineString(convertCoordinates(geometry));
    } else if (Geometry.POLYGON.equals(geometryType)) {
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

    InternalFeature feature = converterService.toInternal(new Feature());
    feature.setId("4");
    feature.setLayer(beanLayer);
    // feature needs a geometry or exceptions all over
    GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel());
    Geometry geometry = geometryFactory.createPoint(new Coordinate(1.5, 1.5));
    feature.setGeometry(geometry);
    newFeatures.add(feature);
    layerService.saveOrUpdate(LAYER_ID, crs, oldFeatures, newFeatures);

    Iterator<FeatureBean> iterator =
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

        String key = getTransformKey(crsTransformInfo);
        transformCache.put(key, getCrsTransform(key, crsTransformInfo));
      }
    }
    GeometryFactory factory = new GeometryFactory();
    EMPTY_GEOMETRIES.put(Point.class, factory.createPoint((Coordinate) null));
    EMPTY_GEOMETRIES.put(LineString.class, factory.createLineString((Coordinate[]) null));
    EMPTY_GEOMETRIES.put(Polygon.class, factory.createPolygon(null, null));
    EMPTY_GEOMETRIES.put(MultiPoint.class, factory.createMultiPoint((Coordinate[]) null));
    EMPTY_GEOMETRIES.put(MultiLineString.class, factory.createMultiLineString((LineString[]) null)); // cast needed!
    EMPTY_GEOMETRIES.put(MultiPolygon.class, factory.createMultiPolygon((Polygon[]) null)); // cast needed!
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

    PrecisionModel precisionModel  = new PrecisionModel(PrecisionModel.FLOATING);
    GeometryFactory geometryFactory = new GeometryFactory(precisionModel, LAYER_SRID);
    Coordinate coordinate = new Coordinate();

    coordinate.x = coordinate.y = -86;
    Assert.assertFalse(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = -85.05;
    coordinate.y = -85.05;
    Assert.assertTrue(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = -85.05;
    coordinate.y = 85.05;
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryFactory.createPoint()

    coordinate.x = coordinate.y = -86;
    Assert.assertFalse(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = -85.05;
    coordinate.y = -85.05;
    Assert.assertTrue(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = -85.05;
    coordinate.y = 85.05;
    Assert.assertTrue(geometry.contains(geometryFactory.createPoint(coordinate)));
    coordinate.x = 85.05;
    coordinate.y = -85.05;
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.