Messages posted here can also be received as emails: information pre-print options:     

Templot Club Home list recently active topics
  Search  Image Gallery  My Account  Members  Help       


 
Forums and resources for users of Templot track design software about Templot Club

Please click: important information for new members and first-time visitors.
 
quick links: files, photos and messages archive on Yahoo
A single message from topic:  Direct loading of background maps   in forum:  Templot talk
main Templot web site

Single message by Martin Wynne       Topic: Direct loading of background maps
Posted: 23 Jul 2017 02:21
 PM  Reply with quote  Reply blank  Go to topic 
Martin Wynne
West Of The Severn, United Kingdom



view images in gallery
view images as slides
Well that was fun. How much actual use can be made of it remains to be seen. :?

Lots of folks like to use maps as a background guide to their track planning. But it's not always straightforward to capture and merge multiple screenshots from the mapping web sites, and scale them accurately to match the model scale.

So I thought it would be useful if Templot could load maps directly from the server. That way the map can be as large as you like, within reason, and Templot can do the scaling to your model scale automatically.

The big fly in that ointment is the copyright and licensing restrictions on most mapping and aerial imagery web sites.

But that doesn't apply to OpenStreetMap (OSM), so I have had a go at loading the OSM map tiles directly, with promising results.

The first requirement is to specify the location, and for the UK the easiest way is to use the OS Grid Ref:



Of course that doesn't work for the rest of the world, so I shall have to add an option to enter latitude/longitude instead. But the OS grid numbers are far more brain-friendly -- they are easily found by going to this map:

 https://osmaps.ordnancesurvey.co.uk

Next Templot needs to know how much area of map you want. That is specified in the equivalent model size, so it's important to have set your gauge/scale before doing this:



Templot then does some quite complex maths (maps are flat, the Earth's surface is curved), and loads all the necessary OSM tiles as background picture shapes. This is Shrewsbury in EM:


© OpenStreetMap contributors

which might take a minute or two to load.

As you can see, there could be several hundred picture shape tiles to fill the required area. But because each one is only a few KB, Templot can zoom and pan over them very quickly -- I have tried up to 2000 picture shape tiles without any noticeable effect on zoom and pan speeds. That certainly wouldn't be the case if this was a single large captured screenshot of several dozen MB. The BGS shapes file can be saved in the usual way, it is only necessary to load the map tiles from the OSM server once.

It's much easier to work with the picture shape borders turned off. A rectangle shape is also drawn showing the requested area -- Templot loads only full tiles, so these overlap the requested area a little way:


© OpenStreetMap contributors

Here I have started overlaying a template on the map:


© OpenStreetMap contributors

This is Bewdley on the Severn Valley Railway:


© OpenStreetMap contributors

The disadvantage with OSM is that it is not always as accurate as OS maps. But of course anyone can go on there and edit it, so if the map doesn't have all the information you need you can add or amend it. Usually that means tracing from aerial imagery, but you can also cross-fade from OSM to the historic 25" maps on the NLS site, so it's possible to double check OSM for accuracy -- bridges, churches, etc., don't tend to wander about much over the years. :)

OSM is at:  http://www.openstreetmap.org/about

Nowadays the OSM servers update most zoom levels within a couple of minutes, so it's much easier to check your work than it used to be. Press CTRL+F5 to refresh your browser if you don't see a change after a few minutes. Be warned though, editing OSM can be very addictive. :)

This new function will be in the next program update. Comments welcome. Would you ever use this?

regards,

Martin.


A single message from topic:  Direct loading of background maps   in forum:  Templot talk
about Templot Club

list recently active topics Templot Companion live online chat Please click: important information for new members and first-time visitors.

Please read this important note about copyright: Unless stated otherwise, all the files submitted to this web site are copyright and the property of the respective contributor. You are welcome to use them for your own personal non-commercial purposes. If you want to re-publish any of this material or use it commercially, you must first obtain the owner's permission to do so.

The small print: All material submitted to this web site is the responsibility of the respective contributor. By submitting material to this web site you acknowledge that you accept full responsibility for the material submitted. The owner of this web site is not responsible for any content displayed here other than his own contributions. The owner of this web site may edit, modify or remove any content at any time without giving notice or reason.
Problems with this web site? Contact webmaster@templot.com.
Powered by UltraBB - © 2009 Data 1 Systems