osgearth_conv errors with input data in lat/lon with lon range of 0 to +360

classic Classic list List threaded Threaded
2 messages Options
XenonofArcticus XenonofArcticus
Reply | Threaded
Open this post in threaded view
|

osgearth_conv errors with input data in lat/lon with lon range of 0 to +360

osgearth 3.0.

I have a GeoTiff, produced from an unconventional sensor data source. It seems to drape without complaint in osgEarth. It's hard to tell if it aligns properly because the data doesn't correlate well with the orthoimagery basemap.

When we try to convert it to mbtiles using osgearth_conv, we encounter what I think is a coordinate system modulo 180 issue:

ERROR 5: .\export_result_native.tiff, band 1: Access window out of range in RasterIO().  Requested

(-360,1) of size 361x360 on raster of 720x361.

I believe osgearth_conv is trying to read data at the -180 longitude region, but is calculating that to be an input raster pixel X coordinate of -360, which is not sensible.

The input data is something that is going to be fetched periodically from an online server, so I don't have the liberty of altering the source data to have a more sensible -180 to +180 longitude range. Is there a way to make osgeearth_conv accept the 0 to +360 longitude range?

gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgearth_conv errors with input data in lat/lon with lon range of 0 to +360

You can try to create a VRT (gdalbuildvrt tool) to "override" the reported data in the GeoTIFF.
Glenn Waldron / Pelican Mapping