2

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) 
PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Aug 19, 2015 at 21:33
2
  • Set environment variable Z and M to disabled Commented 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? Commented Aug 19, 2015 at 21:50

1 Answer 1

6

Try this:

arcpy.env.outputZFlag = "Disabled" 
arcpy.env.outputMFlag = "Disabled" 

Resources can be found here Z and M

answered Aug 19, 2015 at 21:57
1
  • 3
    It'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. Commented Aug 19, 2015 at 22:02

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.