<?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 ArcGIS Server findNearest endpoint with multiple features in Analysis Layer. in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-findnearest-endpoint-with-multiple/m-p/1009912#M3653</link>
    <description>&lt;P&gt;I'm working on identifying the nearest feature to a set of lat/lng values.&amp;nbsp; I'm using ArcGIS Server's findNearest endpoint (server/rest/services/System/SpatialAnalysisTools/GPServer/FindNearest).&amp;nbsp; The service is setup so that I have to supply a value for the nearLayer and analysisLayer.&amp;nbsp; The nearLayer contains the service url I am trying to locate features in.&amp;nbsp; The analysisLayer has all the lat/lng values I am using to query the nearLayer.&amp;nbsp; My analysisLayer is setup like what is shown below.&amp;nbsp; I am sending multiple lat/lng in a single request.&amp;nbsp; The service returns a list of near features but I'm not sure how to join to the features from the analysisLayer.&amp;nbsp; The response I get includes all the fields from the nearLayer and also an OID field.&amp;nbsp; Is there a way I can put a key field in the analysisLayer and have that returned in the response?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Analysis Layer&lt;/P&gt;&lt;P&gt;{"layerDefinition": null, "featureSet": {"geometryType":"esriGeometryPoint","spatialReference":{"wkid":4326,"latestWkid":4326},"features":[{"geometry":{"x":-94.59117567799996,"y":38.134641259000034,"spatialReference":{"wkid":4326,"latestWkid":4326}}},{"geometry":{"x":-92.59117567799996,"y":38.134641259000034,"spatialReference":{"wkid":4326,"latestWkid":4326}}}]}}&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2020 20:33:57 GMT</pubDate>
    <dc:creator>JamesMadden1</dc:creator>
    <dc:date>2020-12-15T20:33:57Z</dc:date>
    <item>
      <title>ArcGIS Server findNearest endpoint with multiple features in Analysis Layer.</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-findnearest-endpoint-with-multiple/m-p/1009912#M3653</link>
      <description>&lt;P&gt;I'm working on identifying the nearest feature to a set of lat/lng values.&amp;nbsp; I'm using ArcGIS Server's findNearest endpoint (server/rest/services/System/SpatialAnalysisTools/GPServer/FindNearest).&amp;nbsp; The service is setup so that I have to supply a value for the nearLayer and analysisLayer.&amp;nbsp; The nearLayer contains the service url I am trying to locate features in.&amp;nbsp; The analysisLayer has all the lat/lng values I am using to query the nearLayer.&amp;nbsp; My analysisLayer is setup like what is shown below.&amp;nbsp; I am sending multiple lat/lng in a single request.&amp;nbsp; The service returns a list of near features but I'm not sure how to join to the features from the analysisLayer.&amp;nbsp; The response I get includes all the fields from the nearLayer and also an OID field.&amp;nbsp; Is there a way I can put a key field in the analysisLayer and have that returned in the response?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Analysis Layer&lt;/P&gt;&lt;P&gt;{"layerDefinition": null, "featureSet": {"geometryType":"esriGeometryPoint","spatialReference":{"wkid":4326,"latestWkid":4326},"features":[{"geometry":{"x":-94.59117567799996,"y":38.134641259000034,"spatialReference":{"wkid":4326,"latestWkid":4326}}},{"geometry":{"x":-92.59117567799996,"y":38.134641259000034,"spatialReference":{"wkid":4326,"latestWkid":4326}}}]}}&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 20:33:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-findnearest-endpoint-with-multiple/m-p/1009912#M3653</guid>
      <dc:creator>JamesMadden1</dc:creator>
      <dc:date>2020-12-15T20:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server findNearest endpoint with multiple features in Analysis Layer.</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-findnearest-endpoint-with-multiple/m-p/1011716#M3659</link>
      <description>&lt;P&gt;I was able to get fields from the analysis layer returned in the connectingLinesLayer results.&amp;nbsp; I was referencing the nearestLayer endpoint which only gives back the near features.&amp;nbsp; The analysis layer was updated to include a layerDefinition for the input geometries (see below).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"layerDefinition": {"geometryType": "esriGeometryPoint","fields": [{"name": "ID","type": "esriFieldTypeOID","alias": "ID"}]}, "featureSet": {"geometryType":"esriGeometryPoint","spatialReference":{"wkid":4326,"latestWkid":4326},"features":[{“attributes”:{“ID”:1}, "geometry":{"x":-94.59117567799996,"y":38.134641259000034,"spatialReference":{"wkid":4326,"latestWkid":4326}},}]}}&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 14:39:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/arcgis-server-findnearest-endpoint-with-multiple/m-p/1011716#M3659</guid>
      <dc:creator>JamesMadden1</dc:creator>
      <dc:date>2020-12-22T14:39:41Z</dc:date>
    </item>
  </channel>
</rss>

