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
pathFilenamestring
RtreeSpatialIndex(string, FileAccess)
public RtreeSpatialIndex(string pathFilename, FileAccess readWriteMode)
Parameters
pathFilenamestringreadWriteModeFileAccess
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
featureFeature
CloseCore()
Close a previously opened index file.
protected override void CloseCore()
CreatePointSpatialIndex(string)
public static void CreatePointSpatialIndex(string pathFilename)
Parameters
pathFilenamestring
CreatePointSpatialIndex(string, RtreeSpatialIndexPageSize)
public static void CreatePointSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize)
Parameters
pathFilenamestringpageSizeRtreeSpatialIndexPageSize
CreatePointSpatialIndex(string, RtreeSpatialIndexPageSize, RtreeSpatialIndexDataFormat)
public static void CreatePointSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize, RtreeSpatialIndexDataFormat dataFormat)
Parameters
pathFilenamestringpageSizeRtreeSpatialIndexPageSizedataFormatRtreeSpatialIndexDataFormat
CreateRectangleSpatialIndex(string)
public static void CreateRectangleSpatialIndex(string pathFilename)
Parameters
pathFilenamestring
CreateRectangleSpatialIndex(string, RtreeSpatialIndexPageSize)
public static void CreateRectangleSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize)
Parameters
pathFilenamestringpageSizeRtreeSpatialIndexPageSize
CreateRectangleSpatialIndex(string, RtreeSpatialIndexPageSize, RtreeSpatialIndexDataFormat)
public static void CreateRectangleSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize, RtreeSpatialIndexDataFormat dataFormat)
Parameters
pathFilenamestringpageSizeRtreeSpatialIndexPageSizedataFormatRtreeSpatialIndexDataFormat
DeleteCore(Feature)
protected override void DeleteCore(Feature feature)
Parameters
featureFeature
DeleteRecord(BaseShape)
public void DeleteRecord(BaseShape shape)
Parameters
shapeBaseShape
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
recordCountintRecord 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
boundingBoxRectangleShape
Returns
GetFeatureIdsContainingRectangleShapeCore(RectangleShape)
protected virtual Collection<string> GetFeatureIdsContainingRectangleShapeCore(RectangleShape rectangleShape)
Parameters
rectangleShapeRectangleShape
Returns
GetFeatureIdsIntersectingBoundingBox(RectangleShape, double, double, int, Collection<RectangleShape>)
public Collection<string> GetFeatureIdsIntersectingBoundingBox(RectangleShape rectangleShape, double screenWidth, double screenHeight, int simplifyPixelBufferSize, Collection<RectangleShape> dimensionlessBoxes)
Parameters
rectangleShapeRectangleShapescreenWidthdoublescreenHeightdoublesimplifyPixelBufferSizeintdimensionlessBoxesCollection<RectangleShape>
Returns
GetFeatureIdsIntersectingBoundingBoxCore(RectangleShape)
protected override Collection<string> GetFeatureIdsIntersectingBoundingBoxCore(RectangleShape boundingBox)
Parameters
boundingBoxRectangleShape
Returns
GetFeatureIdsNearestTo(PointShape, int)
public Collection<string> GetFeatureIdsNearestTo(PointShape pointShape, int maxReturningCount)
Parameters
pointShapePointShapemaxReturningCountint
Returns
GetFeatureIdsNearestToCore(PointShape, int)
protected virtual Collection<string> GetFeatureIdsNearestToCore(PointShape pointShape, int maxReturningCount)
Parameters
pointShapePointShapemaxReturningCountint
Returns
GetFeatureIdsWithinBoundingBox(RectangleShape)
public Collection<string> GetFeatureIdsWithinBoundingBox(RectangleShape boundingBox)
Parameters
boundingBoxRectangleShape
Returns
GetFeatureIdsWithinBoundingBoxCore(RectangleShape)
protected virtual Collection<string> GetFeatureIdsWithinBoundingBoxCore(RectangleShape boundingBox)
Parameters
boundingBoxRectangleShape
Returns
IsRtreeSpatialIndexFileValid(string)
public static bool IsRtreeSpatialIndexFileValid(string indexFileName)
Parameters
indexFileNamestring
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