<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
On 21/09/15 10:23, Alistair Young wrote:<br>
<span style="white-space: pre;">> thanks for that. I downloaded the TFW and TAB files from the Ordnance Survey, put them in the same directory as the tif and did:
>
> gdal_translate -of VRT -a_srs EPSG:27700 sx88.tif out.vrt
></span><br>
<br>
The TFW and tab files should provide this the georeference and
coordinate system<br>
information. This means you should just be able to skip the
gdal_translate step<br>
and use sx88.tif directly. You can run `gdalinfo sx88.tif` to
verify this.<br>
<br>
<span style="white-space: pre;">> And ran ctb-tile on out.vrt. It tiled it but into what appear to be weird columns and rows. E.g. Col 14, row 16046 etc. The SDK fails to read this as I suspect it expects 20 cols and 20 rows (it’s 5 metres per pixel resolution)</span><br>
<br>
The weird columns and rows reflect your use of the TMS geodetic
profile.<br>
Passing `-profile mercator` to ctb-tile will use the Mercator
profile. I've not<br>
used the OSGB SDK but if I had to guess I would assume it uses web
mercator. <br>
<br>
The resolution of the tiles will vary with the zoom level that you
are looking<br>
at. When you say 'it’s 5 metres per pixel resolution' what are you
referring to<br>
by 'it'?<br>
<br>
<span style="white-space: pre;">> I’m not sure what ullr is for. There’s no information about the tif (it’s a British National Grid Square 20kmx20km) but I’ve no idea what lat/lon it covers.</span><br>
<br>
ullr specifies the extent of the dataset. Assuming sx88.tif refers
to the OSGB<br>
national grid square SX88 (which would be 10kmx10km), your
gdal_translate<br>
command would be:<br>
<br>
gdal_translate -of VRT -a_ullr 280000 90000 290000 80000 -a_srs
EPSG:27700 sx88.tif out.vrt<br>
<br>
As mentioned, however, the TFW and TAB files should provide this
information.<br>
<br>
If you need further help with using ctb-tile, it may be best to
email me<br>
directly rather than risk polluting the GDAL mailing list.<br>
<br>
Best regards,<br>
<br>
Homme.<br>
<br>
<br>
<span style="white-space: pre;">>
> Alistair
>
>
> -----------------
> mov eax,1
> mov ebx,0
> int 80
>
> From: <a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev-bounces@lists.osgeo.org"><gdal-dev-bounces@lists.osgeo.org></a> on behalf of Homme Zwaagstra <a class="moz-txt-link-rfc2396E" href="mailto:hrz@geodata.soton.ac.uk"><hrz@geodata.soton.ac.uk></a>
> Date: Monday, 21 September 2015 08:29
> To: <a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev@lists.osgeo.org">"gdal-dev@lists.osgeo.org"</a> <a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev@lists.osgeo.org"><gdal-dev@lists.osgeo.org></a>
> Subject: Re: [gdal-dev] Generating 200x200 tiles
>
>
>
> On 19/09/15 08:14, Alistair Young wrote:
> > Thanks for that. I tried ctb but just got "Could not get transformation > information from source dataset². Chaning gdal2tiles to output 200x200 > worked ok but the SDK failed to display the tiles. I just have a 4000x4000 >
> tif with no geo referencing information so I can only generate raster > profile tiles.
>
> Alistair, you'll have trouble getting anything useful out of any geospatial
> tools without inputting datasets that are correctly georeferenced with an
> appropriate spatial reference system. Assuming you know the extents of your
> 4000x4000 raster, you should be able to do this by creating a virtual raster
> with gdal_translate using options along the following lines:
>
> gdal_translate -of VRT -a_srs srs_def -a_ullr ulx uly lrx lry in.tif out.vrt
>
> Passing out.vrt to ctb should resolve the error, and you'll have more chance
> with other tools too.
>
> Best regards,
>
> Homme
>
> > > Alistair > > > ----------------- > mov eax,1 > mov ebx,0 > int 80 > > > > > On 18/09/2015 00:36, "<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev-bounces@lists.osgeo.org">gdal-dev-bounces@lists.osgeo.org</a> on
> behalf of Brad > Hards"
> <a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev-bounces@lists.osgeo.orgonbehalfofbradh@frogmouth.net"><gdal-dev-bounces@lists.osgeo.org on behalf of bradh@frogmouth.net></a> > wrote: > >> On Thu, 17 Sep 2015 06:03:15 PM Alistair Young wrote: >>> I've been using gdal2tiles to generate zoom levels and tiles and it's >>> working fine but unfortunately the tiles
> are 256x256 and don't work with >>> the UK Ordnance Survey mapping SDK, which requires 200x200 tiles. Is >>> there >>> a way to generate these 200x200 tiles? I can generate them using >>> gdal_retile but it can't generate the zoom levels. >> I'd suggest just
> hacking the python script. Make a copy, and edit the >> __init__() function to change the tileSize member init to be 200 vs 256. >> >> Worth a quick try at least. >> >> Brad >> >> >> _______________________________________________ >> gdal-dev mailing list
> >> <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a> >>
>
> <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a> > > _______________________________________________ > gdal-dev mailing list >
> <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a> >
>
> <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
>
></span><br>
<br>
<br>
</body>
</html>