01: package org.geotools.caching.util;
02:
03: import com.vividsolutions.jts.geom.Envelope;
04:
05: import org.geotools.caching.spatialindex.spatialindex.Region;
06:
07: public class IndexUtilities {
08: /** Transform a JTS Envelope to a Region
09: *
10: * @param JTS Envelope
11: * @return Region
12: */
13: public static Region toRegion(final Envelope e) {
14: Region r = new Region(
15: new double[] { e.getMinX(), e.getMinY() },
16: new double[] { e.getMaxX(), e.getMaxY() });
17:
18: return r;
19: }
20: }
|