@Override public XShapeCollection<Point> buildS4J() { //Could wrap JtsGeometry but probably slower due to conversions to/from JTS in relate() //MultiPoint geometry = FACTORY.createMultiPoint(points.toArray(new Coordinate[points.size()])); List<Point> shapes = new ArrayList<>(coordinates.size()); for (Coordinate coord : coordinates) { shapes.add(SPATIAL_CONTEXT.makePoint(coord.x, coord.y)); } XShapeCollection<Point> multiPoints = new XShapeCollection<>(shapes, SPATIAL_CONTEXT); multiPoints.setPointsOnly(true); return multiPoints; }
@Override public Shape build() { //Could wrap JtsGeometry but probably slower due to conversions to/from JTS in relate() //MultiPoint geometry = FACTORY.createMultiPoint(points.toArray(new Coordinate[points.size()])); List<Point> shapes = new ArrayList<>(coordinates.size()); for (Coordinate coord : coordinates) { shapes.add(SPATIAL_CONTEXT.makePoint(coord.x, coord.y)); } XShapeCollection<Point> multiPoints = new XShapeCollection<>(shapes, SPATIAL_CONTEXT); multiPoints.setPointsOnly(true); return multiPoints; }
@Override public XShapeCollection<Point> build() { //Could wrap JtsGeometry but probably slower due to conversions to/from JTS in relate() //MultiPoint geometry = FACTORY.createMultiPoint(points.toArray(new Coordinate[points.size()])); List<Point> shapes = new ArrayList<>(coordinates.size()); for (Coordinate coord : coordinates) { shapes.add(SPATIAL_CONTEXT.makePoint(coord.x, coord.y)); } XShapeCollection<Point> multiPoints = new XShapeCollection<>(shapes, SPATIAL_CONTEXT); multiPoints.setPointsOnly(true); return multiPoints; }
@Override public XShapeCollection<Point> build() { //Could wrap JtsGeometry but probably slower due to conversions to/from JTS in relate() //MultiPoint geometry = FACTORY.createMultiPoint(points.toArray(new Coordinate[points.size()])); List<Point> shapes = new ArrayList<>(coordinates.size()); for (Coordinate coord : coordinates) { shapes.add(SPATIAL_CONTEXT.makePoint(coord.x, coord.y)); } XShapeCollection<Point> multiPoints = new XShapeCollection<>(shapes, SPATIAL_CONTEXT); multiPoints.setPointsOnly(true); return multiPoints; }
@Override public Shape build() { //Could wrap JtsGeometry but probably slower due to conversions to/from JTS in relate() //MultiPoint geometry = FACTORY.createMultiPoint(points.toArray(new Coordinate[points.size()])); List<Point> shapes = new ArrayList<>(points.size()); for (Coordinate coord : points) { shapes.add(SPATIAL_CONTEXT.makePoint(coord.x, coord.y)); } XShapeCollection multiPoints = new XShapeCollection<>(shapes, SPATIAL_CONTEXT); multiPoints.setPointsOnly(true); return multiPoints; }