org.gvsig.fmap.dal.index.spatial.spatialindex
Class SPTLIBRTree
java.lang.Object
org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider
org.gvsig.fmap.dal.index.spatial.spatialindex.SPTLIBRTree
- All Implemented Interfaces:
- org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
public class SPTLIBRTree
- extends org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider
- implements org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
RTree spatial index based in spatial index library:
http://u-foria.org/marioh/spatialindex/index.html
marioh@cs.ucr.edu
It has the problem that spatial index file creation is a bit slowly (in
comparation with other indexes).
| Nested classes/interfaces inherited from class org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider |
org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider.LongList |
|
Method Summary |
void |
clear()
|
void |
close()
|
List |
containtmentQuery(org.gvsig.fmap.geom.primitive.Envelope env)
|
void |
delete(Object value,
org.gvsig.fmap.dal.feature.spi.FeatureReferenceProviderServices fref)
|
boolean |
exists()
If the spatial index file exists and has content |
List |
findNNearest(int numberOfNearest,
org.gvsig.fmap.geom.primitive.Envelope env)
Looks for N indexes nearest to the specified rect. |
List |
findNNearest(int numberOfNearest,
org.gvsig.fmap.geom.primitive.Point point)
Looks for the N indexes nearest to the specified point |
void |
flush()
|
void |
flush(File f)
|
File |
getFile()
|
void |
initialize()
|
void |
insert(org.gvsig.fmap.geom.primitive.Envelope env,
int index)
Warn! |
void |
insert(Object value,
org.gvsig.fmap.dal.feature.spi.FeatureReferenceProviderServices fref)
|
boolean |
isMatchSupported()
|
boolean |
isNearestSupported()
|
boolean |
isNearestToleranceSupported()
|
boolean |
isRangeSupported()
|
void |
load(File f)
|
List |
match(Object value)
|
List |
match(Object min,
Object max)
|
List |
nearest(int count,
Object value)
|
List |
nearest(int count,
Object value,
Object tolerance)
|
List |
range(Object value1,
Object value2)
|
| 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
SPTLIBRTree
public SPTLIBRTree()
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
exists
public boolean exists()
- If the spatial index file exists and has content
containtmentQuery
public List containtmentQuery(org.gvsig.fmap.geom.primitive.Envelope env)
insert
public void insert(org.gvsig.fmap.geom.primitive.Envelope env,
int index)
- Warn! This RTree implemention doesnt care if 'index' entry has been
indexed yet
findNNearest
public List findNNearest(int numberOfNearest,
org.gvsig.fmap.geom.primitive.Envelope env)
- Looks for N indexes nearest to the specified rect.
- Parameters:
numberOfNearest - rect -
- Returns:
findNNearest
public List findNNearest(int numberOfNearest,
org.gvsig.fmap.geom.primitive.Point point)
- Looks for the N indexes nearest to the specified point
- Parameters:
numberOfNearest - point -
- Returns:
flush
public void flush()
load
public void load(File f)
throws org.gvsig.fmap.dal.feature.exception.FeatureIndexException
- Throws:
org.gvsig.fmap.dal.feature.exception.FeatureIndexException
flush
public void flush(File f)
throws org.gvsig.fmap.dal.feature.exception.FeatureIndexException
- Throws:
org.gvsig.fmap.dal.feature.exception.FeatureIndexException
close
public void close()
getFile
public File getFile()
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
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
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
match
public List match(Object min,
Object max)
nearest
public List nearest(int count,
Object value)
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
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
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.