mapbox / maki

A POI Icon Set
http://labs.mapbox.com/maki-icons/
Creative Commons Zero v1.0 Universal
1.5k stars 213 forks source link

Maki in ArcGIS: .emf and .style files #31

Closed robert-claypool closed 11 years ago

robert-claypool commented 12 years ago

Using Maki or any other SVG symbol in an ArcGIS Map Document (MXD) requires converting the file(s) to Enhanced Metafile (EMF) format.

I spent half the day trying to do this conversion... first with ImageMagick, then IrfanView, XnView, NConvert, and finally, Inkscape and svg2emf.

Both svg2emf and Inkscape seem to work equally well, but the outputs were rendered poorly in Microsoft Paint, so it took some time to figure out that the conversion was successful and it's just Microsoft Paint that sucks.

I say all of that to ask... "Would the project maintainers be opposed to adding EMF copies to the repo?" That's the only vector format we can use in ArcMap, and it would have saved me some considerable time to have had EMF versions already in the repo.

If I get a positive response, I'll fork and add the files. Another option is that I can just add conversion instructions to the Wiki and blog about that.

robert-claypool commented 12 years ago

One more thing: ArcGIS can package symbols into a style file. Having a maki.style in the repo would be another nice touch. This would give ArcMap users a single import file for maki icons.

I can create this stuff and add it to the repo if you want. Just let me know. Thanks!

kkaefer commented 12 years ago

The only Microsoft product that properly reads SVG files is Microsoft Visio. If you have access to that software, try using it to convert the SVG file to EMF/WMF.

tmcw commented 12 years ago

This sounds like a great idea and would be a welcome addition - hopefully the process is somewhat repeatable, since the Maki icon set is due to grow quite a bit soon.

samanpwbb commented 12 years ago

Hey Robert, can you explain to me a little bit how ArcGIS deals with icon files? With TileMill/MapBox at least, individual PNG files of Maki icons are what most people will use unless they want to customize the icons themselves. Right now, as you can see, the Maki release (maki.zip) in https://github.com/mapbox/maki/tree/gh-pages/maki-icon-source includes a single source SVG and then PNG renders of every icon. What exactly would we need to add to this release to make Maki compatible with ArcGIS? I have no experience and no access to the software.

robert-claypool commented 12 years ago

ArcMap can read both Enhanced Metafiles (EMF) and Bitmap (BMP) files for generating what they call Picture Marker Symbols.

Since EMF can keep the V part of SVG, it is preferred over bitmap. Rendering performance is better using EMF, especially when you publish the map document to ArcGIS Server.

Also - believe it or not - ArcGIS can't import PNG files for layer symbols. BMP and EMF are the only options in versions 9.x and 10.0. Esri might change that with the upcoming 10.1 release. I hope so.

robert-claypool commented 12 years ago

What exactly would we need to add to this release to make Maki compatible with ArcGIS?

Individual EMF files in the render folder is what I am proposing. Also, a script that can create new files as the library grows, in the maki-icon-source folder.

An alternative proposal:

Since the EMF feature is targeting ArcGIS users, the script should be easy to run on Windows. DOS, PowerShell, or Python would all be fine (I'm leaning towards DOS even though I hate it). ArcGIS Desktop depends on Python anyway, so Python is available on most machines if we choose Python.

http://gisbiz.com/2012/06/how-to-convert-svg-files-for-arcgis/

samanpwbb commented 11 years ago

done with #45