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
tinyGeoPathFilenamestring
Remarks
None
TinyGeoFeatureLayer(string, string)
This is the class constructor.
public TinyGeoFeatureLayer(string tinyGeoPathFilename, string password)
Parameters
tinyGeoPathFilenamestringpasswordstringThis 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
tinyGeoPathFilenamestringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilenamestringThis parameter specifies the file name for the existed shape file.
unitOfDataGeographyUnitThis parameter specifies the Geography Unit of the data.
columnNamesIEnumerable<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
tinyGeoPathFilenamestringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilenamestringThis parameter specifies the file name for the existed shape file.
unitOfDataGeographyUnitThis parameter specifies the Geography Unit of the data.
columnNamesIEnumerable<string>This parameter specifies the columns in shape file which will be copied to TinyGeo file.
precisionInMeterdoubleThis 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
tinyGeoPathFilenamestringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilenamestringThis parameter specifies the file name for the existed shape file.
unitOfDataGeographyUnitThis parameter specifies the Geography Unit of the data.
columnNamesIEnumerable<string>This parameter specifies the columns in shape file which will be copied to TinyGeo file.
passwordstringThis 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
tinyGeoPathFilenamestringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilenamestringThis parameter specifies the file name for the existed shape file.
unitOfDataGeographyUnitThis parameter specifies the Geography Unit of the data.
columnNamesIEnumerable<string>This parameter specifies the columns in shape file which will be copied to TinyGeo file.
passwordstringThis parameter spcifies the password of the target TinyGeo file.
precisionInMeterdoubleThis 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
tinyGeoPathFilenamestringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilenamestringThis parameter specifies the file name for the existed shape file.
unitOfDataGeographyUnitThis parameter specifies the Geography Unit of the data.
columnNamesIEnumerable<string>This parameter specifies the columns in shape file which will be copied to TinyGeo file.
passwordstringThis parameter spcifies the password of the target TinyGeo file.
precisionInMeterdoubleThis parameter spcifies in double what is the precision in Meter of the target TinyGeo file.
shapeEncodingEncodingThis 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
tinyGeoPathFilenamestringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilenamestringThis parameter specifies the file name for the existed shape file.
unitOfDataGeographyUnitThis parameter specifies the Geography Unit of the data.
returningColumnTypeReturningColumnsTypeThis 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
tinyGeoPathFilenamestringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilenamestringThis parameter specifies the file name for the existed shape file.
unitOfDataGeographyUnitThis parameter specifies the Geography Unit of the data.
returningColumnTypeReturningColumnsTypeThis parameter specifies whether the columns info in shape file will be copied to TinyGeo file.
precisionInMeterdoubleThis 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
tinyGeoPathFilenamestringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilenamestringThis parameter specifies the file name for the existed shape file.
unitOfDataGeographyUnitThis parameter specifies the Geography Unit of the data.
returningColumnTypeReturningColumnsTypeThis parameter specifies whether the columns info in shape file will be copied to TinyGeo file.
passwordstringThis 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
tinyGeoPathFilenamestringThis parameter specifies the file name for the target TinyGeo file.
shapePathFilenamestringThis parameter specifies the file name for the existed shape file.
unitOfDataGeographyUnitThis parameter specifies the Geography Unit of the data.
returningColumnTypeReturningColumnsTypeThis parameter specifies whether the columns info in shape file will be copied to TinyGeo file.
passwordstringThis parameter spcifies the password of the target TinyGeo file.
precisionInMeterdoubleThis 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
tinyGeoPathFilenamestringfeatureLayerFeatureLayerunitOfDataGeographyUnitcolumnNamesIEnumerable<string>passwordstringprecisionInMeterdoubleshapeEncodingEncodingtypeWellKnownType
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
encryptedTinyGeoPathFilenamestringThis parameter specifies the file name for the source encrypted TinyGeo file.
decryptedTinyGeoPathFilenamestringThis parameter specifies the file name for the target decrypted TinyGeo file.
passwordstringThis 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
unencryptedTinyGeoPathFilenamestringThis parameter specifies the file name for the source unencrypted TinyGeo file.
encryptedTinyGeoPathFilenamestringThis parameter specifies the file name for the target encrypted TinyGeo file.
passwordstringThis 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
shapePathFilenamestringunitOfDataGeographyUnitreturningDistanceUnitDistanceUnitprecisionModeTinyGeoPrecisionMode
Returns
GetOptimalPrecision(FeatureLayer, GeographyUnit, DistanceUnit, TinyGeoPrecisionMode)
public static double GetOptimalPrecision(FeatureLayer featureLayer, GeographyUnit unitOfData, DistanceUnit returningDistanceUnit, TinyGeoPrecisionMode precisionMode)
Parameters
featureLayerFeatureLayerunitOfDataGeographyUnitreturningDistanceUnitDistanceUnitprecisionModeTinyGeoPrecisionMode
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.