nyuki package
Submodules
nyuki.geotiff_chopper module
Console script for geotiff_reprojector.
-
nyuki.geotiff_chopper.
check_empty_pixels_below_threshold
(image_array, threshold=0.5)[source]
-
nyuki.geotiff_chopper.
chopper
(sourcetiff, sourcemask, size)[source]
-
nyuki.geotiff_chopper.
img_chopper
(img, label, images_master_directory, prefix=None, height=512, width=512, image_directory_name='images', label_directory_name='labels')[source]
-
nyuki.geotiff_chopper.
rasterize_masks
(masks, raster)[source]
nyuki.geotiff_compressor module
Console script for nyuki geotiff files compressor.
-
nyuki.geotiff_compressor.
compressor
(sourcefile, target_compression='LZW', yes=False)[source]
nyuki.geotiff_info module
Console script for Raster information tool
-
nyuki.geotiff_info.
image_units
(rasterio_open_image)[source]
-
nyuki.geotiff_info.
information
(sourcefile)[source]
-
nyuki.geotiff_info.
r_information
(sourcefile)[source]
-
nyuki.geotiff_info.
v_information
(sourcefile)[source]
nyuki.geotiff_reprojector module
Console script for geotiff_reprojector.
-
nyuki.geotiff_reprojector.
reprojector
(sourcefile, target_epsg='EPSG:4326', yes=False)[source]
nyuki.geotiff_resampler module
Console script for src.
-
nyuki.geotiff_resampler.
resample_raster
(raster, out_path=None, scale=1)[source]
Resample a raster
multiply the pixel size by the scale factor
divide the dimensions by the scale factor
i.e
given a pixel size of 250m, dimensions of (1024, 1024) and a scale of 2,
the resampled raster would have an output pixel size of 500m and dimensions of (512, 512)
given a pixel size of 250m, dimensions of (1024, 1024) and a scale of 0.5,
the resampled raster would have an output pixel size of 125m and dimensions of (2048, 2048)
returns a DatasetReader instance from either a filesystem raster or MemoryFile (if out_path is None)
Attribution: This code was adapted from XXX
-
nyuki.geotiff_resampler.
resampler
(sourcefile, target_resolution, yes=False)[source]
-
nyuki.geotiff_resampler.
write_mem_raster
(data, **profile)[source]
Attribution: This code was taken from XXX
:param data:
:type data:
:param profile:
:type profile:
:return:
:rtype:
-
nyuki.geotiff_resampler.
write_raster
(path, data, **profile)[source]
Attribution: This code was taken from
:param path:
:type path:
:param data:
:type data:
:param profile:
:type profile:
:return:
:rtype:
nyuki.nyuki module
nyuki.utilities module
Utilities file for Nyuki package.
These are some miscellaneous helper functions to facilitate some
of Nyuki’s operations. The functions include
get_file_type(): Function to determine if a file is a vector or raster file.
-
nyuki.utilities.
dhash_distance
(left, right, hash_size=8)[source]
-
nyuki.utilities.
get_file_type
(filename)[source]
This function will determine whether a file is a raster or vector
geospatial file. For example, a Geotiff file is a raster file, while
a shapefile or geojson file is a vector file.
nyuki.vector_reprojector module
Console script for geotiff_reprojector.
-
nyuki.vector_reprojector.
vreprojector
(sourcefile, target_epsg='EPSG:4326', yes=False)[source]
Module contents
Top-level package for src.