osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.37k stars 987 forks source link

Support geoTIFF #16373

Open sonora opened 1 year ago

sonora commented 1 year ago

As a follow-up to #9944, and building on the work already implemented here https://github.com/osmandapp/OsmAnd/commit/6c680cd81f4f1627b8cd252976ef064c6509a340, can I please log the feature request here to support the geoTIFF format as OsmAnd's main, overlay, and underlay map source.

vshcherb commented 1 year ago

That's not really planned for now we will need more specific examples probalby why could it be useful. As for now you can export GeoTiff as tiles and use it directly. Also geotiff only supported now as heightmap and only with mercator projection

sonora commented 1 year ago

The increasingly significant use case is that several high precision sources for scientific purposes and even some public administrations these days provide geoTIFF as their standard output.

As an example see https://geodaten.bayern.de/opengeodata/OpenDataDetail.html?pn=dop40 for the German state of Bavaria, where you can download high-resolution squares only as geoTIFF. The areal photography data there is scale-corrected (every pixel covers precisely the same ground truth projection area, and orthogonally straightened, i.e. you see no vertical components, as such is of high scientific value.

Download a tile and take a look. The beauty of geoTIFF is that it can be viewed in just any photo viewer. But it would be significant value-add if we could use this data in OsmAnd in an uncomplicated fashion.

vshcherb commented 1 year ago

Will it support it in a reasonable manner - GB tif or we will need to preprocess it. This obviously requires investigation probably we can add this year experimental support to do some investigation but I doubt on mobile it will work flawlessly.

ahgera commented 1 year ago

Another use case for georeferenced raster files is map signs at trail information signs, these often contain information like trail color, shelters, etc. I know there are apps that lets you take a photo of such a map, set the position of a few points on it, and produce a georeferenced raster image as a result, which can be very handy when you need an ad hoc map. image

Being able to georeference an image directly in OsmAnd, maybe using a plugin, and then loading it as an overlay layer would be really handy, but limiting the scope to support for various already georeferenced raster images would probably be better.

Depending on how you structure the code internally this could also be used to improve kml/kmz support, since those can contain image overlays as well.

sonora commented 1 year ago

Yes, true, but that use case talks about creating a geo-aligned picture file, I was talking about just viewing a (geoTIFF standard) one in OsmAnd.

akkana commented 3 months ago

I stumbled on this issue as I was looking for something else, and thought it might be worth commenting that you can convert geotiff to OsmAnd sqlite pretty easily with the help of gdal plus an extra script. I detailed the steps here: https://shallowsky.com/blog/mapping/osmand-making-overlay-maps.html (scroll down to "Convert the GeoTiff to Map Tiles"). I used that to make a land ownership OsmAnd overlay that I use every time I hike.