POST
|
Hello Jake, thank you for your answer. It was just a simple projection problem. This kind of geometrical calculations seems to work in FieldMaps if the projections of all the layers are the sames. (BUG-000133986) I reprojected my all layers and everything is working perfectly. A good step to ready-to-use data 🙂 Thank you!
... View more
yesterday
|
0
|
0
|
2
|
POST
|
hello everybody i am migrating to fieldmaps an arcade calculation that work perfectly in the map viewer and pro. the subject of this calculation is : spatially catching the attribute of an other layer BUT based on the majoritary representation in multiple intersections case. when calculating in fieldmaps seems not wait the end of the complete geometry before calculating. console('STATUT : EN PRODUCTION')
console('TITRE : extraire atribut relation spatiale')
console('CLC-ATTR-HERIT-SPA')
console('2024-02-28 Version 1.0 ')
// VARIABLES UTILISATEURS
var t = 50; // tolérance maximale de recherche exprimée en mètres
var G = $feature // G pour géométrie source
var P = buffer($feature,t,'meters'); // P pour entité de type polygone
var L = FeatureSetByName($map, "ROUTES_POUR_PR") // L pour layer dont on veut l'attribut majoritaire
var A = 'ROUTE' // A pour attribut à retourner
// STEP1 : AJUSTEMENT DE LA DISTANCE DE TRAITEMENT
var I = Intersects(L,P) // I pour Intersection
if(isempty(I) || count(I)==0){return '+ de '+t+ 'mètres'}
var adjustedDistance = Infinity;
// On cherche le plus proche pour calculer sa distance
for (var sEnt in I){
var DynDistance = Distance(sEnt,G, "meters");
if(DynDistance < adjustedDistance){
adjustedDistance = DynDistance;
}
};
if(adjustedDistance==0){adjustedDistance+=1}
// STEP : 2 ADAPTATION DE LA GÉOMETRIE SOURCE
if(typeof(geometry(G))=='Polyline'|| typeof(geometry(G))=='Point')
{P = buffer(G,adjustedDistance,'meters')
console('P est une ligne ou un point')};
if(typeof(geometry(G))=='Polygon')
{P = G
console('P est un polygone')};
// STEP 3 : TRAITEMENT DES CAS D'INTERSECTION UNIQUES.
if(isempty(I)||count(I)==0){return '-'};
if(count(I)==1){
var candidat = first(I)[A]
if(right(candidat,2)=='PG'){return replace(candidat,'PG','')}else{return candidat}
};
// STEP 4 : TRAITEMENT DES CAS D'INTERSECTION MULTIPLES.
var features = [];
var feat;
for (var eEnt in I){
var tmpG = clip(eEnt,extent(P))
var Geom = Buffer(tmpG,adjustedDistance,'meters')
var gArea = Area(Intersection(P,Geom),'meters')
var gAttr = eEnt[A]
feat = {'attributes': {'inheritedAttr': Text(gAttr),'representation': Number(gArea),}}
Push(features, feat);
}
var dowDict = {
'fields': [{ 'name': 'inheritedAttr', 'type': 'esriFieldTypeString'},
{'name': 'representation', 'type': 'esriFieldTypeDouble'}],
'geometryType': '',
'features': features
};
var candidat = first(orderBy(FeatureSet(dowDict),'representation DESC'))['inheritedAttr']
if(right(candidat,2)=='PG'){return replace(candidat,'PG','')}else{return candidat}
... View more
a month ago
|
0
|
2
|
186
|
IDEA
|
Hello (again) the sceneViewer team! Points are prouds in the scene viewer because of labeling. Please let polygons and polylines be prouds too ! #alabelforeveryone 🙂
... View more
11-14-2023
01:32 AM
|
2
|
0
|
247
|
IDEA
|
Hello the sceneViewer team! In the mapviewer, it is possible to duplicate layers (with symbology and popup and forms and labels, ect...). What about doing the same in the scene viewer? 3D is the futur 🙂
... View more
11-14-2023
01:14 AM
|
1
|
0
|
287
|
POST
|
this final code work fine for me. i pre calculate the "M" value. // CALCUL DU CUMUL POUR UNE LIGNE // version 1.0 2023-03-16 // variables utilisateur var CAS = 0 ;//mettre 0 pour point de début et -1 point de fin console("cas choisis : "+ CAS ) var SearchingLayer = FeatureSetByName($map,"ROUTE"); var TOLERANCE = 20 ;// la variable TOLERANCE de capture fixée à 5 mètres peut être ajustée si nécessaire console("tolérance choisie : "+TOLERANCE) // 1 - Extraction du point de calcul et recherche var myPoint = Point({x: Geometry($feature)['paths'][CAS][CAS]['x'],y: Geometry($feature)['paths'][CAS][CAS]['y'],spatialReference: { wkid: 102100 }}) console("coordonnées de mon point : "+ myPoint) var buff = Extent(bufferGeodetic(myPoint,TOLERANCE,'meters')); var myGeom = myPoint; var MySearch = Intersects(BufferGeodetic(myGeom, TOLERANCE, "meters"),SearchingLayer); // le calcul renvoit -1 pour signifier absence de rd à proximité if(isempty(Mysearch)){return -1} // dans les autres cas on calcul pour le cas choisi. if(count(Mysearch)==1){ console("cas une seule rd") var Arc = first(Mysearch) } else{ console("cas plusieurs rd") var EvDistance = Infinity; var MyNearest; for (var listing in MySearch){ var DynDistance = Distance(listing,myGeom, "meters"); if(DynDistance < EvDistance){ EvDistance = DynDistance; MyNearest = listing; var Arc = MyNearest } } } var longueur = 0; var p = 0; var newLine = Dictionary(text(Geometry(Arc))); var reste = Round(LengthGeodetic(First(Cut(Arc,Rotate(clip(Arc,buff),90))))); var cutter = Rotate(clip(Arc,buff),90); for (p in newLine.paths){ var segment = Polyline({paths: [newLine.paths[p]],spatialReference:{latestWkid:3857,wkid:102100}}) var segLongueur = lengthGeodetic(segment,'meters') if (intersects(segment,cutter)==true) {return round(longueur+reste)} else {longueur += segLongueur;}
... View more
10-15-2023
11:29 PM
|
0
|
0
|
693
|
IDEA
|
Yes! i agree. the action send an "equal to". it would be very usefull if we could choose between like or equal when configuring actions. may i ask : "it would be very usefull if we could have the same options than when you conigure a datasource in a widget".
... View more
10-11-2023
06:27 AM
|
0
|
0
|
176
|
IDEA
|
And what about adding this wonderful lib in notebook server on Agol? https://www.yworks.com/products/yfiles-graphs-for-jupyter
... View more
05-25-2023
08:13 AM
|
0
|
1
|
408
|
POST
|
Hello everybody, working in Agol and trying to execute a notebook is it the correct syntax? i have an error message but the myItem var is a arcgis.gis.Item
... View more
12-06-2022
12:19 AM
|
0
|
0
|
888
|
POST
|
hello, i am trying to calculate dynamically in the popup profile the upstream's length of a multipart line. this script work well with single part lines only. in this script i cut the line where the buffer of a point intersects the polyline (a road) var CurDep = $feature.road var CurArcGeom = First(Filter(FeatureSetByName($datastore,"test_li"),'ROAD=@CurDep')) var cutter = Rotate(Clip(CurArcGeom,Extent(Buffer($feature,0.1, 'meters'))),90) var DYN_CUMUL = round(Length(First(Cut(CurArcGeom,cutter)))) dyn_cumul In the picture above you can see the results (labels) on two polylines. the first result goes wrong because of the multipart. any idea 🙂
... View more
03-17-2022
09:15 AM
|
0
|
1
|
310
|
POST
|
hello, on pro 2.9 i have got some issues too with this tool. The parameter of the tool "coordinate system" goes suddendly wrong without any manual update on the stuff. here is the chain i use. have got the problem both on excel and csv when i use a second tool "project" the transformation goes wrong too without any manual update. very disturbing...
... View more
03-02-2022
05:41 AM
|
0
|
0
|
1328
|
BLOG
|
Hello, When i read this page, in the help of survey123 the body::esri:style can be use to change the bakground color of a group. It works fine in the fieldapp but not in the webapp. Is it a limitation or the style must be migrated too? I use succesfully this symbols ☑ ✐ in the field app by pushing them dynamically the field label. It works fine in the fieldapp but not in the webapp. Is it a limitation or the style must be migrated too?
... View more
02-28-2022
01:46 AM
|
1
|
0
|
16345
|
POST
|
Hello Nick, Hello everybody. I am trying to do the same dynamically in Argis Online.(my point geometry change, my m value change in the map context windows) I want to use the cut function to get the left length of an intersecting (or nearest) line with M value in a field. I will write more after testing all that. i have got to 90° rotate the result of a clip between the buffer of my point and the line. not easy... it quite works... /* récupérer le cumul par intersection du point avec l'arc. */ var CurDep = $feature.ROUTE var CurBuffGeom =Extent(Buffer($feature, 2, 'meters')) var CurArcGeom = Back(Filter(FeatureSetById($map, /* tests_arcade - Test li */ "17f27378b8d-layer-3"),'route=@CurDep')) var CUTTER = rotate(Clip(CurArcGeom,CurBuffGeom),90) return LengthGeodetic(first(Cut(CurArcGeom, CUTTER))) note : replaced first with back (when i flip the cutter, 90° the left part is the end part of the line.)
... View more
02-23-2022
08:36 AM
|
0
|
0
|
1731
|
POST
|
Hello everybody, For a dashboard i would like to merge two layers with arcade data expression to display the result in a unique list widget (i have to minimize the number of widgets and clicks to keep my users aware...) i tried to adapt the code from the arcade git. but i don't know if it really could work in a list widget. any ideas? here is the code : var portal = Portal("https://www.arcgis.com/"); var notations = FeatureSetByPortalItem(portal,"9abab4147fbb4d708c7058e4269b12f7",0,['RD','TXT_ANNEE','NOTE','CumulD','CumulF','OBJECTID'],false) var travaux = FeatureSetByPortalItem(portal,"162565e07fc745ae94dbb33fafed250a",0,['RD','TXT_ANNEE','NATURE','CUMULD','CUMULF','OBJECTID'],false) var i = 0; var combinedDict = { fields:[ {name : "identifiant",type : "esriFieldTypeInteger"}, {name : "source",type : "esriFieldTypeString"}, {name : "rd",type :"esriFieldTypeString"}, {name : "legende",type :"esriFieldTypeString"}, {name : "annee",type :"esriFieldTypeString"}, {name : "CumulD",type :"esriFieldTypeString"}, {name : "CumulF",type :"esriFieldTypeString"}, ], geometryType:"", features:[], }; for (var n in notations){ combinedDict.features[i] = { attributes: { identifiant : ["OBJECTID"], source : "notation", rd : n["RD"], legende : n["NOTE"], annee : n["TXT_ANNEE"], CumulD : n["CumulD"], CumulF : n["CumulF"], }, }; i++; } for (var n in travaux){ combinedDict.features[i] = { attributes: { identifiant : ["OBJECTID"], source : "travaux", rd : n["RD"], legende : n["NATURE"], annee : n["TXT_ANNEE"], CumulD : n["CUMULD"], CumulF : n["CUMULF"], }, }; i++; } return FeatureSet(Text(combinedDict));
... View more
11-10-2021
02:16 AM
|
0
|
0
|
440
|
BLOG
|
Hello everybody, i am trying to migrate my styles with a test form before going further. I have got a bad display in the webapp. I use two calculations to change the font color and group background. Everything is ok in the app. if(selected(${civilite},'mme'),'DarkViolet ',if(selected(${civilite},'m.'),'blue','')) if(selected(${civilite},'mme'),'Violet',if(selected(${civilite},'m.'),'LightSkyBlue ','')) The form look like this in web app 3.13 form (hmm... Not good!) and like this in the app (good!)
... View more
10-18-2021
04:13 AM
|
1
|
0
|
18098
|
IDEA
|
Bonjour, J'utilise énormément la commande "Afficher un événement d'itinéraire" dans ArcMap. Elle s'effectue par un clic droit sur la table directement dans la table des matières et génère un champ OID automatiquement. Je souhaiterai que le même outil soit disponible dans ArcGIS Pro (qui pour l'instant propose un équivalent en passant par 2 outils de la ToolBox au minimum, donc beaucoup moins pratique). Hello, I often use "Display route event" command in ArcMap (by right clicking on the table directly in the table of contents and generates an OID field automatically). I would like the same tool to be available in ArcGIS Pro (which for the moment offers an equivalent through 2 tools of the ToolBox at least, so much less convenient). Thanks
... View more
02-27-2019
12:53 AM
|
2
|
2
|
515
|
Title | Kudos | Posted |
---|---|---|
1 | 11-14-2023 01:14 AM | |
2 | 11-14-2023 01:32 AM | |
1 | 02-28-2022 01:46 AM | |
1 | 10-18-2021 04:13 AM | |
2 | 02-27-2019 12:53 AM |
Online Status |
Offline
|
Date Last Visited |
2 hours ago
|