Table of Contents

Class RtreeSpatialIndex

Namespace
ThinkGeo.Core
Assembly
ThinkGeo.Core.dll

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 string
readWriteMode FileAccess

Properties

DataFormat

public RtreeSpatialIndexDataFormat DataFormat { get; }

Property Value

RtreeSpatialIndexDataFormat

HasIdx

public bool HasIdx { get; }

Property Value

bool

PageSize

Property PageSize.

public int PageSize { get; }

Property Value

int

PathFilename

public string PathFilename { get; set; }

Property Value

string

ReadWriteMode

public FileAccess ReadWriteMode { get; set; }

Property Value

FileAccess

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 string
pageSize RtreeSpatialIndexPageSize

CreatePointSpatialIndex(string, RtreeSpatialIndexPageSize, RtreeSpatialIndexDataFormat)

public static void CreatePointSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize, RtreeSpatialIndexDataFormat dataFormat)

Parameters

pathFilename string
pageSize RtreeSpatialIndexPageSize
dataFormat 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 string
pageSize RtreeSpatialIndexPageSize

CreateRectangleSpatialIndex(string, RtreeSpatialIndexPageSize, RtreeSpatialIndexDataFormat)

public static void CreateRectangleSpatialIndex(string pathFilename, RtreeSpatialIndexPageSize pageSize, RtreeSpatialIndexDataFormat dataFormat)

Parameters

pathFilename string
pageSize RtreeSpatialIndexPageSize
dataFormat 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 int

Record count of ShapeFile.

Returns

RtreeSpatialIndexPageSize

best page size

GetBoundingBox()

public RectangleShape GetBoundingBox()

Returns

RectangleShape

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

Collection<string>

GetFeatureIdsContainingRectangleShapeCore(RectangleShape)

protected virtual Collection<string> GetFeatureIdsContainingRectangleShapeCore(RectangleShape rectangleShape)

Parameters

rectangleShape RectangleShape

Returns

Collection<string>

GetFeatureIdsIntersectingBoundingBox(RectangleShape, double, double, int, 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 int
dimensionlessBoxes Collection<RectangleShape>

Returns

Collection<string>

GetFeatureIdsIntersectingBoundingBoxCore(RectangleShape)

protected override Collection<string> GetFeatureIdsIntersectingBoundingBoxCore(RectangleShape boundingBox)

Parameters

boundingBox RectangleShape

Returns

Collection<string>

GetFeatureIdsNearestTo(PointShape, int)

public Collection<string> GetFeatureIdsNearestTo(PointShape pointShape, int maxReturningCount)

Parameters

pointShape PointShape
maxReturningCount int

Returns

Collection<string>

GetFeatureIdsNearestToCore(PointShape, int)

protected virtual Collection<string> GetFeatureIdsNearestToCore(PointShape pointShape, int maxReturningCount)

Parameters

pointShape PointShape
maxReturningCount int

Returns

Collection<string>

GetFeatureIdsWithinBoundingBox(RectangleShape)

public Collection<string> GetFeatureIdsWithinBoundingBox(RectangleShape boundingBox)

Parameters

boundingBox RectangleShape

Returns

Collection<string>

GetFeatureIdsWithinBoundingBoxCore(RectangleShape)

protected virtual Collection<string> GetFeatureIdsWithinBoundingBoxCore(RectangleShape boundingBox)

Parameters

boundingBox RectangleShape

Returns

Collection<string>

IsRtreeSpatialIndexFileValid(string)

public static bool IsRtreeSpatialIndexFileValid(string indexFileName)

Parameters

indexFileName string

Returns

bool

OnStreamLoading(StreamLoadingEventArgs)

protected virtual void OnStreamLoading(StreamLoadingEventArgs e)

Parameters

e StreamLoadingEventArgs

OpenCore()

Open an existing index file as read only.

protected override void OpenCore()

RefreshCache()

public void RefreshCache()

Events

StreamLoading

public event EventHandler<StreamLoadingEventArgs> StreamLoading

Event Type

EventHandler<StreamLoadingEventArgs>