<?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 Point in polygon association in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524656#M48933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A few years back, when we were evaluating ArcGIS Server, I created a geoprocessing proof-of-concept service that received a lat/long and returned polygon IDs containing said point. There's now a need to actually use this feature, and within a high-volume environment, no less, so I've been looking to redevelop properly. There appear to be a few ways to go about this - Simple enough! However, what's the fastest, &lt;EM&gt;most performant&lt;/EM&gt; way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a map service containing a few thousand overlapping polygons (just need the layer to make the association) - I would like to send an x,y point (lat/long) and return a list of IDs from the map service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I came across this thread:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://gis.stackexchange.com/questions/49699/how-to-find-the-polygon-containing-a-given-coordinate-using-arcgis-geometry-serv" title="http://gis.stackexchange.com/questions/49699/how-to-find-the-polygon-containing-a-given-coordinate-using-arcgis-geometry-serv"&gt;How to find the polygon containing a given coordinate using ArcGIS Geometry Service? - Geographic Information Systems St…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I go about it this way, or should I use &lt;A href="https://developers.arcgis.com/javascript/jsapi/geometryservice-amd.html"&gt;GeometryService&lt;/A&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Sep 2015 21:42:56 GMT</pubDate>
    <dc:creator>ChrisSmith7</dc:creator>
    <dc:date>2015-09-09T21:42:56Z</dc:date>
    <item>
      <title>Point in polygon association</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524656#M48933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A few years back, when we were evaluating ArcGIS Server, I created a geoprocessing proof-of-concept service that received a lat/long and returned polygon IDs containing said point. There's now a need to actually use this feature, and within a high-volume environment, no less, so I've been looking to redevelop properly. There appear to be a few ways to go about this - Simple enough! However, what's the fastest, &lt;EM&gt;most performant&lt;/EM&gt; way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a map service containing a few thousand overlapping polygons (just need the layer to make the association) - I would like to send an x,y point (lat/long) and return a list of IDs from the map service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I came across this thread:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://gis.stackexchange.com/questions/49699/how-to-find-the-polygon-containing-a-given-coordinate-using-arcgis-geometry-serv" title="http://gis.stackexchange.com/questions/49699/how-to-find-the-polygon-containing-a-given-coordinate-using-arcgis-geometry-serv"&gt;How to find the polygon containing a given coordinate using ArcGIS Geometry Service? - Geographic Information Systems St…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I go about it this way, or should I use &lt;A href="https://developers.arcgis.com/javascript/jsapi/geometryservice-amd.html"&gt;GeometryService&lt;/A&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Sep 2015 21:42:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524656#M48933</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-09-09T21:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Point in polygon association</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524657#M48934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have the answer but your question reminds me of &lt;A href="http://blogs.esri.com/esri/arcgis/2015/09/09/geometryengine-part-1-testing-spatial-relationships-and-editing/"&gt;a Blog post by ESRI&lt;/A&gt; about the client-side &lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.geometry.geometryengine-amd.html"&gt;GeometryEngine&lt;/A&gt; which may be faster if you're dealing with a lot of features. GeometryEngine is in beta and only available in API v3.13 &amp;amp; above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Sep 2015 21:56:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524657#M48934</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-09-09T21:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Point in polygon association</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524658#M48935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking about this - ideally, I'd like to be able to hit it through REST. Really, if I could use SQL Spatial Data, I'd be set (I can't, unfortunately).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 13:00:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524658#M48935</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-09-10T13:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Point in polygon association</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524659#M48936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I think using a QueryTask would be the way to go.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Are you dealing with one point or hundreds or more points?&lt;/LI&gt;&lt;LI&gt;Are you only dealing with on polygon layer?&lt;/LI&gt;&lt;LI&gt;Do you already have the polygon geometry at the client (because the layer is a FeatureLayer in your map)?&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 13:10:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524659#M48936</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-09-10T13:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Point in polygon association</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524660#M48937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've seen a noticeable performance difference depending on whether I return the geometry or not.&amp;nbsp; If all you need is data values returned, a queryTask has worked OK for me, if I have the returnGeometry set to false. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 13:27:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524660#M48937</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-09-10T13:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Point in polygon association</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524661#M48938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I would be dealing with a single point at any given moment in time, such as when a user registered on the system.&lt;/P&gt;&lt;P&gt;2. Just one layer - technically, about 20 coincidental layers merged into one layer, with overlaps (strictly to obtain the associations)&lt;/P&gt;&lt;P&gt;3. I can, but what I'd really like to do is hit it from the server, e.g. something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://geoservices.tamu.edu/Services/CensusIntersection/WebService/v04_01/Rest/?lat=34.0726207996348&amp;amp;lon=-118.397965182076&amp;amp;s=CA&amp;amp;censusYear=2010&amp;amp;apikey=demo&amp;amp;format=json&amp;amp;notStore=false&amp;amp;version=4.01" title="http://geoservices.tamu.edu/Services/CensusIntersection/WebService/v04_01/Rest/?lat=34.0726207996348&amp;amp;lon=-118.397965182076&amp;amp;s=CA&amp;amp;censusYear=2010&amp;amp;apikey=demo&amp;amp;format=json&amp;amp;notStore=false&amp;amp;version=4.01"&gt;http://geoservices.tamu.edu/Services/CensusIntersection/WebService/v04_01/Rest/?lat=34.0726207996348&amp;amp;lon=-118.3979651820…&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then massage and use the returned object server-side.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 13:37:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524661#M48938</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-09-10T13:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Point in polygon association</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524662#M48939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I will probably end-up going this route... I'll let you know how it ends-up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 18:56:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524662#M48939</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-09-14T18:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Point in polygon association</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524663#M48940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, so, with a fresh brain, I realized I was going about this the wrong way. I had to ensure query capabilities were enabled for the layer (curiously, they had been disabled on my targeted service) - everything I needed to do was available for me to hit from asp.net by loading the service URL with querystring params:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2FyourGISserver.com%2Farcgis%2Frest%2Fservices%2Fbase_services%2FyourMapLayer%2FMapServer%2F0%2Fquery%3Fwhere%3D%26" target="_blank"&gt;http://yourGISserver.com/arcgis/rest/services/base_services/yourMapLayer/MapServer/0/query?where=&amp;amp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;text=&amp;amp;&lt;/P&gt;&lt;P&gt;objectIds=&amp;amp;&lt;/P&gt;&lt;P&gt;time=&amp;amp;&lt;/P&gt;&lt;P&gt;geometry=%7B%22x%22+%3A+-104.53%2C+%22y%22+%3A+34.74%7D%0D%0A&amp;amp;&lt;/P&gt;&lt;P&gt;geometryType=esriGeometryPoint&amp;amp;&lt;/P&gt;&lt;P&gt;inSR=4326&amp;amp;&lt;/P&gt;&lt;P&gt;spatialRel=esriSpatialRelWithin&amp;amp;relationParam=&amp;amp;&lt;/P&gt;&lt;P&gt;outFields=yourTargetField&amp;amp;&lt;/P&gt;&lt;P&gt;returnGeometry=false&amp;amp;&lt;/P&gt;&lt;P&gt;maxAllowableOffset=&amp;amp;&lt;/P&gt;&lt;P&gt;geometryPrecision=&amp;amp;&lt;/P&gt;&lt;P&gt;outSR=&amp;amp;&lt;/P&gt;&lt;P&gt;returnIdsOnly=false&amp;amp;&lt;/P&gt;&lt;P&gt;returnCountOnly=false&amp;amp;&lt;/P&gt;&lt;P&gt;orderByFields=&amp;amp;&lt;/P&gt;&lt;P&gt;groupByFieldsForStatistics=&amp;amp;&lt;/P&gt;&lt;P&gt;outStatistics=&amp;amp;&lt;/P&gt;&lt;P&gt;returnZ=false&amp;amp;&lt;/P&gt;&lt;P&gt;returnM=false&amp;amp;&lt;/P&gt;&lt;P&gt;gdbVersion=&amp;amp;&lt;/P&gt;&lt;P&gt;returnDistinctValues=false&amp;amp;&lt;/P&gt;&lt;P&gt;returnTrueCurves=false&amp;amp;&lt;/P&gt;&lt;P&gt;resultOffset=&amp;amp;&lt;/P&gt;&lt;P&gt;resultRecordCount=&amp;amp;&lt;/P&gt;&lt;P&gt;f=pjson&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns a JSON object with the attributes I need!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;{
"displayFieldName": "DisplayField",
"fieldAliases": {
&amp;nbsp; "yourTargetField": "yourTargetField"
},
"fields": [
&amp;nbsp; {
&amp;nbsp; "name": "yourTargetField",
&amp;nbsp; "type": "esriFieldTypeString",
&amp;nbsp; "alias": "yourTargetField",
&amp;nbsp; "length": 6
&amp;nbsp; }
],
"features": [
&amp;nbsp; {
&amp;nbsp; "attributes": {
&amp;nbsp;&amp;nbsp;&amp;nbsp; "yourTargetField": "FOO123"
&amp;nbsp; }
&amp;nbsp; },
&amp;nbsp; {
&amp;nbsp; "attributes": {
&amp;nbsp;&amp;nbsp;&amp;nbsp; "yourTargetField": "BAR321"
&amp;nbsp; }
&amp;nbsp; },
&amp;nbsp; {
&amp;nbsp; "attributes": {
&amp;nbsp;&amp;nbsp;&amp;nbsp; "yourTargetField": "BIZ789"
&amp;nbsp; }
&amp;nbsp; },
&amp;nbsp; {
&amp;nbsp; "attributes": {
&amp;nbsp;&amp;nbsp;&amp;nbsp; "yourTargetField": "BAT987"
&amp;nbsp; }
&amp;nbsp; }
]
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:52:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-in-polygon-association/m-p/524663#M48940</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2021-12-11T22:52:32Z</dc:date>
    </item>
  </channel>
</rss>

