Class TinyGeoFeatureLayer
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
stringpassword
stringThis parameter represents the password to the .tgeo file.
Remarks
None
Properties
HasBoundingBox
public override bool HasBoundingBox { get; }
Property Value
Password
This property gets or sets the password of the TinyGeo file.
public string Password { get; set; }
Property Value
TinyGeoPathFilename
This property returns the path and file of the TinyGeo file you want to use.
public string TinyGeoPathFilename { get; set; }
Property Value
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
stringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilename
stringThis parameter specifies the file name for the existed shape file.
unitOfData
GeographyUnitThis 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
stringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilename
stringThis parameter specifies the file name for the existed shape file.
unitOfData
GeographyUnitThis 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
doubleThis 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
stringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilename
stringThis parameter specifies the file name for the existed shape file.
unitOfData
GeographyUnitThis 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
stringThis 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
stringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilename
stringThis parameter specifies the file name for the existed shape file.
unitOfData
GeographyUnitThis 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
stringThis parameter spcifies the password of the target TinyGeo file.
precisionInMeter
doubleThis 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
stringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilename
stringThis parameter specifies the file name for the existed shape file.
unitOfData
GeographyUnitThis 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
stringThis parameter spcifies the password of the target TinyGeo file.
precisionInMeter
doubleThis parameter spcifies in double what is the precision in Meter of the target TinyGeo file.
shapeEncoding
EncodingThis 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
stringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilename
stringThis parameter specifies the file name for the existed shape file.
unitOfData
GeographyUnitThis parameter specifies the Geography Unit of the data.
returningColumnType
ReturningColumnsTypeThis 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
stringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilename
stringThis parameter specifies the file name for the existed shape file.
unitOfData
GeographyUnitThis parameter specifies the Geography Unit of the data.
returningColumnType
ReturningColumnsTypeThis parameter specifies whether the columns info in shape file will be copied to TinyGeo file.
precisionInMeter
doubleThis 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
stringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilename
stringThis parameter specifies the file name for the existed shape file.
unitOfData
GeographyUnitThis parameter specifies the Geography Unit of the data.
returningColumnType
ReturningColumnsTypeThis parameter specifies whether the columns info in shape file will be copied to TinyGeo file.
password
stringThis 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
stringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilename
stringThis parameter specifies the file name for the existed shape file.
unitOfData
GeographyUnitThis parameter specifies the Geography Unit of the data.
returningColumnType
ReturningColumnsTypeThis parameter specifies whether the columns info in shape file will be copied to TinyGeo file.
password
stringThis parameter spcifies the password of the target TinyGeo file.
precisionInMeter
doubleThis 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
stringfeatureLayer
FeatureLayerunitOfData
GeographyUnitcolumnNames
IEnumerable<string>password
stringprecisionInMeter
doubleshapeEncoding
Encodingtype
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
stringThis parameter specifies the file name for the source encrypted TinyGeo file.
decryptedTinyGeoPathFilename
stringThis parameter specifies the file name for the target decrypted TinyGeo file.
password
stringThis 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
stringThis parameter specifies the file name for the source unencrypted TinyGeo file.
encryptedTinyGeoPathFilename
stringThis parameter specifies the file name for the target encrypted TinyGeo file.
password
stringThis 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
stringunitOfData
GeographyUnitreturningDistanceUnit
DistanceUnitprecisionMode
TinyGeoPrecisionMode
Returns
GetOptimalPrecision(FeatureLayer, GeographyUnit, DistanceUnit, TinyGeoPrecisionMode)
public static double GetOptimalPrecision(FeatureLayer featureLayer, GeographyUnit unitOfData, DistanceUnit returningDistanceUnit, TinyGeoPrecisionMode precisionMode)
Parameters
featureLayer
FeatureLayerunitOfData
GeographyUnitreturningDistanceUnit
DistanceUnitprecisionMode
TinyGeoPrecisionMode
Returns
GetTinyGeoFileType()
public TinyGeoFileType GetTinyGeoFileType()
Returns
Events
StreamLoading
This event allows you to pass in your own stream to represent the files.
public event EventHandler<StreamLoadingEventArgs> StreamLoading
Event Type
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.