NSCC-COGS / Aestheta

An Industrial Think Tank Focused on Developing and Promoting AI Technology for Geospatial Applications [Please note this group was formed as an academic exercise for educational purposes and does not represent a real world organization]
MIT License
7 stars 3 forks source link

Merge shpreader to main branch #89

Closed kkmcgg closed 3 years ago

kkmcgg commented 3 years ago

https://github.com/NSCC-COGS/Aestheta/blob/75f33c06b2d41b234b2e140835f768096dbfd257/Library/core.py#L9

shpreader can be used to load shapefiles into numpy arrays and only exists in the coreJG branch. We will need this functionality for the zostera project. We should move this over to the main branch.

Move, copy, or merge core.shpreader() into the main branch from the coreJG branch

ghost commented 3 years ago

Resolved, sort of, in 154eaa110b957aecd4f07030ab6cefea47c10093. The coreJG branch is too far behind to merge easily.

kkmcgg commented 3 years ago

That should work! Now to implement it for loading a shapefile in the Zostera project!

kkmcgg commented 3 years ago

I've got to reopen this one as unfortunately google colab does not have shapefile as a built-in! (oh no!) For the sake of this class (such as our tutorials and experiments) its really convenient to us that things work in colab. I'll comment out the function for now so that it will run. I think we can either explicitly pull the library OR we can get our package working properly wherein our requirements will be installed once we pip install our library from the git. https://packaging.python.org/tutorials/packaging-projects/

The sadness in colab: `--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last)

in () ----> 1 import Aestheta.Library.core as core 2 core.getTile(show=True) /content/Aestheta/Library/core.py in () 13 import numpy as np 14 import requests ---> 15 import shapefile 16 17 from matplotlib import pyplot as plt ModuleNotFoundError: No module named 'shapefile' --------------------------------------------------------------------------- NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt. To view examples of installing some common dependencies, click the "Open Examples" button below. ---------------------------------------------------------------------------` We'll figure it out! Sorry for all this.
kkmcgg commented 3 years ago

this has been resolved now that we have our package setup.

make sure to use!pip install git+https://github.com/NSCC-COGS/Aestheta.git to have external required packages installed