ozak / georasters

GeoRasters is a Python module that provides a fast and flexible tool to work with GIS raster files.
GNU General Public License v3.0
198 stars 36 forks source link

Updates for Pysal refactoring #40

Closed apoorvalal closed 4 years ago

apoorvalal commented 5 years ago

Are there any updates planned to support the commands that depend on pysal? Pysal 2.0 was a major refactor and modularized the library; e.g. pysal.lat2w (weight matrix) was moved to pysal.lib.weights.lat2w link. As a result, running commands like graster.pysal_G_local() fail.

ozak commented 5 years ago

Yes. It is on the to do list. Any interest in helping out by contributing a PR for that?

apoorvalal commented 5 years ago

Sure, I've forked the repo and will try. Thanks for the hard work on this package; It has saved me from rasterio's oddities several times.

ozak commented 5 years ago

@apoorvalal it seems conda-forge has not moved to pysal-2 yet, so I think I'll wait until they do, since this package is most easily installed and distributed via the conda-forge channel.

The other option is to add a version check in the import. Were you able to look into how to change this? This website gives some help on how to migrate in case you are still open to help out.

ozak commented 5 years ago

Ok it seems for python>=3.6 it is already using pysal>=2.0. I think it should not be difficult to update. Basically check version of pysal, then import accordingly.

ozak commented 5 years ago

@apoorvalal I just updated the code to import the correct functions for pysal>=2.0. If you can/want to test it and let me know if you have any issues that would be great.

ozak commented 4 years ago

I will close this for now. Testing still needed.