NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

1
1

I'm a total noobcomer so please forgive what is probably a very simple request.

I'm working on an application using MetOffice information, and I want to overlay the images they produce onto a map of the correct corresponding dimensions.

The geographical dimensions are 12W, 61N, 5E, 48N. The graphic they produce is 500x500px, so probably needs to be scaled to fit that shape.

My intention is to get a static map without any labels ("United Kingdom", "London" etc) and then overlay one png on top of the other. I want to use the Transport web map.

I've figured out how to get Maperitive to export an image of the right geographical area, but it still has labels.

So my first question is how do I get this (as an exported png) from Maperitive?

I tried doing this. With the following commands:

edit-rules 
//replace all occurrences of 'draw:text' and 'draw : text' with ''
//save as notext.mrules
use-ruleset location=rules\notext.mrules as-alias=notext
apply-ruleset
reload-ruleset

This doesn't remove the labels.

Secondly, is this really the right strategy to solve this problem? I say this because it might, at some point be useful to put on certain place names, and it seems like a static file is then the wrong thing for the job.

asked 14 Dec '13, 13:45

fernbritton's gravatar image

fernbritton
26112
accept rate: 0%

In case that you cannot get a sufficient answer about the ruleset of Maperitive: Have you already asked at the Maperitive googlegroup mailinglist?

(14 Dec '13, 17:27) stephan75

@stephan75 "Have you already asked at the Maperitive googlegroup mailinglist?" No, but I assumed that this site had members who could help since the question I linked was posted here. I might try if no joy here.

(14 Dec '13, 19:02) fernbritton

A common first-time user error with Maperitive is that people think the map displayed when they start the program is already the "product", the map they're working with and that is influenced by style choices.

It isn't.

The map you see when you fire up Maperitive is the map from www.openstreetmap.org and no amount of styling you do will change its looks. You need to load data first, and then (for clarity) disable the "background" map, to see something that Maperitive has rendered by itself. And then, once you've done that, you can apply different styling to it.

How do I know that you have made this mistake?

I know because Maperitive would never have been able to load such a large area! You must understand that data is not filtered server-side, so Maperitive will load all OSM data there is in that rectangle, including every lamppost and every bridleway. Even if you chose not to display them, they would still linger in memory and make it impossible to work with the data.

So, the answer to your question "is this the right strategy", is no. You could possibly get away with Maperitive if you were to pre-filter the data using Osmosis or so, leaving in only the bits you actually need, but that would be tedious.

Note that if you want to "simply combine bitmaps" they absolutely must be in the same map projection. I see that some Met Office products use the same Mercator projection that OSM does, but maybe not all do. Read the documentation carefully.

How much do you want to show on your map anyway? Perhaps the free shape files from naturalearthdata.com (which have just populated places, coastline, lakes, rivers, and a couple major roads) are already a sufficient data source for your task, then you could simply load them up in a GIS program of your choice and apply some basic styling to the different things. The advantage is that they have simplified data that is already prepared for using at the scale you want.

Another option is importing OSM data into a local PostgreSQL data base, and using a simple map style like "OSM bright" and the WYSIWYG style editor TileMill, render that into a PNG image. The advantage of the database approach is that while the database will have all OSM data for the UK, the rendering program can ask the database to hand out only what is required for the map being rendered.

Note that "I want to use the transport web map" makes no sense with any of these approaches including the one you tried initially; the rendering style for the transport web map could potentially work with TileMill (not Maperitive) but it not available for you to modify.

permanent link

answered 14 Dec '13, 22:14

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 14 Dec '13, 22:30

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×315
×63
×48
×42
×22

question asked: 14 Dec '13, 13:45

question was seen: 11,322 times

last updated: 14 Dec '13, 22:30

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum