|
POST
|
I suggest using a cursor instead: from collections import Counter
layer = # name of layer or path to feature class
with arcpy.da.UpdateCursor(layer, ["NAME", "Field"]) as cur:
count = Counter(name for name, field in cur)
cur.reset()
for name, field in cur:
cur.updateRow([name, 1 if count(name) > 1 else 0])
... View more
03-24-2021
08:53 AM
|
0
|
0
|
942
|
|
POST
|
Can you share some more about the fields you are trying to add? What field names have issues? What data types for those fields, etc....
... View more
03-24-2021
07:33 AM
|
1
|
0
|
4395
|
|
POST
|
Looking to Esri's documentation on Authoring geoprocessing services with Python scripts—ArcGIS Pro | Documentation: Most Python script tools that execute successfully on your computer will publish and execute successfully as a geoprocessing service—you do not have to modify your script in any way. In terms of scheduling, there are multiple ways it can be done, which works best depends on your situation. Geoprocessing services themselves do not have a setting to have the service execute automatically, the service has to be called. ArcGIS Pro includes scheduling tools, which rely on Windows Task Scheduler, and Notebook Server now supports scheduling notebook tasks.
... View more
03-23-2021
07:17 AM
|
1
|
1
|
5081
|
|
POST
|
Moving to Python space since question is ArcPy related and not ArcGIS API for Python.
03-22-2021
09:12 AM
|
0
|
0
|
503
|
|
POST
|
@SterlingLoetz, see my reply on your other discussion.
... View more
03-22-2021
08:24 AM
|
0
|
0
|
5710
|
|
POST
|
Yes, the walrus is an interesting addition. That said, I still can't decide if it is quite elegant or a bit hackish.
... View more
03-22-2021
08:23 AM
|
0
|
1
|
657
|
|
POST
|
Whenever discussing issues like this, it is most helpful to share how the shapes are being stored in the DBMS (GEOMETRY, GEOGRAPHY, SDEBINARY) and what projections and datums are involved. The geometry model implemented by ArcGIS products and DBMSs don't always line up exactly, especially or usually when dealing with true curves. For SQL Server, this is mentioned SQL Server spatial types and ArcGIS—ArcGIS Pro | Documentation: ArcGIS adds a column to store extra geometric elements The geometry and geography types cannot store all types of geometric elements that geodatabases must support. Therefore, when you create or register a feature class that uses the geometry or geography storage type with a geodatabase in SQL Server, ArcGIS adds a column to the business table to store these additional geometric elements. The column is called gdb_geomattr_data. The additional geometric elements include the following: Parametric objects such as circular arcs and Bezier curves created with advanced editing tools PointIDs Multipatch features Surface patches from ArcGIS Spatial Analyst extension When ArcGIS detects the data source has these additional geometric elements, a simple geometric representation is stored in the shape column and the unmodified data (including the additional elements) is stored in the gdb_geomattr_data column. It may be that ArcGIS Pro and SQL Server are not calculating area on the exact same object for each record.
... View more
03-22-2021
08:21 AM
|
0
|
0
|
2923
|
|
POST
|
Jayanta has provided a workable solution, but I will elaborate on why your existing code doesn't work. The shutil.rmtree method is designed to remove entire directory trees, not files within directory trees. As the documentation states, "path must point to a directory", which in your case '*txt' is not a valid directory path.
... View more
03-21-2021
06:47 AM
|
3
|
0
|
1864
|
|
POST
|
I can't even get past your first line of code in extract_cursor function: >>> extract_cursor(fcs_in, target_field, target_val, fname)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 2, in extract_cursor
TypeError: 'int' object is not iterable I get that error because of: for i in len(fcs_list): I understand you are posting sample code, but it is hard to dive into sample code when it isn't functional code.
... View more
03-19-2021
01:35 PM
|
1
|
2
|
7169
|
|
POST
|
There is nothing new in Pro that I am aware of. What have you tried from last time you asked, and what were the results?
... View more
03-17-2021
02:33 PM
|
0
|
0
|
2164
|
|
POST
|
There is a very long discussion on this topic with lots of suggestions over @ python - How to replace multiple substrings of a string? - Stack Overflow
... View more
03-17-2021
07:14 AM
|
3
|
0
|
3810
|
|
POST
|
Esri doesn't maintain a web page listing that information. If you already have Pro installed, or know someone who does, you can take Dan's suggestion and use conda to list packages in ArcGIS Pro's default Python environment. If you don't have Pro installed, nor even conda, you can visit the ArcPy package page at Anaconda: https://anaconda.org/Esri/arcpy . From there you can unzip the package at look at the about.json and index.json files to see dependencies and installed packages.
... View more
03-14-2021
08:25 AM
|
2
|
0
|
2624
|
|
POST
|
From a technical perspective, deploying multiple roles on a single machine is simple, we do it on our development servers regularly. I think the general recommendation, although I can't remember where it is written or who all recommends it, comes less from ArcGIS Server roles needing to be on their own machines/sites and more from segmenting various use patterns to different machines/sites. Even within a single ArcGIS Server role, there are times it makes sense to have separate sites. For example, deploying heavily-utilized geoprocessing services on a machine hosting map or feature services can lead to the gp services impacting the performance of other non-gp services. For the situation you describe, I don't see a compelling reason to stand up a separate site. Since deploying ArcGIS Image Server on both the ArcGIS GIS Server machines will involve licensing more cores than you were originally planning, there could be an increased cost from an Esri licensing perspective. That said, deploying 3 Windows servers instead of 2 Windows servers comes with additional operating system licensing costs, not to mention the additional hosting cost of having a 3rd machine. What is the net change in cost? Likely not worth driving a deployment decision.
... View more
03-14-2021
07:43 AM
|
2
|
2
|
4192
|
|
POST
|
I don't think each site needs a separate SMB share, but each site needs its own root folder separate from other site's root folders. If the existing site is using an SMB share as its root folder, then going with another SMB share would make sense. Or, you could make subfolders under the SMB share for each site and migrate the existing site to one of the subfolders and then point the new site to the other subfolder.
... View more
03-11-2021
10:55 AM
|
2
|
1
|
3005
|
|
POST
|
How do you envision two ArcGIS Server sites, different sites, sharing the same configuration store? They will simply clobber each other's files and likely corrupt both.
... View more
03-11-2021
10:12 AM
|
1
|
3
|
3022
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-11-2026 07:04 AM | |
| 1 | 07-17-2026 06:54 AM | |
| 2 | 07-06-2026 12:29 PM | |
| 1 | 07-06-2026 12:00 PM | |
| 2 | 06-05-2026 10:30 AM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|