<?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: Field name in extract multi-values to points with iterator in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/field-name-in-extract-multi-values-to-points-with/m-p/432416#M14534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi bshaftel, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using iterator means iterating one raster at a time: per iteration. This single raster in each iteration goes as input to the extract multi values to point tool as a connection to the Input Rasters parameter. This Input rasters parameter takes multiple rasters at one time (it is multivalue value table) - With this in information -are you trying to run the extract multi values to point tool on each raster one at a time per iteration? or you intend to add all the rasters together to this tool? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, the %Name% is not working with the value list parameter of this tool at present. It is mostly a bug or a current limitation. I could find and let you know. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know what you want to do with the extract tool, may be there is a workaround.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jun 2013 22:56:27 GMT</pubDate>
    <dc:creator>ShitijMehta</dc:creator>
    <dc:date>2013-06-26T22:56:27Z</dc:date>
    <item>
      <title>Field name in extract multi-values to points with iterator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-name-in-extract-multi-values-to-points-with/m-p/432415#M14533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi - I am trying to iterate over ~1300 rasters and add the values to a point feature class in a file geodatabase.&amp;nbsp; I'd like the field names to match the original raster names, but it doesn't work out that way.&amp;nbsp; I tried using in-line variable substitution for the output field name in the extract multi-values to points tool, but it doesn't seem to be working (%Name%).&amp;nbsp; I left it empty as well, but it comes up with a strange naming convention and doesn't use the actual raster name for the field names.&amp;nbsp; I've attached the model below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]25516[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 22:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-name-in-extract-multi-values-to-points-with/m-p/432415#M14533</guid>
      <dc:creator>RebeccaShaftel</dc:creator>
      <dc:date>2013-06-26T22:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Field name in extract multi-values to points with iterator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-name-in-extract-multi-values-to-points-with/m-p/432416#M14534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi bshaftel, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using iterator means iterating one raster at a time: per iteration. This single raster in each iteration goes as input to the extract multi values to point tool as a connection to the Input Rasters parameter. This Input rasters parameter takes multiple rasters at one time (it is multivalue value table) - With this in information -are you trying to run the extract multi values to point tool on each raster one at a time per iteration? or you intend to add all the rasters together to this tool? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, the %Name% is not working with the value list parameter of this tool at present. It is mostly a bug or a current limitation. I could find and let you know. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know what you want to do with the extract tool, may be there is a workaround.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 22:56:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-name-in-extract-multi-values-to-points-with/m-p/432416#M14534</guid>
      <dc:creator>ShitijMehta</dc:creator>
      <dc:date>2013-06-26T22:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Field name in extract multi-values to points with iterator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-name-in-extract-multi-values-to-points-with/m-p/432417#M14535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to add each raster value separately as a new field to the point feature class.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have a workaround to get the raster name added as the field name, that would be great.&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, 26 Jun 2013 23:07:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-name-in-extract-multi-values-to-points-with/m-p/432417#M14535</guid>
      <dc:creator>RebeccaShaftel</dc:creator>
      <dc:date>2013-06-26T23:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Field name in extract multi-values to points with iterator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-name-in-extract-multi-values-to-points-with/m-p/432418#M14536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Rebecca,&amp;nbsp; unfortunatelty this is an issue with the tool not updating the default name for each iteration and not being able to handle inline variables.&amp;nbsp; A defect has been submitted (reference NIM087496).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for a workaround. How famililar are you with python?&amp;nbsp; A pretty simple python expression (see attached python script) can accomplish this.&amp;nbsp; If you require a model builder tool as part of a bigger workflow, you could always modify this to create a script tool which you can use in a model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code is used to create a list of rasters from a workspace (much like the iterator does).&amp;nbsp; I have provided a wildcard option as well to select only rasters with the characters "_b" in the name.&amp;nbsp; This multivalue list can then be used as input to the ExtractMultivaluesToPoints tool.&amp;nbsp; The field names will default to the same name as the input raster.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on your description this should provide you with the desired output. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a following code example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;inRasterWksp = r"D:\data\rasters.gdb" inPnts = r"D:\data\fgdb.gdb\randPnts"&amp;nbsp; arcpy.CheckOutExtension("Spatial") arcpy.env.workspace = inRasterWksp&amp;nbsp; #create a list of rasters (GRID only) with "-b" in the name rasters = arcpy.ListRasters("*_b*","")&amp;nbsp; #run tool with all rasters in the list accepting default field names result = arcpy.sa.ExtractMultiValuesToPoints(inPnts,rasters)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck. I hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Ryan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 23:06:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-name-in-extract-multi-values-to-points-with/m-p/432418#M14536</guid>
      <dc:creator>RyanDeBruyn</dc:creator>
      <dc:date>2013-07-02T23:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Field name in extract multi-values to points with iterator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-name-in-extract-multi-values-to-points-with/m-p/432419#M14537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Rebecca,&amp;nbsp; unfortunatelty this is an issue with the tool not updating the default name for each iteration and not being able to handle inline variables.&amp;nbsp; A defect has been submitted (reference NIM087496).&lt;BR /&gt;&lt;BR /&gt;As for a workaround. How famililar are you with python?&amp;nbsp; A pretty simple python expression (see attached python script) can accomplish this.&amp;nbsp; If you require a model builder tool as part of a bigger workflow, you could always modify this to create a script tool which you can use in a model.&lt;BR /&gt;&lt;BR /&gt;The code is used to create a list of rasters from a workspace (much like the iterator does).&amp;nbsp; I have provided a wildcard option as well to select only rasters with the characters "_b" in the name.&amp;nbsp; This multivalue list can then be used as input to the ExtractMultivaluesToPoints tool.&amp;nbsp; The field names will default to the same name as the input raster.&lt;BR /&gt;&lt;BR /&gt;Based on your description this should provide you with the desired output. &lt;BR /&gt;&lt;BR /&gt;Here is a following code example:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;inRasterWksp = r"D:\data\rasters.gdb"
inPnts = r"D:\data\fgdb.gdb\randPnts"

arcpy.CheckOutExtension("Spatial")
arcpy.env.workspace = inRasterWksp

#create a list of rasters (GRID only) with "-b" in the name
rasters = arcpy.ListRasters("*_b*","")

#run tool with all rasters in the list accepting default field names
result = arcpy.sa.ExtractMultiValuesToPoints(inPnts,rasters)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck. I hope this helps.&lt;BR /&gt;-Ryan&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No one ever replied, so I will....Thank you!&amp;nbsp; This script served excellently as a solution to the problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:25:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-name-in-extract-multi-values-to-points-with/m-p/432419#M14537</guid>
      <dc:creator>PatriciaPendleton1</dc:creator>
      <dc:date>2021-12-11T19:25:57Z</dc:date>
    </item>
  </channel>
</rss>

