34#include <NDEVR/IOFactory.h>
35#include <NDEVR/Matrix.h>
38typedef struct tiff TIFF;
101 class TIF_IMAGE_HANDLER_API GeoTiffFactory :
public IOFactory
174 static constexpr StringView CustomOptionsLabel() {
return "geotiff_options"; }
177 static constexpr StringView CustomOptionsImportMode() {
return "import_mode"; }
180 static constexpr StringView CustomOptionsDecimation() {
return "decimation_stride"; }
183 static constexpr StringView CustomOptionsDrapeMode() {
return "drape_mode"; }
186 static constexpr StringView CustomOptionsUseProjection() {
return "use_projection"; }
The equivelent of std::vector but with a bit more control.
Allows IOFactories to report what features they support to make the import/export dialogs easier to s...
User-defined options that define preferences for importing and exporting using IOFactory objects.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
bool writeFile(FactoryParameters &file) override
Writes design data to a GeoTIFF file.
virtual bool isAutoEnabled() const
Checks whether this factory is automatically enabled.
FactoryFeatures factoryFeatures(const FactoryParameters &file, bool is_read) const override
Returns the supported factory features for the given file.
static GeoTiffFactory * DefaultFactory()
Returns the singleton GeoTiffFactory instance.
bool canRead(const FactoryParameters &file) override
Checks whether the given factory parameters describe a readable GeoTIFF.
static UUID ResolveProjection(const GeoTiffInfo &info)
Resolves the coordinate reference system projection from GeoTIFF info.
void getSupportedFormats(Buffer< FileFormat > &formats, bool is_read) override
Populates the list of supported GeoTIFF file formats.
static bool HasGeoTiffTags(TIFF *tif)
Checks whether the given TIFF handle contains GeoTIFF tags.
FactoryOptions defaultReadOptions(const FactoryParameters &file) const override
Returns the default read options for GeoTIFF files.
static constexpr StringView FactoryID()
Returns the unique identifier string for this factory.
bool canRead(const File &file) override
Checks whether the given file can be read as a GeoTIFF.
static GeoTiffInfo ParseGeoTiffTags(TIFF *tif)
Parses GeoTIFF tags from a TIFF handle.
bool readFile(FactoryParameters &file) override
Reads a GeoTIFF file into the design model.
IOFactory(const StringView &factory_name)
Constructs an IOFactory with the given factory name.
Templated logic for doing matrix multiplication.
The core String View class for the NDEVR API.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
A point in N-dimensional space, used primarily for spatial location information.
The primary namespace for the NDEVR SDK.
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
A container of input information that is to be filled with output information by an IOFactory.
Stores parsed GeoTIFF metadata including projection, tiepoints, and raster dimensions.
bool has_pixel_scale
Whether pixel scale tags were present.
bool isOrthophoto() const
Checks whether this GeoTIFF represents an orthophoto.
UUID source_projection
The UTM projection UUID for geographic CRS conversion.
Vector< 3, fltp08 > pixel_scale
The pixel scale in X, Y, Z.
uint04 model_type
The GeoTIFF model type (projected, geographic, or geocentric).
uint04 height
The image height in pixels.
Vertex< 3, fltp08 > pixelToMeters(fltp08 col, fltp08 row, fltp08 z=0.0) const
Converts pixel coordinates to meters, handling geographic CRS via UTM.
Buffer< Vertex< 3, fltp08 > > model_tiepoints
Model-space tiepoint coordinates.
uint04 projected_cs_type
The projected coordinate system EPSG code.
uint02 elevation_band_index
The band index containing elevation data.
bool isMultispectral() const
Checks whether this GeoTIFF contains multispectral data.
uint04 geographic_type
The geographic coordinate system EPSG code.
bool has_tiepoints
Whether tiepoint tags were present.
uint16_t samples_per_pixel
The number of samples (bands) per pixel.
fltp08 invalid_val
The no-data or invalid value for elevation data.
uint16_t bits_per_sample
The number of bits per sample.
Vertex< 3, fltp08 > pixelToCoord(fltp08 col, fltp08 row, fltp08 z=0.0) const
Converts pixel coordinates to geographic or projected coordinates.
Buffer< String > band_descriptions
Descriptive names for each band.
uint04 raster_type
The raster type (pixel-is-area or pixel-is-point).
uint16_t sample_format
The sample data format (unsigned, signed, float).
bool has_transformation
Whether a transformation matrix tag was present.
Buffer< Vertex< 3, fltp08 > > raster_tiepoints
Raster-space tiepoint coordinates.
Matrix< fltp08 > model_transformation
The full 4x4 model transformation matrix.
uint04 width
The image width in pixels.