
com.groupbyinc.flux.common.apache.lucene.spatial3d.geom.GeoConvexPolygon.class Maven / Gradle / Ivy
???? 4? Hcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoConvexPolygon Fcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoBasePolygon GeoConvexPolygon.java Tcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoConvexPolygon$EitherBound EitherBound points Ljava/util/List; TLjava/util/List; isInternalEdges Ljava/util/BitSet; holes VLjava/util/List; edges E[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/SidedPlane; notableEdgePoints D[[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPoint;
edgePoints C[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPoint; isDone Z eitherBounds Ljava/util/Map; ?Ljava/util/Map; prevBrotherMap ?Ljava/util/Map; nextBrotherMap X(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel;Ljava/util/List;)V h(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel;Ljava/util/List;Ljava/util/List;)V
! this JLcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoConvexPolygon; planetModel ELcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel; pointList H(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel;)V (
) + . 0 2 4 6 8
: java/util/List < size ()I > ? = @
B Ccom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel D java/util/BitSet F ()V H
G I
K done (Z)V M N
O k(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel;Ljava/util/List;Ljava/util/BitSet;Z)V {(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel;Ljava/util/List;Ljava/util/List;Ljava/util/BitSet;Z)V R
S internalEdgeFlags returnEdgeInternal J(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel;DD)V Z(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel;DDLjava/util/List;)V X
Y
startLatitude D startLongitude java/util/ArrayList ^
_ I @com/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPoint a W
b c add (Ljava/lang/Object;)Z e f = g addPoint (DDZ)V java/lang/IllegalStateException k .Can't call addPoint() if done() already called m (Ljava/lang/String;)V o
l p set (I)V r s
G t % & v latitude longitude isInternalEdge Can't call done() more than once { "java/lang/IllegalArgumentException } $Polygon needs at least three points.
~ p Bcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/SidedPlane ? get (I)Ljava/lang/Object; ? ? = ?
legalIndex (I)I ? ?
? =com/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Plane ? ?(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Vector;Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Vector;)V ?
? ? >com/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Vector ? evaluateIsZero C(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Vector;)Z ? ?
? ? java/lang/StringBuilder ?
? I !Polygon points are all coplanar: ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ? ?
? ? toString ()Ljava/lang/String; ? ?
? ? ?(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Vector;Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Vector;Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Vector;)V ?
? ? java/util/HashMap ? s
? ? isNumericallyIdentical B(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Plane;)Z ? ?
? ? %Constructed planes are all coplanar: ? isWithin ? ?
? ? 7Convex polygon has a side that is more than 180 degrees ? ?(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/SidedPlane;Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/SidedPlane;)V ?
?
java/util/Map ? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? ? ? ? iterator ()Ljava/util/Iterator; ? ? = ? java/util/Iterator ? hasNext ()Z ? ? ? ? next ()Ljava/lang/Object; ? ? ? ? Bcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPolygon ?
getEdgePoints E()[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPoint; ? ? ? ?
isWithinHoles E(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPoint;)Z ? ?
? 3Polygon edge intersects a polygon hole; not allowed ? index I j start BLcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPoint; end planeToFind ?Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Plane;
endPointIndex check sp DLcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/SidedPlane; i
interiorPoint edge bound1Index bound2Index
startingIndex edgeIndex hole DLcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPolygon; p holeEdgePoints isInternalReturnEdge edgePointCount ? ? point ](Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel;Ljava/io/InputStream;)V java/io/IOException ? Jcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/SerializableObject ? readPointArray ?(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel;Ljava/io/InputStream;)[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPoint; ? ? ? ? java/util/Arrays asList %([Ljava/lang/Object;)Ljava/util/List;
readPolygonArray ?(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel;Ljava/io/InputStream;)[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPolygon; ? java/io/InputStream
readBitSet )(Ljava/io/InputStream;)Ljava/util/BitSet;
? (I)Z ?
G inputStream Ljava/io/InputStream; write (Ljava/io/OutputStream;)V writePointArray )(Ljava/io/OutputStream;Ljava/util/List;)V ? writePolygonArray ? writeBitSet +(Ljava/io/OutputStream;Ljava/util/BitSet;)V ?! outputStream Ljava/io/OutputStream; (DDD)Z
localIsWithin&%
' ?% ?) polygon x y z, \ ?/- \ ?1. \ ?3 v @Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Vector;
?)
intersects ?(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Plane;[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPoint;[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Membership;)Z Bcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Membership; &(Ljava/lang/Object;)Ljava/lang/Object; ?= ?>?(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/PlanetModel;Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Plane;[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPoint;[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoPoint;[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Membership;[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Membership;)Z9@
?A9: ?C
notablePoints bounds E[Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Membership; E(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoShape;)Z @com/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoShapeIJC9H ?L shape BLcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/GeoShape; getBounds C(Lcom/groupbyinc/flux/common/apache/lucene/spatial3d/geom/Bounds;)V
NORTH_POLER ? ES&