[Xastir] Ordnance Survey (OSGB) "OS OpenMap Local"

Tom Russo russo at bogodyn.org
Tue May 1 14:55:45 PDT 2018


On Tue, May 01, 2018 at 03:46:30PM -0600, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
> On Tue, May 01, 2018 at 08:19:58PM +0000, we recorded a bogon-computron collision of the <paul.g0wxt at gmail.com> flavor, containing:
[...]
> 
> Your only path forward is to change the coordinate system of the images into 
> something that Xastir can deal with.  Your best choice is straight WGS84 
> geographic coordinates, EPSG:4326.  The tool to use here is gdalwarp, and the 
> command needed to do the work is in README.MAPS, under the heading "GeoTIFF 
> files in certain projections need special processing."  That command is:
> 
>         gdalwarp -t_srs EPSG:4326 original_raster.tif usable_raster.tif
> 
> > I'd rather not have to run a script to mangle each and every tile in
> > the set, as there will be hundreds
> 
> Unfortunately, there is no other choice.  Fortunately, as Jason says, 
> you can do it with a script and a loop, and only need to do it once.

By the way, if your maps have opaque collar material (border text, white borders
or whatever) outside the map frame, then you might wind up with maps that 
don't tile well.  In that case you might have to do some extra scripting work 
to strip off the collars during the gdalwarp phase.

It isn't all that hard to do but can require some good script-fu.  An example
of how that's done can be seen in the "geopdf2gtiff.pl" script in the
scripts directory of Xastir.  It takes USGS GeoPDF files for 7.5' quadrangles
and strips off their collars before warping them and converting to geotiff.
In the case of those files, the GeoPDF file also contains a polygon 
specification saying where the neatline of the map should be, and by default
the script uses that.  But sometimes USGS puts a bad polygon in there and
we have to override it, and in that case we compute where the neatline should
be (all USGS 7.5' quads have easily computed border lat/lon values), and the
script is set up to do that, too.

-- 
Tom Russo    KM5VY
Tijeras, NM  

 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]



More information about the Xastir mailing list