Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable opening datasets with gcps even if no valid crs is present #182

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Sep 23, 2022

  1. Enable opening datasets with gcps even if no valid crs is present

    Some datasets like Sentinel-1 GRD files don't have a coordinate reference system (crs), but they may have ground control points (gcps) and can still be opened by rasterio.
    weiji14 committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    66f3781 View commit details
    Browse the repository at this point in the history
  2. Get src_crs from last index position of gcps tuple

    Need to reproject from a proper source coordinate reference system (src_crs) instead of arbitrarily.
    weiji14 committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    4f656fe View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    edbf3a9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cc0cd1f View commit details
    Browse the repository at this point in the history
  5. Remove duplicated WarpedVRT instantiation

    Put the src_crs in the vrt_params dict to avoid an elif statement.
    weiji14 committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    1b3c47c View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2022

  1. avoid mutating spec.vrt_params

    It's not a good idea in dask to mutate inputs. This object could be shared with other tasks.
    
    Also, I think we just need to check `ds.crs is None`—if `ds.crs` is a CRS, it will always have a `to_epsg` method. (Though that could fail, so I've added handling for that case too.)
    gjoseph92 committed Oct 24, 2022
    Configuration menu
    Copy the full SHA
    1fb37c7 View commit details
    Browse the repository at this point in the history
  2. fix up test imports

    The test is still failing for me though.
    gjoseph92 committed Oct 24, 2022
    Configuration menu
    Copy the full SHA
    fca7961 View commit details
    Browse the repository at this point in the history
  3. fix conditional

    this also gets the test passing
    gjoseph92 committed Oct 24, 2022
    Configuration menu
    Copy the full SHA
    d7b0820 View commit details
    Browse the repository at this point in the history