Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is related to Retain ESRI symbology in Mapinfo TAB

As a workaround I am wondering if I can save all my ESRI symbology from the lyr files created using the script below to an ESRI style sheet and then convert that to a font set which can be opened in mapinfo/opengeo? enter image description here

The image above shows some of the [complex] symbology that we have in our ESRI mxd's that need to go into Mapinfo and/or Opengeo to be available via WMS.

Tests show that KML created from the lyr files handle the symbology better than tab but not every time.

Code so far...

# Author:

import arcpy, string, datetime, shutil, os
import arcpy.mapping as MAP

#Read input parameters from script tool
MXDList = string.split(arcpy.GetParameterAsText(0), ";")
ProjectPath = arcpy.GetParameterAsText(1)


#Loop through each MXD and print
#for MXDPath in MXDList:
print count
outPath = ProjectPath+'\\'+mxd.filePath[mxd.filePath.rfind('\\')+1:mxd.filePath.rfind('.')]
msd = outPath+'.msd'
dfList = arcpy.mapping.ListDataFrames(mxd)
for df in dfList:
#arcpy.mapping.ConvertToMSD(mxd, msd, df, "NORMAL", "NORMAL")
#arcpy.AddMessage(str(count)+'...' +str(outPath)+'...'+'\n')
    lyrList=arcpy.mapping.ListLayers(mxd, "", df)
    outPath = ProjectPath+'\\'+mxd.filePath[mxd.filePath.rfind('\\')+1:mxd.filePath.rfind('.')]+'\\'+str(
    for lyrFile in lyrList:
        if lyrFile.isFeatureLayer == True:
            if lyrFile.visible == True:
                arcpy.AddMessage(str(lyrFile)+' is visible')
                print str(lyrFile)+' is visible...exporting dataset'
                    arcpy.FeatureClassToFeatureClass_conversion(lyrFile.dataSource, outPath, outFileN)
                    arcpy.SaveToLayerFile_management(lyrFile,outPath+'\\'+outFileN+'.lyr', "ABSOLUTE")
                    arcpy.LayerToKML_conversion(outPath+'\\'+outFileN+'.lyr', outPath+'\\'+outFileN+'.kmz')
                    print 'Exists...continuing'

        arcpy.AddMessage(str(lyrFile)+' is visible')
        print str(lyrFile)+' is not visible'
##    errorM=arcpy.GetMessages()
##    arcpy.AddMessage(str(count)+str(errorM)+'\n continuing...\n')
##    print errorM
##    #MAP.PrintMap(MXD, printer)
#Remove variable reference to file
del mxd, msd

BTW// I tried the msd route (change to .zip and open the xml) but it is very convoluted.

share|improve this question

I am not sure sure if the GeoCat bridge provides this exact functionality but its worth checking out.

share|improve this answer
Thanks. This is quite an expensive option (thus currently not viable) and will only work for a WMS based solution...the primary need is conversion to tab/mapinfo symbology and wms is only if converting to mapinfo isn't practical. – GeorgeC Jul 6 '12 at 10:34
up vote 1 down vote accepted

Basically this was not possible but figured out a roundabout way to get the result. See arcgis python script to tool issue for final result.

I am using Arc2Earth community edition to convert each lyr to sld. It is manual but quick.

Other questions to get to this stage are

Is it possible to convert an ESRI style sheet to a font set?

Retain ESRI symbology in Mapinfo TAB


Create a summary table of the symbology of all datasets in multiple mxd's

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.