Skip to content

Commit

Permalink
requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsleh committed Feb 21, 2022
1 parent f2acddd commit a8f5ba6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Binary file modified tests/data/astergdem/ASTGTMV003_N000000_dem.tif
Binary file not shown.
Binary file modified tests/data/astergdem/ASTGTMV003_N000010_dem.tif
Binary file not shown.
Binary file modified tests/data/astergdem/astergdem.zip
Binary file not shown.
8 changes: 5 additions & 3 deletions tests/data/astergdem/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def create_file(path: str, dtype: str, num_channels: int) -> None:
profile["transform"] = rasterio.transform.from_bounds(0, 0, 1, 1, 1, 1)
profile["height"] = SIZE
profile["width"] = SIZE
profile["compress"] = "lzw"
profile["predictor"] = 2

Z = np.random.randint(
np.iinfo(profile["dtype"]).max, size=(1, SIZE, SIZE), dtype=profile["dtype"]
Expand All @@ -39,7 +41,7 @@ def create_file(path: str, dtype: str, num_channels: int) -> None:

if __name__ == "__main__":
zipfilename = "astergdem.zip"
filesToZip = []
files_to_zip = []

for file_dict in files:
path = file_dict["image"]
Expand All @@ -48,11 +50,11 @@ def create_file(path: str, dtype: str, num_channels: int) -> None:
os.remove(path)
# Create mask file
create_file(path, dtype="int32", num_channels=1)
filesToZip.append(path)
files_to_zip.append(path)

# Compress data
with zipfile.ZipFile(zipfilename, "w") as zip:
for file in filesToZip:
for file in files_to_zip:
zip.write(file, arcname=file)

# Compute checksums
Expand Down
4 changes: 2 additions & 2 deletions torchgeo/datasets/astergdem.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ class AsterGDEM(RasterDataset):
The `AsterGDEM
<https://lpdaac.usgs.gov/products/astgtmv003/>`_
dataset is a Digital Elevation Model of reference on a global scale.
dataset is a Digital Elevation Model (DEM) on a global scale.
The dataset can be downloaded from the
`Earth Data website <https://search.earthdata.nasa.gov/search/>`_
after making an account.
Dataset features:
* DEMs at 30 m per pixel spatial resolution (3601x3601 px)
* data collected from `Aster
* data collected from the `Aster
<https://terra.nasa.gov/about/terra-instruments/aster>`_ instrument
Dataset format:
Expand Down

0 comments on commit a8f5ba6

Please sign in to comment.