Exporting to Adobe Illustrator

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages
English

Adobe Illustrator is a vector graphics package, popular in the graphics design and publishing world. This page details approaches to get OpenStreetMap maps into the ".ai" file format for working with in Adobe Illustrator.


Export Tab on OpenStreetMap.org

While you can export Mapnik files from the Export tab of OpenStreetMap.org, the resulting files are very difficult to edit, containing multiple clipped and masked images. All features are a single layer.

Maperitive

Screenshot of Adobe Illustrator showing a Maperitive-generated SVG map.

Maperitive can produce high quality (and small-size) SVG rendering specially designed for importing into Adobe Illustrator. It separates map features into SVG layers, takes care of not duplicating shapes and also renders text as normal letters (and not as graphic paths like Mapnik does). A sample SVGZ map of the center of Dublin: http://maperitive.net/samples/Dublin_center_AI.svgz (NOTE: you cannot open it in browser, use Adobe Illustrator instead).

Maperitive tutorial on exporting to Adobe Illustrator: Generating OSM Map For Adobe Illustrator In Seven Easy Steps

More info about the export-svg command: http://maperitive.net/docs/manual/Commands/ExportSvg.html

osm2ai.pl

The osm2ai.pl script takes OpenStreetMap data and produces an unstyled Adobe Illustrator file (.ai). You can then work on this in Illustrator to produce a finished map.

Given a bounding box, the script takes all the ways that pass through that area, and draws them (in a Mercator projection). Ways are grouped in Illustrator layers according to their tags. By editing the script, you can determine which tags go to which layers.

What you'll need

  • The osm2ai.pl script ([1])
  • An updated version of osm2ai.pl (feb. 2013) that supports osm files edited by josm is available here
  • Perl and the Geo::Coordinates::OSGB module (plus a few others you almost certainly have already)
  • Either:
    • (for small areas) an .osm file covering the area you want
    • (for large areas) an OpenStreetMap SQL database running on your own machine - typically, a MySQL database created from planet.osm by planetosm-to-db.pl or similar

Using the script

perldoc osm2ai.pl for instructions.

The output

The resulting Illustrator file is version 6 (which will still open in any modern version).

The file is wholly unstyled and unlabelled: the idea is that you make the cartographic styling decisions yourself. However, to help you, the tags (keys/values) are brought through into the file, so that you can see (for example) the name of the road. The keys/values are stored as a 'comment'. To view these (in Illustrator CS), open the Attributes palette to its fullest extent.

Each way is rendered as a single Illustrator path.

Future plans

  • Move to the 'Export' tab
  • Add constant scaling etc.

Example

Illustrator.png

Other approaches

In Potlatch, you can export to pdf and then open the file in Illustrator. You can do a find and replace to get rid of layers you don't need.

Various other approaches may be possible if you convert via other formats such SVG

External links

How to get Open Street Map data into Adobe Illustrator with MAPublisher

http://openvectormaps.com is a library of vector maps in SVG and AI formats. Most maps were produced using Maperative.