|
POST
|
I second Wes's comment, especially since the tool is available at all licensing levels. There are also several Python-based packages that have similar functionality. I personally like usaddress, but I only work with US addresses.
... View more
03-04-2016
07:11 AM
|
1
|
1
|
2736
|
|
POST
|
If one is interested in creating a Relate (using one is a different matter) with ArcPy, that functionality is available in ArcGIS Pro but not ArcMap: Add Relate.
... View more
03-03-2016
06:58 AM
|
1
|
0
|
2182
|
|
POST
|
What version of ArcMap are you using? I ask because new support for several useful Python packages was included at 10.4. Specifically, Pandas is now supported and pandas.rolling_max was built for this type of situation. If you are working with 10.3.1 or earlier, there is a moving average recipe in the Python deque Recipes that can be easily modified to return the sum instead of average and then used to find the maximum: >>> def moving_sum(iterable, window_size=1):
from collections import deque
from itertools import islice
it = iter(iterable)
d = deque(islice(it, window_size-1))
d.appendleft(0)
s = sum(d)
for elem in it:
s += elem - d.popleft()
d.append(elem)
yield s
>>> rain_hour = (0.25, 0.8, 0.13, 0.08, 0.55, 0.34, 0.35, 0.17, 0.02, 0.6, 0.14)
>>> max(moving_sum(rain_hour, 6))
2.2500000000000004
>>>
... View more
03-01-2016
03:12 PM
|
1
|
0
|
1208
|
|
POST
|
Can you elaborate a bit more about why you are trying to script relates with Python? I view Relates as GUI sugar to make working with 1-to-many relationships more palatable in ArcMap, i.e., they work best when working with the GUI, but there is usually a better way to do it when scripting.
... View more
03-01-2016
01:34 PM
|
0
|
1
|
2182
|
|
POST
|
The error says 'row' is not defined because in Mitch's code there is no variable 'row', hence it is undefined when you try to update the cursor based on a non-existent variable. I am not sure I completely understand what value you are trying to use to update the row with, but does the following work: with arcpy.da.UpdateCursor(punkte, returnField, where_clause=None, sql_clause=sql_clause) as cursor:
last_row = cursor.next()
last_row[1] = UID
cursor.updateRow(last_row)
... View more
02-29-2016
06:50 AM
|
2
|
1
|
2781
|
|
POST
|
Regarding your second question, the answer is "versioned views." From What is a versioned view: Versioned views are automatically created for tables or feature classes that are registered as versioned in ArcGIS 10.1 or later releases. If you register a feature dataset as versioned, a versioned view is created on each feature class in the feature dataset. The view that is created has the same name as the table or feature class with _evw appended to the end. Regarding your first question, my reflex answer is "no," but I also can't say for sure without revisiting the documentation. Maybe someone else can chime in with a good documentation link. Enterprise geodatabases are great data stores, they are much less great at being a data catalog. Attempts to organize data within enterprise geodatabases based on visual presentation instead of functional requirements typically leads to functional issues, performance issues, or both down the road. For folks with GIS in their job title, hopefully what you describe isn't confusing to them. For the masses, there are numerous other avenues for cataloguing GIS data where visual presentation and discoverability can be emphasized.
... View more
02-27-2016
08:22 AM
|
0
|
1
|
1025
|
|
POST
|
There is typically some level of moderation, although it varies, and I can't say whether every code snippet is verified before an addition is approved/allowed. I realize moderation requires resources as well, but I have found moderating content requires left effort than thinking up and writing original content to share.
... View more
02-26-2016
11:33 AM
|
0
|
0
|
3015
|
|
POST
|
Alexander, the STWithin (geometry Data Type) (SQL Server 2012) documentation is an example where a SQL Server user added a comment and some code through a community additions avenue. For MS, the community additions don't carry over into the new version of the documentation even if they still apply, so the number of additions are typically small when a new product like SQL Server 2016 is first released.
... View more
02-26-2016
11:30 AM
|
0
|
0
|
3015
|
|
POST
|
Here is a documentation-related suggestion I share with Esri employees whenever I get the chance. Seeing you are a Documentation Product Engineer, I figure I will share it here as well. I think it would benefit Esri customers if there was a "community addition" section for the online documentation. Microsoft's Developer Network has long had this feature, and I have come across other IT-related companies that do the same thing. The reality is, there are limits to the resources devoted to documentation, and it makes sense to create more avenues for users/customers to share their knowledge about Esri products. The best place for additional comments or examples from the user community isn't in some forum like GeoNet but directly in the documentation.
... View more
02-25-2016
06:54 PM
|
6
|
9
|
3015
|
|
POST
|
At this point it is helpful to others for you to present some example data along with what you expect the results to look like. If the example data can be extracts from your actual data set, all the better.
... View more
02-24-2016
10:50 AM
|
1
|
12
|
2086
|
|
POST
|
Enable ArcSDE SDEINTERCEPT and take a look at all of the SQL code/commands being issued when you connect from ArcMap to a geodatabase. ArcMap or ArcCatalog don't just "connect" to SQL Server, they issue a whole series of SQL when initial connections are made or when data is browsed in SDE. If you were to do a similar trace with SQL Server Management Studio, you would see different and much less traffic when first connecting. Management Studio and ArcMap/ArcCatalog are very different applications, I wouldn't set my expectations of one application's performance based on the other.
... View more
02-24-2016
06:56 AM
|
0
|
1
|
1191
|
|
POST
|
There are others that can speak much more definitively on this topic, but what you are seeing is completely expected. What are the ping times to the server between your initial and cellular tests? I am guessing your initial tests are <1ms or possibly 5-10ms while your cellular tests are 150-250+ms. In layman's terms, SDE is a very chatty protocol, and it is very sensitive to network latency. Back in the application server days (not direct connect), there were a series of configuration options that could be set to mitigate the impacts of higher-latency networks. I never explored those configuration options with direct connects because we moved away from WAN access to SDE and to web services.
... View more
02-24-2016
06:44 AM
|
0
|
3
|
1191
|
|
POST
|
Luke Pinner, this is definitely the most idiomatic and elegant in my mind. I would give 2 helpfuls if I could. I know the OP used LTRIM, which is probably why you used lstrip(), but I wonder if using strip() would be better for the OP. One very minor comment, the list comprehension can be swapped for a generator expression, which then allows the expression brackets to be dropped: ' '.join(s.lstrip() for s in (LOCN,LOCD,LOCS) if s)
... View more
02-24-2016
06:33 AM
|
2
|
1
|
2191
|
|
BLOG
|
Dan, thanks for sharing that link/thread. I think it is a good one for people to check out that are diving into the "parts" of Esri geometries.
... View more
02-22-2016
06:51 AM
|
1
|
0
|
937
|
|
BLOG
|
The ArcPy Geometry classes have been around since ArcPy was introduced in ArcGIS 10.0. ArcGIS 10.1 brought some noticeable enhancements to ArcPy, including additional properties and methods to the Geometry classes. There have been bug fixes and enhancements with newer releases, as well as a Call for More Pythonic ArcPy Geometries, but the classes haven't changed much over the past 4 years. This is why I was a bit surprised when I ran into an issue with the ArcPy Polygon class recently. The surprise wasn't that I ran into an issue, but more that I hadn't run into it or noticed it earlier than now. The ArcPy Polygon isMultipart and partCount properties have been around since ArcGIS 10.0. Interestingly enough, the documentation for them hasn't changed one word in that time. The issue I ran into can be demonstrated by two square polygons, one of which has a hole in it: >>> # Create the 2 polygons
>>> poly = arcpy.FromWKT('POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))')
>>> poly_hole = arcpy.FromWKT('POLYGON((12 0, 22 0, 22 10, 12 10, 12 0),'
... '(15 3, 15 7, 19 7, 19 3, 15 3))')
...
>>> # Check the number of parts
>>> poly.partCount
1
>>> poly_hole.partCount
1
>>>
>>> # Check the multipart property
>>> poly.isMultipart
False
>>> poly_hole.isMultipart
True
>>>
Wait a second, something doesn't add up here. Both polygons have 1 part, but the polygon with a hole in it is a multipart? It seems we are witnessing the multi-part single-part polygon, a sideshow favorite that you don't even have to visit the circus to see. The facile explanation is that the polygon with a hole in it is a multipart because it has an exterior and interior boundary, as opposed to the other polygon that only has an exterior boundary. Multiple parts, see, simple. The explanation does make sense, but it also implies that partCount has been broken since ArcGIS 10.0. Well, maybe partCount has been working all along and the documentation has been wrong for 6 years. Then again, maybe isMultipart has been broken for 6 years. Who knows, not me, but I just can't believe I haven't been bitten by this bug long before now. In terms of what next, assuming Esri Development acknowledges this is either a software or documentation bug, my money is on the documentation getting updated, eventually. It is always easier to add additional footnotes and asterisks to documentation than it is to update code. That said, I think there is actually a larger problem with the ArcPy Geometry classes. I spent some time trying the example above in different spatial systems, even other Esri software components outside of ArcPy, and I have come to the conclusion the real problem is in the labels themselves. Specifically, the problem lies in the use of "part" to talk about geometries. Take a look at the List of SQL functions for Esri's ST_Geometry data type, the OGC Methods on Geometry Instances for Microsoft's geometry data type, or the PostGIS Reference; you will not find a single function, method, or property with the word "part" in it. There are accessor functions for counting geometries, but they count "geometries" and not "parts." There are accessor functions for counting interior rings, but they count "interior rings" and not "parts." You see where this is going. The problem with the ArcPy Geometry classes, at least one of them, is that Esri replaced multiple, specific geometry components with a single generic one, the "part." By abstracting geometries and rings with parts, not only did they deviate from geospatial standards and norms, they created the sideshow-worthy multi-part single-part polygon.
... View more
02-20-2016
11:16 AM
|
4
|
2
|
4442
|
| 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
|