{"id":1112481,"date":"2021-01-20T14:50:24","date_gmt":"2021-01-20T22:50:24","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=1112481"},"modified":"2024-11-01T00:16:46","modified_gmt":"2024-11-01T07:16:46","slug":"use-arcade-geometry-functions","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions","title":{"rendered":"Use Arcade geometry functions with FeatureSets to provide spatial context"},"author":7121,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[23341,777102],"tags":[32551,42611,758221,758231],"industry":[],"product":[36551],"class_list":["post-1112481","blog","type-blog","status-publish","format-standard","hentry","category-analytics","category-arcade","tag-arcade","tag-configurable-apps","tag-geometry-functions","tag-intersects","product-arcgis-online"],"acf":{"short_description":"Present information from other layers in your pop-ups, such as lists of nearby schools or stores, using FeatureSets and geometry functions.","flexible_content":[{"acf_fc_layout":"content","content":"<p>A major benefit of a Geographic Information System (GIS) is the ability to bring different data layers together spatially. A common 2-step GIS workflow is first creating buffers or drive-time polygons from a points layer of something like schools or hospitals. Then second, performing a spatial join using that new polygon layer with additional attributes of the community or natural environment within those polygons. Traditionally, this type of geoprocessing had to be pre-calculated before you could present your results. Furthermore, when a there was newer version of one of your input layers, you had to redo your geoprocessing and start all over again.<\/p>\n<p>Today, we live in the world of live feeds and web layers that are constantly updated with new features and refreshed attribute values. The geometry functions in Arcade allow us to work with these web layers and perform such calculations on the fly when someone interacts with an app. Arcade <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/data_functions\/#featuresetbyid\" target=\"_blank\" rel=\"noopener\">FeatureSet functions<\/a> allow us to reference other layers within your map in pop-ups. Simple <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/\" target=\"_blank\" rel=\"noopener\">geometry functions<\/a> such as <em>Intersects()<\/em>, <em>Buffer()<\/em>, and <em>Contains()<\/em> allow us to perform spatial joins and geoprocessing with those layers on the fly, in real time. Combining the two allows us to present informative pop-ups in maps and in side panels within configurable apps.<\/p>\n"},{"acf_fc_layout":"content","content":"<h1><strong>Use <em>Intersects()<\/em> to combine existing point and polygon layers<\/strong><\/h1>\n<p>For example, I have two layers for a project I did about the pipeline of transfer students from community colleges to universities. I have points of California community colleges, and polygons of 45-minute drive-times of California&#8217;s public universities, both as existing layers. I created my pop-ups to display what universities are close by for transfer students from each community college. This pop-up is then used in my <a href=\"https:\/\/arcgis.com\/apps\/Minimalist\/index.html?appid=c11a49b3d1ae4af59eebc8145eb3aaf3\" target=\"_blank\" rel=\"noopener\">final app&#8217;s<\/a> side panel to display the number and the list of likely transfer destinations from each community college.<\/p>\n<p>If the community college is within more than one university&#8217;s 45-minute drive-time area, which is the case for Cerritos College, we see a count and list of likely universities for transfer students:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1112771,"id":1112771,"title":"CerritosCollege","filename":"CerritosCollege-1.png","filesize":76112,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CerritosCollege-1.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\/cerritoscollege-2","alt":"Cerritos College is selected in the map, pop-up reads: Likely universities for transfer students from this college are the 6 public universities in a commutable distance: * Cal State Los Angeles * Cal State Long Beach * Cal State Fullerton * Cal Poly Pomona * Cal State Dominguez Hills * UC Irvine","author":"7121","description":"","caption":"","name":"cerritoscollege-2","status":"inherit","uploaded_to":1112481,"date":"2021-01-14 05:43:17","modified":"2021-01-20 22:34:20","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1054,"height":415,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CerritosCollege-1-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CerritosCollege-1.png","medium-width":464,"medium-height":183,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CerritosCollege-1.png","medium_large-width":768,"medium_large-height":302,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CerritosCollege-1.png","large-width":1054,"large-height":415,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CerritosCollege-1.png","1536x1536-width":1054,"1536x1536-height":415,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CerritosCollege-1.png","2048x2048-width":1054,"2048x2048-height":415,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CerritosCollege-1-826x325.png","card_image-width":826,"card_image-height":325,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CerritosCollege-1.png","wide_image-width":1054,"wide_image-height":415}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CerritosCollege-1.png"},{"acf_fc_layout":"content","content":"<p>If the community college is in a commutable area for only one university, which is the case for Victor Valley College, we see a slightly different sentence: &#8220;The most likely university for transfer students is the 1 university in a commutable distance:&#8221; and then the name of that university (in this case, Cal State San Bernardino).<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1112661,"id":1112661,"title":"VictorValleyCollege","filename":"VictorValleyCollege.png","filesize":27438,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/VictorValleyCollege.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\/victorvalleycollege","alt":"Victor Valley College is selected in the map, and pop-up reads: The most likely university for transfer students from this college is the 1 public university in a commutable distance: * Cal State San Bernardino","author":"7121","description":"","caption":"","name":"victorvalleycollege","status":"inherit","uploaded_to":1112481,"date":"2021-01-14 01:29:53","modified":"2021-01-20 22:35:34","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":820,"height":358,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/VictorValleyCollege-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/VictorValleyCollege.png","medium-width":464,"medium-height":203,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/VictorValleyCollege.png","medium_large-width":768,"medium_large-height":335,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/VictorValleyCollege.png","large-width":820,"large-height":358,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/VictorValleyCollege.png","1536x1536-width":820,"1536x1536-height":358,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/VictorValleyCollege.png","2048x2048-width":820,"2048x2048-height":358,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/VictorValleyCollege.png","card_image-width":820,"card_image-height":358,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/VictorValleyCollege.png","wide_image-width":820,"wide_image-height":358}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/VictorValleyCollege.png"},{"acf_fc_layout":"content","content":"<p>If the community college is not in any drive-time polygons from the universities, we see different text entirely: &#8220;No public universities are in a commutable distance. Transfer students from this community college are likely to be residential students.&#8221; College of the Desert is a community college in this situation:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1112671,"id":1112671,"title":"CollegeOfTheDesert","filename":"CollegeOfTheDesert.png","filesize":18085,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CollegeOfTheDesert.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\/collegeofthedesert","alt":"College of the Desert is selected in the map and pop-up reads: No public universities are in a commutable distance. Transfer students from this community college are likely to be residential students.","author":"7121","description":"","caption":"","name":"collegeofthedesert","status":"inherit","uploaded_to":1112481,"date":"2021-01-14 01:34:02","modified":"2021-01-20 22:36:21","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":920,"height":297,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CollegeOfTheDesert-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CollegeOfTheDesert.png","medium-width":464,"medium-height":150,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CollegeOfTheDesert.png","medium_large-width":768,"medium_large-height":248,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CollegeOfTheDesert.png","large-width":920,"large-height":297,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CollegeOfTheDesert.png","1536x1536-width":920,"1536x1536-height":297,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CollegeOfTheDesert.png","2048x2048-width":920,"2048x2048-height":297,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CollegeOfTheDesert-826x267.png","card_image-width":826,"card_image-height":267,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CollegeOfTheDesert.png","wide_image-width":920,"wide_image-height":297}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CollegeOfTheDesert.png"},{"acf_fc_layout":"content","content":"<p>How was this done?<\/p>\n<p>Both the count and the list of universities use the <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/geometry_functions\/#intersects\" target=\"_blank\" rel=\"noopener\"><em>Intersects()\u00a0<\/em>function<\/a>. The syntax for this function is very simple: Intersects(geometry that is tested for the intersects relationship, the geometry being intersected). This yields a Boolean (true\/false) value, and returns a FeatureSet of features that do indeed intersect the second geometry. What makes this powerful is the ability to combine this with other Arcade functions to create informative pop-ups that provide your desired context.<\/p>\n<h2><strong>How to display the count<\/strong><\/h2>\n<p>Step 1. From the community college points layer, navigate to Configure Pop-up and add an expression. These points will be the geometry that is tested for the intersects relationship.<\/p>\n<p>Step 2. Use <em>FeatureSetbyID()<\/em> to create a FeatureSet of the university drive-time polygons (polygon layer within this same map). These polygons will be the geometry being intersected.<\/p>\n<p>Step 3. Return the new FeatureSet that you just created. (Tip: you can even click &#8220;Test&#8221; to see an example list of records.)<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1112741,"id":1112741,"title":"featureSetOfUniversityPolygons","filename":"featureSetOfUniversityPolygons.png","filesize":15836,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/featureSetOfUniversityPolygons.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\/featuresetofuniversitypolygons","alt":"var drive_time_area = FeatureSetByID($map, layer id retrieved through Arcade expression interface); var universities = Intersects($feature, drive_time_area); return universities;","author":"7121","description":"","caption":"","name":"featuresetofuniversitypolygons","status":"inherit","uploaded_to":1112481,"date":"2021-01-14 05:33:24","modified":"2021-01-20 22:37:40","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":836,"height":266,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/featureSetOfUniversityPolygons-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/featureSetOfUniversityPolygons.png","medium-width":464,"medium-height":148,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/featureSetOfUniversityPolygons.png","medium_large-width":768,"medium_large-height":244,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/featureSetOfUniversityPolygons.png","large-width":836,"large-height":266,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/featureSetOfUniversityPolygons.png","1536x1536-width":836,"1536x1536-height":266,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/featureSetOfUniversityPolygons.png","2048x2048-width":836,"2048x2048-height":266,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/featureSetOfUniversityPolygons-826x263.png","card_image-width":826,"card_image-height":263,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/featureSetOfUniversityPolygons.png","wide_image-width":836,"wide_image-height":266}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/featureSetOfUniversityPolygons.png"},{"acf_fc_layout":"content","content":"<p>Step 4. Simply use the <em>Count()<\/em> function in conjunction with the <em>Intersects()<\/em> function to get the count of universities near each community college.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1112721,"id":1112721,"title":"NumberOfCommutableUniversities","filename":"NumberOfCommutableUniversities.png","filesize":20521,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/NumberOfCommutableUniversities.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\/numberofcommutableuniversities","alt":"var uni_drive_times = FeatureSetByID($map, layer id retrieved through Arcade expression interface); var uni_nearby = Count(Intersects($feature, uni_drive_times); return uni_nearby; Test button is clicked to reveal the result of 5 and the type of \"Number.\"","author":"7121","description":"","caption":"","name":"numberofcommutableuniversities","status":"inherit","uploaded_to":1112481,"date":"2021-01-14 05:09:12","modified":"2021-01-20 22:39:46","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":840,"height":597,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/NumberOfCommutableUniversities-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/NumberOfCommutableUniversities.png","medium-width":367,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/NumberOfCommutableUniversities.png","medium_large-width":768,"medium_large-height":546,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/NumberOfCommutableUniversities.png","large-width":840,"large-height":597,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/NumberOfCommutableUniversities.png","1536x1536-width":840,"1536x1536-height":597,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/NumberOfCommutableUniversities.png","2048x2048-width":840,"2048x2048-height":597,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/NumberOfCommutableUniversities-654x465.png","card_image-width":654,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/NumberOfCommutableUniversities.png","wide_image-width":840,"wide_image-height":597}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/NumberOfCommutableUniversities.png"},{"acf_fc_layout":"content","content":"<p>You can then use the <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/logical_functions\/#when\" target=\"_blank\" rel=\"noopener\"><em>when()<\/em> logical function<\/a> or other <a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/data-management\/your-arcade-questions-answered\/#if-else\" target=\"_blank\" rel=\"noopener\">if\/else logic<\/a> to create an expression to display the three conditional sentences listed above. The type of logic is simply: If criterion A is met (in this case, if there are two or more public universities nearby), return sentence A. Else if criterion B is met (in this case, if there&#8217;s 1 and only 1 public university nearby), return sentence B. Else, (in this case, if there are zero), return sentence C.<\/p>\n<h2><strong>How to display the list<\/strong><\/h2>\n<p>Repeat steps 1 and 2 above. This gives you a FeatureSet of the multiple university drive time polygons that the community college intersects. In order to list these out, use a for loop. For each feature in our newly-created FeatureSet, list the field called Campus. I used an asterisk and a space to separate each campus. Here&#8217;s what this looks like in Arcade:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1112761,"id":1112761,"title":"ListOfUniversities","filename":"ListOfUniversities.png","filesize":28004,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfUniversities.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\/listofuniversities","alt":"var drive_time_area = FeatureSetByID...; var universities = Intersects($feature, drive_time_area); var uni_list = ' '; for (var k in universities) { uni_list += \" * \" + k.Campus}; return uni_list;","author":"7121","description":"","caption":"","name":"listofuniversities","status":"inherit","uploaded_to":1112481,"date":"2021-01-14 05:41:09","modified":"2021-01-20 22:41:38","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":833,"height":593,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfUniversities-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfUniversities.png","medium-width":367,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfUniversities.png","medium_large-width":768,"medium_large-height":547,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfUniversities.png","large-width":833,"large-height":593,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfUniversities.png","1536x1536-width":833,"1536x1536-height":593,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfUniversities.png","2048x2048-width":833,"2048x2048-height":593,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfUniversities-653x465.png","card_image-width":653,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfUniversities.png","wide_image-width":833,"wide_image-height":593}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>This community college app uses <em>Intersects()<\/em> to display both a count and a list in the pop-up to convey spatial context. Similarly, <a href=\"https:\/\/arcgis.com\/apps\/instant\/minimalist\/index.html?appid=59c541d59cb8461faaebdcde35a32f96\" target=\"_blank\" rel=\"noopener\">an app of farmers markets in Washington, DC<\/a> uses other geometry functions to display additional information in the side panel.<\/p>\n<h1><strong>Use <em>Buffer()<\/em> and <em>Contains()<\/em> to combine two point layers<\/strong><\/h1>\n<p>Unlike the community colleges app, this app is powered by two point layers: farmer&#8217;s markets and retail locations that accept SNAP (Supplemental Nutritional Assistance Program). The first part of the side panel displays the count of retail stores that accept SNAP within a one-mile buffer of the farmer&#8217;s market:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1112791,"id":1112791,"title":"SidePanelOfApp_FirstPart","filename":"SidePanelOfApp_FirstPart.png","filesize":152940,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_FirstPart.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\/sidepanelofapp_firstpart","alt":"New Morning Farmer's Market is selected in the map, pop-up contains a lot of info, but the sentence \"There are 9 retail stores in DC within 1 mile that accept SNAP\" is highlighted.","author":"7121","description":"","caption":"","name":"sidepanelofapp_firstpart","status":"inherit","uploaded_to":1112481,"date":"2021-01-14 05:56:26","modified":"2021-01-20 22:42:42","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1216,"height":694,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_FirstPart-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_FirstPart.png","medium-width":457,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_FirstPart.png","medium_large-width":768,"medium_large-height":438,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_FirstPart.png","large-width":1216,"large-height":694,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_FirstPart.png","1536x1536-width":1216,"1536x1536-height":694,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_FirstPart.png","2048x2048-width":1216,"2048x2048-height":694,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_FirstPart-815x465.png","card_image-width":815,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_FirstPart.png","wide_image-width":1216,"wide_image-height":694}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2><strong>How to display the count<\/strong><\/h2>\n<p>Step 1. From the farmer&#8217;s markets points layer, navigate to Configure Pop-up and add an expression. These points will be the geometry used to form the 1-mile buffers.<\/p>\n<p>Step 2. Use <em>FeatureSetbyID()<\/em> to create a FeatureSet of the retail locations that accept SNAP (points layer within this same map).<\/p>\n<p>Step 3. Use <em>Buffer()<\/em> to create a 1-mile radius on the fly. Use the <em><a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/geometry_functions\/#buffer\" target=\"_blank\" rel=\"noopener\">Buffer() function<\/a><\/em> by specifying three parameters: the geometry to buffer, the distance to buffer from that geometry, and the unit of the distance as text. To do a one-mile ring, it&#8217;s simply <em>Buffer($feature, 1, &#8216;miles&#8217;)<\/em>. There&#8217;s also a <em><a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/geometry_functions\/#buffergeodetic\" target=\"_blank\" rel=\"noopener\">BufferGeodetic()<\/a><\/em> if you need to account for the earth&#8217;s curvature.<\/p>\n<p>Step 4. Use <em>Contains().\u00a0<\/em>The <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/geometry_functions\/#contains\" target=\"_blank\" rel=\"noopener\"><em>Contains()<\/em><\/a> function is very similar to the <em>Intersects()<\/em> function described above. It returns a Boolean value for each feature, and a FeatureSet of those features that are in fact contained within a specified geometry.<\/p>\n<p>Step 5. Once again combine with <em>Count()<\/em> and return the number of retail stores that accept SNAP within a 1-mile buffer of the farmer&#8217;s markets.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1112801,"id":1112801,"title":"CountOfRetailStoresIn1Mile","filename":"CountOfRetailStoresIn1Mile.png","filesize":18406,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CountOfRetailStoresIn1Mile.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\/countofretailstoresin1mile","alt":"var SNAP_layer = FeatureSetByID(...); var one_mile_ring = Buffer($feature, 1, 'miles'); var retail_sum = Count(Contains(SNAP_layer, one_mile_ring)); return retail_sum; Test button has been clicked to show a result of 13 and the type of \"Number.\"","author":"7121","description":"","caption":"","name":"countofretailstoresin1mile","status":"inherit","uploaded_to":1112481,"date":"2021-01-14 06:16:02","modified":"2021-01-20 22:44:08","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":838,"height":594,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CountOfRetailStoresIn1Mile-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CountOfRetailStoresIn1Mile.png","medium-width":368,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CountOfRetailStoresIn1Mile.png","medium_large-width":768,"medium_large-height":544,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CountOfRetailStoresIn1Mile.png","large-width":838,"large-height":594,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CountOfRetailStoresIn1Mile.png","1536x1536-width":838,"1536x1536-height":594,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CountOfRetailStoresIn1Mile.png","2048x2048-width":838,"2048x2048-height":594,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CountOfRetailStoresIn1Mile-656x465.png","card_image-width":656,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/CountOfRetailStoresIn1Mile.png","wide_image-width":838,"wide_image-height":594}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2><strong>How to display the list<\/strong><\/h2>\n<p>Repeat steps 1 through 4 above, and use a for loop similar to what we did in the community colleges example. Here the field we want is called Store_Name. This time, I forced a new line after every store name to separate each store.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1112821,"id":1112821,"title":"ListOfStores","filename":"ListOfStores.png","filesize":20863,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfStores.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\/listofstores","alt":"var SNAP_layer = FeatureSetByID(...); var one_mile_ring = Buffer($feature, 1, 'miles'); var nearby_stores = Contains(SNAP_layer, one_mile_ring); var retail_list = ' '; for (k in nearby_stores) { retail_list += k.Store_Name + TextFormatting.NewLine }; return retail_list;","author":"7121","description":"","caption":"","name":"listofstores","status":"inherit","uploaded_to":1112481,"date":"2021-01-14 06:22:57","modified":"2021-01-20 22:45:41","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":853,"height":478,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfStores-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfStores.png","medium-width":464,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfStores.png","medium_large-width":768,"medium_large-height":430,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfStores.png","large-width":853,"large-height":478,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfStores.png","1536x1536-width":853,"1536x1536-height":478,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfStores.png","2048x2048-width":853,"2048x2048-height":478,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfStores-826x463.png","card_image-width":826,"card_image-height":463,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ListOfStores.png","wide_image-width":853,"wide_image-height":478}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>When my map&#8217;s pop-up displays in the side panel of the app, it displays a list of the retail stores within 1 mile of the farmer&#8217;s market that the user selected:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1112831,"id":1112831,"title":"SidePanelOfApp_SecondPart","filename":"SidePanelOfApp_SecondPart.png","filesize":150991,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_SecondPart.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\/sidepanelofapp_secondpart","alt":"Same map as before, this time the section of the pop-up that is highlighted is the list of retail stores.","author":"7121","description":"","caption":"","name":"sidepanelofapp_secondpart","status":"inherit","uploaded_to":1112481,"date":"2021-01-14 06:25:12","modified":"2021-01-20 22:46:26","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1216,"height":694,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_SecondPart-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_SecondPart.png","medium-width":457,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_SecondPart.png","medium_large-width":768,"medium_large-height":438,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_SecondPart.png","large-width":1216,"large-height":694,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_SecondPart.png","1536x1536-width":1216,"1536x1536-height":694,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_SecondPart.png","2048x2048-width":1216,"2048x2048-height":694,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_SecondPart-815x465.png","card_image-width":815,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/SidePanelOfApp_SecondPart.png","wide_image-width":1216,"wide_image-height":694}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>These two apps use only a small fraction of all the geometry functions available when creating Arcade expressions.<\/p>\n<h1><strong>Other geometry functions that allow you to combine layers spatially<\/strong><\/h1>\n<h2><em>Distance() and DistanceGeodetic()<\/em><\/h2>\n<p>These <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/geometry_functions\/#distance\" target=\"_blank\" rel=\"noopener\">distance functions<\/a> calculate the shortest distance between two points. Use these when you&#8217;re interested in &#8220;as-the-crow-flies&#8221; distances, rather than drive-time or walk-time distances over a street network.<\/p>\n<h2><em>Within()<\/em><\/h2>\n<p>Similar to <em>Contains()<\/em>, the <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/geometry_functions\/#within\" target=\"_blank\" rel=\"noopener\"><em>Within()<\/em> function<\/a> indicates whether or not one geometry is within another. To decide which of these two functions to use, It&#8217;s helpful to think about which of your two layers is the inside geometry and the outside geometry. For example, points cannot <em>contain<\/em> polygons, but points can be <em>within<\/em> polygons. Polygons can only be <em>within<\/em> other polygons, not points.<\/p>\n<h2>So many more!<\/h2>\n<p>Union, Intersection, Clip, Overlaps, and more of your favorite spatial relationships are all available as <a href=\"https:\/\/developers.arcgis.com\/arcade\/function-reference\/\" target=\"_blank\" rel=\"noopener\">Arcade geometry functions.<\/a><\/p>\n<p>Combining layers together using Arcade makes working with ever-changing web-based layers easier. If a new community college or new farmer&#8217;s market is added to these layers, I don&#8217;t need to start over again. Arcade enables you to display the the spatial relationships across multiple data layers in pop-ups. This pop-up information travels through the ArcGIS Online system in <a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/configurable-apps\/sharing-collaboration\/get-the-attention-your-web-maps-deserve-using-configurable-apps\/\" target=\"_blank\" rel=\"noopener\">configurable apps<\/a> and dashboards, helping you to create polished web mapping applications. GIS analysts are well-positioned to take advantage of the location-based nature of so much of the data out there in the world. Arcade geometry functions are a great way to make those spatial relationships apparent.<\/p>\n<h1><strong>Further Resources:<\/strong><\/h1>\n<p><a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/data-management\/your-arcade-questions-answered\/\">Your Arcade Questions Answered<\/a> is a blog post that has lots of great information for those looking to get started. Some of my favorite sections are:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/data-management\/your-arcade-questions-answered\/#featureset\">What is a FeatureSet?<\/a><\/li>\n<li><a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/data-management\/your-arcade-questions-answered\/#spatial\">Can I do spatial calculations in Arcade?<\/a><\/li>\n<li><a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/data-management\/your-arcade-questions-answered\/#int\">What is the difference between the Intersects() and Intersections() functions?<\/a><\/li>\n<li><a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/data-management\/your-arcade-questions-answered\/#closest\">Can I list the closest locations to a point on my map?<\/a><\/li>\n<\/ul>\n<p>Pop-up taking a while to load?<\/p>\n<ul>\n<li>Consider optimizing performance by a more efficient use of Arcade. For example, reduce and subset features early on to avoid iterating through all features within a layer. The summary section of <a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/mapping\/mapping\/create-powerful-popups-in-web-apps-with-arcade-feature-sets\/\" target=\"_blank\" rel=\"noopener\">this blog<\/a> gives a good overview of this. In general, take time to <a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/mapping\/mapping\/whats-new-with-arcade-taking-a-stroll-through-featuresets-part-2\/\" target=\"_blank\" rel=\"noopener\">understand what&#8217;s slowing you down<\/a> and what can be done to improve performance.<\/li>\n<li>In some cases, a join followed by a calculated field is more appropriate than using expressions, which is a faster query.<\/li>\n<\/ul>\n"}],"authors":[{"ID":7121,"user_firstname":"Diana","user_lastname":"Lavery","nickname":"Diana Lavery","user_nicename":"dianaclavery_global","display_name":"Diana Lavery","user_email":"DLavery@esri.com","user_url":"","user_registered":"2018-03-02 00:19:20","user_description":"(she\/her\/hers) Diana loves working with data. She has over 15 years experience as a practitioner of demography, sociology, economics, policy analysis, and GIS. Diana holds a BA in quantitative economics and an MA in applied demography. She is a senior GIS engineer on ArcGIS Living Atlas of the World's Policy Maps team. Diana enjoys strong coffee and clean datasets, usually simultaneously.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/04\/diana-lavery-3z7a9428-213x200.jpg' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}],"related_articles":[{"ID":403392,"post_author":"6561","post_date":"2019-01-15 08:00:41","post_date_gmt":"2019-01-15 16:00:41","post_content":"","post_title":"Create powerful popups in web apps with Arcade feature sets","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"create-powerful-popups-in-web-apps-with-arcade-feature-sets","to_ping":"","pinged":"","post_modified":"2024-11-11 12:35:28","post_modified_gmt":"2024-11-11 20:35:28","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=403392","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":878991,"post_author":"6461","post_date":"2020-06-10 11:11:30","post_date_gmt":"2020-06-10 18:11:30","post_content":"","post_title":"Your Arcade Questions Answered","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"closed","post_password":"","post_name":"your-arcade-questions-answered","to_ping":"","pinged":"","post_modified":"2024-11-01 00:17:42","post_modified_gmt":"2024-11-01 07:17:42","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=878991","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"2","filter":"raw"},{"ID":389482,"post_author":"6981","post_date":"2018-12-21 06:20:16","post_date_gmt":"2018-12-21 14:20:16","post_content":"","post_title":"What\u2019s new with Arcade: Taking a stroll through FeatureSets (Part 2)","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"whats-new-with-arcade-taking-a-stroll-through-featuresets-part-2","to_ping":"","pinged":"","post_modified":"2024-11-11 12:35:38","post_modified_gmt":"2024-11-11 20:35:38","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=389482","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"}],"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/ArcadeGeometry.png","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/generic_contours_banner.png"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Use Arcade geometry functions with FeatureSets to provide spatial context<\/title>\n<meta name=\"description\" content=\"Present information from other layers in your pop-ups, such as lists of nearby schools or stores, using FeatureSets and geometry functions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Use Arcade geometry functions with FeatureSets to provide spatial context\" \/>\n<meta property=\"og:description\" content=\"Present information from other layers in your pop-ups, such as lists of nearby schools or stores, using FeatureSets and geometry functions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-01T07:16:46+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\"},\"author\":{\"name\":\"Diana Lavery\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/1f2b2b13a804cac814ed4245368e9eb9\"},\"headline\":\"Use Arcade geometry functions with FeatureSets to provide spatial context\",\"datePublished\":\"2021-01-20T22:50:24+00:00\",\"dateModified\":\"2024-11-01T07:16:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\"},\"wordCount\":10,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"arcade\",\"configurable apps\",\"geometry functions\",\"Intersects\"],\"articleSection\":[\"Analytics\",\"Arcade\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\",\"name\":\"Use Arcade geometry functions with FeatureSets to provide spatial context\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2021-01-20T22:50:24+00:00\",\"dateModified\":\"2024-11-01T07:16:46+00:00\",\"description\":\"Present information from other layers in your pop-ups, such as lists of nearby schools or stores, using FeatureSets and geometry functions.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Use Arcade geometry functions with FeatureSets to provide spatial context\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/1f2b2b13a804cac814ed4245368e9eb9\",\"name\":\"Diana Lavery\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/04\/diana-lavery-3z7a9428-213x200.jpg\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/04\/diana-lavery-3z7a9428-213x200.jpg\",\"caption\":\"Diana Lavery\"},\"description\":\"(she\/her\/hers) Diana loves working with data. She has over 15 years experience as a practitioner of demography, sociology, economics, policy analysis, and GIS. Diana holds a BA in quantitative economics and an MA in applied demography. She is a senior GIS engineer on ArcGIS Living Atlas of the World's Policy Maps team. Diana enjoys strong coffee and clean datasets, usually simultaneously.\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/dianaclavery_global\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Use Arcade geometry functions with FeatureSets to provide spatial context","description":"Present information from other layers in your pop-ups, such as lists of nearby schools or stores, using FeatureSets and geometry functions.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions","og_locale":"en_US","og_type":"article","og_title":"Use Arcade geometry functions with FeatureSets to provide spatial context","og_description":"Present information from other layers in your pop-ups, such as lists of nearby schools or stores, using FeatureSets and geometry functions.","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2024-11-01T07:16:46+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions"},"author":{"name":"Diana Lavery","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/1f2b2b13a804cac814ed4245368e9eb9"},"headline":"Use Arcade geometry functions with FeatureSets to provide spatial context","datePublished":"2021-01-20T22:50:24+00:00","dateModified":"2024-11-01T07:16:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions"},"wordCount":10,"commentCount":6,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["arcade","configurable apps","geometry functions","Intersects"],"articleSection":["Analytics","Arcade"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions","name":"Use Arcade geometry functions with FeatureSets to provide spatial context","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2021-01-20T22:50:24+00:00","dateModified":"2024-11-01T07:16:46+00:00","description":"Present information from other layers in your pop-ups, such as lists of nearby schools or stores, using FeatureSets and geometry functions.","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-online\/analytics\/use-arcade-geometry-functions#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Use Arcade geometry functions with FeatureSets to provide spatial context"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/1f2b2b13a804cac814ed4245368e9eb9","name":"Diana Lavery","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/04\/diana-lavery-3z7a9428-213x200.jpg","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/04\/diana-lavery-3z7a9428-213x200.jpg","caption":"Diana Lavery"},"description":"(she\/her\/hers) Diana loves working with data. She has over 15 years experience as a practitioner of demography, sociology, economics, policy analysis, and GIS. Diana holds a BA in quantitative economics and an MA in applied demography. She is a senior GIS engineer on ArcGIS Living Atlas of the World's Policy Maps team. Diana enjoys strong coffee and clean datasets, usually simultaneously.","url":"https:\/\/www.esri.com\/arcgis-blog\/author\/dianaclavery_global"}]}},"text_date":"January 20, 2021","author_name":"Diana Lavery","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/dianaclavery_global","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/01\/generic_contours_banner.png","primary_product":"ArcGIS Online","tag_data":[{"term_id":32551,"name":"arcade","slug":"arcade","term_group":0,"term_taxonomy_id":32551,"taxonomy":"post_tag","description":"","parent":0,"count":113,"filter":"raw"},{"term_id":42611,"name":"configurable apps","slug":"configurable-apps","term_group":0,"term_taxonomy_id":42611,"taxonomy":"post_tag","description":"","parent":0,"count":47,"filter":"raw"},{"term_id":758221,"name":"geometry functions","slug":"geometry-functions","term_group":0,"term_taxonomy_id":758221,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":758231,"name":"Intersects","slug":"intersects","term_group":0,"term_taxonomy_id":758231,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"}],"category_data":[{"term_id":23341,"name":"Analytics","slug":"analytics","term_group":0,"term_taxonomy_id":23341,"taxonomy":"category","description":"","parent":0,"count":1329,"filter":"raw"},{"term_id":777102,"name":"Arcade","slug":"arcade","term_group":0,"term_taxonomy_id":777102,"taxonomy":"category","description":"","parent":0,"count":98,"filter":"raw"}],"product_data":[{"term_id":36551,"name":"ArcGIS Online","slug":"arcgis-online","term_group":0,"term_taxonomy_id":36551,"taxonomy":"product","description":"","parent":0,"count":2427,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=arcgis-online","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/1112481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/7121"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=1112481"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/1112481\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=1112481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=1112481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=1112481"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=1112481"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=1112481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}