raster2ML
Purpose
raster2ML is a utility designed to process a Raster file and its corresponding shapefile to produce a raster mask file. The mask assigns class names based on the specified field in the shapefile.
Output
The result is an 8-bit PNG file where each distinct class from the shapefile is represented by a different color.
Usage
1. raster2png:
Converts a Raster image into an 8-bit PNG.
Command:
test_raster2png.py [-h] src_raster output_folder
Example:
!python tutorial/test_raster2png.py tutorial/in_folder/myraster.tif tutorial/out_folder
2. shp2labelme:
Generate a labelme JSON structure using raster and shapefile data.
Command:
test_shp2labelme.py [-h] raster_file shapefile_path label_field
Example:
!python tutorial/test_shp2labelme.py tutorial/out_folder/myraster_8bit.png tutorial/in_folder/myvector.shp idlin
3. labelme2mask:
Defines a set of functions that transform a given labelme JSON file into a labeled image (mask).
Command:
test_labelme2mask.py [-h] source_json_file target_folder
Example:
!python tutorial/test_labelme2mask.py tutorial/out_folder/myraster_8bit.json tutorial/out_folder
Dependencies
Ensure you have all the necessary dependencies installed. Refer to requirements.txt for a list of required packages.
Metadata
Release files for raster2ML 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| raster2ML-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for raster2ML-0.1.1-py3-none-any.whl |
Release files / raster2ML-0.1.1-py3-none-any.whl
| Download URL | raster2ML-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d3f65dfaf3d45a8cbe11e18e6637e80d48535dba8fc0dda907db116f766bc0e
|
|
BLAKE2b-256 checksum How to use checksums |
02cb3fcdc6f905832ecb9e5eede57f58d6eced6b84bc3abc664bb837f7969ddd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for raster2ML 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.