Bonjour à tous !
J'essaie de suivre un tutoriel utilisant arcade pour trouver une liste de points proches d'un polygone (<\/SPAN>https:\/\/learn.arcgis.com\/en\/projects\/build-an-app-to-expand-food-access\/<\/SPAN><\/A> dans la section "Stores near markets"), mais avec des données différentes et dans arcgis pro. Pour que FeatureSetById fonctionne pour ma couche, j'ai besoin d'un ID de couche. Comment le trouver dans ArcGIS pro ?<\/SPAN><\/P>J'ai suivi les étapes pour attribuer un layerID (<\/SPAN>https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/help\/sharing\/overview\/assign-layer-ids.htm<\/SPAN><\/A>) mais j'ai obtenu un ID de couche "2" et cela n'a pas fonctionné.<\/SPAN><\/P>Si cet ID de couche n'existe pas ou ne fonctionne pas dans ArcGIS pro, comment puis-je autrement utiliser arcade pour trouver une liste de points proches ou à l'intérieur d'un polygone ?<\/SPAN><\/P> <\/P>exemple de code du tutoriel :<\/SPAN><\/P>var retail_layer = FeatureSetById($map, \/\* SNAP Store Locations *\/ "178f065ba89-layer-82")<\/SPAN><\/P>var radius = Buffer($feature,.75,"miles")<\/SPAN><\/P>var nearby_stores = Intersects(retail_layer,radius)<\/SPAN><\/P> <\/P>var retail_list = ''<\/SPAN><\/P>for (var k in nearby_stores){<\/SPAN><\/P>retail_list += k.Store_Name + TextFormatting.NewLine<\/SPAN><\/P>}<\/SPAN><\/P>return retail_list<\/SPAN><\/P> <\/P>ma couche polygone : https:\/\/naturalengland-defra.opendata.arcgis.com\/datasets\/national-parks-england\/explore?location=55.122476%2C-49.875730%2C5.78<\/A><\/SPAN><\/P>ma couche de points : gis_osm_transport_free_1.shp depuis le dossier shapefile zippé ici http:\/\/download.geofabrik.de\/europe\/great-britain\/england.html<\/A><\/SPAN><\/P> <\/P>
ma couche de points : gis_osm_transport_free_1.shp depuis le dossier shapefile zippé ici
<\/P>
To find the layerID of a layer in ArcGIS Online that is being used in Pro, one way to do this is to look at the last part of the path when adding the layer, as in the screenshot here:
You might not need to use Arcade though, if you're working in Pro. Pro has select by location. You can select the points that fall within the polygon that way.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.