|
POST
|
If you do a reverse name lookup on all of those IPs, they all point back to Amazon's Elastic Compute Cloud, which is where ArcGIS.com resides. You are getting different host IPs because of load balancing in the cloud. What are the ranges of IP addresses that participate in the load balancing? I don't know, and I doubt Esri will publish them. That said, you may be able to get some information if you open an Esri Support case.
... View more
03-18-2015
08:27 AM
|
0
|
0
|
549
|
|
POST
|
In the realm of community planning, there is a model of public or stakeholder engagement/participation called Decide, Announce, and Defend (DAD), a.k.a., decide-inform-justify. It has been and continues to be the most common way most organizations (governmental, civic, private sector, academia) engage their stakeholders, but it is also a paternalistic model that some argue is outdated, even antiquated. On the spectrum of DAD to informed consent, Esri is pretty far over on the DAD side whether we are talking about the retirement of SDE command line tools, the transition to MyEsri, or even their business processes as they relate to customers. Esri isn't unique in this regard, just look at all of the products Google unceremoniously jettisoned in the past year, but that isn't much consolation for ArcGIS users. I think there are IT companies that do it better, and I would like to see Esri improve their customer engagement from the introduction of new features to supporting those features throughout their lifespan and eventually retiring them. Hope isn't a strategy, at least if you want to accomplish anything, but it can be a coping mechanism. So, I too will hope they fix some of these SDE command line issues sooner than later.
... View more
03-18-2015
08:03 AM
|
2
|
2
|
2829
|
|
POST
|
Type checking, e.g., field.type == 'String', might be the ArcGIS way but it isn't very Pythonic. This is one of those cases where learning programming through ArcPy teaches less-than-idiomatic Python. As the expression goes, and is summarized by @herge over at Stackoverflow (What's the canonical way to check for type in python?😞 The most Pythonic way to check the type of an object is... not to check it. Since Python encourages Duck Typing, you should just try to use the object's methods the way you want to use them. So if your function is looking for a writable file object, don't check that it's a subclass of file, just try to use its .write() method! Of course, sometimes these nice abstractions break down and isinstance(obj, cls) is what you need. But use sparingly. It is for this reason that I suggested type casting your integers to strings and then process them and your strings containing integers the same way.
... View more
03-17-2015
11:38 AM
|
2
|
0
|
5205
|
|
POST
|
They likely wrote the documentation for the Search Cursor first, and it is correct for that cursor because it does return tuples, and then someone got sloppy and didn't update the next() portion for the update cursor. Little mistakes like this happen, it is human nature, but what amazes me is how ridiculous it gets when you try to get Esri to correct them, i.e., open a Support Case, submit a documentation bug, wait for development to look at it (which could be months), and then maybe they will address it in a future version. The software may, may, be agile but not the business processes!
... View more
03-17-2015
10:28 AM
|
1
|
0
|
5205
|
|
POST
|
If there is no chance that floats are involved, the str.isdigit method can be used like you already tried. Instead of type checking for int, str, or unicode; you can just cast the field as a string and process it like a string. row[3] = None
if row[17] is not None:
row[3] = int(filter(unicode.isdigit, unicode(row[17]))) If a float could show up in the string fields, you could go with a regular expression approach. row[3] = None
f = re.findall(r"[-+]?\d*\.\d+|\d+", unicode(row[17]))[0]
f = float(f)
row[3] = int(f) The above regular expression is abridged in that it doesn't capture scientific notation, exponents, etc.... There is a good discussion on extracting floats from Python strings over at Stackoverflow: How to extract a floating number from a string in Python [duplicate].
... View more
03-17-2015
08:57 AM
|
3
|
0
|
1138
|
|
POST
|
Regarding Google, it is interesting/odd that ArcGIS 10.1 seems to be the higher-ranked search results. With ArcGIS 10.1 and 10.2, you could just manually change the URL, which was easy enough. With 10.3, not only did Esri change the subdomain for the online help, it changed the name from "Help" to "Documentation." The fact it was done with no notice to customers was a bit annoying. Here is the ArcGIS 10.3 Desktop overview of the Conflation toolset. If you dive into the links on that page, there is some good information on edge matching, feature matching, rubber sheeting, etc.... I would say start by reading the documentation and work through the examples. Beyond that, I don't see any offerings in the Esri Training Catalog that are specific to conflation.
... View more
03-16-2015
12:43 PM
|
0
|
0
|
1738
|
|
POST
|
The Conflation toolset was introduced in ArcGIS 10.2.1. There really hasn't been any changes or updates to it since then, as the lack of references to any such changes or updates in the documentation implies. A big part of why you have gotten no response is likely the appearance you have done nothing yourself to try and answer the question first. Maybe the What's New lists were checked as well as the Help files; if so, none of that came across in the original question.
... View more
03-16-2015
08:31 AM
|
0
|
2
|
1738
|
|
POST
|
Since this is an Esri site focused on ArcGIS products, I will answer from the ArcPy perspective, which is there are no ArcPy functions or classes that monitor memory usage of ArcPy or Python objects. The larger or more general question of tracking Python object memory usage has been asked and discussed on many other forums. An excerpt from the Find out how much memory is being used by an object in Python post that I have always liked is: There's no easy way to find out the memory size of a python object. One of the problems you may find is that Python objects - like lists and dicts - may have references to other python objects (in this case, what would your size be? The size containing the size of each object or not?). There are some pointers overhead and internal structures related to object types and garbage collection. Finally, some python objects have non-obvious behaviors. For instance, lists reserve space for more objects than they have, most of the time; dicts are even more complicated since they can operate in different ways (they have a different implementation for small number of keys and sometimes they over allocate entries). Besides the post referenced above, there are numerous other StackOverflow posts on this topic along with links to code for approximating the size of Python objects. A quick Google search should get you pointed in the right direction.
... View more
03-16-2015
08:06 AM
|
2
|
1
|
1259
|
|
POST
|
ArcPy versions are really tied to the underlying ArcGIS for Desktop, Engine, Server, etc... application that is installed. The GetInstallInfo (arcpy) function will let you know which application the currently loaded arcpy package is pointing to along with a bunch of other information, including version. >>> import arcpy
>>> arcpy.GetInstallInfo()['Version']
u'10.3' Looking at the ArcGIS 10.3 Issues Addressed List, nothing jumps out at me for CalclateField_management or ArcPy that would seem related to this issue. That said, sometimes bugs get addressed indirectly as the result of a different bug being addressed directly, i.e., not every issue that gets addressed with a new release ends up in the Issues Addressed List. Looking at your StackExchange post, it appears you are using Enthought Canopy for Python package deployment. I am also wondering if it might be a configuration issue tied to how iPython is being pushed your machine with ArcGIS installed.
... View more
03-16-2015
07:08 AM
|
0
|
0
|
2176
|
|
POST
|
What version of iPython are you using? I am running iPython 3.0.0 with ArcGIS 10.3, and I am able to use arcpy.CalculateField_management without any errors. There were 11 flush-related issues closed in iPython 3.0.0, maybe this was related to one of them.
... View more
03-14-2015
08:38 PM
|
0
|
3
|
2176
|
|
POST
|
If you have the C:\Python27\ArcGISx6410.2 directory on your machine, then you installed 64-bit Background Geoprocessing (not part of the standard installation) or ArcGIS for Server. Assuming the latter isn't the case, the former is what put the extra Python interpreter installation on your machine. With regard to the OP's situation, 64-bit Background Geooprocessing wasn't introduced until ArcGIS 10.1 SP1. That said, the information provided is useful for others that install 64-bit Background Geoprocessing and get confused over which Python interpreter they are using when.
... View more
03-13-2015
07:12 AM
|
2
|
1
|
1169
|
|
POST
|
FeatureClassToNumpyArray, nah, that would be too easy. I got tunnel vision on showing the mechanics of building the numpy array, but FeatureClassToNumPyArray is the more ArcPy approach.
... View more
03-13-2015
07:04 AM
|
2
|
1
|
7505
|
|
POST
|
fc = #feature class with NEAR_X and NEAR_Y fields
idfield = #an identifier field
nearList = []
with arcpy.da.SearchCursor(fc, [idfield, "NEAR_X", "NEAR_Y"]) as cur:
for id, x, y in cur:
nearList.append((id, (x, y)))
dtype = numpy.dtype([(idfield,numpy.int32),('XY', '<f8', 2)])
narr = numpy.array(nearList, dtype) You can add extra fields, or drop the idfield, if you want.
... View more
03-12-2015
01:17 PM
|
1
|
4
|
7505
|
|
POST
|
I am using ArcGIS 10.3, and it isn't fixed! There is a bug with the arcpy.SelectLayerByLocation_management tool. At first I thought it might be related to using shape files, but I can generate the same issues with file geodatabases and even ArcSDE databases. The following code demonstrates how arcpy.SelectLayerByLocation_management misses the polygon while looping through a search cursor and checking for intersection gets the polygon. >>> arcpy.SelectLayerByLocation_management("xxxx_feat", "INTERSECT","xxxx_ext1", "", "NEW_SELECTION")
<Result 'xxxx_feat'>
>>> arcpy.GetCount_management("xxxx_feat")
<Result '1357'>
>>> arcpy.SelectLayerByAttribute_management("xxxx_feat","CLEAR_SELECTION")
<Result 'xxxx_feat'>
>>>
>>> i = 0
>>> ext = next(arcpy.da.SearchCursor("xxxx_ext1","SHAPE@"))[0]
>>> with arcpy.da.SearchCursor("xxxx_feat","SHAPE@") as cur:
... for shape, in cur:
... if not shape.disjoint(ext):
... i += 1
...
>>> i
1358
>>> The code above does raise the possibility of another approach. If you are always selecting from the same set of features, you could build a search cursor and loop over the same cursor each time the extent object changes. There are a couple of pluses with this approach. One, creating a new cursor takes more resources than simply resetting one. Two, the .disjoint method is quite quick.
... View more
03-11-2015
12:34 PM
|
1
|
2
|
5972
|
|
POST
|
This question was originally cross posted to StackExchange, where it received feedback, some of which was marked best answer. Geographic Information Systems Stack Exchange > How to get a search cursor on a particular version in arcpy
... View more
03-11-2015
08:49 AM
|
1
|
0
|
863
|
| 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
|