Raster Soviet Topo Maps

Brent Fraser bfraser at GEOANALYTIC.COM
Wed Dec 20 10:47:16 PST 2006


Steve,

  Some answers (I hope)...

> I am writing some code that will clip the collars. So from your
> description above it is not clear, but it would seem that all you images
>   are identical height and width when you are done.

Not even close (especially for Canadian topo maps).  Since the width of the
mapped area is based on lines of longitude, the farther north the map, the
narrower it is (because the maps are projected).   It is likely not too
noticable on your group of Soviet topos...

>
> One thing that I am worried about is that the aspect ratio of the map
> areas is not the same as the lat/lon coverage and sizes very somewhat.
>
>     ie: h_img/w_img != h_lat/w_lon
>
> So, I am assuming that my Rectify step also needs to scale the image to
> some standard size that has an aspect ratio of 15x10 mins for the 50K
maps.

You should do the rectification step in projected coordinates for the best
results.  I think you could use gdal_translate to "attach" the control
points to the image, then use gdalwarp to apply an affine warp to the image
using the control points but I haven't tried this myself (GlobalMapper is
sooo much easier).  In the rectification step all your are asking the
software to do is apply an affine transformation to the raster to align the
pixel coordinate system to the projected coordinate system of the map.  The
resulting warped image will look almost identical to the "raw" scan, but it
may be slightly rotated if it is not adjacent to the central meridian.  And
the other thing the rectification does is produce registration info, usually
in the form of a World file.

  If you instead tried to move the raw scan into geographic coordinates by
applying the affine trasformation, some parts of the map would not be
accurate at all.  Basically you would be doing a map "projection" using an
affine trasformation; not recommended!

Once you have the images rectified to their project coordinate system, you
could get gdal_warp to move them into a geographic coordinate system (it
would use map projection equations, not an affine warp since it would know
the both the source and target coordinate systems).   And you could also use
it to clip to the lat/lon extents.  Then you'd be done.  Build a tile index,
specify the coordinate system fo the layer as geographic, let mapserver
re-project them.

But for best performance, you should store them in the coordinate system you
will be displaying them.    After you've clipped the collars using gdalwarp
you could re-project them back to GK, and fill in the perimeter "wedges"
with the adjacent maps.  Gdalwarp will do this too, although if you have
lots of maps you would want to script this...

>
>
> Do you have these up and running somewhere that I can browse them?

Nope. We sell the Canadian topos as GeoTiffs on CDs.  We've done some Soviet
topos on a as-requested basis, but nothing on-line.

>
> I hope to have code that will automate processing these, but it will
> take through the holidays to scrape together enough evenings and
> weekends to get it working. Finding the clip corners has been a
> challenge but I might have that whipped. There is still a lot to sort out.

Avoid coding!  Frank W., as usually, has already done all the hard work.
gdal_translate and gdalwarp will [likely] do everything for you....

Brent



More information about the MapServer-users mailing list