Convert JTS envelope into a {@link Bbox}.

@param envelope
JTS envelope
@return Geomajas {@link Bbox}
199515
public Bbox toDto(Envelope envelope) {
		return new Bbox(envelope.getMinX(), envelope.getMinY(), envelope.getWidth(), envelope.getHeight());
	}
102366
public static function createNotMerged(Envelope $envelope, \Exception $e = null)
    {
        $message = 'The given DigiDoc envelope must be merged with Api (using Api::merge) before calling this method.';

        return new static($message, null, $e);
    }
91119
public void schedule(Envelope envelope, long time) {
        if (envelope.getMailbox() != this) {
            throw new RuntimeException("envelope.mailbox != this mailbox");
        }

        envelopes.putEnvelope(envelope, time);
    }
1316381
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "boundingBox")
    public JAXBElement<EnvelopeType> createBoundingBox(EnvelopeType value) {
        return new JAXBElement<EnvelopeType>(_BoundingBox_QNAME, EnvelopeType.class, null, value);
    }
497757
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "verticalExtent")
    public JAXBElement<EnvelopeType> createVerticalExtent(EnvelopeType value) {
        return new JAXBElement<EnvelopeType>(_VerticalExtent_QNAME, EnvelopeType.class, null, value);
    }
1306375
public static String envelope2WKT(org.locationtech.jts.geom.Envelope env) {
        GeometryFactory gf = GeometryUtilities.gf();
        Geometry geometry = gf.toGeometry(env);
        return geometry.toText();
    }
466689
static Map<String, Object> maxPayload(final Object max) {
		if (max == null) {
			return null;
		}
		Map<String, Object> payload = new LinkedHashMap<>();
		payload.put("value", max);
		payload.put("message", MSG_PREFIX + VALIDATORS.get(Max.class));
		return payload;
	}
430792
public Envelope toInternal(Bbox bbox) {
		return new Envelope(bbox.getX(), bbox.getMaxX(), bbox.getY(), bbox.getMaxY());
	}
87152
static public GeographyValue decodeGeography(final ByteBuffer bb) {
        final int strLength = bb.getInt();
        final int startPosition = bb.position();
        GeographyValue gv = GeographyValue.unflattenFromBuffer(bb);
        assert(bb.position() - startPosition == strLength);
        return gv;
    }
1062971
public BoundingBox boundingBoxToWebMercator(BoundingBox boundingBox) {
        if (projection == null) {
            throw new GeoPackageException("Shape Converter projection is null");
        }
        return boundingBox.transform(toWebMercator);
    }
1148014
public long count(GeometryEnvelope envelope) {
		long count = 0;
		switch (getIndexedType()) {
		case GEOPACKAGE:
			count = featureTableIndex.count(envelope);
			break;
		case RTREE:
			count = rTreeIndexTableDao.count(envelope);
			break;
		default:
			count = manualFeatureQuery.count(envelope);
		}
		return count;
	}
1210548
public Polygon createPolygon(Bbox bbox) {
		Coordinate tl = new Coordinate(bbox.getX(), bbox.getY());
		Coordinate tr = new Coordinate(bbox.getX() + bbox.getWidth(), bbox.getY());
		Coordinate br = new Coordinate(bbox.getX() + bbox.getWidth(), bbox.getY() + bbox.getHeight());
		Coordinate bl = new Coordinate(bbox.getX(), bbox.getY() + bbox.getHeight());
		return new Polygon(srid, precision, new LinearRing(srid, precision, new Coordinate[] { tl, tr, br, bl, tl }),
				null);
	}
125074
public static <T> T mapToBean(Map<?, ?> map, Class<T> beanClass, CopyOptions copyOptions) {
		return fillBeanWithMap(map, ReflectUtil.newInstance(beanClass), copyOptions);
	}
431294
public static Map<String, EntryValue> convertBeanToEntryMap(Object bean) {
        Map<String, Object> buildAttributeValueMap = BeanUtilsExtended.buildObjectAttributeMap(bean);
        return Maps.transformEntries(buildAttributeValueMap, new ObjectToEntryValueTransformer());
    }
175854
public String toGeoJsonEnvelope(Envelope e) {
        return new StringBuffer().append("[").append(e.getMinX()).append(",")
                .append(e.getMinY()).append(",").append(e.getMaxX()).append(",")
                .append(e.getMaxY()).append("]").toString();
    }
1037797
public static Polygon envelopeToPolygon( Envelope2D envelope ) {
        double w = envelope.getMinX();
        double e = envelope.getMaxX();
        double s = envelope.getMinY();
        double n = envelope.getMaxY();

        Coordinate[] coords = new Coordinate[5];
        coords[0] = new Coordinate(w, n);
        coords[1] = new Coordinate(e, n);
        coords[2] = new Coordinate(e, s);
        coords[3] = new Coordinate(w, s);
        coords[4] = new Coordinate(w, n);

        GeometryFactory gf = GeometryUtilities.gf();
        LinearRing linearRing = gf.createLinearRing(coords);
        Polygon polygon = gf.createPolygon(linearRing, null);
        return polygon;
    }
606317
protected String safeGetPostbackPayload(MessageEnvelope envelope) {
		if (envelope != null && envelope.getPostback() != null
				&& envelope.getPostback().getPayload() != null) {
			return envelope.getPostback().getPayload();
		}
		return "";
	}