NeoGeographyToolkit / StereoPipeline

The NASA Ames Stereo Pipeline is a suite of automated geodesy & stereogrammetry tools designed for processing planetary imagery captured from orbiting and landed robotic explorers on other planets.
Apache License 2.0
479 stars 169 forks source link

Handle Swiss coordinate system #224

Closed ScottMcMichael closed 10 months ago

ScottMcMichael commented 5 years ago

ASP has some problems when processing data with this projection: "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs "

Sample data is here: lunokhod2:/home/smcmich1/data/swiss_projection

oleg-alexandrov commented 5 years ago

I narrowed this down to the get_wkt and set_wkt functions in the Cartography module in VW. The second function does not write exactly the thing that the first function reads. We read it in, parse it, form some objects, and then extract again the wkt string from that object. Things get lost on the way. I am sure the problem is not in GDAL or other external tools, as if I pass to GDAL the precise wkt string we read in, and not the thing we process, it can write it correctly.

dpmayerUSGS commented 5 years ago

Not a direct solution, but just note that support for this projection across EPSG, WKT, and GeoTIFF has always been a little shaky. Some notes here: http://geotiff.maptools.org/proj_list/swiss_oblique_cylindrical.html

oleg-alexandrov commented 5 years ago

I made some progress here, at least now the PROJCS and GEOGCS fields are good, and +k_0 is parsed (sorry, internal details), but this is not enough. I think we don't capture the AUTHORITY right.

I'd suggest one reproject this DEM to WGS84 and some other projection, say stereographic, using gdalwarp. It may take us time to untangle this as my current work is non-ASP.

adehecq commented 5 years ago

Thanks. Yes that’s fine, I will just use a different projection for the moment.

On Feb 3, 2019, at 20:45, Oleg Alexandrov notifications@github.com<mailto:notifications@github.com> wrote:

I made some progress here, at least now the PROJCS and GEOGCS fields are good, and +k_0 is parsed (sorry, internal details), but this is not enough. I think we don't capture the AUTHORITY right.

I'd suggest one reproject this DEM to WGS84 and some other projection, say stereographic, using gdalwarp. It may take us time to untangle this as my current work is non-ASP.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/NeoGeographyToolkit/StereoPipeline/issues/224#issuecomment-460129821, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADIjka2rCWVZe1bJHU_ymxNSVItnXoHcks5vJ7r6gaJpZM4abChE.

ScottMcMichael commented 5 years ago

I made a small change to VW so that the +towgs84 field is now recorded in our output files. Some of the authority fields are still missing but maybe it is good enough now?