RtreeSpatialIndex¶
Namespace: ThinkGeo.Core
Rtree is a facade class of MapSuiteRtree.
public class RtreeSpatialIndex : SpatialIndex, System.IDisposable
Inheritance Object → SpatialIndex → RtreeSpatialIndex
Implements IDisposable
Properties¶
PathFilename¶
public string PathFilename { get; set; }
Property Value¶
ReadWriteMode¶
public FileAccess ReadWriteMode { get; set; }
Property Value¶
DataFormat¶
public RtreeSpatialIndexDataFormat DataFormat { get; }
Property Value¶
HasIdx¶
public bool HasIdx { get; }
Property Value¶
PageSize¶
Property PageSize.
public int PageSize { get; }
Property Value¶
IsOpen¶
public bool IsOpen { get; }
Property Value¶
CanDelete¶
public bool CanDelete { get; protected set; }
Property Value¶
Constructors¶
RtreeSpatialIndex()¶
DefauLb constructor.
public RtreeSpatialIndex()
RtreeSpatialIndex(String)¶
public RtreeSpatialIndex(string pathFilename)
Parameters¶
pathFilename String
RtreeSpatialIndex(String, FileAccess)¶
public RtreeSpatialIndex(string pathFilename, FileAccess readWriteMode)
Parameters¶
pathFilename String
readWriteMode FileAccess
Methods¶
Finalize()¶
protected void Finalize()
Dispose()¶
This method is targeting releasing or resetting unmanaged resources.
public void Dispose()
OnStreamLoading(StreamLoadingEventArgs)¶
protected void OnStreamLoading(StreamLoadingEventArgs e)
Parameters¶
RefreshCache()¶
public void RefreshCache()
DeleteCore(Feature)¶
protected void DeleteCore(Feature feature)
Parameters¶
feature Feature
AddCore(Feature)¶
protected void AddCore(Feature feature)
Parameters¶
feature Feature
GetFeatureIdsIntersectingBoundingBoxCore(RectangleShape)¶
protected Collection<string> GetFeatureIdsIntersectingBoundingBoxCore(RectangleShape boundingBox)
Parameters¶
boundingBox RectangleShape
Returns¶
GetFeatureIdsWithinBoundingBox(RectangleShape)¶
public Collection<string> GetFeatureIdsWithinBoundingBox(RectangleShape boundingBox)
Parameters¶
boundingBox RectangleShape
Returns¶
GetFeatureIdsWithinBoundingBoxCore(RectangleShape)¶
protected Collection<string> GetFeatureIdsWithinBoundingBoxCore(RectangleShape boundingBox)
Parameters¶
boundingBox RectangleShape
Returns¶
GetFeatureIdsContainingRectangleShape(RectangleShape)¶
public Collection<string> GetFeatureIdsContainingRectangleShape(RectangleShape boundingBox)
Parameters¶
boundingBox RectangleShape
Returns¶
GetFeatureIdsContainingRectangleShapeCore(RectangleShape)¶
protected Collection<string> GetFeatureIdsContainingRectangleShapeCore(RectangleShape rectangleShape)
Parameters¶
rectangleShape RectangleShape
Returns¶
GetFeatureIdsNearestTo(PointShape, Int32)¶
public Collection<string> GetFeatureIdsNearestTo(PointShape pointShape, int maxReturningCount)
Parameters¶
pointShape PointShape
maxReturningCount Int32
Returns¶
GetFeatureIdsNearestToCore(PointShape, Int32)¶
protected Collection<string> GetFeatureIdsNearestToCore(PointShape pointShape, int maxReturningCount)
Parameters¶
pointShape PointShape
maxReturningCount Int32
Returns¶
GetBestPageSize(Int32)¶
Static method for getting the best page size according to the record count of a ShapeFile.
public static RtreeSpatialIndexPageSize GetBestPageSize(int recordCount)
Parameters¶
recordCount Int32
Record count of ShapeFile.
Returns¶
RtreeSpatialIndexPageSize
best page size
GetRoot()¶
Get the root node.
internal Node GetRoot()
Returns¶
Node
root node
CreateRectangleSpatialIndex(String)¶
public static void CreateRectangleSpatialIndex(string pathFilename)
Parameters¶
pathFilename String
CreateRectangleSpatialIndex(String, RtreeSpatialIndexPageSize)¶
public static void CreateRectangleSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize)
Parameters¶
pathFilename String
pageSize RtreeSpatialIndexPageSize
CreateRectangleSpatialIndex(String, RtreeSpatialIndexPageSize, RtreeSpatialIndexDataFormat)¶
public static void CreateRectangleSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize, RtreeSpatialIndexDataFormat dataFormat)
Parameters¶
pathFilename String
pageSize RtreeSpatialIndexPageSize
dataFormat RtreeSpatialIndexDataFormat
CreatePointSpatialIndex(String)¶
public static void CreatePointSpatialIndex(string pathFilename)
Parameters¶
pathFilename String
CreatePointSpatialIndex(String, RtreeSpatialIndexPageSize)¶
public static void CreatePointSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize)
Parameters¶
pathFilename String
pageSize RtreeSpatialIndexPageSize
CreatePointSpatialIndex(String, RtreeSpatialIndexPageSize, RtreeSpatialIndexDataFormat)¶
public static void CreatePointSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize, RtreeSpatialIndexDataFormat dataFormat)
Parameters¶
pathFilename String
pageSize RtreeSpatialIndexPageSize
dataFormat RtreeSpatialIndexDataFormat
IsRtreeSpatialIndexFileValid(String)¶
public static bool IsRtreeSpatialIndexFileValid(string indexFileName)
Parameters¶
indexFileName String
Returns¶
OpenCore()¶
Open an existing index file as read only.
protected void OpenCore()
CloseCore()¶
Close a previously opened index file.
protected void CloseCore()
Flush()¶
Write memory to disk if modified.
public void Flush()
GetFeatureIdsIntersectingBoundingBox(RectangleShape, Double, Double, Int32, Collection<RectangleShape>)¶
public Collection<string> GetFeatureIdsIntersectingBoundingBox(RectangleShape rectangleShape, double screenWidth, double screenHeight, int simplifyPixelBufferSize, Collection<RectangleShape> dimensionlessBoxes)
Parameters¶
rectangleShape RectangleShape
screenWidth Double
screenHeight Double
simplifyPixelBufferSize Int32
dimensionlessBoxes Collection<RectangleShape>
Returns¶
GetFeatureCountCore()¶
Get the count of all records in all leaf nodes.
protected int GetFeatureCountCore()
Returns¶
Int32
record count
GetBoundingBox()¶
public RectangleShape GetBoundingBox()
Returns¶
DeleteRecord(BaseShape)¶
public void DeleteRecord(BaseShape shape)
Parameters¶
shape BaseShape
Events¶
StreamLoading¶
public event EventHandler<StreamLoadingEventArgs> StreamLoading;