C# Class GeoCache.Common.Repository.MongoRepository

Implementation class for Mongo data repository
Inheritance: INoSqlRepository
Show file Open project: OliveiraThales/GeoCache Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Dispose

GetAll ( string featureClassName ) : IEnumerable

Get all geometries from a featureClass

GetByEnvelope ( string featureClassName, IEnvelope envelope ) : IEnumerable

Get all geometries inside the envelope from a featureClass

GetFullExtent ( string featureClassName ) : IEnvelope

Get full extent of featureClass

Insert ( string featureClassName, IGeometry geometry ) : void

Insert a document in the data repository.

MongoRepository ( ) : System.Collections.Generic

Constructor

RemoveAll ( string featureClassName ) : void

Remove all the data from the repository.

Private Methods

Method Description
Connect ( ) : void

Connect to mongo server

Deserialize ( byte bytes ) : Geometry.Geometry

Deserialize a geometry

GetCollection ( string collectionName ) : MongoCollection

Get the collection from cache

Parser ( BsonDocument document ) : IGeometry

Parse mongo document to Geometry

Serialize ( Geometry geometry ) : byte[]

Serialize a geometry

Method Details

Dispose() public method

Dispose
public Dispose ( ) : void
return void

GetAll() public method

Get all geometries from a featureClass
public GetAll ( string featureClassName ) : IEnumerable
featureClassName string FeatureClass name
return IEnumerable

GetByEnvelope() public method

Get all geometries inside the envelope from a featureClass
public GetByEnvelope ( string featureClassName, IEnvelope envelope ) : IEnumerable
featureClassName string FeatureClass name
envelope IEnvelope Envelope
return IEnumerable

GetFullExtent() public method

Get full extent of featureClass
public GetFullExtent ( string featureClassName ) : IEnvelope
featureClassName string FeatureClass name
return IEnvelope

Insert() public method

Insert a document in the data repository.
public Insert ( string featureClassName, IGeometry geometry ) : void
featureClassName string featureClassName
geometry IGeometry /// O documento ///
return void

MongoRepository() public method

Constructor
public MongoRepository ( ) : System.Collections.Generic
return System.Collections.Generic

RemoveAll() public method

Remove all the data from the repository.
public RemoveAll ( string featureClassName ) : void
featureClassName string
return void