Hi all,I'm working on a script to take WKT Geometry that has been generated by SQL Server and output shapefiles. This will be run inside of a stored procedure in SQL. To accomplish this, I am first trying to detect the geometry type (for arcpy.MakeFeatureclass_management()) by looping over the text file:
ogcGeom = open(sys.argv[1], 'r')
ogcTypes = set()
for line in ogcGeom:
ogcTypes.add(line.split()[0])
if len(ogcTypes) > 1:
sys.exit('More than one geographic type detected')
ogcType = [gType for gType in ogcTypes]
goemType = typeDict[ogcType]
Ultimately I want to treat outputs with multiple types in them as multiple shapefile outputs, but I'm trying to start with the basic case. The issue I am having is that I can't find good reference information for mapping the OGC Type name to the ESRI type name expected by Create Featureclass.I'm trying to complete the typeDict dictionary:
#GeometryCollection intentionally excluded
typeDict = {'Point': 'POINT',
'LineString':'POLYLINE',
'CircularString': '<ESRI_Type_Name>',
'CompoundCurve': '<ESRI_Type_Name>',
'Polygon': 'POLYGON',
'CurvePolygon': '<ESRI_Type_Name>',
'MultiPoint': 'POINT',
'MultiLineString': 'POLYLINE',
'MultiPolygon': 'POLYGON'}
They seem obvious, but I can't find information on whether or not the types I haven't filled in are supported. This post seems to suggest that they may be, (otherwise they wouldn't be potential outputs to PostGres), but I'd rather be sure than guess. Can't seem to find this information anywhere.Does anyone here know?Thanks,- Doug