<?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 Best way to return whether a feature falls within a polygon?  in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/best-way-to-return-whether-a-feature-falls-within/m-p/864827#M5583</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a fairly simple question: what is the best way to run a binary (yes/no) query to let me know if a point/polygon/line falls within an area. The use case is this: I have a parcel and want to return whether it falls within like five zones. I'm looking for a python solution if possible, as this will be iframed into a pop-up result in a custom Web App.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I need is a 'yes' or 'no' result from the queries. Please help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Jul 2017 18:56:30 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2017-07-11T18:56:30Z</dc:date>
    <item>
      <title>Best way to return whether a feature falls within a polygon?</title>
      <link>https://community.esri.com/t5/developers-questions/best-way-to-return-whether-a-feature-falls-within/m-p/864827#M5583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a fairly simple question: what is the best way to run a binary (yes/no) query to let me know if a point/polygon/line falls within an area. The use case is this: I have a parcel and want to return whether it falls within like five zones. I'm looking for a python solution if possible, as this will be iframed into a pop-up result in a custom Web App.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I need is a 'yes' or 'no' result from the queries. Please help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jul 2017 18:56:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/best-way-to-return-whether-a-feature-falls-within/m-p/864827#M5583</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-07-11T18:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to return whether a feature falls within a polygon?</title>
      <link>https://community.esri.com/t5/developers-questions/best-way-to-return-whether-a-feature-falls-within/m-p/864828#M5584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sure you can do this with Python but if the data are stored in ArcGIS feature services, then you can use any language to make a REST API call with the appropriate spatialRelationship operator and parameters. &amp;nbsp;See the layer query doc here&amp;nbsp;&lt;A class="link-titled" href="http://resources.arcgis.com/en/help/arcgis-rest-api/#/Query_Feature_Service_Layer/02r3000000r1000000/" title="http://resources.arcgis.com/en/help/arcgis-rest-api/#/Query_Feature_Service_Layer/02r3000000r1000000/"&gt;ArcGIS REST API&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example of a REST request that will return the state that intersects the given point:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_States_Generalized/FeatureServer/0/query?where=&amp;amp;objectIds=&amp;amp;time=&amp;amp;geometry=-118.22088%2C34.56495&amp;amp;geometryType=esriGeometryPoint&amp;amp;inSR=4326&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;resultType=none&amp;amp;distance=0.0&amp;amp;units=esriSRUnit_Meter&amp;amp;returnGeodetic=false&amp;amp;outFields=FID%2CSTATE_NAME&amp;amp;returnGeometry=false&amp;amp;returnCentroid=false&amp;amp;multipatchOption=xyFootprint&amp;amp;maxAllowableOffset=&amp;amp;geometryPrecision=&amp;amp;outSR=&amp;amp;returnIdsOnly=false&amp;amp;returnCountOnly=false&amp;amp;returnExtentOnly=false&amp;amp;returnDistinctValues=false&amp;amp;orderByFields=&amp;amp;groupByFieldsForStatistics=&amp;amp;outStatistics=&amp;amp;resultOffset=&amp;amp;resultRecordCount=&amp;amp;returnZ=false&amp;amp;returnM=false&amp;amp;quantizationParameters=&amp;amp;sqlFormat=none&amp;amp;f=html&amp;amp;token=" title="https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_States_Generalized/FeatureServer/0/query?where=&amp;amp;objectIds=&amp;amp;time=&amp;amp;geometry=-118.22088%2C34.56495&amp;amp;geometryType=esriGeometryPoint&amp;amp;inSR=4326&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;resultType=none&amp;amp;distance=0.0&amp;amp;units=esriSRUnit_Meter&amp;amp;returnGeodetic=false&amp;amp;outFields=FID%2CSTATE_NAME&amp;amp;returnGeometry=false&amp;amp;returnCentroid=false&amp;amp;multipatchOption=xyFootprint&amp;amp;maxAllowableOffset=&amp;amp;geometryPrecision=&amp;amp;outSR=&amp;amp;returnIdsOnly=false&amp;amp;returnCountOnly=false&amp;amp;returnExtentOnly=false&amp;amp;returnDistinctValues=false&amp;amp;orderByFields=&amp;amp;groupByFieldsForStatistics=&amp;amp;outStatistics=&amp;amp;resultOffset=&amp;amp;resultRecordCount=&amp;amp;returnZ=false&amp;amp;returnM=false&amp;amp;quantizationParameters=&amp;amp;sqlFormat=none&amp;amp;f=html&amp;amp;token="&gt;https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_States_Generalized/FeatureServer/0/query?where=&amp;amp;ob…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 18:20:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/best-way-to-return-whether-a-feature-falls-within/m-p/864828#M5584</guid>
      <dc:creator>AllanLaframboise</dc:creator>
      <dc:date>2017-07-12T18:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to return whether a feature falls within a polygon?</title>
      <link>https://community.esri.com/t5/developers-questions/best-way-to-return-whether-a-feature-falls-within/m-p/864829#M5585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is actually perfect. You can execute the proper spatial queries both Map &amp;amp; Feature services, which is perfect.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Springboarding off of that realization -- are you familiar with a JS / Python code snippet that has an if/else statement for REST endpoint responses? My end-use is this: Hitting a webpage will trigger several of these spatial queries and return whether the point is in a number of areas (i.e. housing development area, wetland, etc.). I'm looking for a boolean logic of yes/no, so I imagine I could write a JSON parser to look for a !='No Record Found'&amp;nbsp;and either print 'Yes' or 'No' depending on the response...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know of any samples out there for parsing the REST API's responses?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 18:54:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/best-way-to-return-whether-a-feature-falls-within/m-p/864829#M5585</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-07-12T18:54:52Z</dc:date>
    </item>
  </channel>
</rss>

