Using ArcGIS 10.2 for Desktop, I have some Shapefiles which I have no idea why their Geometry column (shape) contain ZM! now I need to remove all those ZM
and get a clean polygon instead.
I thought I can use the FeatureClassToShapefile_conversion()
but not sure how to disabled
both Output has Z Values
and Output has M Values
through following ArcPy
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
# Set local variables
inFeature = ["climate.shp"]
outLocation = "C:/output"
arcpy.FeatureClassToShapefile_conversion(inFeatures, outLocation)
asked Aug 19, 2015 at 21:33
-
Set environment variable Z and M to disabledFelixIP– FelixIP2015年08月19日 21:41:35 +00:00Commented Aug 19, 2015 at 21:41
-
Thanks FelixIP, this is exactly my questing! how can I do it? I didn't find any thing on ArcGIS Online Help, I know this is doable trough ArcToolbox but how in ArcPy?Suffii– Suffii2015年08月19日 21:50:15 +00:00Commented Aug 19, 2015 at 21:50
1 Answer 1
Try this:
arcpy.env.outputZFlag = "Disabled"
arcpy.env.outputMFlag = "Disabled"
answered Aug 19, 2015 at 21:57
-
3It's also worth mentioning that the only way you can find out which environment settings a tool honors is to look at the Help file for a particular tool. There is a section on every tools help page called Environment listing which ones it honors.Hornbydd– Hornbydd2015年08月19日 22:02:26 +00:00Commented Aug 19, 2015 at 22:02
lang-py