Get a Shapefile Geometry Type

المشرف العام

Administrator
طاقم الإدارة
I am making a python code for Arcgis9.3. In this code I have an input feature and I create a Output feature. I want that the output feature is the same geometry type as the input feature. At the moment my code to create the output feature is :

gp.CreateFeatureclass("C:/Users/Desktop/Test/", NameOutFC, "POLYLINE")But I would like to get the input feature geometry type and use it to create my output feature :

gp.CreateFeatureclass("C:/Users/Desktop/Test/", NameOutFC, GeometryLikeInput)I found the code with ArcPy :

desc = arcpy.Describe('C:/shapefile.shp')geometryType = desc.shapeTypeif geometryType == 'polygon':print 'Polygon'elif geometryType == 'point'But I can't use it with arcgis9.3.



أكثر...
 
أعلى