<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Removing ZM From Geometry Column Polygon Using ArcPy? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268593#M20693</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean In case of having the original file in directory&amp;nbsp;&amp;nbsp; "&lt;STRONG&gt;C:\\GIS\\ROR&lt;/STRONG&gt;" and if I want to save the output in "&lt;STRONG&gt;D:\\Data\\Final\\&lt;/STRONG&gt;" Do I have to set two env.workspace for both input and out puts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Aug 2015 11:16:17 GMT</pubDate>
    <dc:creator>BruceGreen</dc:creator>
    <dc:date>2015-08-20T11:16:17Z</dc:date>
    <item>
      <title>Removing ZM From Geometry Column Polygon Using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268590#M20690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;sing 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 &lt;CODE&gt;ZM&lt;/CODE&gt; and get a clean polygon instead.&lt;/P&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;I thought I can use the &lt;CODE&gt;FeatureClassToShapefile_conversion()&lt;/CODE&gt; but not sure how to &lt;CODE&gt;disabled&lt;/CODE&gt; both &lt;CODE&gt;Output has Z Values&lt;/CODE&gt; and &lt;CODE&gt;Output has M Values&lt;/CODE&gt; through following ArcPy&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="com" style="color: #808080;"&gt;# Import system modules&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; 
&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;import&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arcpy &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;from&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arcpy &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;import&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; env&amp;nbsp; 
&lt;/SPAN&gt;&lt;SPAN class="com" style="color: #808080;"&gt;# Set environment settings&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; env&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;workspace &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"C:/data"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&amp;nbsp; 
&lt;/SPAN&gt;&lt;SPAN class="com" style="color: #808080;"&gt;# Set local variables&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; 
inFeature &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"climate.shp"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; outLocation &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"C:/output"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; 
arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;FeatureClassToShapefile_conversion&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;inFeatures&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; outLocation&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:09:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268590#M20690</guid>
      <dc:creator>BruceGreen</dc:creator>
      <dc:date>2021-12-11T13:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Removing ZM From Geometry Column Polygon Using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268591#M20691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your input "climate.shp" is a shapefile not a feature class (a dataset inside a geodatabase).&lt;/P&gt;&lt;P&gt;I would recommend that you actually get all of your data into geodatabases first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &lt;SPAN class="n"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;FeatureClassToFeatureClass_conversion&lt;/SPAN&gt; or arcpy.CopyFeatures_management to copy the input to the output and disable Z &amp;amp; M geometries using the flags available in environment settings:&lt;/P&gt;&lt;P&gt;See here :&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Copy_Features/001700000035000000/" title="http://resources.arcgis.com/en/help/main/10.2/index.html#/Copy_Features/001700000035000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Feature_Class_To_Feature_Class/001200000020000000/" title="http://resources.arcgis.com/en/help/main/10.2/index.html#/Feature_Class_To_Feature_Class/001200000020000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your code might look like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env
env.workspace = "c:/Data/AGeodatabase.gdb"
inFeature = "climate"
outFeature = "climate2"
&lt;SPAN class="n"&gt;env&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;outputZFlag&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s"&gt;"Disabled"&lt;/SPAN&gt;
&lt;SPAN class="s"&gt;&lt;SPAN class="n"&gt;env&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;outputMFlag&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s"&gt;"Disabled"&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="s"&gt;&lt;SPAN class="s"&gt;arcpy.&lt;SPAN class="n"&gt;FeatureClassToFeatureClass_conversion&lt;/SPAN&gt;(inFeature, outFeature)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="s"&gt;&lt;SPAN class="s"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s"&gt;&lt;SPAN class="s"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:09:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268591#M20691</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2021-12-11T13:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Removing ZM From Geometry Column Polygon Using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268592#M20692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&amp;nbsp; Neil but I have every thing in `.shp` and not `gdb` format. In that case how I can set the env workspace?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 11:05:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268592#M20692</guid>
      <dc:creator>BruceGreen</dc:creator>
      <dc:date>2015-08-20T11:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Removing ZM From Geometry Column Polygon Using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268593#M20693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean In case of having the original file in directory&amp;nbsp;&amp;nbsp; "&lt;STRONG&gt;C:\\GIS\\ROR&lt;/STRONG&gt;" and if I want to save the output in "&lt;STRONG&gt;D:\\Data\\Final\\&lt;/STRONG&gt;" Do I have to set two env.workspace for both input and out puts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 11:16:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268593#M20693</guid>
      <dc:creator>BruceGreen</dc:creator>
      <dc:date>2015-08-20T11:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Removing ZM From Geometry Column Polygon Using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268594#M20694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried both this methods&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;from arcpy import env&lt;/P&gt;&lt;P&gt;env.workspace = "E:\\GIS\\Data"&lt;/P&gt;&lt;P&gt;inFeature = "band-tailed_pigeon.shp"&lt;/P&gt;&lt;P&gt;outFeature = "E:\\GIS\\Data\\band-tailed_pigeon-NOZM.shp"&lt;/P&gt;&lt;P&gt;env.outputZFlag = "Disabled"&lt;/P&gt;&lt;P&gt;env.outputMFlag = "Disabled"&lt;/P&gt;&lt;P&gt;arcpy.FeatureClassToFeatureClass_conversion(inFeature, outFeature)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;from arcpy import env&lt;/P&gt;&lt;P&gt;env.workspace = "E:\\GIS\\Data"&lt;/P&gt;&lt;P&gt;inFeature = "band-tailed_pigeon.shp"&lt;/P&gt;&lt;P&gt;outFeature = "band-tailed_pigeon-NOZM.shp"&lt;/P&gt;&lt;P&gt;env.outputZFlag = "Disabled"&lt;/P&gt;&lt;P&gt;env.outputMFlag = "Disabled"&lt;/P&gt;&lt;P&gt;arcpy.FeatureClassToFeatureClass_conversion(inFeature, outFeature)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I am getting this error in both case&lt;/P&gt;&lt;P&gt;&lt;IMG alt="arcerror.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/123096_arcerror.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;FeatureClassToFeatureClass&lt;/TD&gt;&lt;TD&gt;C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\conversion.py&lt;/TD&gt;&lt;TD&gt;1675&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;/P&gt;&lt;P&gt;ERROR 000732: Output Location: Dataset E:\GIS\Data\band-tailed_pigeon-NOZM.shp does not exist or is not supported&lt;/P&gt;&lt;P&gt;ERROR 000735: Output Feature Class: Value is required&lt;/P&gt;&lt;P&gt;Failed to execute (FeatureClassToFeatureClass).&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please let me know what I am doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 11:37:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268594#M20694</guid>
      <dc:creator>BruceGreen</dc:creator>
      <dc:date>2015-08-20T11:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Removing ZM From Geometry Column Polygon Using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268595#M20695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Re: your code above, the following will work to copy the shape, but not sure if it will do anything for your original question about removing the Z and M.&amp;nbsp; You can use FeatureClassToShapefile of the FeatureClassToFeatureClass, but I remove the dashes and replaced with _ for the output of the FC2FC version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env
theWorkspace = r"D:\Data\Final"
env.workspace = theWorkspace
env.overwriteOutput
inFeature = r"c:\GIS\ROR\"band-tailed_pigeon.shp"
outFeature = "band_tailed_pigeon_NOZM.shp"

#either of the next two will work to copy to new location...
#not sure if it will do anything for you ZM question
#arcpy.FeatureClassToShapefile_conversion(inFeature, theWorkspace)
arcpy.FeatureClassToFeatureClass_conversion(inFeature, theWorkspace, outFeature)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:09:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268595#M20695</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-11T13:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Removing ZM From Geometry Column Polygon Using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268596#M20696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your parameters for arcpy.FeatureClassToFeatureClass are incorrect. Your are providing two parameters but you need at least three. Please take a look at&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://desktop.arcgis.com/en/desktop/latest/tools/conversion-toolbox/feature-class-to-feature-class.htm" target="_blank"&gt;http://desktop.arcgis.com/en/desktop/latest/tools/conversion-toolbox/feature-class-to-feature-class.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will work:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env
env.workspace = "E:\\GIS\\Data"
inFeature = "band-tailed_pigeon.shp"
outFeature = "band-tailed_pigeon-NOZM.shp"
env.outputZFlag = "DISABLED"
env.outputMFlag = "DISABLED"
arcpy.FeatureClassToFeatureClass_conversion(inFeature, env.workspace, outFeature)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or as an alternative you can use arcpy.CopyFeatures_management.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:09:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/removing-zm-from-geometry-column-polygon-using/m-p/268596#M20696</guid>
      <dc:creator>ThomasEmge</dc:creator>
      <dc:date>2021-12-11T13:09:20Z</dc:date>
    </item>
  </channel>
</rss>

