MapFrame - plea for help

Jul 16, 2011 at 12:03 PM

The Ordnance Survey Great Britain has released some of its maps into the public domain . One series is StreetView. These raster-image .tif files each covers 5 * 5 km at a resolution of 1 metre, so there are 5k * 5k = 25 M pixels per tile. (The compressed tif files themselves vary from about 1 to 3 MB). There is a World file .tfw for each tile, and I can open up to 6 of these tiles simultaneously to cover 15 * 10 km. The tiles register perfectly on the Map control. I don't know how many bytes per pixel are used to represent the colour., but even at just one byte the 6 tiles represent 150 MB. I tried reducing the colour depth in Control Panel, Display from 4 to 2 bytes, but still could open only 6 tiles.

I want to create a seamless layer, opening .tif files as necessary to pan around or zoom. Zooming right out would make StreetView invisible and display a lower-resolution map. It is not difficult to generate the name of a tif file from map coordinates. It would be nice eventually to have a Map Preview window as in MapWindow showing the whole of the country with a draggable selection rectangle to select the necessary 5 * 5 kn tiles.

I believe that the MapFrame is what I need - can anyone help with further advice?

Coordinator
Jul 16, 2011 at 3:04 PM
"MapFrame" is a collection of layers - with the idea that you can have multiple "MapFrames" in a single legend or you can have the same MapFrame appear in two map instances. So you could implement a preview map by setting it's mapframe to the same one as in your main map but I'm not sure what that will do - it might sync the zooming and panning and extents which would be weird... if you experiment with this, please let us know how it goes.

- Dan

--------------------------
Daniel P. Ames, Ph.D. PE
Associate Professor, Geosciences
Idaho State University - Idaho Falls
dan.ames@isu.edu
geology.isu.edu
www.mapwindow.org



On Sat, Jul 16, 2011 at 6:03 AM, DavidNicholls <notifications@codeplex.com> wrote:

From: DavidNicholls

The Ordnance Survey Great Britain has released some of its maps into the public domain . One series is StreetView. These raster-image .tif files each covers 5 * 5 km at a resolution of 1 metre, so there are 5k * 5k = 25 M pixels per tile. (The compressed tif files themselves vary from about 1 to 3 MB). There is a World file .tfw for each tile, and I can open up to 6 of these tiles simultaneously to cover 15 * 10 km. The tiles register perfectly on the Map control. I don't know how many bytes per pixel are used to represent the colour., but even at just one byte the 6 tiles represent 150 MB. I tried reducing the colour depth in Control Panel, Display from 4 to 2 bytes, but still could open only 6 tiles.

I want to create a seamless layer, opening .tif files as necessary to pan around or zoom. Zooming right out would make StreetView invisible and display a lower-resolution map. It is not difficult to generate the name of a tif file from map coordinates. It would be nice eventually to have a Map Preview window as in MapWindow showing the whole of the country with a draggable selection rectangle to select the necessary 5 * 5 kn tiles.

I believe that the MapFrame is what I need - can anyone help with further advice?

Read the full discussion online.

To add a post to this discussion, reply to this email (DotSpatial@discussions.codeplex.com)

To start a new discussion for this project, email DotSpatial@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jul 16, 2011 at 6:25 PM

Thanks, Prof Ames.

If anyone has any further ideas or code on how to use MapFrame I'd love to hear them.

If I have any success, I'll post the results.

David Nicholls

Developer
Jul 18, 2011 at 12:55 PM

Hi David,

Regarding the image tile memory resource issues, you might want to consider displaying the images via a BruTileLayer.  That would require you to put the image tiles in a TMS or WMS-C server.  You can learn more about BruTileLayer here: http://dotspatial.codeplex.com/discussions/238631 .

Kyle

Editor
Jul 18, 2011 at 1:38 PM

You may want to create a virtual raster using with gdal and load that (*.vrt). Gdal internally pulls together all the images needed to assemble a new image (http://www.gdal.org/gdalbuildvrt.html).

This at least this works "out of the box" with SharpMap and I see no reason why it wouldnt work with DotSpatial (if you load + use GdalExtension) .

Hth FObermaier

Jul 19, 2011 at 8:55 AM

Thank you kellison and FObermaier.

I have read up on the BruTileLayer.Very interesting, but I think that setting up a Tile Map Server would be beyond my technical capabilities and resources. I envisage a desktop GIS where the tiles/files are stored on the same machine.

The virtual raster sounds like a seamless map layer in MapInfo, which is what I want really. I shall try splicing some tiles together using gdalbuildvrt and the command line. I suppose the difficulty will be in compiling the GDAL since my Visual Studio is set up for Visual Basic. But then when I come to access the virtual raster using the GDALExtension, do I need to use C++ anyway?

David

Editor
Jul 19, 2011 at 9:51 AM

You do not need to compile gdal yourself. For the command line tool use the binaries provided by Tamas Szerekes:

For displaying use DotSpatial's GdalExtension and you should be all set.

Hth FObermaier