View Source GeoTIFF (GeoTIFF v0.1.0)
This library reads specially formatted TIFF files that contain metadata abot the geographics transformation. This implimentation is specific to TIFF files sourced from NOAA charts.
Lambert Conformal Conic to Geographic Transformation Formulae
Link to this section Summary
Functions
Given geotiff struct, convert the coordinate to a pixel offset
Parse the tiff headers for Geo TIFF related tags, then generate and calculte the parameters required to transform pixels to coordinates and vise versa.
Given geotiff struct, convert a pixel offset to world coordinates
Link to this section Functions
Given geotiff struct, convert the coordinate to a pixel offset
Examples
iex> GeoTIFF.coord_to_pixel(GeoTIFF.parse_geotiff_file("res/Sample.tiff"), {-95, 39})
{5212, 5934}
Parse the tiff headers for Geo TIFF related tags, then generate and calculte the parameters required to transform pixels to coordinates and vise versa.
Examples
iex> GeoTIFF.parse_geotiff_file("res/Sample.tiff").easting |> Float.round(9)
110334.526523672
Given geotiff struct, convert a pixel offset to world coordinates
Examples
iex> GeoTIFF.pixel_to_coord(GeoTIFF.parse_geotiff_file("res/Sample.tiff"), {5212, 5934}) |> Tuple.to_list |> Enum.at(1) |> Float.round(5)
38.99943