GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - systemed/MapPDF: PDF MapCSS renderer in Ruby

This repository was archived by the owner on Aug 27, 2023. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
icons
icons
 
 
lib
lib
 
 
README.txt
README.txt
 
 
charlbury.osm
charlbury.osm
 
 
map.pdf
map.pdf
 
 
opencyclemap.css
opencyclemap.css
 
 
pdf_test.rb
pdf_test.rb
 
 

Repository files navigation

MapPDF - Ruby map PDF renderer
==============================

This is an experimental PDF renderer from MapCSS stylesheets.

== Dependencies ==

* Jochen Topf's OSMlib (http://osmlib.rubyforge.org/)
* Prawn (http://prawn.majesticseacreature.com/)
* Ruby MapCSS parser (https://github.com/systemed/mapcss_ruby)
* RQuad (https://github.com/iterationlabs/rquad)

NOTE: current Prawn will not work perfectly. You need a slight patch to lib/prawn/images.rb - 
see comments in lib/pdf_renderer/point_item.rb. You'll still get a map without this patch, 
but the icons will be offset.

== How to use ==

See pdf_test.rb. In short:

1. (OSMlib)      Read your OSM data into a database
2. (mapcss_ruby) Create a 'parent objects' dictionary
3. (mapcss_ruby) Read the MapCSS file into a RuleSet
4. (mappdf_ruby) Create a MapSpec with the bounding box and map area parameters
5. (Prawn)       Create a PDF
6. (mappdf_ruby) Tell the MapSpec to draw onto it

== To do ==

* Better text offset

== Not currently supported ==

* Dash decoration (arrows etc.)
* Underline

== Licence and author ==

WTFPL. You can do whatever the fuck you want with this code. Code by Richard Fairhurst, autumn 2011.

OpenStreetMap data by OpenStreetMap contributors (CC-BY-SA).

About

PDF MapCSS renderer in Ruby

Resources

Readme
Activity

Stars

27 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.