Class RtreeSpatialIndex
Rtree is a facade class of MapSuiteRtree.
public class RtreeSpatialIndex : SpatialIndex, IDisposable
- Inheritance
-
RtreeSpatialIndex
- Implements
- Inherited Members
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
stringreadWriteMode
FileAccess
Properties
DataFormat
public RtreeSpatialIndexDataFormat DataFormat { get; }
Property Value
HasIdx
public bool HasIdx { get; }
Property Value
PageSize
Property PageSize.
public int PageSize { get; }
Property Value
PathFilename
public string PathFilename { get; set; }
Property Value
ReadWriteMode
public FileAccess ReadWriteMode { get; set; }
Property Value
Methods
AddCore(Feature)
protected override void AddCore(Feature feature)
Parameters
feature
Feature
CloseCore()
Close a previously opened index file.
protected override void CloseCore()
CreatePointSpatialIndex(string)
public static void CreatePointSpatialIndex(string pathFilename)
Parameters
pathFilename
string
CreatePointSpatialIndex(string, RtreeSpatialIndexPageSize)
public static void CreatePointSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize)
Parameters
pathFilename
stringpageSize
RtreeSpatialIndexPageSize
CreatePointSpatialIndex(string, RtreeSpatialIndexPageSize, RtreeSpatialIndexDataFormat)
public static void CreatePointSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize, RtreeSpatialIndexDataFormat dataFormat)
Parameters
pathFilename
stringpageSize
RtreeSpatialIndexPageSizedataFormat
RtreeSpatialIndexDataFormat
CreateRectangleSpatialIndex(string)
public static void CreateRectangleSpatialIndex(string pathFilename)
Parameters
pathFilename
string
CreateRectangleSpatialIndex(string, RtreeSpatialIndexPageSize)
public static void CreateRectangleSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize)
Parameters
pathFilename
stringpageSize
RtreeSpatialIndexPageSize
CreateRectangleSpatialIndex(string, RtreeSpatialIndexPageSize, RtreeSpatialIndexDataFormat)
public static void CreateRectangleSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize, RtreeSpatialIndexDataFormat dataFormat)
Parameters
pathFilename
stringpageSize
RtreeSpatialIndexPageSizedataFormat
RtreeSpatialIndexDataFormat
DeleteCore(Feature)
protected override void DeleteCore(Feature feature)
Parameters
feature
Feature
DeleteRecord(BaseShape)
public void DeleteRecord(BaseShape shape)
Parameters
shape
BaseShape
Dispose()
This method is targeting releasing or resetting unmanaged resources.
public void Dispose()
~RtreeSpatialIndex()
protected ~RtreeSpatialIndex()
Flush()
Write memory to disk if modified.
public void Flush()
GetBestPageSize(int)
Static method for getting the best page size according to the record count of a ShapeFile.
public static RtreeSpatialIndexPageSize GetBestPageSize(int recordCount)
Parameters
recordCount
intRecord count of ShapeFile.
Returns
- RtreeSpatialIndexPageSize
best page size
GetBoundingBox()
public RectangleShape GetBoundingBox()
Returns
GetFeatureCountCore()
Get the count of all records in all leaf nodes.
protected override int GetFeatureCountCore()
Returns
- int
record count
GetFeatureIdsContainingRectangleShape(RectangleShape)
public Collection<string> GetFeatureIdsContainingRectangleShape(RectangleShape boundingBox)
Parameters
boundingBox
RectangleShape
Returns
GetFeatureIdsContainingRectangleShapeCore(RectangleShape)
protected virtual Collection<string> GetFeatureIdsContainingRectangleShapeCore(RectangleShape rectangleShape)
Parameters
rectangleShape
RectangleShape
Returns
GetFeatureIdsIntersectingBoundingBox(RectangleShape, double, double, int, Collection<RectangleShape>)
public Collection<string> GetFeatureIdsIntersectingBoundingBox(RectangleShape rectangleShape, double screenWidth, double screenHeight, int simplifyPixelBufferSize, Collection<RectangleShape> dimensionlessBoxes)
Parameters
rectangleShape
RectangleShapescreenWidth
doublescreenHeight
doublesimplifyPixelBufferSize
intdimensionlessBoxes
Collection<RectangleShape>
Returns
GetFeatureIdsIntersectingBoundingBoxCore(RectangleShape)
protected override Collection<string> GetFeatureIdsIntersectingBoundingBoxCore(RectangleShape boundingBox)
Parameters
boundingBox
RectangleShape
Returns
GetFeatureIdsNearestTo(PointShape, int)
public Collection<string> GetFeatureIdsNearestTo(PointShape pointShape, int maxReturningCount)
Parameters
pointShape
PointShapemaxReturningCount
int
Returns
GetFeatureIdsNearestToCore(PointShape, int)
protected virtual Collection<string> GetFeatureIdsNearestToCore(PointShape pointShape, int maxReturningCount)
Parameters
pointShape
PointShapemaxReturningCount
int
Returns
GetFeatureIdsWithinBoundingBox(RectangleShape)
public Collection<string> GetFeatureIdsWithinBoundingBox(RectangleShape boundingBox)
Parameters
boundingBox
RectangleShape
Returns
GetFeatureIdsWithinBoundingBoxCore(RectangleShape)
protected virtual Collection<string> GetFeatureIdsWithinBoundingBoxCore(RectangleShape boundingBox)
Parameters
boundingBox
RectangleShape
Returns
IsRtreeSpatialIndexFileValid(string)
public static bool IsRtreeSpatialIndexFileValid(string indexFileName)
Parameters
indexFileName
string
Returns
OnStreamLoading(StreamLoadingEventArgs)
protected virtual void OnStreamLoading(StreamLoadingEventArgs e)
Parameters
OpenCore()
Open an existing index file as read only.
protected override void OpenCore()
RefreshCache()
public void RefreshCache()
Events
StreamLoading
public event EventHandler<StreamLoadingEventArgs> StreamLoading