com.groupbyinc.flux.common.geo.builders.ShapeBuilder.class Maven / Gradle / Ivy
???? 4K 4com/groupbyinc/flux/common/geo/builders/ShapeBuilder 4com/groupbyinc/flux/action/support/ToXContentToBytes 3com/groupbyinc/flux/common/io/stream/NamedWriteable ShapeBuilder.java 6com/groupbyinc/flux/common/geo/builders/ShapeBuilder$1 Acom/groupbyinc/flux/common/geo/builders/ShapeBuilder$GeoShapeType
GeoShapeType @com/groupbyinc/flux/common/geo/builders/ShapeBuilder$Orientation
Orientation Fcom/groupbyinc/flux/common/geo/builders/ShapeBuilder$IntersectionOrder IntersectionOrder 9com/groupbyinc/flux/common/geo/builders/ShapeBuilder$Edge Edge Ccom/groupbyinc/flux/common/geo/builders/ShapeBuilder$CoordinateNode CoordinateNode 8com/groupbyinc/flux/common/xcontent/XContentParser$Token 2com/groupbyinc/flux/common/xcontent/XContentParser Token LOGGER !Lorg/apache/logging/log4j/Logger; DEBUG Z DATELINE D@f? ZERO_ZERO ?Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Coordinate; SPATIAL_CONTEXT :Lorg/locationtech/spatial4j/context/jts/JtsSpatialContext; FACTORY DLcom/groupbyinc/flux/common/vividsolutions/jts/geom/GeometryFactory; wrapdateline MULTI_POLYGON_MAY_OVERLAP AUTO_VALIDATE_JTS_GEOMETRY AUTO_INDEX_JTS_GEOMETRY INTERSECTION_ORDER HLcom/groupbyinc/flux/common/geo/builders/ShapeBuilder$IntersectionOrder;
FIELD_TYPE Ljava/lang/String; type 6 FIELD_COORDINATES coordinates 9 FIELD_GEOMETRIES
geometries < FIELD_ORIENTATION orientation ? $assertionsDisabled ()V B C
D ( ) F 8org/locationtech/spatial4j/context/jts/JtsSpatialContext H isGeo ()Z J K
I L , ! N this 6Lcom/groupbyinc/flux/common/geo/builders/ShapeBuilder; jtsGeometry q(Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Geometry;)Lorg/locationtech/spatial4j/shape/jts/JtsGeometry; 0org/locationtech/spatial4j/shape/jts/JtsGeometry T |(Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Geometry;Lorg/locationtech/spatial4j/context/jts/JtsSpatialContext;ZZ)V B V
U W validate Y C
U Z index \ C
U ] geom =Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Geometry; 2Lorg/locationtech/spatial4j/shape/jts/JtsGeometry; build *()Lorg/locationtech/spatial4j/shape/Shape; parseCoordinates {(Lcom/groupbyinc/flux/common/xcontent/XContentParser;)Lcom/groupbyinc/flux/common/geo/builders/ShapeBuilder$CoordinateNode; java/io/IOException f nextToken <()Lcom/groupbyinc/flux/common/xcontent/XContentParser$Token; h i j START_ARRAY :Lcom/groupbyinc/flux/common/xcontent/XContentParser$Token; l m n END_ARRAY p m q
VALUE_NULL s m t doubleValue ()D v w x VALUE_NUMBER z m { =com/groupbyinc/flux/common/vividsolutions/jts/geom/Coordinate } (DD)V B
~ ? B(Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Coordinate;)V B ?
? "java/lang/IllegalArgumentException ? 'coordinates cannot contain NULL values) ? (Ljava/lang/String;)V B ?
? ? java/util/ArrayList ?
? D java/util/List ? d e
? add (Ljava/lang/Object;)Z ? ? ? ? (Ljava/util/List;)V B ?
? lon lat parser 4Lcom/groupbyinc/flux/common/xcontent/XContentParser; token nodes WLjava/util/List; Ljava/util/List; parse l(Lcom/groupbyinc/flux/common/xcontent/XContentParser;)Lcom/groupbyinc/flux/common/geo/builders/ShapeBuilder; ?(Lcom/groupbyinc/flux/common/xcontent/XContentParser;Lcom/groupbyinc/flux/index/mapper/GeoShapeFieldMapper;)Lcom/groupbyinc/flux/common/geo/builders/ShapeBuilder; ? ?
? geoDocMapper 6Lcom/groupbyinc/flux/index/mapper/GeoShapeFieldMapper;
toXContent ?(Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Coordinate;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; 3com/groupbyinc/flux/common/xcontent/XContentBuilder ?
startArray 7()Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
? ? x ? # ~ ? value 8(D)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
? ? y ? # ~ ? endArray ? ?
? ? builder 5Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;
coordinate writeCoordinateTo u(Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Coordinate;Lcom/groupbyinc/flux/common/io/stream/StreamOutput;)V 1com/groupbyinc/flux/common/io/stream/StreamOutput ? writeDouble (D)V ? ?
? ? out 3Lcom/groupbyinc/flux/common/io/stream/StreamOutput; readFromStream s(Lcom/groupbyinc/flux/common/io/stream/StreamInput;)Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Coordinate; 0com/groupbyinc/flux/common/io/stream/StreamInput ?
readDouble ? w
? ? in 2Lcom/groupbyinc/flux/common/io/stream/StreamInput; shift ?(Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Coordinate;D)Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Coordinate;? dateline E()Lcom/groupbyinc/flux/common/geo/builders/ShapeBuilder$GeoShapeType; intersection ?(Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Coordinate;Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Coordinate;D)D? t p1 p2
intersections @(D[Lcom/groupbyinc/flux/common/geo/builders/ShapeBuilder$Edge;)I A ! ? java/lang/Double ? isNaN (D)Z ? ?
? ? java/lang/AssertionError ?
? D ? ' ? next ;Lcom/groupbyinc/flux/common/geo/builders/ShapeBuilder$Edge; ? ? ? MAX_COORDINATE ? ' ? intersect ? ' ? ? ?
? B(D)Lcom/groupbyinc/flux/common/vividsolutions/jts/geom/Coordinate; ? ?
? 2 3 ? java/util/Arrays sort ,([Ljava/lang/Object;Ljava/util/Comparator;)V
position i I edges <[Lcom/groupbyinc/flux/common/geo/builders/ShapeBuilder$Edge; numIntersections debugEnabled org/apache/logging/log4j/Logger isDebugEnabled K ! getWriteableName ()Ljava/lang/String; 6 ?
shapeName
access$100 x0 java/lang/Class! desiredAssertionStatus# K
"$ getName&
"' 2com/groupbyinc/flux/common/logging/ESLoggerFactory) getLogger 5(Ljava/lang/String;)Lorg/apache/logging/log4j/Logger;+,
*- com/groupbyinc/flux/Assertions/ ENABLED1 ! 02 &