Visual Basic (Declaration) | |
---|---|
Public Shared Function GeoKeysSupported( _ ByVal format As RasterImageFormat _ ) As Boolean |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public static bool GeoKeysSupported( RasterImageFormat format ) |
C++/CLI | |
---|---|
public: static bool GeoKeysSupported( RasterImageFormat format ) |
Parameters
- format
- The RasterImageFormat to check
Return Value
true if the format supports TIFF Geo key tags; otherwise it is false.This is a helper method that can be used to detect if a certain raster file format supports TIFF Geo key tags. For example, ReadGeoKey, RasterCodecs.ReadGeoKeys(String,Int32) and EnumGeoKeys can be used to read the geo keys stored in a file. If the file format supports geo keys, such as TIFF, then these methods will successfully return the geo key tags stored.
However, if the format does not support geo key tags, such as BMP, an exception will be thrown by the RasterCodecs objects. You can use GeoKeysSupported to check if the file supports geo keys and only call the read methods if the return value is true.
Note that the RasterCodecs option uses this method internally to check if the file supports geo keys when the CodecsLoadOptions.GeoKeys is set to true and only read the file geo keys if the file format supports them.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
Reference
RasterCodecs ClassRasterCodecs Members
ReadGeoKey(String,Int32,Int32) Method
ReadGeoKeys(String,Int32) Method
EnumGeoKeys(String,Int32) Method
CommentsSupported Method
TagsSupported Method
Tags Property
RasterImage.GeoKeys
Working with Markers
Implementing TIFF Comments and Tags
TIFF File Comments
Implementing GeoKeys (GeoTIFF tags)
RasterCommentMetadataType