Closed tm-abby-moreno closed 2 years ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
hi @tm-abby-moreno
I forgot to add - can I request you to add the files
data
directory and update the notebook to point to that instead?
This PR addresses the issue: #170
This PR adds a new module called
vector_to_raster_mask.py
with 2 functions:_explode
andgenerate_mask
. The core function is thegenerate_mask
and_explode
is just an internal helper function. This function converts vectors into rasters where each pixel is a numerical representation of a feature in the vector data. The intended use is to convert vector annotations into raster labels/masks that align with satellite images.User will need to provide a reference raster image (for this PR we used a TIF image for now), a shapefile that contains the area of the raster image and this shapefile must have a column/feature that contains labels/categories. They must also provide a dictionary of their desired labels and values to be added to the masks.
Other updates:
flake8
file to ignore an unused import warning (already explained this to @butchtm that the import does not get explicitly called but is needed in plotting the image)sidebar.json
to display the docs of this module