<?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: Set extent without using an existing raster with Feature To Raster in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/set-extent-without-using-an-existing-raster-with/m-p/252819#M19477</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK - I solved this one on my own.&amp;nbsp; If you set the extent like this it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.env.extent = "677000 5527000 710000 5545000"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This does not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;#arcpy.env.extent = arcpy.Extent("677000,5527000,710000,5545000")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Apr 2011 23:16:25 GMT</pubDate>
    <dc:creator>GuyDuke</dc:creator>
    <dc:date>2011-04-06T23:16:25Z</dc:date>
    <item>
      <title>Set extent without using an existing raster with Feature To Raster</title>
      <link>https://community.esri.com/t5/python-questions/set-extent-without-using-an-existing-raster-with/m-p/252818#M19476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to convert feature data to raster and have a defined coordinate extent that I want to use for the output grids.&amp;nbsp; I don't, however, want to rely on using snap raster with an existing dataset to do this.&amp;nbsp; This code does the conversion but it ignores the extent setting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy
arcpy.env.workspace = "C:\Test\ArcGIS_Python_Course\Roads"
arcpy.env.extent = arcpy.Extent("677000,5527000,710000,5545000")


#set local variables
cellSize = 100
inFeature = "Roads3.shp"
outRaster = "g3"
field = "GRID"

outGrid = arcpy.FeatureToRaster_conversion(inFeature, field, outRaster, cellSize)

print "Finishg processing..."&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know how to set the grid extent for this tool without using an existing file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 22:31:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-extent-without-using-an-existing-raster-with/m-p/252818#M19476</guid>
      <dc:creator>GuyDuke</dc:creator>
      <dc:date>2011-04-06T22:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set extent without using an existing raster with Feature To Raster</title>
      <link>https://community.esri.com/t5/python-questions/set-extent-without-using-an-existing-raster-with/m-p/252819#M19477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK - I solved this one on my own.&amp;nbsp; If you set the extent like this it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.env.extent = "677000 5527000 710000 5545000"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This does not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;#arcpy.env.extent = arcpy.Extent("677000,5527000,710000,5545000")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 23:16:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-extent-without-using-an-existing-raster-with/m-p/252819#M19477</guid>
      <dc:creator>GuyDuke</dc:creator>
      <dc:date>2011-04-06T23:16:25Z</dc:date>
    </item>
  </channel>
</rss>

