chadrockey / TGC-Designer-Tools

Tools to support course creation and Lidar/Terrain Creation in The Golf Club 2019.
Apache License 2.0
44 stars 27 forks source link

New PyCRS Version Is Incompatible from PIP #4

Closed chadrockey closed 5 years ago

chadrockey commented 5 years ago

@frodaddy00

FYI I had to force a downgrade to PyCRS 0.1.3 to get this to run. The latest version of this package (1.0.0) seems to have renamed some elements such as "parser" to "parse".

Looks like they JUST had a new, API breaking release.

https://pypi.org/project/PyCRS/#history

chadrockey commented 5 years ago

Resolved in: https://github.com/chadrockey/TGC-Designer-Tools/commit/9b00fcac3983ec340667b3785a08ad35ca73baaf

@frodaddy00 I added a pip requirements.txt file to make things easier to install. I also locked down the flakier packages (pyproj) to specific versions just in case. Oh, and pycrs is gone.

python -m pip install -r requirements.txt

It turned out that after the refactor to handle projection data from inside the lidar files themselves, I was only using pycrs to convert the "Well Known Text" projection format to get the unit multiplier of the WKT.

I also ran into situations where pyproj didn't like or didn't work well with the pycrs.to_proj4(), so I just removed the dependency entirely.

I had to find a way to get the unit, so if anyone knows how to query that for an EPSG directly, I'll update that function. Otherwise, I use pyproj's quirky preserve_units feature to figure out how far it things one unit is in meters. :)