org.gvsig.fmap.dal.index.spatial.gt2
Class GT2Quadtree
java.lang.Object
org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider
org.gvsig.fmap.dal.index.spatial.gt2.GT2Quadtree
- All Implemented Interfaces:
- org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
public class GT2Quadtree
- extends org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider
- implements org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProvider
This Quadtree spatial index implementation is based in a fork of
org.geotools.index.quadtree.Quadtree implementation.
This implementation offers us:
- Persistence of spatial index
We had to fork geotools quadtree for many reasons:
- It was strongly dependent of SHP format, so it returned not only a num of
rectangle, it also returned byte offset of this rectangle in shp file
- Query artifact wasnt run well at all
- Author:
- azabala
| Nested classes/interfaces inherited from class org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider |
org.gvsig.fmap.dal.feature.spi.index.AbstractFeatureIndexProvider.LongList |
| 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
GT2Quadtree
public GT2Quadtree()
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
load
public void load()
throws org.gvsig.fmap.dal.feature.exception.FeatureIndexException
- Throws:
org.gvsig.fmap.dal.feature.exception.FeatureIndexException
load
public void load(File f)
throws org.gvsig.fmap.dal.feature.exception.FeatureIndexException
- Throws:
org.gvsig.fmap.dal.feature.exception.FeatureIndexException
insert
public void insert(org.gvsig.fmap.geom.primitive.Envelope env,
int index)
- Inserts an object in the index
delete
public void delete(org.gvsig.fmap.geom.primitive.Envelope env,
int index)
toJtsEnvelope
public com.vividsolutions.jts.geom.Envelope toJtsEnvelope(org.gvsig.fmap.geom.primitive.Envelope env)
flush
public void flush()
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
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
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.