DOI-USGS / knoten

Python Geospatial Sensor Exploitation Library
Other
3 stars 21 forks source link

genereate_latlon_boundary does not work for an approach/limb image #8

Open kberryUSGS opened 5 years ago

kberryUSGS commented 5 years ago

generate_latlon_boundary doesn't seem to work for an approach/limb image, as it appears to only project points on the boundary of the image. If these pixels don't have the target in them, I'm not sure that the result will make sense.

jessemapel commented 5 years ago

I wonder if there is an existing algorithm for handling this type of stuff.

scsides commented 5 years ago

If I remember correctly, the image where this was discovered did return a polygon even though none of the image edge pixels intersected the target. This should be looked at.

jessemapel commented 5 years ago

@scsides This is probably due to how imageToGround behaves in USGSCSM when it doesn't intersect the body. It will return the point on the image ray closest to the body.

scsides commented 5 years ago

It would be nice to find an existing library for this, but the algorithm in ISIS does produce a valid polygon for most cases including full image, full disk, limb, north pole, south pole, longitude boundary, but not both north and south poles in the same image.

scsides commented 5 years ago

That's concerning. Is there anything that tells us it failed, but returned an invalid result anyway?

scsides commented 5 years ago

@jessemapel says there should be a warning added if this occurs, and that we should check to make sure this is happening.