|
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
|
1039
|
|
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
|
1039
|
|
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
|
848
|
|
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
|
1380
|
|
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
|
1380
|
|
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
|
768
|
|
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
|
4820
|
|
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
|
4820
|
|
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
|
3793
|
|
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
|
719
|
|
POST
|
Thanks for uploading data, it helps. If I use your data as-is, and choose Intersect_3D instead of Intersect, the polygon in question gets selected for a total of 1358. If I project your data from WGS84 to a North American continental projection like Lamberts Conformal Conic, I get the same result. Since using the 3D intersect option and projecting your data explicitly gets the same, expected result; I can only surmise something is going on with default values or tolerances when using geographic coordinates and a 2D intersect. Maybe the projection-on-the-fly is having an issue, I am not sure.
... View more
03-10-2015
11:14 AM
|
0
|
4
|
1278
|
|
POST
|
If I understand you correctly, it is one polygon on or near the periphery that is not being handled the way you think. A few questions. Is the missing polygon a single-part or multi-part polygon? You appear to be working at continental map scale, i.e., 1:60,000,000. What spatial reference are you using? Which part specifically isn't working? Does the arcpy.SelectLayerByLocation_management tool miss the polygon or does that step work and it is the search cursor that is missing it? Regarding cursors, you should really consider using the newer ArcPy Data Access (arcpy.da) cursors instead of the older/original ArcPy (arcpy) cursors.
... View more
03-09-2015
06:14 PM
|
0
|
8
|
2517
|
|
POST
|
Regarding spatial reference, yes, it is always a good idea to specify a spatial reference when creating ArcPy geometry objects. There are numerous, known precision issues that crop up with ArcPy geometry objects when spatial references aren't specified. Is lack of a spatial reference the issue here? We will know soon enough when you test it. When you are talking about a "shared point with the extent rectangle," I am a bit uncertain whether that is what you mean. "Shared point" could be taken to mean something very specific, like a polygon in question must share a vertex with the extent rectangle. Try adding the spatial reference, and then report back. Also, are the differences you are finding only along the periphery of the extent object? Are any polygons more in the interior being handled different. There are 15+ different types of overlaps one can specify. I picked Intersect in this case because it is the default and most common. It could be the CopyFeatures_management tool uses a different overlap type, or it could be a bug in one tool or the other.
... View more
03-09-2015
04:28 PM
|
0
|
10
|
2517
|
|
POST
|
You make a good point, i.e., each IDE handles things a bit different so some parts of my statements might not apply to others using different IDEs. That said, most of what I say is generally enough to apply on some level to most IDEs. Regarding the "import arcpy" question, it is an apples to oranges issue, or at least Granny Smith to Honeycrisp. An IDE code editor can't do name completion on a Python site package/library/module/etc... that isn't imported. The import statement is used by the code editor to expand code completion beyond the default or base Python packages, but that normally doesn't provide access to dynamic properties like ArcPy environment settings. In PyScripter when you add a package like ArcPy to the code completion special packages, it actually executes code to see all the run-time items you see in the interactive console and then caches them for use in the code editor. It isn't "seeing" those items like normal items, it had to execute code to find the items and then build a cache of them; hence, why you have to put arcpy in the special packages list to see them all. With PyCharm, there is a "Collect run-time types information for code insight" option that will build similar caches. With ArcPy, however, that feature doesn't seem to work very well. Whether the problem lies in Esri, JeBrains, or both I do not know.
... View more
03-09-2015
01:47 PM
|
1
|
1
|
3352
|
|
POST
|
arcpy.env.workspace is not a Python special method, it is an ArcPy environment setting exposed as a property on ArcPy's env class. When ArcPy is instantiated, the environment settings get defined and stored as a set in one of the environment object's internal or private attributes, _environments to be specific. You can use the Python dir() built-in function to see those environment settings, but you also see lots of other class attributes as well. The following code snippet shows only the environment settings: import arcpy
for env in arcpy.env._environments:
print env The interactive console is retrieving those environment settings and making them available for code completion to the user. The set of environment settings doesn't exist until an instance of ArcPy is created, so a user doesn't see them for code completion in the editor window. I can't say I am doing complete justice with this explanation, but I find it hard to get much more in depth without getting into the weeds of Python class structure and how properties are defined and managed. I think Esri would argue one should use the online documentation to understand ArcPy and not rely on code completion in a code editor or interactive window. Is Esri's implementation of the ArcPy Env class frustrating because of how it impacts code completion in editor windows, I think so; but I also think this factor is low on the list when considering how to structure ArcPy.
... View more
03-09-2015
10:43 AM
|
2
|
3
|
3352
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Monday | |
| 1 | 2 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 12-19-2025 06:05 AM | |
| 1 | 12-02-2025 07:31 AM |
| Online Status |
Online
|
| Date Last Visited |
6 hours ago
|