POST
|
There must be something else I'm doing wrong. Even though I can create a geometry with a spatial reference and use it for distanceTo, it still shows as having None spatial reference for the purpose of projectAs.
... View more
12-19-2012
06:27 AM
|
0
|
0
|
862
|
POST
|
I think I have figured this out - distanceTo requires both geometries to have the same projection / spatial reference. The newly created geometry has an unknown projection/spatial reference, so the call fails. The spatial reference needs to be set at creation time for the new geometry.
... View more
12-18-2012
01:06 PM
|
0
|
0
|
862
|
POST
|
I'm trying to call distanceTo from a PointGeometry to a Polyine and am running into trouble whenever the polyline is one I just cooked up. Any pointer on what I'm doing incorrectly would be welcome.
#get the first point feature and the first line feature
poi = arcpy.da.SearchCursor("POIs","SHAPE@").next()[0]
line = arcpy.da.SearchCursor("Streets","SHAPE@").next()[0]
print poi.distanceTo(line) #returns 0.017893575694200557
#get first part of line
part = line.getPart(0)
#get the first two points on that part
p0 = part[0]
p1 = part[1]
#make a new polyline out of those two points
seg = arcpy.Polyline(arcpy.Array([p0,p1]))
print seg.length #returns 0.0017140186696764268, so the segment is there as a polyline
#try to get the distance from the poi to the segment
poi.distanceTo(seg)
This is what comes back: Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\arcobjects\arcobjects.py", line 809, in distanceTo
return convertArcObjectToPythonObject(self._arc_object.DistanceTo(*gp_fixargs((other,))))
ValueError: <geoprocessing describe geometry object object at 0x16068EE0>
... View more
12-10-2012
12:45 PM
|
0
|
5
|
4698
|
POST
|
I've been having problems with Select by Location running very slowly. I ran an experiment in which there was one point feature to do the section and I selecting all the lines within 200 m of that one point feature. The lines are in a geodatabase, which claims to have a spatial index built. 27 million lines, but with the spatial index, that shouldn't matter, right? After huge delay in GP, I tried it in the interface - same thing, huge delay, but it at least provided the information that it was reading envelopes - hundreds of thousands before I canceled (and crashed ArcMap...again). With a spatial index built, why would Select by Location (and Clip) read all those envelopes - it should be reading just a few after using the index. What is up? UPDATE: I started it again and am watching ArcGIS read through *all* the envelopes of the streets. 27 million of them. That's not right - it should be using the spatial index to just grab the close envelopes.
... View more
11-15-2012
09:25 AM
|
0
|
0
|
285
|
POST
|
You are exactly correct - in Catalog, you can see that the field is the correct name. Now I just need to figure out how to change the alias, since that is what the user will see.
... View more
11-05-2012
07:07 AM
|
0
|
0
|
341
|
POST
|
Probably doing it incorrectly, but following the samples in which I try Python: import arcpy fi = arcpy.FieldInfo() fi.addField("Name", "Name2", "VISIBLE", "") arcpy.MakeFeatureLayer_management("TheFC, "foo5", "","", fi) arcpy.CopyFeatures_management("foo5", "hoo1") Does NOT persist renaming the fields. Hoo1 still has the old names. According to what I have read, it shouldn't. Is modelbuilder the *only* way renaming works? Is it possible by using ArcPy field methods? What am I doing incorrectly (this time)?
... View more
11-01-2012
05:04 PM
|
0
|
4
|
468
|
POST
|
If I have multiple processes working away, the sample posted at http://blogs.esri.com/esri/arcgis/2012/09/26/distributed-processing-with-arcgis-%e2%80%93-part-1/ makes it appear that you can write to a single table in_memory\identical in all the processes. That would suggest a separate copy of the workspace for each process, which I think it was Bruce Harold says in the comments. But frankly, I am still lost. What's making me confused is the commentary in this threadhttp://gis.stackexchange.com/questions/35614/concurrent-use-of-in-memory-workspace-in-arcpy which makes it seem like in_memory is shared across processes and is sort of like a "folder" in that you are OK to write to multiple tables as long as they have different names, but NOT to the same table name. Note, ths gis.stackexchange post is from 2011. So my question is whether a separate in_memory workspace is created for each process (so all processes end up writing to their own in_memory\table1 or whether it is shared, so you need to change the table names in_memory\table1, in_memory\table2, etc. or something else? I know I should just code and test, but maybe my test will work but under the hood it is "unsafe."
... View more
11-01-2012
02:34 PM
|
0
|
0
|
253
|
POST
|
Cool, Thanks. For what it's worth, I tried not to blink and caught part of what was flashing in the marquee "ing Back" I think.
... View more
10-31-2012
03:42 PM
|
0
|
0
|
648
|
POST
|
Khibma: Consistently, the first GP tool run in the background for a given ArcMap session doesn't show in the Marquee (something blue flashes there for a second but it's too fast for me to read, then nothing). New Mxd: - ran tool: no marquee - ran tool: marquee save mxd, close ArcMap, open mxd - ran tool: no marquee - ran tool: marquee At least it seems to me that the first time the background GP is started in ArcMap, the marquee doesn't work properly. New MxD, old MxD, doesn't matter.
... View more
10-25-2012
07:45 AM
|
0
|
0
|
648
|
POST
|
(I realize that new features for AGX are not going to be added at this point, but with the AGX Add-in framework, maybe this could be an add-in on release day?( It is possible to add related record look up in the API (someone asked and was told to write their own, with the API call suggested), but it would be awesome to have this functionality in the gallery ready to go.
... View more
10-19-2012
04:17 PM
|
0
|
0
|
448
|
POST
|
(I realize that new features for AGX are not going to be added at this point, but with the AGX Add-in framework, maybe this could be an add-in on release day?) Measure Tool really needs to have a way to put the lat and long on one line, without "Latitude" and "Longitude" Over and over again, we copy and paste coordinates from one app to another and we cannot do this in AGX (or ArcMap) without fixing things up - in ArcMap, pasting requires putting the numbers in one and a time in Go To XY. In AGX, pasting is fine, but getting the coordinates out via the Measure tool meanings having the pull them out of text that looks like: Latitude: 34.5 Longtidue: -117.6 Is there another tool, setting, or add-in that can avoid this!
... View more
10-19-2012
03:46 PM
|
0
|
0
|
448
|
POST
|
I keep running into problems when using the software w/biggish shapefiles. Opening attribute table is one and running an attribute query to make a label is another - the entire table gets pulled into memory it seems 3 GB and kaplooey! AGX freezes or dies. Generally slow and unpredictable drawing from shapefiles and from .lyr files referencing shapefiles. Much better when referencing .lpk, but that means we need to lpk hundreds of shapefiles. Sometimes freezes.
... View more
10-19-2012
03:30 PM
|
0
|
0
|
448
|
POST
|
OK, Since posting I have been seeing a mix of appearing and not appearing, but I have had to use the software on the only machine on which we have 10.1 installed, so there has not been a lot of time for experiments. 1. It seems the first time I run the ArcMap and run a tool, the Marquee does not appear - nothing shows. 2. When I turned off background processing, closed ArcMap, opened ArcMap, turned on background processing - the Marquee showed. I can experiment later - my gut tells me it has something to do with the first time the BG processing is running in a given ArcMap session - unless you mess with the option checkbox? No percentage complete - I guess that is by design now?
... View more
10-18-2012
03:13 PM
|
0
|
0
|
648
|
POST
|
Nothing is showing up at all where I'd expect to see progress indicated in ArcMap. The process runs and I get a little pop up notice when it is complete, as before. I cannot see anything where I was expecting to see a "scrolling progress" before. The help system makes it looks like I should see something (the screen shot shows a progress bar, not the marquee style from before). Background processing is enabled. Do I need to do something else to make this visible? The process is running (I looked in Task Manager) but there is no indication in the ArcMap UI. Update: Correc this to be "sometimes" cannot see bar at all. Sometimes the scrolling marquee is there, sometimes not.
... View more
10-17-2012
04:16 PM
|
0
|
14
|
3175
|
POST
|
Yes you can. Someone should correct me if I am wrong but using ArcGIS Server services is default implementation in WPF API and you can you all that functionality with Basic license. Local geoprosessing is another story. This is good news.
... View more
09-11-2012
12:18 PM
|
0
|
0
|
225
|
Title | Kudos | Posted |
---|---|---|
1 | 02-21-2013 06:39 AM | |
1 | 02-15-2013 10:25 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|