wgs84_to_geotiff_pixels#

pycraf.pathprof.wgs84_to_geotiff_pixels(geotiff, lons, lats)[source]#

Convert WGS84 (longitude, latitude) to pixel space of a GeoTiff.

This is purely a convenience function, which internally calls pyproj with the appropriate CRS of the GeoTiff file. The GeoTiff file must be opened with the Python package Rasterio

Parameters:
geotiffDatasetReader instance

A geotiff raster map opened with the Python package Rasterio.

lons, latsQuantity

Geographic longitudes/latitudes (WGS84) [deg]

Returns:
xpix, ypixndarray of float64

Pixel coordinates (floating point!) of the provided geographic position(s) in the given GeoTiff raster map.