|
POST
|
I am trying to add data to a brand new FileGDB with UPDM 2020. I thought that using the AppendRoutes Tool would help me to....you know...append routes. I went in the following process: 1. Create a UPDM 2020 using "Gas and Pipeline Data Management for ArcGIS Enterprise", I made the deployment of the version 1.2 (it includes a UPDM deployment solution for the version 2020). 2. I create in other FGDB a feature Class to hold my initial routes: I define the fields required (According to the documentation of the tool AppendRoutes😞 Route Name and RouteId 3. Then the tool start complaining because it does not has the other fields. 4. Create and fill the additional Fields I keep receiving information like this: 5. Create Line related fields in the source FC, and now I receive this: I wonder what I am missing. Why the documentation says that those fields are optional, but they aren't? How add routes to a UPDM 2020 FGDB? I just found this post: https://community.esri.com/t5/arcgis-pipeline-referencing-questions/append-routes-geoprocessing-tool-failing-in/m-p/842669#M42 thanks to @AyanPalit and an old colleague @JelmerAkkerman for their discussion, I think that they described the workaround. But as soon as I start implemented the workaround , one of my fears became reality: In the latest version of ArcGIS Pro APR tables cannot be modified so easily, First using the Append Tool i was able to add a Feature class to the EngineeringNetwork, then I made the same to create a centerline (Weird, isn't it?, I should gone first for the centerline, but anyway, I am in Everything can be done mode), but when I try to modify the CenterlineSequence Table....Booom: Here I am again......How to fill those FC?
... View more
08-07-2021
10:32 AM
|
0
|
2
|
2296
|
|
POST
|
I remembered my instructor in the course Getting Started with Linear Referencing : he said "We use the Redline Feature class as a sandbox to create modifications in the lines/routes, then move them to the proper feature classes" I said to myself: "Miself, lets create a centerline in the redline and using the AppendRoutes tool, we will be able to have the routes AND the centerline" Well, I just tried to create a line in the RedLine FC: I was able to create the geometry, but as soon as I start modifying the fields (required information to use the AppendRoutes Tools, this happend): Good grief!!
... View more
08-07-2021
09:00 AM
|
0
|
0
|
3746
|
|
POST
|
I started using the "Gas and Pipeline Data Management for ArcGIS Enterprise", I made the deployment of the version 1.2 (it includes a UPDM deployment solution for the version 2020). Following the instructions provided in here I tried to prototype a single user environment with WGS 1984 as Geographical Coordinates Reference system. I found the first detail: In my experience with the UPDM 2016, UPDM 2018 the APR was configured using the P_Centerline feature class, in this version, I found the script that enable APR uses PipelineLine feature class as Centerline Feature Class. (I have not check yet in the data dictionary of UPDM 2020 to know if this is a bug or a change in the Data Model). Following my instincts, I modify the LRS using the P_Centerline feature class as the Centerline Feature Class (If I made a huge mistake here, please let me know). After having a file geodatabase configured as UPDM, with APR, I said to myself: "Myself, let's create a couple of centerlines, then using those centerlines create some routes in the Engineering Network, and just for fun, we will create a couple of Pipeline devices" I created a couple of centerlines (Nothing fancy, just create a couple of lines using editing tools in ArcGIS Pro). Now, lets go for the for the routes, when I try to use the Create Route tool, I am no able to do it, the tool does not recognize the centerlines as proper geographic objects : Centerlines created Create Route Tool says that the centerlines does not have valid measures. The selection pane identify the length of the shape as the creator (Is there a bug?) The fields "From Measure" and "To Measure" in the tool appear disable With this situation, my dream of having my own little UPDM 2020 with information was crashed 😞 Then I decided to create a new empty File geodatabase (WGS 1984), and created the required structure to make this FGDB a APR enable FGDB, after doing that with the CreateLRS tool: arcpy.locref.CreateLRS(r"C:\Temp2\APR\APR_FROM_SCRATCH.gdb", "ALRS", "Centerline", "Calibration_Point", "Redline", "Centerline_Sequence", 'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision', "8.98315284119521E-09 DecimalDegrees", "0.001 Meters", "0.000000001 DecimalDegrees", "0.0001 Meters") In that point of time, I created my three centerlines, to be able to create the routes in the network, then, I tried to create the routes: Everything looks perfect, I was able to create the routes. After all this comments, code and images, the question remains: How I create my basic Pipeline infrastructure (Lines/Routes/Assets) in UPDM 2020 in a File Geodatabase? By the way, I was using ArcGIS Pro 2.8 when the problem appear, and today after updating to 2.8.2, the problem is still present.
... View more
08-07-2021
08:21 AM
|
0
|
4
|
3774
|
|
BLOG
|
Wait....What????? Make a clone as describe below the dashed ===== line if you aren't in control of your machine a few lines after: ================================================== Clone... If you have to do it, here is a guide. This guide is only for people which have actual control over their computers. Sorry, if my English is not good (It is not my mother language), and please correct me: The guide under the dashed is the guide when you are in control ?
... View more
07-19-2021
11:25 PM
|
1
|
0
|
3319
|
|
BLOG
|
Currently I am working in a development environment, but I must move those changes to production. The geodatabases (Dev\Production) have archiving and versioning enable. As you state we are using traditional versioning. Thanks for any additional tip.
... View more
06-14-2021
06:54 AM
|
0
|
0
|
2657
|
|
BLOG
|
@AyanPalit I was using the wrong term, I mean Archiving
... View more
06-14-2021
06:30 AM
|
0
|
0
|
2665
|
|
BLOG
|
Thank @AyanPalit for your answer. I feel that is still in the air, How to handle the history of the FC. With my attempts to solve this, I keep losing the history of the features classes involved in the move operation. Any tipp?
... View more
06-14-2021
04:08 AM
|
0
|
0
|
2672
|
|
BLOG
|
Hello fellow, Is there a way to move the feature classes involved in the LRS (programatically: Python) keeping the History and versioning information? https://community.esri.com/t5/python-questions/move-feature-classes-reproduce-programmatically-move-drag-n-drop/m-p/1067788#M61354 Thanks!!!
... View more
06-13-2021
10:29 PM
|
0
|
0
|
2687
|
|
POST
|
There is a Geodatabase with several Feature Datasets (FD), because a requirement in Location referencing tools in ArcGIS Pro 2.6 and above, Feature Classes (FC) from one FD should be moved to another FD. I have found several answers, like: https://community.esri.com/t5/python-questions/move-feature-class-from-dataset-a-to-dataset-b-in-database/m-p/1025627#M59896 https://community.esri.com/t5/data-management-questions/move-feature-classes-out-of-feature-dataset/td-p/163438 Using ArcPy to Move Feature Classes to Feature Dataset? The answers can be summarized on: Drag-n-Drop from one FD to another FD Programmatically (Python) copy, delete, rename the FC using either: a. CopyFeatures_management b. FeatureClassToGeodatabase_conversion This two programmatically options, sounds good from the point of view of the structure and content of the FC. But the underlying process is not the same as the option 1. I moved a FC using Drag-n-Drop from the FD Integrity_Pub to Integrity: Properties before moving the FC: Properties after moving the FC: When the FC is moved using the Option 2.b. (it is recommended here😞 Is there a way to move the FC, programmatically and keep the Archiving and Versioning? Like the Drag-n-Drop does it.
... View more
06-13-2021
10:26 PM
|
0
|
0
|
1161
|
|
POST
|
Hello, How can I reproduce the drag nd drop behavior programmatically? I have seen several post about copy, delete, rename operations, but it is not the same result as drag and drop.
... View more
06-11-2021
02:41 AM
|
0
|
0
|
2231
|
|
POST
|
Hi, did you tried to check your theory? any results?
... View more
06-10-2021
12:36 AM
|
0
|
0
|
4306
|
|
BLOG
|
Hi, I was just checking the Data dictionary (using the link provided above) and I was not able to found neither the layers for DA Survey Readings or the layers related to ILI. Are those layers were removed? What is the strategy to store that information?
... View more
02-11-2021
11:32 PM
|
2
|
0
|
12564
|
|
POST
|
The issue looks similar, but despite the fact that I receive the same error, in database A the changes are committed. Reading the suggested links, I am doing both calls from the same computer, and i have both databases in the same instance of SQLServer. I am going to try changing the compatibility of the database.
... View more
11-13-2020
05:20 AM
|
0
|
0
|
1345
|
|
POST
|
I have two ESRI enterprise geodatabases on SQLServer: A and B. They are almost the same database (structure) I have this code snippet in python to deleted several rows from versions: def delete_project_features(edit_workspace, delete_tables, version, inspection_id):
sde_conn = arcpy.ArcSDESQLExecute(edit_workspace)
sde_conn.execute("EXEC sde.set_current_version '{0}';".format(version))
sde_conn.execute("EXEC sde.edit_version '{0}',1 WITH RESULT SETS NONE;".format(version))
for table in delete_tables:
inspectionId = inspection_id
feature_count = sde_conn.execute("SELECT COUNT(*) FROM {0}_evw WHERE INSPECTION_ID = '{1}';".format(table, inspectionId))
sde_conn.execute("DELETE FROM {0}_evw WHERE INSPECTION_ID = '{1}';".format(table, inspectionId))
try:
sde_conn.execute("EXEC sde.edit_version '{0}',2 WITH RESULT SETS NONE;".format(version))
except Exception as e:
if repr(e).find("error 266") > -1:
logEngine.log(_("Deleted all redundant features"), logger, SERVICE)
else:
mess = "Failed to delete features"
raise Exception(mess) When I run it on Database A, the rows are deleted as expected, but in Database B the rows remain there. I always get the error: AttributeError: ArcSDESQLExecute: StreamExecute ArcSDE Extended error 266 [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0. despite the fact of the error, the rows are deleted on A What setting could be different in the databases that prevents in B the successful result of the script execution? Database A: Compatibility level 2016 Recovery model Simple Collation SQL_Latin1_General_CP1_CI_AS Database B: Compatibility level 2012 Recovery model Full Collation Latin1_General_CI_AS
... View more
11-12-2020
03:23 AM
|
0
|
2
|
1370
|
|
POST
|
There are 2 databases A and B; Each one has two tables: Table1 and Table2, both were created with the same script, defining for both: fields, versioning and archiving. It is required to delete some rows in both tables and, of course in both databases. A script was prepared: def remove_items(from_table, ids):
log.add("Start to clean orphan objects from: {0}".format(from_table))
total_to_delete = 0
fields = arcpy.ListFields("{0}.{1}".format(user_do, from_table))
if "INSPECTION_ID" in [f.baseName for f in fields]:
with arcpy.da.SearchCursor("{0}.{1}".format(user_do, from_table), ["INSPECTION_ID"]) as count_cursor:
for row in count_cursor:
if row[0] not in ids:
total_to_delete += 1
row_counter = 0
with arcpy.da.UpdateCursor("{0}.{1}".format(user_do, from_table), ["INSPECTION_ID"]) as table_cursor:
for row in table_cursor:
if row[0] not in ids:
table_cursor.deleteRow()
row_counter += 1
log.add("In table {0} deleted rows {1} / {2}".format(from_table, row_counter, total_to_delete))
log.add("Total rows deleted from {0} : {1}".format(from_table, row_counter))
with arcpy.da.Editor(arcpy.env.workspace) as edit:
log.add("This script may take a while to finish.")
remove_items("Table1", orphan_ids)
remove_items("Table2", orphan_ids) The script is run against Database A, and it runs with out any issue. The script is run against Database B, and it generates the following error: ['RuntimeError: Insufficient permissions [Database_B.Table_2][STATE_ID = 2880]\n', '\nThe above exception was the direct cause of the following exception:\n\n', 'Traceback (most recent call last):\n', ' File "C:/T/Repos/RemoveOrphanInspections.py", line 136, in <module>\n main(argv[1:])\n', ' File "C:/T/Repos/RemoveOrphanInspections.py",'SystemError: <built-in method __exit__ of Workspace Editor object at 0x0000019EDF973180> returned a result with an error set\n'] Permissions were checked, and the data owner user (the one used to run the script), has the permissions of Select, Insert, Update and Delete. I make a change to the script: with arcpy.da.Editor(arcpy.env.workspace) as edit:
log.add("This script may take a while to finish.")
remove_items("Table1", orphan_ids)
edit = arcpy.da.Editor(arcpy.env.workspace)
edit.startEditing(False, True)
edit.startOperation()
remove_items("Table2", orphan_ids)
edit.stopOperation()
edit.stopEditing(True) Now the script runs with out issue. With this modification I am using two edit sessions, therefore there is two transaction scopes (That was not the original plan). Versioning, archiving, permissions and fields are the same in both Databases. How could check the differences between the Database_A.Table2 and Database_B.Table2? Which property of the table should be checked to choose a proper Edit session management?
... View more
08-12-2020
10:38 PM
|
0
|
0
|
1326
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 12-01-2023 02:45 AM | |
| 1 | 07-19-2021 11:25 PM | |
| 1 | 07-21-2023 04:44 AM | |
| 1 | 07-07-2023 05:15 AM | |
| 1 | 01-19-2023 03:19 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-02-2024
12:42 AM
|