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?


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...

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(df.name)
    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.

2 Answers 2


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


  • 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, 2012 at 10:34

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

Converting ArcGIS style (symbology) to font for MapInfo/OpenGeo?

Retain ESRI symbology in Mapinfo TAB


Creating summary table of symbology of all datasets in multiple MXDs?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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