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

Hi all.

For the last couple of weeks I've been really struggling to get OSM data to Adobe Illustrator format using the OSM2AI.PL script.

I've got planet.osm stripped down to 4GB using o5mfilter32. Is putting it to a database first even necessary to use the OSM2AI.PL script? I've got 8 GB of RAM, which should be enough to export a 4GB file?

In any case, I've been experimenting with trying to export smaller osm files with OSM2AI.PL but I get thousands of error messages along the lines of "Use of uninitialized value $lon in multiplication (*) at...". The script produces a file but it's just a set of orphaned vertices at the same coordinates. The same thing happens with --projection set to either mercator or osgb.

Any help would be tremendously appreciated.

asked 15 Jun '11, 13:34

decoder's gravatar image

accept rate: 0%

Silly question time - do you really want the whole planet in Illustrator format or just a bit of it?

If it is just a bit of it, you might find a recent extract of that bit somewhere like here:

(15 Jun '11, 16:54) SomeoneElse ♦

I need the entire planet I'm afraid. I already got several AI files of individual countries from but I also need a global map. It would be ideal to have some sort of script to simplify the paths so that they only look good when looked at from a considerable distance.

(15 Jun '11, 18:06) decoder

Adobe Illustrator is extremely unlikely to be able to load a file created from 4Gb of OSM data. I've tried to load the a CloudMade Illustrator file (produced with osm2ai) of the whole of the UK and Illustrator simply refused.

Note also that does not use a full XML parser, but regular expressions, to read the .osm file. In other words, it is very possible that .osm files produced by programs other than the OSM website and Osmosis will fail. If you post some failing lines from your file somewhere then we can look, but needless to say I'm not downloading a 4Gb file just to test it!

permanent link

answered 15 Jun '11, 15:16

Richard's gravatar image

Richard ♦
accept rate: 18%

I have successfully loaded a 300 MB AI file of Finland and that's 75% the size of the UK map. Even though Illustrator is not a 64bit application it might still depend on your OS and Illustrator version.

I appreciate that there is a fair chance that a 4 GB AI file will not load, but nevertheless I'd like to give it a go. If it doesn't work, then strip the OSM file down further, until it does.

I have downloaded my OSM file from one of the sites listed at, but I forget which one specifically. In any case, I've tried the script on several OSM's acquired from multiple sources.

Basically the errors (warnings?) go like this:

With OSGB projection:

Use of uninitialized value $lon in multiplication (*) at C:/strawberry/perl/site/lib/Geo/Coordinates/ line 78. Use of uninitialized value $_[-1] in hash element at C:/strawberry/perl/site/lib/Geo/Coordinates/ line 64. Use of uninitialized value $lat in pattern match (m//) at C:/strawberry/perl/site/lib/Geo/Coordinates/ line 68.

With mercator projection:

Use of uninitialized value $_[0] in multiplication () at line 272. Use of uninitialized value in subtraction (-) at line 271. Use of uninitialized value $_[0] in multiplication () at line 272. Use of uninitialized value in subtraction (-) at line 271.

(15 Jun '11, 18:03) decoder

Could you paste a few lines from your .osm file containing nodes, please? Say, copy and paste a 100-line section which contains <node> tags into somewhere, and put the link here.

(15 Jun '11, 21:01) Richard ♦

For other possibilities to load OSM data in Adobe Illustrator have a look at Exporting_to_Adobe_Illustrator in the OSM wiki. Maybe that helps?

permanent link

answered 15 Jun '11, 19:30

stephan75's gravatar image

accept rate: 6%

I have read through that page, and OSM2AI.PL is the only solution that creates unstyled paths which are what I need for my project. Also solutions that can export very large areas are few and far between. I would think that converting the results produced by the other solutions to unstyled paths would be an impossible amount of work.

Basically what I need is a global roadmap, at manageable detail and file size, as unstyled paths in illustrator compatible format.

(15 Jun '11, 19:38) decoder

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 15 Jun '11, 13:34

question was seen: 6,049 times

last updated: 28 Feb '12, 09:40

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