Select to view content in your preferred language

Working with OGC Geometry Types in ArcGIS

533
1
11-05-2013 07:00 AM
DouglasSands
Deactivated User
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
Tags (2)
0 Kudos
1 Reply
MelitaKennedy
Esri Notable Contributor
Hi Doug,

You should not consider this a 'definitive' answer, but the three types all use parametric curves aka circular or elliptical arcs or possibly splines. Shapefiles do not support these types. Here's a topic discussing this: About editing shapefiles.

Melita
0 Kudos