ngageoint / sarpy

A basic Python library to demonstrate reading, writing, display, and simple processing of complex SAR data using the NGA SICD standard.
MIT License
246 stars 85 forks source link

Processing SICD files from G-EGD #457

Closed AmaralScientist closed 3 weeks ago

AmaralScientist commented 1 year ago

Our group would like to process the SICD formatted files that are provided on the G-EGD platform into a georeferenced, orthorectified product. Is there a straightforward way to do this using SarPy? I can open the SICD files and view them. However, when I orthorectify a SICD file using the ortho helper, the resulting image does not align to Google Earth. What am I doing wrong?

ghost commented 1 year ago

Hey there,

First and foremost, I completely understand where you're coming from. Handling SICD files and ensuring accurate georeferencing can be quite intricate. SarPy, as a potent Python library, is specifically tailored for such operations, and it's great that you're leveraging it.

From a technical standpoint, SarPy provides robust methods for orthorectifying SICD formatted files. However, a few nuances might be affecting the alignment with Google Earth:

1 - Coordinate System Alignment: One of the primary considerations is ensuring that the coordinate system or datum of the SICD files matches that of Google Earth, which typically operates on the WGS-84 system. Any misalignment between the two can lead to discrepancies in the final output. 2 - Projection Considerations: SarPy's orthorectification relies on intricate projection methods. The library is stringent about the shape, type, and properties of the data during this process. Any anomalies or inconsistencies in your SICD data might introduce errors during the projection phase. 3 - Vector Definitions: The library emphasizes specific vector definitions during the orthorectification process. It's crucial to ensure that these vectors are correctly defined, perpendicular where required, and not zero vectors. 4 - Geometry Objects Ordering: SarPy uses a specific lon/lat ordering for GeometryObjects. If this isn't adhered to, it might be a potential source of the misalignment.

Given these insights, here's what I'd suggest:

Best of luck, and hope this helps!

utwade commented 1 year ago

Are you using create_kmz to check for alignment in Google Earth? That is the most direct way to check whether the SICD is being projected correctly or not.