Returns a new {@link GeoShapeCondition} with the specified shape.

@param field the name of the field
@param shape the shape in WKT format
@return a new geo shape condition
509094
public static GeoShapeCondition geoShape(String field, String shape) {
        return geoShape(field, wkt(shape));
    }
653530
public static Style createDefaultPolygonStyle() {
        FeatureTypeStyle featureTypeStyle = sf.createFeatureTypeStyle();
        featureTypeStyle.rules().add(createDefaultPolygonRule());

        Style style = sf.createStyle();
        style.featureTypeStyles().add(featureTypeStyle);

        return style;
    }
808875
def shape(value):
        
        if value.value:
            _assert_is_type('shape.value', value.value, str_types)
            if value.value not in PropertySet._valid_shapes:
                raise ValueError(value.value + ' is not a valid shape')
150195
public static GeoShape fromJson(String json) {
        try {
            return JsonSerializer.fromString(json, GeoShape.class);
        } catch (IOException e) {
            throw new IllegalArgumentException("Unparseable shape");
        }
    }
1244380
public static ConvexHull ofShapes(final List<Shape> shapes) {
        final Path2D combined = new Path2D.Double();
        for (Shape shape : shapes)
            combined.append(shape, false);
        return new ConvexHull(shapeOf(grahamScan(pointsOf(combined))));
    }
1204023
public static <E, D extends Comparable> Range<E, D> newRange(Attribute<?, ?>... fields) {
        return new Range<E, D>(fields);
    }
447493
@Override
    public BitemporalMapper build(String field) {
        return new BitemporalMapper(field, validated, vtFrom, vtTo, ttFrom, ttTo, pattern, nowValue);
    }
1219497
public final FacetOptions addFacetByRange(FieldWithRangeParameters<?, ?, ?> field) {
		Assert.notNull(field, "Cannot range facet on null field.");
		Assert.hasText(field.getName(), "Cannot range facet on field with null/empty fieldname.");

		this.facetRangeOnFields.add(field);
		return this;
	}
1073623
public static GoogleMapShape addShapeToMap(GoogleMap map,
                                               GoogleMapShape shape) {

        GoogleMapShape addedShape = null;

        switch (shape.getShapeType()) {

            case LAT_LNG:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.MARKER, addLatLngToMap(map,
                        (LatLng) shape.getShape()));
                break;
            case MARKER_OPTIONS:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.MARKER, addMarkerOptionsToMap(map,
                        (MarkerOptions) shape.getShape()));
                break;
            case POLYLINE_OPTIONS:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.POLYLINE, addPolylineToMap(map,
                        (PolylineOptions) shape.getShape()));
                break;
            case POLYGON_OPTIONS:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.POLYGON, addPolygonToMap(map,
                        (PolygonOptions) shape.getShape()));
                break;
            case MULTI_LAT_LNG:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.MULTI_MARKER, addLatLngsToMap(map,
                        (MultiLatLng) shape.getShape()));
                break;
            case MULTI_POLYLINE_OPTIONS:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.MULTI_POLYLINE, addPolylinesToMap(map,
                        (MultiPolylineOptions) shape.getShape()));
                break;
            case MULTI_POLYGON_OPTIONS:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.MULTI_POLYGON, addPolygonsToMap(map,
                        (MultiPolygonOptions) shape.getShape()));
                break;
            case COLLECTION:
                List<GoogleMapShape> addedShapeList = new ArrayList<GoogleMapShape>();
                @SuppressWarnings("unchecked")
                List<GoogleMapShape> shapeList = (List<GoogleMapShape>) shape
                        .getShape();
                for (GoogleMapShape shapeListItem : shapeList) {
                    addedShapeList.add(addShapeToMap(map, shapeListItem));
                }
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.COLLECTION, addedShapeList);
                break;
            default:
                throw new GeoPackageException("Unsupported Shape Type: "
                        + shape.getShapeType());

        }

        return addedShape;
    }
371912
public BoundingBox boundingBoxToWgs84(BoundingBox boundingBox) {
        if (projection == null) {
            throw new GeoPackageException("Shape Converter projection is null");
        }
        return boundingBox.transform(toWgs84);
    }
726605
function convertShape (shape, tag) {
  return templates.element({
    'tag': tag,
    'width': shape.width,
    'height': shape.height,
    'fill': shape.properties.fill
  });
}
999566
@Nullable
  static CircleOptions fromFeature(@NonNull Feature feature) {
    if (feature.geometry() == null) {
      throw new RuntimeException("geometry field is required");
    }
    if (!(feature.geometry() instanceof Point)) {
      return null;
    }

    CircleOptions options = new CircleOptions();
    options.geometry = (Point) feature.geometry();
    if (feature.hasProperty(PROPERTY_CIRCLE_RADIUS)) {
      options.circleRadius = feature.getProperty(PROPERTY_CIRCLE_RADIUS).getAsFloat();
    }
    if (feature.hasProperty(PROPERTY_CIRCLE_COLOR)) {
      options.circleColor = feature.getProperty(PROPERTY_CIRCLE_COLOR).getAsString();
    }
    if (feature.hasProperty(PROPERTY_CIRCLE_BLUR)) {
      options.circleBlur = feature.getProperty(PROPERTY_CIRCLE_BLUR).getAsFloat();
    }
    if (feature.hasProperty(PROPERTY_CIRCLE_OPACITY)) {
      options.circleOpacity = feature.getProperty(PROPERTY_CIRCLE_OPACITY).getAsFloat();
    }
    if (feature.hasProperty(PROPERTY_CIRCLE_STROKE_WIDTH)) {
      options.circleStrokeWidth = feature.getProperty(PROPERTY_CIRCLE_STROKE_WIDTH).getAsFloat();
    }
    if (feature.hasProperty(PROPERTY_CIRCLE_STROKE_COLOR)) {
      options.circleStrokeColor = feature.getProperty(PROPERTY_CIRCLE_STROKE_COLOR).getAsString();
    }
    if (feature.hasProperty(PROPERTY_CIRCLE_STROKE_OPACITY)) {
      options.circleStrokeOpacity = feature.getProperty(PROPERTY_CIRCLE_STROKE_OPACITY).getAsFloat();
    }
    if (feature.hasProperty(PROPERTY_IS_DRAGGABLE)) {
      options.isDraggable = feature.getProperty(PROPERTY_IS_DRAGGABLE).getAsBoolean();
    }
    return options;
  }
1225380
private static Shape getShapeWithId(String id,
                                        ArrayList<Shape> shapes) {
        Shape result = new Shape(id);
        if (shapes.contains(result)) {
            return shapes.get(shapes.indexOf(result));
        }

        shapes.add(result);
        return result;
    }
1096949
public FieldSpec buildConditionField(int index, Struct<PluralType> branch) {
    String fieldDoc = PluralRulePrinter.print(branch);
    String name = String.format("COND_%d", index);
    FieldSpec.Builder field = FieldSpec.builder(PLURAL_CONDITION, name, PRIVATE, STATIC, FINAL)
        .addJavadoc(fieldDoc + "\n");

    List<Node<PluralType>> expressions = branch.nodes();

    CodeBlock.Builder code = CodeBlock.builder();
    code.beginControlFlow("(o) ->");

    int size = expressions.size();
    for (int i = 0; i < size; i++) {
      renderExpr(i == 0, code, expressions.get(i));
    }
    code.addStatement("return true");
    code.endControlFlow();

    field.initializer(code.build());
    return field.build();
  }
864035
@SuppressWarnings("unchecked")
    public OsmDroidMapShape toShape(Geometry geometry) {

        OsmDroidMapShape shape = null;

        GeometryType geometryType = geometry.getGeometryType();
        switch (geometryType) {
            case POINT:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.LAT_LNG, toLatLng((Point) geometry));
                break;
            case LINESTRING:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.POLYLINE_OPTIONS,
                    toPolyline((LineString) geometry));
                break;
            case POLYGON:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.POLYGON_OPTIONS,
                    toPolygon((Polygon) geometry));
                break;
            case MULTIPOINT:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.MULTI_LAT_LNG,
                    toLatLngs((MultiPoint) geometry));
                break;
            case MULTILINESTRING:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.MULTI_POLYLINE_OPTIONS,
                    toPolylines((MultiLineString) geometry));
                break;
            case MULTIPOLYGON:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.MULTI_POLYGON_OPTIONS,
                    toPolygons((MultiPolygon) geometry));
                break;
            case CIRCULARSTRING:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.POLYLINE_OPTIONS,
                    toPolyline((CircularString) geometry));
                break;
            case COMPOUNDCURVE:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.MULTI_POLYLINE_OPTIONS,
                    toPolylines((CompoundCurve) geometry));
                break;
            case CURVEPOLYGON:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.POLYGON_OPTIONS,
                    toCurvePolygon((CurvePolygon) geometry));
                break;
            case POLYHEDRALSURFACE:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.MULTI_POLYGON_OPTIONS,
                    toPolygons((PolyhedralSurface) geometry));
                break;
            case TIN:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.MULTI_POLYGON_OPTIONS,
                    toPolygons((TIN) geometry));
                break;
            case TRIANGLE:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.POLYGON_OPTIONS,
                    toPolygon((Triangle) geometry));
                break;
            case GEOMETRYCOLLECTION:
                shape = new OsmDroidMapShape(geometryType,
                    OsmMapShapeType.COLLECTION,
                    toShapes((GeometryCollection<Geometry>) geometry));
                break;
            default:
                throw new GeoPackageException("Unsupported Geometry Type: "
                    + geometryType.getName());
        }

        return shape;
    }
974040
@Override
    public GeoBBoxCondition build() {
        return new GeoBBoxCondition(boost, field, minLatitude, maxLatitude, minLongitude, maxLongitude);
    }
1086852
public static String getMapFieldType(Field field) {
        String k = getMapFieldKeyType(field);
        String v = getMapFieldValueType(field);
        return "java.util.Map<" + k + ", " + v + ">";
    }