[Talk-GB] Using OSM as a base for my own fictional map?

Chris Hill osm at raggedred.net
Fri Jul 24 17:05:52 UTC 2020


On 24/07/2020 16:59, Martin Wynne wrote:
> I'm looking for some pointers.
>
> I have a dedicated server (located in Ohio, I'm in UK) with full 
> controls. I'm fairly confident with web sites and javascript (and 
> geometry), but I'm entirely new to online mapping (apart from editing 
> OSM in the iD editor).
>
> What I want to do is use OSM as a base map for small areas of the UK, 
> but remove entirely all the OSM-derived railway tracks, and replace 
> them with my own data. This data would be essentially fictional, not 
> based on or derived from anything which is there now. I want to be 
> able to create tiles zoomed in far enough to see individual rails and 
> sleepers, with each rail as two separate rail edges.
>
> Where would I start to do that? How would I deal with attribution, 
> warning unsuspecting users that everything is derived from OSM (and 
> can be relied on to the same extent, if any, as any other OSM) EXCEPT 
> the railway tracks, which can't?
>
> Many thanks for any help/ideas/suggestions.

I have done this a few times for my own maps. For a small area I 
download the area into JOSM (so you need to setup and learn JOSM). This 
allows you to save an area as an .osm file on your local PC. I then 
remove, change and add anything I need and save it to the .osm file 
again. The crucial thing is to avoid uploading the edited data to the 
OSM server, so I disable my credentials in JOSM so that uploads won't 
work. You can load, edit and save many times of course to get what you want.

When the map data is how I want it I load the .osm file into a local 
database with osm2pgsql (the normal process for making local map tiles) 
and go through a rendering process. I still use TileMill, but there are 
various other options.

This allows you to invent or subvert any tagging regime you want. You 
can use any existing OSM data but also remove (or ignore in the render) 
anything you don't want. You can add anything else that suits you.

The map tiles that result from the rendering process can be uploaded to 
the usual map tile directory structure on your web-facing server and 
then you will need a web page with map code on it to display the tiles. 
I always use Leafletjs which is powerful and easy to use if you know 
your way around Javascript.

You need to credit OSM in the normal way for any published map - 
Leafletjs helps you add a suitable credit on a web page.

Making a map that lets you zoom in so far to be able to see rails and 
sleepers on a track is a tall order - I think Leafletjs handles up to 
Zoom level 22, but I'm not sure that will show enough detail. At that 
level renders of even small areas starts to make very large numbers of 
tiles.

I have used this (or very similar) techniques to make map for temporary 
events such as fairs, fĂȘtes and festivals as well as a planned scheme of 
flood defences and a mock up of a tidal barrier.

HTH

cheers
Chris Hill (chillly)




More information about the Talk-GB mailing list