Discussion:
[Marble-devel] GeoTiff
Konrad Enzensberger
2012-02-16 12:23:21 UTC
Permalink
Hi,

i was wondering how to add a GeoTiff map to marblewidget.
Is this possible ?
Or do i need to create image tiles from the original tiff ?

I know marblewidget CreateMapWizard, but this only handles world images,
any hint how to modify TileCreator class ?

br, konrad
Javier Becerra - AUVA
2012-02-16 13:21:17 UTC
Permalink
Hi Konrad:

I have made some progress in overlaying a GeoTiff in Marble, however my
solution is not exactly what you ask. Anyway, I guess that my experience
might give you some ideas:

1) I have used GDAL's gdal2tiles.py in order to break the original
GeoTiff into 256x256 tiles at different zoom levels. (See my note below
regarding the y coordinate of the generated tiles).
2) Instead of dynamically adding a texture layer to the MarbleWidget, I
modify a dgml file (e.g. openstreetmap.dgml) to add a new texture layer
which points to the tiles created by gdal2tiles.py (you can look at
openstreetmap's "hillshading" texture and do something similar).

Then you just have to select the modified theme in Marble and you can
navigate to your overlaid image.

As I said, it is not exactly what you were asking for, but that might be
a good starting point.

Best regards,
Javier

NB: it seems that gdal2tiles generates tiles with the y coordinate
starting on the bottom of the map (as per TSM specs), and marble (OSM)
expects them to have the y origin at the top of the map (or viceversa, I
always end up messing that), so I transform the y coordinates in the
images generated by gdal2tiles.py in order to get them at the right
place in marble. BTW, I wonder if there is a way to tell Marble about
this top/bottom origin in the DGML file?
Post by Konrad Enzensberger
Hi,
i was wondering how to add a GeoTiff map to marblewidget.
Is this possible ?
Or do i need to create image tiles from the original tiff ?
I know marblewidget CreateMapWizard, but this only handles world images,
any hint how to modify TileCreator class ?
br, konrad
_______________________________________________
Marble-devel mailing list
https://mail.kde.org/mailman/listinfo/marble-devel
Torsten Rahn
2012-02-16 14:11:50 UTC
Permalink
Post by Javier Becerra - AUVA
NB: it seems that gdal2tiles generates tiles with the y coordinate
starting on the bottom of the map (as per TSM specs), and marble (OSM)
expects them to have the y origin at the top of the map (or viceversa, I
always end up messing that), so I transform the y coordinates in the
images generated by gdal2tiles.py in order to get them at the right
place in marble. BTW, I wonder if there is a way to tell Marble about
this top/bottom origin in the DGML file?
So gdal2tiles has the same y-axis orientation as the tiling layout used in the
old NASA WorldWind tiling layout (I guess because they used gdal2tiles ...).
IIRC Bernhard Beschow ("shentey") worked on getting the NASA WorldWind tiles
displayed in Marble but I don't know whether it got supported in the end.

BR,
Torsten
Post by Javier Becerra - AUVA
Post by Konrad Enzensberger
Hi,
i was wondering how to add a GeoTiff map to marblewidget.
Is this possible ?
Or do i need to create image tiles from the original tiff ?
I know marblewidget CreateMapWizard, but this only handles world images,
any hint how to modify TileCreator class ?
br, konrad
_______________________________________________
Marble-devel mailing list
https://mail.kde.org/mailman/listinfo/marble-devel
_______________________________________________
Marble-devel mailing list
https://mail.kde.org/mailman/listinfo/marble-devel
Continue reading on narkive:
Loading...