←Select platform

GeoKeysSupported Method

Summary

Checks whether the given file format supports TIFF GeoKey tags

Syntax
C#
VB
Objective-C
C++
Java
public static bool GeoKeysSupported( 
   RasterImageFormat format 
) 
Public Shared Function GeoKeysSupported( _ 
   ByVal format As RasterImageFormat _ 
) As Boolean 
+ (BOOL)geoKeysSupported:(LTRasterImageFormat)format 
public static boolean geoKeysSupported(RasterImageFormat format) 
public: 
static bool GeoKeysSupported(  
   RasterImageFormat format 
)  

Parameters

format
The RasterImageFormat to check

Return Value

true if the format supports TIFF GeoKey tags; otherwise it is false.

Remarks

This is a helper method that can be used to detect if a certain raster file format supports TIFF GeoKey tags. For example, ReadGeoKey, ReadGeoKeys and EnumGeoKeys can be used to read the GeoKeys stored in a file. If the file format supports GeoKeys, such as TIFF, then these methods will successfully return the GeoKey tags stored.

However, if the format does not support GeoKey tags, such as BMP, an exception will be thrown by the RasterCodecs objects. You can use GeoKeysSupported to determine whether the file supports GeoKeys and only call the read methods if the return value is true.

Note that the RasterCodecs option uses this method internally to determine whether the file supports GeoKeys when the CodecsLoadOptions.GeoKeys is set to true and only read the file GeoKeys if the file format supports them.

Example

For an example, refer to ReadTags.

Requirements

Target Platforms

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly