Raster¶
-
class
Raster
(filename, member=None)¶
Description
info (**kwargs) |
Return information on a dataset |
is_compressed () |
Return True is the file is compressed |
get_filename () |
Return the file name |
get_rastername () |
Return the raster name |
get_parameters () |
Return the raster parameters defined in the dataset |
get_raster_size () |
Return (number of columns, number of rows) |
get_nodata ([band_number]) |
Return nodata or list of nodata |
get_extent ([scale]) |
Return the raster extent in world coordinates. |
Copy and/or filter
copy ([name, driver_short_name]) |
Return a copy of this raster |
Bands
get_band_count () |
Return the number of bands |
get_band_data_type ([band_number]) |
Return data type or list of data types |
get_band ([band_number]) |
Return a raster band |
Arrays
get_array ([band_number, col0, row0, n_cols, …]) |
Return the raster band array | ||
get_array_full ([value]) |
|
Pixel
get_pixel_size () |
Return pixel sizes (x, y): (column width, row height) |
get_centroid_world_coordinates () |
Return the raster centroid in world coordinates |
pixel_to_world (x, y) |
Return the top-left world coordinate of the pixel |
world_to_pixel (x, y) |
Transform world to pixel coordinates |
extent_world_to_pixel (min_x, max_x, min_y, max_y) |
Return extent in pixel coordinates |
Transform
get_coordinate_system () |
Return the coordinate system |
get_geotransform () |
Return geo transform. |
transform (**kwargs) |
Return a raster in the given coordinate system |
resample (pixel_sizes[, resample_alg]) |
Resample the raster |