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

fix: errors constructing RSMSectionedPolynomialSensorModel from TREs #24

Merged
merged 1 commit into from
Oct 25, 2023
Merged
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
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = osml-imagery-toolkit
version = 1.1.1
version = 1.1.2
description = Toolkit to work with imagery collected by satellites and UAVs
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down
6 changes: 3 additions & 3 deletions src/aws/osml/gdal/rsm_sensor_model_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def _build_loworder_rsm_polynomial(rsmpi_tre: ET.Element, polynomial_prefix: str

coefficients = []
for coeff_suffix in ["0", "X", "Y", "Z", "XX", "XY", "XZ", "YY", "YZ", "ZZ"]:
coefficients.append(get_tre_field_value(rsmpi_tre, f"{polynomial_prefix}{coeff_suffix}", int))
coefficients.append(get_tre_field_value(rsmpi_tre, f"{polynomial_prefix}{coeff_suffix}", float))
return RSMLowOrderPolynomial(coefficients)

@staticmethod
Expand All @@ -306,9 +306,9 @@ def _build_rsm_sectioned_polynomial_sensor_model(
sensor_model_grid_map[(sensor_model.section_row, sensor_model.section_col)] = sensor_model

section_sensor_model_grid = []
for row in range(0, num_section_rows):
for row in range(1, num_section_rows + 1):
row_of_sensor_models = []
for col in range(0, num_section_cols):
for col in range(1, num_section_cols + 1):
row_of_sensor_models.append(sensor_model_grid_map[(row, col)])
section_sensor_model_grid.append(row_of_sensor_models)

Expand Down
Loading