Skip to content

Commit

Permalink
chore: clean up unnecessary additions
Browse files Browse the repository at this point in the history
  • Loading branch information
annehaley committed Dec 2, 2024
1 parent 8310f00 commit 9a2008e
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 39 deletions.
2 changes: 1 addition & 1 deletion sample_data/ingest_use_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def ingest_datasets(use_case, include_large=False, dataset_indexes=None):

dataset_size_mb = dataset_for_conversion.get_size() >> 20
if include_large or dataset_size_mb < 50:
if use_case in ['boston_floods', 'curbs_aid']:
if use_case == 'boston_floods':
boston_floods_ingest.convert_dataset(dataset_for_conversion, dataset)
elif use_case == 'new_york_energy':
new_york_energy_ingest.convert_dataset(dataset_for_conversion, dataset)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
if file_path.name.endswith('.jp2'):
src = large_image.open(file_path)
metadata = src.getMetadata()
# print(metadata)
bounds = metadata.get('sourceBounds')
if proj is None:
proj = bounds.get('srs')
Expand Down Expand Up @@ -63,7 +62,7 @@
dst_srs = osr.SpatialReference()
dst_srs.ImportFromEPSG(4326)
transform = osr.CoordinateTransformation(src_srs, dst_srs)
# print(transform)

gcps = []
for px, py, cx, cy in [
(0, 0, abs_xmin, abs_ymax),
Expand All @@ -75,7 +74,6 @@
gcps.append((
px, py, point.GetX(), point.GetY()
))
# print(gcps)

ds = gdal.Open(str(sink_output_path))
georefd = gdal.Translate(
Expand All @@ -87,6 +85,4 @@
)
)

# foo = large_image.open(gdal_output_path)
# print(foo.getMetadata(), foo.geospatial, foo.__class__)
print(f'Completed in {datetime.datetime.now() - start} seconds')
15 changes: 0 additions & 15 deletions sample_data/use_cases/curbs_aid/datasets.json

This file was deleted.

13 changes: 0 additions & 13 deletions sample_data/use_cases/curbs_aid/projects.json

This file was deleted.

2 changes: 1 addition & 1 deletion uvdat/core/management/commands/populate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'use_case',
choices=['boston_floods', 'new_york_energy', 'curbs_aid'],
choices=['boston_floods', 'new_york_energy'],
help='Sample data collection to load',
)
parser.add_argument(
Expand Down
5 changes: 1 addition & 4 deletions uvdat/core/models/simulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
class SimulationResult(TimeStampedModel):
class SimulationType(models.TextChoices):
FLOOD_1 = 'FLOOD_1', 'Flood Scenario 1'
RECOVERY = (
'RECOVERY',
'Recovery Scenario',
)
RECOVERY = 'RECOVERY', 'Recovery Scenario'
SEGMENT_CURBS = 'SEGMENT_CURBS', 'Segment Curbs'

simulation_type = models.CharField(
Expand Down

0 comments on commit 9a2008e

Please sign in to comment.