<?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: Does RasterToPolygon not honour environmental settings? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/does-rastertopolygon-not-honour-environmental/m-p/1053795#M6011</link>
    <description>&lt;P&gt;From...&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/raster-to-polygon.htm" target="_blank"&gt;Raster to Polygon (Conversion)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;these are the environment parameters that are supported&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Auto Commit, Current Workspace, Default Output Z Value, Extent, Geographic Transformations, M Resolution, M Tolerance, Maintain Spatial Index, Output CONFIG Keyword, Output Coordinate System, Output has M values, Output has Z values, Output M Domain, Output XY Domain, Output Z Domain, Scratch Workspace, Snap Raster, XY Resolution, XY Tolerance, Z Resolution, Z Tolerance&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 May 2021 15:09:43 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-05-03T15:09:43Z</dc:date>
    <item>
      <title>Does RasterToPolygon not honour environmental settings?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/does-rastertopolygon-not-honour-environmental/m-p/1053761#M6010</link>
      <description>&lt;P&gt;I am running in some strange problems in ArcGIS Pro 2.7.2. Within a notebook&amp;nbsp; I started to define some environmental settings, setting addOutputsToMap to false and overwriteOutput to true, and I specify the outputCoordinateSystem via&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.env.outputCoordinateSystem = arcpy.SpatialReference(25832)&lt;/LI-CODE&gt;&lt;P&gt;I retrieve an iterator containing the path of a number of tif files and iterate over it.&lt;/P&gt;&lt;P&gt;Within the iteration I utilize RasterToPolygon&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.conversion.RasterToPolygon(tif,out_fc,simplify="NO_SIMPLIFY",raster_field="Value")&lt;/LI-CODE&gt;&lt;P&gt;Even though I set outputOverwrite = True I am getting ERROR 000528: Output Path/to/File already exists from RasterToPolygon. Does not happen all the time, but from time to time.&lt;/P&gt;&lt;P&gt;The other problem is the coordinate system defined for the notebook. In case I leave the environmental attribute addOutputsToMap at the default value I get the immediate response while running the RasterToPolygon cell. The feature classes created by the tool are missing the spatial reference!&lt;/P&gt;&lt;P&gt;I checked... all tif files are in EPSG 25832, the feature dataset I am writing the feature classes into is defined in EPSG 25832, and the notebook defines the coordinate system to EPSG 25832.&lt;/P&gt;&lt;P&gt;I was also running the RasterToPolygon in an with-statement, utilizing EnvManger... to no avail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder where RasterToPolygon drops the coordinate system.&lt;BR /&gt;In case it's not meant to honour neither environmental settings, nor inherit spatial references from input files then I wonder why there is no parameter, offering the possibility&amp;nbsp; to define the output coordinate system for the method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Python used here is in version 3.7.9 and I did not clone the environment... it's the default.&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 14:02:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/does-rastertopolygon-not-honour-environmental/m-p/1053761#M6010</guid>
      <dc:creator>TomGeo</dc:creator>
      <dc:date>2021-05-03T14:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: Does RasterToPolygon not honour environmental settings?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/does-rastertopolygon-not-honour-environmental/m-p/1053795#M6011</link>
      <description>&lt;P&gt;From...&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/raster-to-polygon.htm" target="_blank"&gt;Raster to Polygon (Conversion)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;these are the environment parameters that are supported&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Auto Commit, Current Workspace, Default Output Z Value, Extent, Geographic Transformations, M Resolution, M Tolerance, Maintain Spatial Index, Output CONFIG Keyword, Output Coordinate System, Output has M values, Output has Z values, Output M Domain, Output XY Domain, Output Z Domain, Scratch Workspace, Snap Raster, XY Resolution, XY Tolerance, Z Resolution, Z Tolerance&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 15:09:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/does-rastertopolygon-not-honour-environmental/m-p/1053795#M6011</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-05-03T15:09:43Z</dc:date>
    </item>
  </channel>
</rss>

