Remove pyproj Dependency to Resolve conda-forge Feedstock Issues - #339
Conversation
|
@seongsujeong This PR replaces some lines that you wrote in the unwrapping code, please confirm that the functionality of the code is sufficient to replace the prior code. @seongsujeong @oberonia78 Please weigh in with high priority, as this issue is preventing users from getting recent ISCE3 versions on conda-forge |
seongsujeong
left a comment
There was a problem hiding this comment.
LGTM. The change was tested and confirmed that the transformed coordinates are identical. I see few seconds of increase in the runtime, which I do not think significant.
|
@seongsujeong Thanks for checking on this!! |
|
@hfattahi @oberonia78 Seongsu has given an approval after testing the PR, please review when able. I will be gone until Tuesday after we finish this evening so feel free to squash/merge if and when we have appropriate approvals |
|
@Tyler-g-hudson since we are not using pyproj extensively and you are replacing one usage with direct gdal use plus eliminating one unit test, then the solution seems fine to me for now. However, does this solution mean that ISCE3 users can not have one environment with both ISCE3 and pyproj ? @xhuang-jpl we need to make sure this PR runs fine for an end to end InSAR run (inlcuding using water mask and tropo delay). BTW, I looked at conda forge feedstock error log and for clarity it is worth mentioning the exact issue: Looks like we are allowing gdal lower than 3.13.0a0 and right now GDAL is at 3.13.2 . We need extensive testing before using 3.13.x. In the meantime we need a solution like what @Tyler-g-hudson has proposed here. |
|
thanks @hfattahi , I will do a full test with tropo and water mask included. |
|
@hfattahi and @Tyler-g-hudson , I have tested the entire InSAR workflows including the tropo and water mask, which works fine. |
|
@xhuang-jpl @hfattahi It looks like the tests have succeeded, are we ready to proceed? If so, I will need an approval |
|
@hfattahi answering the following questions:
They probably can, but the ISCE3 dependency graph is very complex which means that any additional package we add to it could have downstream effects like this. The issue is that the conda-forge feedstock wants to build for an array of Python versions, and for one of those versions the build process fails if we require pyproj and doesn't fail if we don't, even if pyproj is used by some other dependencies. However, if we don't require pyproj in that build process and attempt to run it, it fails because it tries and fails to import pyproj in these files. As for why the build fails for that specific version when pyproj is required, I'm not certain, and the behavior is counterintuitive. I've been researching it but have not come to any convincing conclusion regarding why it does this even though I don't pin a pyproj version in the conda-forge feedstock build.
Not as far as I know, for the reasons discussed above. |
|
I'd guess the problem is a version conflict between isce3 pyproj direct dependency and the transitive dependency. That is, the dependency graph has something like isce3 → pyproj (version=x) If you can't reconcile the version constraints x and y simultaneously then the build would fail. I'm not sure where this stuff is specified, so I don't know for sure. But maybe we could modify the direct constraint x so that the build succeeds and we don't have to change the code? |
hfattahi
left a comment
There was a problem hiding this comment.
Thanks @Tyler-g-hudson . I think this is a reasonable fix for now until we will need to deal with pyproj in future.
commit fc8112c Author: xhuang-jpl <118782850+xhuang-jpl@users.noreply.github.com> Date: Thu Aug 20 11:35:37 2026 -0700 Update Soil Moisture SAS to v0.4.3 (#349) * sm r3.4 * change the SM commit id for R4.0.2 * update the SM SAS version to v0.4.3 --------- Co-authored-by: Xiaodong Huang <xhuang@nisar-adt-dev-3.jpl.nasa.gov> commit 0d1600d Author: SamNemo <11642807+nemo794@users.noreply.github.com> Date: Mon Aug 17 16:19:06 2026 -0700 Update STATIC workflow for new water mask spec (#334) * Update STATIC workflow for new water mask spec. * Update STATIC runconfig with explicit classification values for water mask --------- Co-authored-by: Samantha C. Niemoeller <samantha.c.niemoeller@jpl.nasa.gov> commit be7b3d9 Author: Brian Hawkins <1729052+bhawkins@users.noreply.github.com> Date: Thu Aug 13 18:13:07 2026 -0500 Fix failing unit test test.cxx.isce3.io.raster.raster (#348) * Check raster dimensions * Initialize all rows in mask file. commit 0a8df45 Author: Tyler G. Hudson <tyler.g.hudson@gmail.com> Date: Tue Aug 11 17:25:18 2026 -0700 Remove pyproj Dependency to Resolve conda-forge Feedstock Issues (#339) * Remove dead code in llhxyz.py that depends on pyproj * Update reprojection code in unwrap/preprocess.py commit 54f2c28 Author: Gustavo H. X. Shiroma <52007211+gshiroma@users.noreply.github.com> Date: Thu Jun 25 23:50:55 2026 -0700 Add radar grid decimation option to compute the static layers layover/shadow mask (#328) * disable polarimetric symmetrization by default * revert changes to `symmetrize_cross_pol_channels` * Update GCOV and GSLC specification XMLs * Revert changes to the GCOV and GSLC specification XMLs * add radargrid decimation option to compute the layover shadow mask * simplify parameter names


Context
This PR removes the direct dependency on
pyprojfrom ISCE3, resolving issues encountered in the conda-forge feedstock PR (conda-forge/isce3-feedstock#122) where introducing pyproj as a dependency caused build errors after lines were introduced to the code in 0.25.13. ISCE3 does not have a listed dependency onpyprojso we either need to remove these lines or handle the dependency management issues that come with officially adding this dependency to the repo.Summary of Changes
This PR completely removes direct usage of
pyprojfrom the ISCE3 codebase by replacing it with equivalent functionality fromosgeo.osr(GDAL), which is already a core dependency.Analysis Results:
pyprojin production code:python/packages/isce3/unwrap/preprocess.pytests/cxx/isce3/core/ellipsoid/llhxyz.py) has been removedpyprojwas never explicitly declared inenvironment.yml- it appeared only as a transitive dependency frompyaps3orraider-baseChanges Made
1. Modified
python/packages/isce3/unwrap/preprocess.pyRemoved:
Replaced with:
Rationale:
osgeo.osrwhich is already imported and used extensively in the same file (lines 280-290)SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER)ensures (lon, lat) order, equivalent to pyproj'salways_xy=True2. Deleted Dead Code
Removed:
tests/cxx/isce3/core/ellipsoid/llhxyz.pyReason:
tests/cxx/isce3/core/ellipsoid/ellipsoid.cpppyproj.transform())Benefits
✅ Resolves conda-forge feedstock issues - eliminates malformed
pyproj==3.7.1dependency spec✅ No new dependencies - uses existing GDAL >= 3.6 requirement
✅ Follows established patterns -
osgeo.osris used in 29 files across the codebase✅ Same performance - both pyproj and GDAL use the PROJ library underneath
✅ Removes dead code - eliminates unused test file with deprecated API
✅ Simplifies maintenance - one less direct dependency to track
Technical Details
GDAL Version Compatibility
environment.yml)SetAxisMappingStrategy()was introduced in GDAL 3.0.0 (2019)Axis Mapping Importance
OAMS_TRADITIONAL_GIS_ORDERforces (longitude, latitude) order expected by GIS softwarealways_xy=TrueparameterTesting Recommendations
Note: Full test suite will be automatically run by the ISCE3 CI system.
References
osgeo.osrusage patterns:preprocess.pylines 280-290,transform_xy_to_latlon.pylines 38-46Note: While
pyprojmay still appear as a transitive dependency frompyaps3orraider-base, ISCE3 no longer imports or uses it directly. This resolves the feedstock dependency specification issue while maintaining full functionality.