|
POST
|
I think part of what is confusing people is semantics, particularly the use of the word "furthest." Assuming no two construction sites are exactly the same distance from a waste facility, you will only have one construction site that is furthest away. If by furthest you mean far, then a definition of what is far and what is close would be helpful. Or, are you looking to simply determine the distance from each construction site to each waste facility?
... View more
03-18-2015
12:16 PM
|
1
|
17
|
5791
|
|
POST
|
You can accomplish what you want, and a whole lot more, using Pivot Tables. Pivot Tables are quite powerful and the learning curve isn't too steep.
... View more
03-18-2015
12:05 PM
|
0
|
0
|
1069
|
|
POST
|
If you are only working with Points, another approach is to use the new NumPy-based features that were introduced with the ArcPy data access (arcpy.da) module. import os
import numpy as np
in_features = #Point data set to have exported as individual data sets
out_path = #Path to geodatabases or folder for individual data sets
out_prefix = 'pnt_' #Prefix for individual data sets, can be empty ''
desc = arcpy.Describe(in_features)
SR = desc.spatialReference
OID_name = desc.OIDFieldName
shape_name = desc.ShapeFieldName
narr = arcpy.da.FeatureClassToNumPyArray(in_features, "*")
ndtype = narr.dtype
for row in narr:
n = np.array(row, ndtype)
OID = n[OID_name]
arcpy.da.NumPyArrayToFeatureClass(n,
os.path.join(out_path, out_prefix + str(OID)),
shape_name,
SR) The above script will work on shape files and feature classes because I am using an arcpy.Describe object to retrieve the name of the unique identifier and shape fields.
... View more
03-18-2015
11:35 AM
|
2
|
1
|
1451
|
|
POST
|
First, I don't think MakeFeatureLayer_management is what you want unless you are using it as an intermediate step before exporting the feature layer. Second, it helps to paste specific error messages. Third, what about putting str(i) in place of i in the layer name you are concatenating.
... View more
03-18-2015
08:39 AM
|
1
|
1
|
4088
|
|
POST
|
I hear ya. Usually there are workarounds, but not always. The frustration with relying on workarounds is that they tend to break even more frequently than ArcGIS between versions, which in effect puts you on a gerbil wheel. Workarounds are a necessity at times, but they are also wasted time when there is work to be done. For your sake and mine, along with many others, let's hope each 10.3.x release adds more geodatabases administration functions/tools.
... View more
03-18-2015
08:34 AM
|
2
|
0
|
2751
|
|
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
|
526
|
|
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
|
2751
|
|
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
|
5087
|
|
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
|
5087
|
|
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
|
1112
|
|
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
|
1673
|
|
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
|
1673
|
|
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
|
1210
|
|
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
|
2114
|
|
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
|
2114
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | a month ago | |
| 1 | 05-29-2026 08:22 AM | |
| 1 | 06-02-2026 06:16 AM | |
| 3 | 06-01-2026 01:55 PM | |
| 1 | 05-22-2026 05:27 AM |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|