org.gcube.indexmanagement.geo.shape
Class PolygonProcessing

java.lang.Object
  extended by org.gcube.indexmanagement.geo.shape.PolygonProcessing

public class PolygonProcessing
extends Object


Constructor Summary
PolygonProcessing()
           
 
Method Summary
static Polygon intersection(Polygon a, Polygon b)
          returns the intersection of two polygons a, b
static boolean isContained(Polygon internal, Polygon external)
          checks if polygon internal is contained inside the polygon external
static void main(String[] args)
          used only for testing - Std out will not be used by this class when called by the container
static boolean overlaps(Polygon a, Polygon b)
          checks if a polygon a overlaps with a polygon b
static Polygon union(Polygon a, Polygon b)
          returns the union of two polygons a, b
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolygonProcessing

public PolygonProcessing()
Method Detail

intersection

public static Polygon intersection(Polygon a,
                                   Polygon b)
returns the intersection of two polygons a, b

Parameters:
a - - polygon a
b - - polygon b
Returns:
the intersection of a and b

union

public static Polygon union(Polygon a,
                            Polygon b)
returns the union of two polygons a, b

Parameters:
a - - polygon a
b - - polygon b
Returns:
the union of a and b

isContained

public static boolean isContained(Polygon internal,
                                  Polygon external)
checks if polygon internal is contained inside the polygon external

Parameters:
internal - - the internal polygon
external - - the external polygon
Returns:
true if yes / false otherwise

overlaps

public static boolean overlaps(Polygon a,
                               Polygon b)
checks if a polygon a overlaps with a polygon b

Parameters:
a - - the a polygon
b - - the b polygon
Returns:
true if yes / false otherwise

main

public static void main(String[] args)
used only for testing - Std out will not be used by this class when called by the container

Parameters:
args -


Copyright © 2012. All Rights Reserved.