<?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: Extract image x,y from lat long coordinates? in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/extract-image-x-y-from-lat-long-coordinates/m-p/221660#M12592</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I actually do know how to extract values to points. What I am after is the corresponding image x/y coordinates (pixel xy in the image, not geographic xy), that go with the lat/long points. The student I'm working with needs the image xy to use in a separate script he's written that analyzes the pixel values for cloud cover and radiance at specified locations. It's not a GIS script so it just needs image coordinates for the pixels.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I have a workaround but would still like to know if Arc can determine the image coordinates of a point over the image.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Oct 2012 00:20:34 GMT</pubDate>
    <dc:creator>DavidMedeiros</dc:creator>
    <dc:date>2012-10-23T00:20:34Z</dc:date>
    <item>
      <title>Extract image x,y from lat long coordinates?</title>
      <link>https://community.esri.com/t5/data-management-questions/extract-image-x-y-from-lat-long-coordinates/m-p/221658#M12590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have some geo referenced images that I need to extract a series of pixel values for at specific lat/long locations (that part is easy). I also need to extract the image x and y for each of these pixels and I don't see any way to do that in Arc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions for getting the image xy (not the map xy) from an image layer based on input coordinates or points?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;David&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 19:25:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/extract-image-x-y-from-lat-long-coordinates/m-p/221658#M12590</guid>
      <dc:creator>DavidMedeiros</dc:creator>
      <dc:date>2012-10-22T19:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Extract image x,y from lat long coordinates?</title>
      <link>https://community.esri.com/t5/data-management-questions/extract-image-x-y-from-lat-long-coordinates/m-p/221659#M12591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi David,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to extract the actual pixel value and place it into an attribute table of a point feature class you can use the &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//009z0000002t000000"&gt;extract values to points&lt;/A&gt;&lt;SPAN&gt; tool in the spatial analyst extraction tool set.&amp;nbsp; If you actually want to clip the raster to a point feature class and essentially end up with a raster that contains a single pixel under each point you can use the &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//009z0000002n000000"&gt;extract by mask&lt;/A&gt;&lt;SPAN&gt; tool in the spatial analyst extraction tool set. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jamie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 21:27:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/extract-image-x-y-from-lat-long-coordinates/m-p/221659#M12591</guid>
      <dc:creator>JamieDrisdelle</dc:creator>
      <dc:date>2012-10-22T21:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Extract image x,y from lat long coordinates?</title>
      <link>https://community.esri.com/t5/data-management-questions/extract-image-x-y-from-lat-long-coordinates/m-p/221660#M12592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I actually do know how to extract values to points. What I am after is the corresponding image x/y coordinates (pixel xy in the image, not geographic xy), that go with the lat/long points. The student I'm working with needs the image xy to use in a separate script he's written that analyzes the pixel values for cloud cover and radiance at specified locations. It's not a GIS script so it just needs image coordinates for the pixels.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I have a workaround but would still like to know if Arc can determine the image coordinates of a point over the image.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 00:20:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/extract-image-x-y-from-lat-long-coordinates/m-p/221660#M12592</guid>
      <dc:creator>DavidMedeiros</dc:creator>
      <dc:date>2012-10-23T00:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extract image x,y from lat long coordinates?</title>
      <link>https://community.esri.com/t5/data-management-questions/extract-image-x-y-from-lat-long-coordinates/m-p/221661#M12593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi David,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can do this in ArcGIS but it would require you to use Python.&amp;nbsp; The method you would want to use is &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018v00000023000000" rel="nofollow noopener noreferrer" target="_blank"&gt;RasterToNumPyArray&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; Once you convert your raster to an array you can query it using numpy in Python.&amp;nbsp; Here is a basic code sample.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import numpy
import arcpy

myArray = arcpy.RasterToNumPyArray('C:/data/inRaster')
pixelvalue = myArray[1,0]

print pixelvalue
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first value in the array will start at 0,0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jamie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:48:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/extract-image-x-y-from-lat-long-coordinates/m-p/221661#M12593</guid>
      <dc:creator>JamieDrisdelle</dc:creator>
      <dc:date>2021-12-11T10:48:30Z</dc:date>
    </item>
  </channel>
</rss>

