Headless Maperitive

457 views
Skip to first unread message

Igor Brejc

unread,
May 29, 2012, 1:31:24 AM5/29/12
to Maperitive
Hi,

The new 2.2 release now comes with a headless / no-GUI / command-line console (whichever term you prefer). 
You can run your scripts (and Python scripts) by specifying them in the command line, like

Maperitive.Console.exe Samples/Python/AddWebMap.py

I've tested the console to a certain degree, but there may be some bugs here and there. Also note that certain Maperitive commands that are GUI-specific don't do anything in the console mode.
There are also two parameters (-viewwidth and -viewheight) which you can use to set the size of the Maperitive console virtual map display. The default size is 1000x1000 pixels.
I doubt you will really need to use these two parameters, however - they are only useful if you rely on a certain display size in your scripts when exporting or generating rasters (which you shouldn't). Specifying the bitmap size explicitly in the command parameters is a much better approach.

Enjoy!
Igor

Igor Brejc

unread,
May 29, 2012, 1:32:57 AM5/29/12
to Maperitive
Oh yes, and the download link is http://maperitive.net/beta/Maperitive-latest.zip

Alfons Geisshuber

unread,
May 29, 2012, 3:10:29 PM5/29/12
to maper...@googlegroups.com
Works like a charm! Thanks.

MapGenerator

unread,
Apr 21, 2014, 4:53:09 AM4/21/14
to maper...@googlegroups.com

Hi,

I try to run a headless script... the script works fine with gui, but not headless please help.
here the simple script:
set-dem-source SRTM3
set-print-bounds-geo 8.3033,48.9419,8.6002,49.0644
use-ruleset alias=default
apply-ruleset
generate-contours
export-bitmap dpi=300

The error occours while downloading the SRTM data.

Please Help, what do I have to do different, or is it not possible to do headless

Igor Brejc

unread,
Apr 22, 2014, 12:12:12 PM4/22/14
to Maperitive
Looks like a bug, will be fixed soon. Thanks for reporting.


--
You received this message because you are subscribed to the Google Groups "Maperitive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maperitive+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Igor Brejc

unread,
May 3, 2014, 4:26:56 AM5/3/14
to Maperitive
Hi,

Actually, there's also a bug in your script :)
You set printing bounds (set-print-bounds-geo), but you probably wanted to set geometry bounds (set-geo-bounds). Since geometry bounds are not set, Maperitive tries to generate contours for the whole world.
This is one of the problems with headless scripting for application like Maperitive - lack of visual clues as to what's happening. I'll try to add some more logging in the console.



On Mon, Apr 21, 2014 at 10:53 AM, MapGenerator <saueru...@gmail.com> wrote:

--
Reply all
Reply to author
Forward
0 new messages