Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions tools/RAiDER/llreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import pyproj
import xarray as xr

from RAiDER.utilFcns import transform_bbox


try:
import pandas as pd
Expand Down Expand Up @@ -330,14 +332,11 @@ def __init__(self, path: Path, is_dem=False, cube_spacing_in_m: Optional[float]=

self._filename = path
self.p = rio_profile(path)
self._bounding_box = rio_extents(self.p)
self._bounding_box = transform_bbox(rio_extents(self.p), dest_crs=4326, src_crs=self.p['crs'])
self._is_dem = is_dem
_, self._proj, self._geotransform = rio_stats(path)
self._type = 'geocoded_file'
try:
self.crs = self.p['crs']
except KeyError:
self.crs = None
self.crs = CRS.from_epsg(4326)

def readLL(self) -> tuple[np.ndarray, np.ndarray]:
# ll_bounds are SNWE
Expand Down
10 changes: 7 additions & 3 deletions tools/RAiDER/utilFcns.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pathlib
import re
from pathlib import Path
from typing import Any, Optional, Union, cast
from typing import TYPE_CHECKING, Any, Optional, Union, cast

import numpy as np
import numpy.typing as npt
Expand All @@ -20,11 +20,15 @@
from RAiDER.constants import _THRESHOLD_SECONDS
from RAiDER.constants import _g0 as G0
from RAiDER.constants import _g1 as G1
from RAiDER.llreader import AOI
from RAiDER.logger import logger
from RAiDER.types import BB, RIO, CRSLike, FloatArray2D, FloatArray3D


# Only used for type annotations
if TYPE_CHECKING:
from RAiDER.llreader import AOI


# Optional imports
try:
import pandas as pd
Expand Down Expand Up @@ -420,7 +424,7 @@ def round_time(datetime: dt.datetime, roundTo: int=60) -> dt.datetime:


def writeDelays(
aoi: AOI, #: AOI,
aoi: 'AOI',
wetDelay: ndarray,
hydroDelay: ndarray,
wet_path: Path,
Expand Down
Loading