org.gvsig.fmap.dal.index.spatial.jsi
Class JSIRTree
java.lang.Object
org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider
org.gvsig.fmap.dal.index.spatial.jsi.JSIRTree
- All Implemented Interfaces:
- org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
- Direct Known Subclasses:
- JSIPersistentRTree
public class JSIRTree
- extends org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider
- implements org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
RTree spatial index implementation based in library
JSI (java spatial index).
http://jsi.sourceforge.net/
This RTree has better performance that Spatial Index Library
RTree, and that JTS'RTree, because
it uses the GNU's Trove Collections API.
We are doing some probes with it, because it offers
a Nearest Neighbour algorithm implementation
(useful for Spatial Join geoprocess, for example).
It isnt persistent, and We've found some problems
with delete operations.
- Author:
- azabala, jyarza
| Nested classes/interfaces inherited from class org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider |
org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider.LongList |
|
Field Summary |
static String |
NAME
|
protected com.infomatiq.jsi.rtree.RTree |
rtree
|
| Methods inherited from class org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider |
allowNulls, getFeatureIndexProviderServices, setFeatureIndexProviderServices |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider |
allowNulls, setFeatureIndexProviderServices |
NAME
public static final String NAME
rtree
protected com.infomatiq.jsi.rtree.RTree rtree
JSIRTree
public JSIRTree()
initialize
public void initialize()
throws org.gvsig.fmap.dal.exception.InitializeException
- Specified by:
initialize in interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider- Overrides:
initialize in class org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider
- Throws:
org.gvsig.fmap.dal.exception.InitializeException
findNNearest
protected List findNNearest(int numberOfNearest,
org.gvsig.fmap.geom.primitive.Point point)
iterator
public Iterator iterator()
size
public int size()
toJsiRect
protected com.infomatiq.jsi.Rectangle toJsiRect(org.gvsig.fmap.geom.primitive.Envelope env)
insert
public void insert(Object value,
org.gvsig.fmap.dal.feature.spi.FeatureReferenceProviderServices fref)
- Specified by:
insert in interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
delete
public void delete(Object value,
org.gvsig.fmap.dal.feature.spi.FeatureReferenceProviderServices fref)
- Specified by:
delete in interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
match
public List match(Object value)
throws org.gvsig.fmap.dal.feature.exception.FeatureIndexException
- Specified by:
match in interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
- Throws:
org.gvsig.fmap.dal.feature.exception.FeatureIndexException
nearest
public List nearest(int count,
Object value)
- Specified by:
nearest in interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
isMatchSupported
public boolean isMatchSupported()
- Specified by:
isMatchSupported in interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
isNearestSupported
public boolean isNearestSupported()
- Specified by:
isNearestSupported in interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
isNearestToleranceSupported
public boolean isNearestToleranceSupported()
- Specified by:
isNearestToleranceSupported in interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
isRangeSupported
public boolean isRangeSupported()
- Specified by:
isRangeSupported in interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
nearest
public List nearest(int count,
Object value,
Object tolerance)
throws org.gvsig.fmap.dal.feature.exception.FeatureIndexException
- Specified by:
nearest in interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
- Throws:
org.gvsig.fmap.dal.feature.exception.FeatureIndexException
range
public List range(Object value1,
Object value2)
throws org.gvsig.fmap.dal.feature.exception.FeatureIndexException
- Specified by:
range in interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
- Throws:
org.gvsig.fmap.dal.feature.exception.FeatureIndexException
getEnvelope
protected org.gvsig.fmap.geom.primitive.Envelope getEnvelope(Object value)
clear
public void clear()
throws org.gvsig.fmap.dal.exception.DataException
- Specified by:
clear in interface org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
- Throws:
org.gvsig.fmap.dal.exception.DataException
Copyright © 2004-2013 gvSIG. All Rights Reserved.