Giter Club home page Giter Club logo

Comments (11)

piyushrpt avatar piyushrpt commented on July 23, 2024 1

There exists a minor conflict in handling the PROJ_LIB environment variable by the different packages.

  • For GDAL3, this needs to point to PROJ v6 which is in share/proj. This is automatically done by conda.
  • For basemap to continue to work with older PROJ conventions, this needs to point to
export PROJ_LIB=`python3 -c "import pyproj; print(pyproj.pyproj_datadir)"`

For now one might have to toggle between the 2 settings for HDF5 preparation / visualization stages for #76

from mintpy.

yunjunz avatar yunjunz commented on July 23, 2024 1

The basemap PROJ_LIB issue is fixed in the development version on Github (matplotlib/basemap#454). The latest release has not included this fix yet. For now, the following command works from my limited testing:

For macports:

# run "sudo port uninstall py36-matplotlib-basemap" if basemap was installed with port
sudo /opt/local/bin/pip install git+https://github.com/matplotlib/basemap.git#egg=mpl_toolkits

For conda:

# run "conda uninstall basemap" if basemap was installed with conda
$PYTHON3DIR/bin/pip install git+https://github.com/matplotlib/basemap.git#egg=mpl_toolkits

from mintpy.

yunjunz avatar yunjunz commented on July 23, 2024

Hi @piyushrpt, I have added the 3 lines you suggested to conda.txt. Thank you for the recommendation.

from mintpy.

piyushrpt avatar piyushrpt commented on July 23, 2024

@yunjunz Thanks for the update

from mintpy.

yunjunz avatar yunjunz commented on July 23, 2024

Thank you @piyushrpt for the suggestion, I have updated the installation note accordingly.

from mintpy.

hfattahi avatar hfattahi commented on July 23, 2024

@yunjunz For now let's remove the "gdal>=3.0" from the https://github.com/insarlab/MintPy/blob/master/docs/conda.txt please and leave the issue open until basemap and GDAL3 are consistent (which shouldn't be long). This way we won't break mintpy (in particular basemap) for mintpy users. The solution @piyushrpt gave is clear enough for limited users of prep_aria.py at the moment.

from mintpy.

yunjunz avatar yunjunz commented on July 23, 2024

Hi @hfattahi, from a test installation using the current conda.txt with gdal>=3.0 and PROJ_LIB setup, basemap from MintPy works for me, as shown below.

I did not test prep_aria.py and thought toggle between the 2 settings meant for PROJ_LIB setup only, is it @piyushrpt ?

[yunjunz:~] yunjunz% conda list gdal
# packages in environment at /Users/yunjunz/development/python/miniconda3_test:
#
# Name                    Version                   Build  Channel
gdal                      3.0.0            py36h7eb7563_3    conda-forge
libgdal                   3.0.0                h1405c63_3    conda-forge

[yunjunz:~] yunjunz% smallbaselineApp.py -v
MintPy release version v1.1.2-28, release date 2019-06-09

[yunjunz:~] yunjunz% plot_coherence_matrix.py
usage: plot_coherence_matrix.py [-h] [--yx Y X] [--lalo LAT LON]
                                [--lookup LOOKUP_FILE] [-c COLORMAP]
                                [--figsize WID LEN] [--img-file IMG_FILE]
                                [--view-cmd VIEW_CMD] [--save] [--nodisplay]
                                [--noverbose]
                                ifgram_file
plot_coherence_matrix.py: error: the following arguments are required: ifgram_file

from mintpy.

piyushrpt avatar piyushrpt commented on July 23, 2024

That's right. You need PROJ_LIB to point to the default proj6 (setup by activating conda env) for using prep_aria to generate HDF5. Once this is done, one needs to set PROJ_LIB with the command that points to pyproj data for using basemap. Hopefully, this discrepancy in basemap gets resolved soon. Just want to make sure that adding gdal3 is not forcing other users to change their behavior (since everything needed for prep_aria is not public yet).

from mintpy.

yunjunz avatar yunjunz commented on July 23, 2024

PROJ_LIB problem has existed for a while now for basemap conda-forge/basemap-feedstock#30. It's caused by conda installation only, macports installation works fine. Adding gdal to conda.txt does not affect this problem.

Related with basemap, I gave a shot on replacing basemap with cartopy #87, but not very successful. Will look at it again in the future.

I do agree that gdal>=3.0 in conda.txt is a relative strong constraint, which might force other users to change their behavior, and other scripts in mintpy do not need it. I will remove it for now.

from mintpy.

Ovec8hkin avatar Ovec8hkin commented on July 23, 2024

Can this be closed now that Basemap has been replaced by cartopy?

from mintpy.

yunjunz avatar yunjunz commented on July 23, 2024

From my testing on macOS Mojave, I am able to install isce2, aria-tools, mintpy and pyaps all in one conda environment, with the note here: https://github.com/yunjunz/macOS_Setup/blob/master/README.md. Close this issue.

from mintpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.