<?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: ArcGIS Online Polygon containing a point in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-polygon-containing-a-point/m-p/862016#M4226</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because of projection-on-the-fly, seeing them overlapping onscreen is absolutely no guarantee that they are in the same coordinate system&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Sep 2017 11:45:45 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2017-09-26T11:45:45Z</dc:date>
    <item>
      <title>ArcGIS Online Polygon containing a point</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-polygon-containing-a-point/m-p/862013#M4223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a feature layer containing polygons. How do I find if a point lies within any of the polygons in shapefile? I am using ArcGIS Online and ArcGIS API for Python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to extract features from the feature layer and could convert feature to polygon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I constructed arcgis.geometry.point object from X, Y.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However polygon.contains(point) is not returning any result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 06:27:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-polygon-containing-a-point/m-p/862013#M4223</guid>
      <dc:creator>DeepakSwamy</dc:creator>
      <dc:date>2017-09-26T06:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Polygon containing a point</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-polygon-containing-a-point/m-p/862014#M4224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The obvious questions,.... are the polygon and the point in the same coordinate system? are both systems defined? have you switched the values for X and Y?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 09:23:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-polygon-containing-a-point/m-p/862014#M4224</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-09-26T09:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Polygon containing a point</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-polygon-containing-a-point/m-p/862015#M4225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, both are in same coordinate system. I can see both polygon and point features in the map view. I can see that in map view point is contained within the polygon. I have derived polygon and point from the geometry of the features seen on the map. However polygon.contains(point) returns 'None' as response. Not sure what am I doing wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 10:51:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-polygon-containing-a-point/m-p/862015#M4225</guid>
      <dc:creator>DeepakSwamy</dc:creator>
      <dc:date>2017-09-26T10:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Polygon containing a point</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-polygon-containing-a-point/m-p/862016#M4226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because of projection-on-the-fly, seeing them overlapping onscreen is absolutely no guarantee that they are in the same coordinate system&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 11:45:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-polygon-containing-a-point/m-p/862016#M4226</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-09-26T11:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Polygon containing a point</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-polygon-containing-a-point/m-p/1078265#M6348</link>
      <description>&lt;P&gt;This seems to be a very old post but sharing as it might help someone else. if you want to search a point geometry within a polygon, you will have to use within filter while doing spatial query on polygon layer.&lt;/P&gt;&lt;P&gt;Code Example:&lt;/P&gt;&lt;P&gt;pt = Point({"x" : -10392706.32194956, "y" : 5622351.110157302, "spatialReference" : {"wkid" : 4326 }}) //constructing point geometry&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;gf = within(pt,sr=4326) // this is&amp;nbsp;&lt;EM&gt;geometry_filter we are creating which will be passed in the query below. you will have to import within filter&amp;nbsp;from arcgis.geometry.filters import within&lt;BR /&gt;&lt;/EM&gt;&lt;BR /&gt;polygon_features = polygon_layer.query(where='1=1',geometry_filter=gf,out_fields='field1,field2',return_geometry= False) // if you want polygon geometry to be returned then remove&amp;nbsp;return_geometry= False.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 15:00:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-polygon-containing-a-point/m-p/1078265#M6348</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-07-13T15:00:00Z</dc:date>
    </item>
  </channel>
</rss>

