|
POST
|
If the PG databases are in the same server, you might be able to INSERT INTO ... SELECT across databases within SQL. It's not at all difficult to write ArcPy code with a da.SearchCursor fetching rows from one database and da.InsertCursor writing into another. I moved several dozen tables spanning 60 million rows using this last summer without any ArcGIS-related errors (using both 32-bit Python and 64-bit Python). - V
... View more
05-08-2017
12:00 PM
|
1
|
0
|
1532
|
|
POST
|
I often write scripts which are designed to run for hours or days, so I usually add a test at the top of major processing loops that check for some condition which would cause graceful termination. Often it is the existence of a "stop.now" file, but sometimes it is a "pause.now" which puts the script in a loop waiting for either a "stop.now" to terminate or an absence of "pause.now" to continue. This would have to be added into your script before execution. Python script tools (.pyt) can interact with the progress bar in the tool window, but need to be inside an asynchronous arcpy.SetProgressor()/ResetProgressor() session, at which point a try block around arcpy.SetProgressorPosition() will catch a Cancel button press and allow you to handle it gracefully. - V
... View more
05-08-2017
08:41 AM
|
2
|
0
|
822
|
|
POST
|
If your environment is that ancient, you should at least consider a fresh install and full data migration. This would allow you to review the data schema and application architecture, and upgrade what is necessary. It would also permit spatial defragmentation and coordinate reference optimization, which could significantly improve performance. Finally, you would have multiple opportunities to get the data transition correct (a true proof of concept) before migrating the applications. - V PS: Please specify the database; since "SDE" no longer exists, the term of art is "enterprise geodatabase" or "<Name of DBMS> enterprise geodatabase".
... View more
05-03-2017
07:52 AM
|
3
|
2
|
3135
|
|
POST
|
Python is one of very few languages where the modulus operator works on floating-point datatypes. Usually a math function (e.g., fmod) is required, with the operator only supporting integer types. I tested in Python 2.7 (which is why I got away with the paren-less print).
... View more
04-27-2017
07:28 PM
|
2
|
0
|
4026
|
|
POST
|
The Python modulus operator (%) can be used to force a range on even floating-point values: >>> print (358.1 + 4) % 360.0
2.1
>>> print (3.0 - 12) % 360.0
351.0
... View more
04-27-2017
02:50 PM
|
1
|
2
|
4026
|
|
POST
|
Have you tried a non-Esri forum (more specifically, a Microsoft one) to obtain this answer? Even a vendor-neutral site like GIS StackExchange is more likely to have this answered than here in GeoNet. The PostGIS operator is ST_DWithin, but neither SDE.ST_Geometry nor the native Microsoft geometry/geography operators support that method, so you'd need to evaluate using an ST_Buffer with ST_Intersects (which uses a spatial index, if available) and ST_Distance (which doesn't use a spatial index at all). I need to point out that SQL Server 2008 is very old software (released in beta nearly a decade ago), and support for it among GIS vendors (and Microsoft) is waning. You should consider upgrading to at least SQL Server 2012 or 2014, which were at least released this decade. - V
... View more
04-24-2017
11:56 AM
|
1
|
0
|
2524
|
|
POST
|
[This got detached from the thread stream by auto-save; pasted back in where it belongs] Rex gave you two SQL statements, though the second one has a typo ('Updated features' instead of 'Deleted features'). Working with the two of them you should be able to synthesize the distinctions between inserts and updates, and deletes and updates. - V
... View more
04-20-2017
06:56 AM
|
0
|
0
|
5126
|
|
POST
|
Correct. Individual edits associated with a state only exist in the An and Dn tables associated with each table. To find all edits associated with all tables participating in that state would require iterating all versioned tables. - V
... View more
04-20-2017
06:53 AM
|
1
|
0
|
5126
|
|
POST
|
Any SQL query solution can be implemented in ArcPy through an arcpy.ArcSDESQLExecute cursor.
... View more
04-17-2017
06:56 AM
|
3
|
2
|
5126
|
|
POST
|
You'll probably want to detail your issues with 10.0->10.4 migration as a different question in a different group. I had no significant problems porting some pretty complex ArcObjects Java SOEs from 10.0 to 10.1, then adding complexity and porting to 10.2, then 10.3, then 10.4, so you may be just dealing some of the fundamental changes that occurred at the 10.0-10.1 migration. - V
... View more
03-29-2017
10:09 AM
|
1
|
0
|
2456
|
|
POST
|
Note that you might have issues working with large selection sets which use logfile tables in the database. "Read-only" users are granted CREATE TABLE to support logfile creation.
... View more
03-28-2017
09:04 AM
|
1
|
1
|
2941
|
|
POST
|
1) No, a spatial view can only see what SQL can see, which is tables in the database 2) Not possible, but using network drives is a poor solution, even for situations where it is possible. 3) The only solution is to load the data into the database. Note that Excel is not a database format, and shouldn't be considered one; working with data coming out of Excel requires an awful lot of error handling. Real-time or near-real-time updates based on a flat file are extremely difficult to detect and manifest - a mediocre implementation could take weeks to stabilize, and a robust solution might involve months and custom modifications to the database itself. - V
... View more
03-28-2017
07:31 AM
|
1
|
0
|
1515
|
|
POST
|
ArcGIS 10.0 has been Retired for nearly 15 months. I'd be afraid to use the ancient Python that shipped with 10.0 for even non-ArcPy use. Attempting to use a modern ArcPy script with an ancient ArcGIS build isn't likely to be successful.
... View more
03-28-2017
06:36 AM
|
2
|
2
|
2456
|
|
POST
|
DeleteRows is not efficient (no "delete" is), but TruncateTable is, not that it would much matter with only 20k rows (but if you cross 500k rows, you'll notice a difference). - V
... View more
03-23-2017
06:42 AM
|
0
|
0
|
8558
|
|
POST
|
You seem to have forgotten to back up and restore the SDE user (between steps 5 and 6), and to upgrade the 10.1 schema tables to 10.4.1 between steps 6 and 7).
... View more
03-22-2017
09:47 AM
|
0
|
0
|
1525
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-30-2026 09:35 AM | |
| 2 | 06-08-2026 09:13 PM | |
| 1 | 05-29-2026 12:51 PM | |
| 1 | 06-01-2026 06:03 PM | |
| 2 | 05-29-2026 08:31 AM |