Skip to content

Commit 6d4d9c9

Browse files
Virginia BrancatovbrancatVirginia Brancato
authored andcommitted
WIP address dateline crossing in stage_dem (#696)
* Check dateline crossing and introduce split_polygon_dateline function * Packing together shapely imports * Correct shapely imports * Extending determine_projection to handle 2 polygons * Extend download_dem to handle 2 polygons * Extend return_dem_filepath to handle 2 polygons * Modify overlap computation * Correct typos * Modify transform_poly_coords to handle list of polygons * Fix workflow for a 1 element polygon list * Adapt overlap_dem to handle list of polygons * Addressing residual issue with handling list of polygons * Modify dateline crossing function * Optimizing code for check_dem_overlap * Optimize return_vrt_filepath function * Optimize download_dem function * Fix inappropriate for cycle * Fix pep8 notation and remove unnecessary comments * Modify stage_dem unit test * Compute vrt_filepath and soft failing for s3 bucket download check * Correcting errors in stage_dem unit test * Simplyfing list notation * Rename poly to polys and clarifying in docstrings when list of polygons/epsg are expected * Assert validity of inputs in transform_polygon_coords * Generalizing for cycle in transform_polygon_coords * Add dateline crossing and point2epsg to unit test * Correct typo poly to polys * Add more individual workflow checks to the unit test * Specifying that now is list of vrt_filenames and using f string to clean up * Clean-up generated DEM in unit test * Correct iscetest erroneous import * Change minX/maxX, minY/maxY variable names to abide pep8 * Remove unnecessary else/pass * Correcting residual pep8 notation and create temp file directory with tempfile * Add temp file to handle temporary files * Update docstring and remove iterative dem delete * Remove epsg check against epsg from track frame database * Modify download_dem to accomodate new look of nisar-dem s3 bucket * Add docstring for functions in stage_dem.py * Correct typo in EPSG checking and change default file format to VRT * Correct bug in check_dem_overlap * Form VRT with datelines DEMs * Clean up and sort inputs * Clean up, pep8 notation, isort imports * Correct bugs in unit test * Switch from gdal.Warp to gdal.Translate * Change tolerance for stage_dem.py unit test * Download Tiff dem and form VRT. Use iterator to flag tiff files * Check output DEM filename VRT extension * Add extra check on EPS when crossing the dateline * Address different epsg code for crossing dateline at the pole * Modify lat limits for polar stereo regions * Modify check on epsg for polar regions in unit test * Modify outpath to guarantee uniquess of Tiff DEM name * One epsg for polarstereo, rename epsg to epsgs, rename outdir to file_prefix * Correct typo in epsg allocation * Remove vrt_filename_function as not needed * Fast EPSGs allocation using len instead of iterator * Explictly assign EPSG since fixed * Reduce loop in DEM download * Simplify code in tranform_polygon_coords * Revert chanhe in xmin/xmaxcomputation in transform_polygon_coord Co-authored-by: vbrancat <[email protected]> Co-authored-by: Virginia Brancato <[email protected]>
1 parent b6334d2 commit 6d4d9c9

File tree

2 files changed

+318
-188
lines changed

2 files changed

+318
-188
lines changed

0 commit comments

Comments
 (0)