Iain, Can you provide the code?
On Mon, Oct 31, 2011 at 12:46 AM, Iain <iainmalco...@googlemail.com> wrote: > I'm building a set of 'tiles' that actually just contain dem data to drive > a > 3d geograpic tool on android (using opengl es2.0) > > primarily for the uk (cos that's where I am) but hopefully in a way that > works anywhere. > > I've picked up the srtm data and used gdal translate and gdawarp as > described in the http://wiki.openstreetmap.org/wiki/HikingBikingMaps > openstreetmao wiki here , and used these to add height colouring and > contour > lines to mapnik generated tiles and this all works well and appears to be > OK. > > To get the 'height' tiles I'm using the same giant tiff that I use as input > to hill shade and colour-relief to a little home brew app that uses the > gdal > library to fetch out a tilesworth of data and then scales it and writes a > tile file (using the same tile naming scheme as mapnik / tms. But the > tiles > I generate appear to be out about 1/4 degree too far north (look OK east > west) over the whole area. (the mapnik generated tiles, using background > from hill shade + colour-relief and data from openstreetmap in a postgis > database are all fine and match exactly the position of tiles from the > openstreetmap server. > > I am linearly scaling the raster info using the geo info from the giant > tiff > and the http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames code here > to translate between tile numbers and lon/lat. > > Is linear scaling the wrong way to do this? (but if so I would expect the > error to change as I move north - south). > > I am considering using gdal2tiles to generate out the tiles, (I think I can > easily tweak the settings to generate 16bit tiffs, and then reprocess these > to fix the filenames and reformat the data ready for the android device), > but this is a rather long way around to get there. > > Anyone know why this all goes awry? > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Using-a-gdal-generated-tiff-to-generate-DEM-tiles-losing-registration-tp6946188p6946188.html > Sent from the GDAL - Dev mailing list archive at Nabble.com. > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev > -- Best regards, Chaitanya kumar CH. +91-9494447584 17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev