tyson-swetnam / porder

Simple CLI for Planet ordersV2 API
https://tyson-swetnam.github.io/porder/
Apache License 2.0
49 stars 12 forks source link

init deprecation warnings for each scene that is searched with porder search #40

Closed rbavery closed 4 years ago

rbavery commented 4 years ago

Hi Sam!

This looks to be because of the form pyproj.Proj(init=epsgcode) that is used in geojson2id.py. I took a crack at solving this since the warnings were filling up a notebook I was running and also updated the code to use at least pyproj 2.2.2, which comes with > 10x speedup for the search function (according to my own test run.) I'm submitting a PR soon

The warnings:

Running search for a maximum of: 1000000 assets
/home/rave/miniconda3/envs/porder-test/lib/python3.8/site-packages/pyproj-2.4.2.post1-py3.8-linux-x86_64.egg/pyproj/crs.py:77: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method.
  return _prepare_from_string(" ".join(pjargs))
/home/rave/miniconda3/envs/porder-test/lib/python3.8/site-packages/pyproj-2.4.2.post1-py3.8-linux-x86_64.egg/pyproj/crs.py:77: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method.
  return _prepare_from_string(" ".join(pjargs))
/home/rave/miniconda3/envs/porder-test/lib/python3.8/site-packages/pyproj-2.4.2.post1-py3.8-linux-x86_64.egg/pyproj/crs.py:77: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method.
  return _prepare_from_string(" ".join(pjargs))
...
rbavery commented 4 years ago

The PR I'm submitting should update the pyProj requirement from 1.9 and I notice in the docs this link is suggested to install pyproj, and the wheels only go up to 1.9 (which was released back in 2016): https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyproj

I've found conda an easier method for getting geospatial dependencies installed, what do you think about amending the windows and other installation instructions to suggest a conda environment as the main way to get setup with porder? I taught this tutorial at UCSB where we did just that with an environment.yml file and it went alright, easier than pip at least: https://github.com/rbavery/porder_tutorial

samapriya commented 4 years ago

Fixed in issues 0.5.9 based on PR from @rbavery . Thanks Ryan. porder now supports python3 onwards only