|
IDEA
|
Function calls in PL/SQL are quite verbose. In a plain SQL query, we can do this… sde.st_geometryN_f(shape,1) …but in a custom PL/SQL function, we have to do this: sde.st_geometry_operators.st_geometryN_f(shape,1) Which makes the function calls hard to read when we string multiple functions together: -- startpoint X of a multi-part polyline sde.st_geometry_operators.st_x_f(sde.st_geometry_operators.st_startpoint_f(sde.st_geometry_operators.st_geometryN_f(shape,1))); More info: Use SDE.ST_GEOMETRY functions in a custom function Could Esri give us a shorter way to make SDE.ST_GEOMETRY function calls in PL/SQL?
... View more
04-01-2022
03:40 AM
|
0
|
0
|
565
|
|
IDEA
|
With Oracle Spatial, we have the option of using sites like db<>fiddle and Oracle Live SQL to mock up SQL or data online...and share it...when troubleshooting code in forums (Esri Community, GIS SE, etc.). That works great when using native datatypes like SDO_GEOMETRY. But when it comes to datatypes like SDE.ST_GEOMETRY, we're out of luck. Could Esri provide an online playground that has the ST_GEOMETRY datatype (in Oracle)? Similar to what we have for Arcade, but also shareable.
... View more
03-31-2022
03:00 PM
|
0
|
0
|
410
|
|
POST
|
I have a calculation attribute rule that runs without errors, but doesn't work as expected: Attribute rule works in Pro 2.9.2, but not in Pro 2.6.8 I want to debug the code, to see what part of it is failing to update the geometry's vertices. The code doesn't produce any errors, so I can't use error messages to help me. And ArcGIS Pro 2.6.8 doesn't support outputting console messages (unlike Pro 2.9.2 +/-). Does anyone have any tips for debugging Arcade code in that scenario?
... View more
03-31-2022
08:41 AM
|
0
|
1
|
1230
|
|
POST
|
I have a calculation attribute rule that works in Pro 2.9.2 (in a 2.9.2 FGDB). It updates the M-values of the polyline geometry: function pythagoras(x1, y1, x2, y2) {
return sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
}
var geom = Dictionary(Text(Geometry($feature)));
var paths = geom['paths'];
var oldX = paths[0][0][0];
var oldY = paths[0][0][1];
var line_length = 0;
for (var path_idx in paths) {
for (var point_idx in paths[path_idx]) {
var newX = paths[path_idx][point_idx][0];
var newY = paths[path_idx][point_idx][1];
if (point_idx != 0) {
line_length += pythagoras(oldX, oldY, newX, newY);
}
paths[path_idx][point_idx][-1] = line_length;
oldX = newX;
oldY = newY;
}
}
return Polyline(geom); However, if I create that attribute rule in Pro 2.6.8 (in a separate 2.6.8 FGDB), it doesn't work as expected. It runs without errors, and it even densifies true curves (which tells me that the code is running), but it doesn't update the M-values of the vertices properly (it sets the M-values to Nan). Question: Is there something in that script that is not supported in older versions of ArcGIS Pro? I believe the Dictionary(), Text(), and Geometry() functions are working ok (since the script successfully returns a densified geometry). So I think it must be something else. Unfortunately, I can't upgrade Pro any further right now, since our version of license manager doesn't support later versions of Pro. Thanks!
... View more
03-31-2022
08:27 AM
|
0
|
3
|
1494
|
|
POST
|
I don't have any experience with this sort of thing, and this almost certainly won't work, but I thought I'd ask out of curiosity: If you put HTML tags directly in the text, what happens? Example: "foo <b>bar</b>" I only ask because I stumbled upon an scenario (in an external system -- IBM Maximo Spatial) where I could put a HTML hyperlink in a db view's field -- and the map (ArcGIS JavaScript API?) picked up the HTML as a proper hyperlink. I would have never guessed that would work. Maybe HTML bolding would have worked too.
... View more
03-31-2022
06:49 AM
|
0
|
2
|
6499
|
|
POST
|
Related: Search Esri blogs for specific keywords: https://www.esri.com/arcgis-blog/?s=#arcade https://www.esri.com/en-us/search/?q=attribute%20rules
... View more
03-30-2022
02:18 PM
|
0
|
0
|
2335
|
|
POST
|
Related: Search Esri blogs for specific keywords: https://www.esri.com/arcgis-blog/?s=#arcade https://www.esri.com/en-us/search/?q=attribute%20rules @jcarlson might be interested.
... View more
03-30-2022
02:16 PM
|
1
|
0
|
1440
|
|
IDEA
|
Edit: I like @JohannesLindner‘s idea better: [Put the custom message] in the Create Features Pane / Modify Features Pane. The generic success messages and error messages are shown there already, so imo that's the right place for custom messages. Similar to this, but it would be a custom information message, not an error message (source) : Disregard: For example, a temporary "green information bar" at the top of the map could appear. And then after a few seconds, it would be automatically hidden. That's how it works with the map in IBM Maximo Spatial. It's a pretty reasonable way to show a message. It's not as annoying as popup dialog window. But it's also visible enough to get the job done...it provides a message to the user...and the user can ignore it if they want to. https://i.stack.imgur.com/h7DxG.png
... View more
03-30-2022
01:52 PM
|
0
|
0
|
3553
|
|
IDEA
|
Could Esri consider changing the "Exclude from Application Evaluation" flag so that it's more intuitive? A lot of people find that flag confusing. For example, change the flag to "Allow Application Evaluation". Thanks.
... View more
03-30-2022
01:02 PM
|
0
|
2
|
1623
|
|
BLOG
|
Is that link broken? It seems to just point to the "About Esri" page: https://www.esri.com/en-us/about/about-esri/overview
... View more
03-30-2022
10:16 AM
|
0
|
0
|
223
|
|
IDEA
|
Related: Attribute Rules Blog: Auto Snapping with Attribute rules during Editing
... View more
03-30-2022
09:54 AM
|
0
|
0
|
2370
|
|
BLOG
|
Regarding this blurb: In 2.7, we added the ability to assign an attribute rule to the shape field, which will allow the Arcade expression to return a geometry to update the $feature geometry. Is there any chance that's a typo? If I understand correctly, we can edit the geometry in version 2.6. Screenshots of Pro 2.6.8:
... View more
03-30-2022
09:52 AM
|
0
|
0
|
1395
|
|
POST
|
Thanks! Regarding: "...workflows similar to those implemented in ArcMap for editing non-versioned data." This is my understanding: Currently, in ArcMap, we can discard edits when editing unversioned data (but we can't undo). Currently, in ArcGIS Pro, we can't discard edits when editing unversioned data (we can't undo either). The edits get automatically saved (the save & discard buttons are greyed-out). And we don't seem to have the option of disabling auto-saving the edits either; it's already disabled by default : I'm still skeptical that future versions of ArcGIS Pro will allow undo of unversioned data. My guess is: it will only be possible to discard an edit session, not undo (consistent with how ArcMap works now). I would be very happy to be wrong though.
... View more
03-30-2022
09:37 AM
|
0
|
0
|
5409
|
|
POST
|
I have a multi-part polyline in an SDE.ST_GEOMETRY feature class (Oracle 18c EGDB). I've written a PL/SQL function that replaces the geometry's M-values with the cumulative length of the line. (My plan is to eventually create a database trigger that uses the function to update polyline geometries — when features get edited.) Input:
MULTILINESTRING M (( 0.0 5.0 -100000.0, 10.0 10.0 -100000.0, 30.0 0.0 -123),( 50.0 10.0 456, 60.0 10.0 789))
--select sde.st_astext(shape) from polylines
Output:
MULTILINESTRING M ((0 5 0, 10 10 11.18, 30 0 33.54),(50 10 33.54, 60 10 43.54))
--select m_as_length(shape) from polylines Question: The m_as_length() function works as expected. But I'm a PL/SQL novice, so I thought I'd ask: Can the script be improved? with
function pythagoras(x1 in number, y1 in number, x2 in number, y2 in number) return number is
begin
return round(sqrt( (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)), 2); -- Power is a slow function
end;
function m_as_length(shape in sde.st_geometry) return varchar2
is
result varchar2(32767);
vertex_set varchar2(32767);
oldX number;
oldY number;
newX number;
newY number;
line_len number := 0;
begin
for vPartIndex in 1..sde.st_geometry_operators.st_numgeometries_f(shape)
loop
vertex_set := null;
for vPointIndex in 1..sde.st_geometry_operators.st_numpoints_f(sde.st_geometry_operators.ST_GeometryN_f(shape,vPartIndex))
loop
newX := sde.st_geometry_operators.st_x_f(sde.st_geometry_operators.st_pointn_f(sde.st_geometry_operators.st_geometryn_f(shape,vPartIndex),vPointIndex));
newY := sde.st_geometry_operators.st_y_f(sde.st_geometry_operators.st_pointn_f(sde.st_geometry_operators.st_geometryn_f(shape,vPartIndex),vPointIndex));
if vPointIndex <> 1 then
line_len := line_len + pythagoras(oldX, oldY, newX, newY);
end if;
oldX := newX;
oldY := newY;
vertex_set := vertex_set || newX || ' ' || newY || ' ' || line_len || ', ';
end loop;
result := result || '(' || rtrim((vertex_set),', ') || '),';
end loop;
return 'MULTILINESTRING M (' || rtrim((result),',') || ')';
end;
select
m_as_length(shape)
from
polyline Related: Use SDE.ST_GEOMETRY functions in a custom function Explains why the function calls are so verbose: sde.st_geometry_operators.st_numgeometries_f. ST_GEOMETRY functions: st_numgeometries st_x st_startpoint st_geometryN st_numpoints st_pointn I'm aware that this sort of thing can be achieved with Arcade in ArcGIS Pro 2.6+. Even still, I want to learn how to do this in PL/SQL, for professional development reasons, and to have a plan B, for scenarios where Arcade won't work (due to compatibility issues, etc.). My FC is registered as versioned (with option to move edits to base). We don't use named versions, we only use the default version (so that we can undo/redo edits while editing). So in this case, using database triggers on a versioned FC shouldn't be an issue -- especially since we're exclusively working in the base FC -- and are using the "with base" option.
... View more
03-30-2022
07:17 AM
|
0
|
0
|
1188
|
|
POST
|
Instead of creating a custom integration mechanism, I wonder if you could do the following: Create a view in the GIS database that connects to Maximo via a dblink. In the view, generate fake rows for the missing GIS assets -- if those assets haven't already been changed to decommissioned in Maximo. Flag the rows in the view as status=decommissioned (all done dynamically in the view -- we're not creating any data here). Then sync those fake rows to Maximo as decommissioned assets. The view could contain your existing/real assets too -- not just the fake decommissioned ones. That way, you could use the out-of-box Maximo/GIS integration mechanism that already exists (the ArcGISDataSync cron). No customization would be required! Sounds a bit too good to be true... Edit: One possible problem with that idea: With the fake decommissioned rows, what about all the other attributes that exist on the Maximo side? The fake row would have nulls in all it's fields, which would overrite your Maximo info, so that's likely a problem. Some of those fields would be mandatory in Maximo (the integration would throw an error if you tried to sync nulls). And I would think there would be other valuable fields in Maximo where you'd want to keep that information...you wouldn't want to set those fields to null. You could grab the data from Maximo...for the missing fields...and put them in the GIS view..and sync the data back to Maximo. But now, this is feeling like a messy/bad idea. Oh well, it was worth saying it out loud. Just a side note: If I remember correctly, when you're syncing an asset to Maximo for the first time, I don't think the status can be decommissioned. I think the status needs to be ACTIVE or something like that -- for the first sync. You'd have to ask around for details if you thought it'd be an issue, although it sounds like it might not be an issue for you.
... View more
03-28-2022
08:24 AM
|
0
|
0
|
2029
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-30-2026 11:08 AM | |
| 1 | 05-11-2026 11:23 AM | |
| 2 | 05-07-2026 04:19 AM | |
| 1 | 05-06-2026 09:03 AM | |
| 2 | 03-19-2026 09:29 AM |