From 647ac700a943e9cddde0a316317910d9737fcfc2 Mon Sep 17 00:00:00 2001 From: Martin Davis Date: Thu, 19 Dec 2024 11:36:50 -0800 Subject: [PATCH] Remove obsolete example --- .../technique/PolygonUnionUsingBuffer.java | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 modules/example/src/main/java/org/locationtech/jtsexample/technique/PolygonUnionUsingBuffer.java diff --git a/modules/example/src/main/java/org/locationtech/jtsexample/technique/PolygonUnionUsingBuffer.java b/modules/example/src/main/java/org/locationtech/jtsexample/technique/PolygonUnionUsingBuffer.java deleted file mode 100644 index 0e0c507c92..0000000000 --- a/modules/example/src/main/java/org/locationtech/jtsexample/technique/PolygonUnionUsingBuffer.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2016 Vivid Solutions. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * and Eclipse Distribution License v. 1.0 which accompanies this distribution. - * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v20.html - * and the Eclipse Distribution License is available at - * - * http://www.eclipse.org/org/documents/edl-v10.php. - */ - -package org.locationtech.jtsexample.technique; - -import org.locationtech.jts.geom.Geometry; -import org.locationtech.jts.geom.GeometryFactory; -import org.locationtech.jts.io.WKTReader; - -/** - * Shows a technique for using a zero-width buffer to compute - * the union of a collection of polygonal geometries. - * The advantages of this technique are: - * - * Disadvantages are: - * - * - * @deprecated It is now recommended to use Geometry.union() (unary union) instead of this technique. - * - * @version 1.7 - */ -public class PolygonUnionUsingBuffer { - - public static void main(String[] args) - throws Exception - { - WKTReader rdr = new WKTReader(); - - Geometry[] geom = new Geometry[3]; - geom[0] = rdr.read("POLYGON (( 100 180, 100 260, 180 260, 180 180, 100 180 ))"); - geom[1] = rdr.read("POLYGON (( 80 140, 80 200, 200 200, 200 140, 80 140 ))"); - geom[2] = rdr.read("POLYGON (( 160 160, 160 240, 240 240, 240 160, 160 160 ))"); - unionUsingBuffer(geom); - - } - - public static void unionUsingBuffer(Geometry[] geom) - { - GeometryFactory fact = geom[0].getFactory(); - Geometry geomColl = fact.createGeometryCollection(geom); - Geometry union = geomColl.buffer(0.0); - System.out.println(union); - } - - - -}