<?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 Question about the boundingPolygonLayer parameter in the InterpolatePoints service in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/question-about-the-boundingpolygonlayer-parameter/m-p/1381619#M4667</link>
    <description>&lt;P&gt;Helllo,&lt;/P&gt;&lt;P&gt;I am trying to use the&amp;nbsp;InterpolatePoints service and I have a problem with the&amp;nbsp;boundingPolygonLayer parameter.&lt;/P&gt;&lt;P&gt;I am loading a layer with the border of Germany from ArcGIS Living ATLAS:&amp;nbsp;&lt;A href="https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/DEU_Boundaries_2022/FeatureServer" target="_self"&gt;url&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I know that I can pass the url directly and that works fine. For flexibility reasons I want to use the feature set option. My code for preparing the feature set looks like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    // Germany test for filtering the interpolated predictions
    var germanyLayer = new FeatureLayer({
      url: "https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/DEU_Boundaries_2022/FeatureServer"
    });

    var germanyQuery = germanyLayer.createQuery();
    germanyQuery.returnGeometry = true;
    germanyQuery.outFields = ["*"]; // Specify the fields you need
    const germanyResult = await germanyLayer.queryFeatures(germanyQuery);
    console.log('germanyResult: ', germanyResult);

    const germanyDict = {
      layerDefinition: {
          geometryType: "esriGeometryPolygon",
          fields: [
              {
                  name: "Id",
                  type: "esriFieldTypeOID",
                  alias: "Id"
              },
              {
                  name: "Name",
                  type: "esriFieldTypeString",
                  alias: "Name"
              }
              // Add other fields as necessary
          ]
      },
      featureSet: {
          geometryType: "esriGeometryPolygon",
          spatialReference: {
              wkid: 102100
          },
          features: [
              {
                  geometry: germanyResult.features[0].geometry,
                  attributes: {
                      Id: 1,
                      Name: "Germany"
                  }
              },
          ]
      }
    }&lt;/LI-CODE&gt;&lt;P&gt;Then I construct the parameters in the following way:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    const apiUrl = `https://analysis3.arcgis.com/arcgis/rest/services/tasks/GPServer/InterpolatePoints/submitJob`;
    const parameters = {
      f: "json",
      token: token,
      inputLayer: JSON.stringify(temp_feature_layer),
      field: fieldName,
      //outputName: JSON.stringify({ serviceProperties: { name: outputName } }),
      interpolateOption: interpolateOption,
      classificationType: classificationType,
      numClasses: 32,
      // boundingPolygonLayer: JSON.stringify({ url: 'https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/DEU_Boundaries_2022/FeatureServer/0' }),
      boundingPolygonLayer: JSON.stringify(germanyDict),
    };&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;DIV&gt;This is part of my implementation. I am skipping the rest because the code runs fine when I either don't specify the boundingPolygonLayer or when I use the url. When I use the germanyDict I get the following error from the submitted job&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-02-13 at 16.36.55.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94603i9218979187978008/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-02-13 at 16.36.55.png" alt="Screenshot 2024-02-13 at 16.36.55.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any help would be greatly appreciated.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;DIV&gt;Dimitris&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 13 Feb 2024 15:38:01 GMT</pubDate>
    <dc:creator>DimitriosIliadis</dc:creator>
    <dc:date>2024-02-13T15:38:01Z</dc:date>
    <item>
      <title>Question about the boundingPolygonLayer parameter in the InterpolatePoints service</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/question-about-the-boundingpolygonlayer-parameter/m-p/1381619#M4667</link>
      <description>&lt;P&gt;Helllo,&lt;/P&gt;&lt;P&gt;I am trying to use the&amp;nbsp;InterpolatePoints service and I have a problem with the&amp;nbsp;boundingPolygonLayer parameter.&lt;/P&gt;&lt;P&gt;I am loading a layer with the border of Germany from ArcGIS Living ATLAS:&amp;nbsp;&lt;A href="https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/DEU_Boundaries_2022/FeatureServer" target="_self"&gt;url&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I know that I can pass the url directly and that works fine. For flexibility reasons I want to use the feature set option. My code for preparing the feature set looks like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    // Germany test for filtering the interpolated predictions
    var germanyLayer = new FeatureLayer({
      url: "https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/DEU_Boundaries_2022/FeatureServer"
    });

    var germanyQuery = germanyLayer.createQuery();
    germanyQuery.returnGeometry = true;
    germanyQuery.outFields = ["*"]; // Specify the fields you need
    const germanyResult = await germanyLayer.queryFeatures(germanyQuery);
    console.log('germanyResult: ', germanyResult);

    const germanyDict = {
      layerDefinition: {
          geometryType: "esriGeometryPolygon",
          fields: [
              {
                  name: "Id",
                  type: "esriFieldTypeOID",
                  alias: "Id"
              },
              {
                  name: "Name",
                  type: "esriFieldTypeString",
                  alias: "Name"
              }
              // Add other fields as necessary
          ]
      },
      featureSet: {
          geometryType: "esriGeometryPolygon",
          spatialReference: {
              wkid: 102100
          },
          features: [
              {
                  geometry: germanyResult.features[0].geometry,
                  attributes: {
                      Id: 1,
                      Name: "Germany"
                  }
              },
          ]
      }
    }&lt;/LI-CODE&gt;&lt;P&gt;Then I construct the parameters in the following way:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    const apiUrl = `https://analysis3.arcgis.com/arcgis/rest/services/tasks/GPServer/InterpolatePoints/submitJob`;
    const parameters = {
      f: "json",
      token: token,
      inputLayer: JSON.stringify(temp_feature_layer),
      field: fieldName,
      //outputName: JSON.stringify({ serviceProperties: { name: outputName } }),
      interpolateOption: interpolateOption,
      classificationType: classificationType,
      numClasses: 32,
      // boundingPolygonLayer: JSON.stringify({ url: 'https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/DEU_Boundaries_2022/FeatureServer/0' }),
      boundingPolygonLayer: JSON.stringify(germanyDict),
    };&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;DIV&gt;This is part of my implementation. I am skipping the rest because the code runs fine when I either don't specify the boundingPolygonLayer or when I use the url. When I use the germanyDict I get the following error from the submitted job&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-02-13 at 16.36.55.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94603i9218979187978008/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-02-13 at 16.36.55.png" alt="Screenshot 2024-02-13 at 16.36.55.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any help would be greatly appreciated.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;DIV&gt;Dimitris&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Feb 2024 15:38:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/question-about-the-boundingpolygonlayer-parameter/m-p/1381619#M4667</guid>
      <dc:creator>DimitriosIliadis</dc:creator>
      <dc:date>2024-02-13T15:38:01Z</dc:date>
    </item>
  </channel>
</rss>

