OpenOrienteering / mapper

OpenOrienteering Mapper is a software for creating maps for the orienteering sport.
https://www.openorienteering.org/apps/mapper/
GNU General Public License v3.0
402 stars 106 forks source link

Cut map to paper size #1102

Open otoomet opened 6 years ago

otoomet commented 6 years ago

pdf/image export has a very handy preview window where I can manipulate the paper sheet position on the map image. Is there a way to do something similar when outputting or cutting the map, not just image of it? I'd like to add logos/descriptions/etc on the final version, and it would be handy to have those to line up with the paper edges.

Obviously, I can create a rectangle and cut it out, but it is a bit laborious to get exactly correct dimensions.

Configuration

Mapper Version: 0.8.1 Operating System: ubuntu 16

dg0yt commented 6 years ago

This feature does not exist yet. In some recent discussion I proposed such a feature as another "Export as ..." option.

ghost commented 6 years ago

I thout about this too and has few ideas how it could be solved.

Obviously, I can create a rectangle and cut it out, but it is a bit laborious to get exactly correct dimensions.

This is not good way, as it broke base map.

Also there are few tasks:

OCAD way

Few years ago, when I try trial OCAD I found useful function in printing: "Fit printing area to last selected object" (or something like this).

So, I use this function as next:

  1. Draw map.
  2. Draw rectangle using any line symbol. This rectangle should be same size as printing area (as paper size or little smaller) and cover needed map area for printing.
  3. Select this rectangle object (keep it selected!)
  4. Call printing dialog and set "Fit printing area to last selected object" (or something like this).
  5. As result printing area adjusted to map area covered by selected rectangle.

But I not shure that there was some option to draw a border around page.

Current state in Mapper

Currently there NO such function as "Fit printing area to selection (last selected object)", BUT we already has few options for set "Map area" (Single page, Custom area), that has option "Center print area".

"Center print area" at this moment adjust printining area to center of all map.

Solution 1: add in OpenOrienteering Mapper next options for "Print", "Image export" & "PDF export" dialogs

Also, think, "Center print area to selection" should replace existed "Center print area" (as last is not very flexible option).

Solution 2: There is also another way how to solve this task using special symbols and templates.

It is little harder way, but it could be used without any additional changes in OpenOrienteering Mapper source code!

Tomorrow I will add example files for this solution.

ghost commented 6 years ago

Solution 2

NOTE: I will use for demonstration purposes complete map.omap example:

So, here is a way for "cut map" without real map objects cutting using area with symbol that use top white knockout color (lets create it and name as "Knockout White")

  1. Open map.
  2. Create top color "Knockout White" and define it as BLACK 0 pic1
  3. Create area symbol (lets name it as "Printing knockout area") with "Knockout White" color. pic2
  4. Configure grid to needed page size: for demonstration I set it to A6 paper size (105.0mm × 148.5mm) and check both Show greed an Snap to greed. Also use Horizontal offset and Vertical offset to adjust one of paper cell to position that cover needed map area. pic3
  5. Select symbol "Printing knockout area" and create 1st rectangle area that just cover needed map area; snap all four corners of this rectangle to greed cell corners. pic4
  6. Using same symbol draw bigger 2nd rectangle area that will cover all map area. pic5
  7. Now open context menu on "Symbols" widget and choose "Select all objects with this symbol" pic6
  8. Go to "Advanced editing" toolbar and click on "Area XOr" pic7
  9. Now you got area object with hole that show only needed area. pic8
  10. Now you can also move this printing frame pic9
  11. For temporary hide this area object just select symbol "Printing knockout area" and set in context menu "Hide objects with this symbol". pic10
  12. Now you can print it on A5 paper with blank border around needed map pic11

As you can see if "Center print area" is ON it automatically adjusted to only visible truncated map area!

If you will play more with greed and 1st rectangle area size you could better define needed blank border size according target paper.

Creating printing frame template with logos

There is a way for create printing frame template as separate map file, that could has logos fixed in predefined position according paper borders. Its possible create set of printing frames as set of special map files. Those map files should be imported to main map file as templates.

More info on this functionality I will add tomorrow.

P.S.

@dg0yt, just discovered that in such (dirty?) way we already has in Mapper near replacement for such options as:

So, I just impressed by myself 😲