Table of Contents

Class TinyGeoFeatureLayer

Namespace
ThinkGeo.Core
Assembly
ThinkGeo.Core.dll

This class represents a FeatureLayer of TinyGeo File by ThinkGeo.

public class TinyGeoFeatureLayer : FeatureLayer
Inheritance
TinyGeoFeatureLayer
Inherited Members

Remarks

None

Constructors

TinyGeoFeatureLayer()

This is the class constructor.

public TinyGeoFeatureLayer()

Remarks

None

TinyGeoFeatureLayer(string)

This is the class constructor.

public TinyGeoFeatureLayer(string tinyGeoPathFilename)

Parameters

tinyGeoPathFilename string

Remarks

None

TinyGeoFeatureLayer(string, string)

This is the class constructor.

public TinyGeoFeatureLayer(string tinyGeoPathFilename, string password)

Parameters

tinyGeoPathFilename string
password string

This parameter represents the password to the .tgeo file.

Remarks

None

Properties

HasBoundingBox

public override bool HasBoundingBox { get; }

Property Value

bool

Password

This property gets or sets the password of the TinyGeo file.

public string Password { get; set; }

Property Value

string

TinyGeoPathFilename

This property returns the path and file of the TinyGeo file you want to use.

public string TinyGeoPathFilename { get; set; }

Property Value

string

Remarks

When you specify the path and file name it should be in the correct format as such however the file does not need to exists on the file system. This is to allow us to accept streams supplied by the developer at runtime. If you choose to provide a file that exists then we will attempt to use it. If we cannot find it then we will raise the SteamLoading event and allow you to supply the stream. For example you can pass in "C:\NotARealPath\File1.tgeo" which does not exists on the file system. When we raise the event for you to supply a stream we will pass to you the path and file name for you to differentiate the files.

Exceptions

ArgumentException

Setting an invalid FilePathName structure will thrown an ArgumentException.

Methods

CreateTinyGeoFile(string, string, GeographyUnit, IEnumerable<string>)

Static API to create a new TinyGeo file from an existed shape file.

public static void CreateTinyGeoFile(string tinyGeoPathFilename, string shapePathFilename, GeographyUnit unitOfData, IEnumerable<string> columnNames)

Parameters

tinyGeoPathFilename string

This parameter specifies the file name for the target TinyGeo file.

shapePathFilename string

This parameter specifies the file name for the existed shape file.

unitOfData GeographyUnit

This parameter specifies the Geography Unit of the data.

columnNames IEnumerable<string>

This parameter specifies the columns in shape file which will be copied to TinyGeo file.

CreateTinyGeoFile(string, string, GeographyUnit, IEnumerable<string>, double)

Static API to create a new TinyGeo file from an existed shape file.

public static void CreateTinyGeoFile(string tinyGeoPathFilename, string shapePathFilename, GeographyUnit unitOfData, IEnumerable<string> columnNames, double precisionInMeter)

Parameters

tinyGeoPathFilename string

This parameter specifies the file name for the target TinyGeo file.

shapePathFilename string

This parameter specifies the file name for the existed shape file.

unitOfData GeographyUnit

This parameter specifies the Geography Unit of the data.

columnNames IEnumerable<string>

This parameter specifies the columns in shape file which will be copied to TinyGeo file.

precisionInMeter double

This parameter spcifies in double what is the precision in Meter of the target TinyGeo file.

CreateTinyGeoFile(string, string, GeographyUnit, IEnumerable<string>, string)

Static API to create a new TinyGeo file from an existed shape file.

public static void CreateTinyGeoFile(string tinyGeoPathFilename, string shapePathFilename, GeographyUnit unitOfData, IEnumerable<string> columnNames, string password)

Parameters

tinyGeoPathFilename string

This parameter specifies the file name for the target TinyGeo file.

shapePathFilename string

This parameter specifies the file name for the existed shape file.

unitOfData GeographyUnit

This parameter specifies the Geography Unit of the data.

columnNames IEnumerable<string>

This parameter specifies the columns in shape file which will be copied to TinyGeo file.

password string

This parameter spcifies the password of the target TinyGeo file.

CreateTinyGeoFile(string, string, GeographyUnit, IEnumerable<string>, string, double)

Static API to create a new TinyGeo file from an existed shape file.

public static void CreateTinyGeoFile(string tinyGeoPathFilename, string shapePathFilename, GeographyUnit unitOfData, IEnumerable<string> columnNames, string password, double precisionInMeter)

Parameters

tinyGeoPathFilename string

This parameter specifies the file name for the target TinyGeo file.

shapePathFilename string

This parameter specifies the file name for the existed shape file.

unitOfData GeographyUnit

This parameter specifies the Geography Unit of the data.

columnNames IEnumerable<string>

This parameter specifies the columns in shape file which will be copied to TinyGeo file.

password string

This parameter spcifies the password of the target TinyGeo file.

precisionInMeter double

This parameter spcifies in double what is the precision in Meter of the target TinyGeo file.

CreateTinyGeoFile(string, string, GeographyUnit, IEnumerable<string>, string, double, Encoding)

Static API to create a new TinyGeo file from an existed shape file.

public static void CreateTinyGeoFile(string tinyGeoPathFilename, string shapePathFilename, GeographyUnit unitOfData, IEnumerable<string> columnNames, string password, double precisionInMeter, Encoding shapeEncoding)

Parameters

tinyGeoPathFilename string

This parameter specifies the file name for the target TinyGeo file.

shapePathFilename string

This parameter specifies the file name for the existed shape file.

unitOfData GeographyUnit

This parameter specifies the Geography Unit of the data.

columnNames IEnumerable<string>

This parameter specifies the columns in shape file which will be copied to TinyGeo file.

password string

This parameter spcifies the password of the target TinyGeo file.

precisionInMeter double

This parameter spcifies in double what is the precision in Meter of the target TinyGeo file.

shapeEncoding Encoding

This parameter specifies the encoding of the existed shape file.

CreateTinyGeoFile(string, string, GeographyUnit, ReturningColumnsType)

Static API to create a new TinyGeo file from an existed shape file.

public static void CreateTinyGeoFile(string tinyGeoPathFilename, string shapePathFilename, GeographyUnit unitOfData, ReturningColumnsType returningColumnType)

Parameters

tinyGeoPathFilename string

This parameter specifies the file name for the target TinyGeo file.

shapePathFilename string

This parameter specifies the file name for the existed shape file.

unitOfData GeographyUnit

This parameter specifies the Geography Unit of the data.

returningColumnType ReturningColumnsType

This parameter specifies whether the columns info in shape file will be copied to TinyGeo file.

CreateTinyGeoFile(string, string, GeographyUnit, ReturningColumnsType, double)

Static API to create a new TinyGeo file from an existed shape file.

public static void CreateTinyGeoFile(string tinyGeoPathFilename, string shapePathFilename, GeographyUnit unitOfData, ReturningColumnsType returningColumnType, double precisionInMeter)

Parameters

tinyGeoPathFilename string

This parameter specifies the file name for the target TinyGeo file.

shapePathFilename string

This parameter specifies the file name for the existed shape file.

unitOfData GeographyUnit

This parameter specifies the Geography Unit of the data.

returningColumnType ReturningColumnsType

This parameter specifies whether the columns info in shape file will be copied to TinyGeo file.

precisionInMeter double

This parameter spcifies in double what is the precision in Meter of the target TinyGeo file.

CreateTinyGeoFile(string, string, GeographyUnit, ReturningColumnsType, string)

Static API to create a new TinyGeo file from an existed shape file.

public static void CreateTinyGeoFile(string tinyGeoPathFilename, string shapePathFilename, GeographyUnit unitOfData, ReturningColumnsType returningColumnType, string password)

Parameters

tinyGeoPathFilename string

This parameter specifies the file name for the target TinyGeo file.

shapePathFilename string

This parameter specifies the file name for the existed shape file.

unitOfData GeographyUnit

This parameter specifies the Geography Unit of the data.

returningColumnType ReturningColumnsType

This parameter specifies whether the columns info in shape file will be copied to TinyGeo file.

password string

This parameter spcifies the password of the target TinyGeo file.

CreateTinyGeoFile(string, string, GeographyUnit, ReturningColumnsType, string, double)

Static API to create a new TinyGeo file from an existed shape file.

public static void CreateTinyGeoFile(string tinyGeoPathFilename, string shapePathFilename, GeographyUnit unitOfData, ReturningColumnsType returningColumnType, string password, double precisionInMeter)

Parameters

tinyGeoPathFilename string

This parameter specifies the file name for the target TinyGeo file.

shapePathFilename string

This parameter specifies the file name for the existed shape file.

unitOfData GeographyUnit

This parameter specifies the Geography Unit of the data.

returningColumnType ReturningColumnsType

This parameter specifies whether the columns info in shape file will be copied to TinyGeo file.

password string

This parameter spcifies the password of the target TinyGeo file.

precisionInMeter double

This parameter spcifies in double what is the precision in Meter of the target TinyGeo file.

CreateTinyGeoFile(string, FeatureLayer, GeographyUnit, IEnumerable<string>, string, double, Encoding, WellKnownType)

public static void CreateTinyGeoFile(string tinyGeoPathFilename, FeatureLayer featureLayer, GeographyUnit unitOfData, IEnumerable<string> columnNames, string password, double precisionInMeter, Encoding shapeEncoding, WellKnownType type)

Parameters

tinyGeoPathFilename string
featureLayer FeatureLayer
unitOfData GeographyUnit
columnNames IEnumerable<string>
password string
precisionInMeter double
shapeEncoding Encoding
type WellKnownType

DecryptTinyGeoFile(string, string, string)

Decrypt an existed encrypted TinyGeo File and save it as a new TinyGeo File.

public static void DecryptTinyGeoFile(string encryptedTinyGeoPathFilename, string decryptedTinyGeoPathFilename, string password)

Parameters

encryptedTinyGeoPathFilename string

This parameter specifies the file name for the source encrypted TinyGeo file.

decryptedTinyGeoPathFilename string

This parameter specifies the file name for the target decrypted TinyGeo file.

password string

This parameter specified the password of the source encrypted TinyGeo file.

EncryptTinyGeoFile(string, string, string)

Encrypt an existed TinyGeo File and save it as a new TinyGeo File.

public static void EncryptTinyGeoFile(string unencryptedTinyGeoPathFilename, string encryptedTinyGeoPathFilename, string password)

Parameters

unencryptedTinyGeoPathFilename string

This parameter specifies the file name for the source unencrypted TinyGeo file.

encryptedTinyGeoPathFilename string

This parameter specifies the file name for the target encrypted TinyGeo file.

password string

This parameter specified the password of the target encrypted TinyGeo file.

GetOptimalPrecision(string, GeographyUnit, DistanceUnit, TinyGeoPrecisionMode)

public static double GetOptimalPrecision(string shapePathFilename, GeographyUnit unitOfData, DistanceUnit returningDistanceUnit, TinyGeoPrecisionMode precisionMode)

Parameters

shapePathFilename string
unitOfData GeographyUnit
returningDistanceUnit DistanceUnit
precisionMode TinyGeoPrecisionMode

Returns

double

GetOptimalPrecision(FeatureLayer, GeographyUnit, DistanceUnit, TinyGeoPrecisionMode)

public static double GetOptimalPrecision(FeatureLayer featureLayer, GeographyUnit unitOfData, DistanceUnit returningDistanceUnit, TinyGeoPrecisionMode precisionMode)

Parameters

featureLayer FeatureLayer
unitOfData GeographyUnit
returningDistanceUnit DistanceUnit
precisionMode TinyGeoPrecisionMode

Returns

double

GetTinyGeoFileType()

public TinyGeoFileType GetTinyGeoFileType()

Returns

TinyGeoFileType

Events

StreamLoading

This event allows you to pass in your own stream to represent the files.

public event EventHandler<StreamLoadingEventArgs> StreamLoading

Event Type

EventHandler<StreamLoadingEventArgs>

Remarks

If you choose you can pass in your own stream to represent the file. The stream can come from a variety of places such as isolated storage, a compressed file, and encrypted stream. When the Image is finished with the stream it will dispose of it so be sure to keep this in mind when passing the stream in. If you do not pass in a alternate stream the class will attempt to load the file from the file system using the TinyGeoPathFilename property.