|
POST
|
What is the backend storage format? File geodatabase? ArcSDE geodatabase? I ask because there may be other approaches that work more efficiently if the data is all stored in a DBMS.
... View more
11-13-2014
06:16 PM
|
1
|
4
|
2056
|
|
POST
|
In similar situations in the past, I just resorted to using the pipe symbol or vertical bar as the field separator. Although I have seen crazy data where people use commas, colons, semicolons, and slashes in places they shouldn't be; I seldom run across people using vertical bars in free-form text.
... View more
11-13-2014
02:05 PM
|
0
|
0
|
3988
|
|
POST
|
The following shows the type of situation I caution about above: My original code would generate a distance of 266.7m for the given point on the lake above with a fetch angle of 337.5 degrees. My guess is that you don't want the total length of the line, but the length of the first part ( Part(0) ) of the line, which is 96.16m. Assuming the lines will be built from the point outwards, which I believe will always be the case with this code, the following change to the last loop will return the length of the first part and not the length of all the parts.
for i in drange(0, 360, alpha):
pl = linefromPolarCoord(i, distance, pt, SR).intersect(pn,2)
pl = arcpy.Polyline(pl.getPart(0), SR)
insertCur.insertRow([OID, i, pl.length])
... View more
11-13-2014
09:06 AM
|
0
|
1
|
4484
|
|
POST
|
After how many records does it start to slow down? It could be a memory management issue by looping over all buffers with one search cursor. I realize 14.000 records isn't really large, but it may be large enough to cause an issue. What about chunking the records up and only have search cursors of say 1.000 records, does that keep the speed up?
... View more
11-13-2014
08:12 AM
|
0
|
0
|
1012
|
|
POST
|
Coincidentally, this exact same topic came up in ArcPy Café the other week: Split into equal length features. A team member Dave (I don't know him other than his name is Dave) provided a fairly compact and elegant solution.
... View more
11-12-2014
02:15 PM
|
0
|
0
|
4607
|
|
POST
|
I think what is being asked is whether your DBAs have fully patched the 12c database, including the latest October 2014 patches from Oracle. If so, that could be what is preventing you from connecting. Critical Information Regarding Oracle Update and ArcGIS - See more at: http://blogs.esri.com/esri/supportcenter/2014/10/23/critical-information-regarding-oracle-update-and-arcgis/
... View more
11-12-2014
02:00 PM
|
1
|
0
|
2660
|
|
POST
|
My preference is always to script it out with arcpy, especially in cases like this where using the GUI could quickly become cumbersome. ArcGIS 10.3 introduces a new method for point geometries that fits the bill for this task: arcpy.PointGeometry.pointFromAngleAndDistance. Unfortunately, that likely isn't going to help you out here and now unless you are testing the prerelease version of it. In the absence of that new method, you can roll your own using basic trigonometry. Since we are rolling our own, I think it makes sense to create a function to go one step further and build the line: def linefromPolarCoord(angle, distance, point, spatialReference=None):
X = distance * math.cos(math.radians(90 - angle))
Y = distance * math.sin(math.radians(90 - angle))
return arcpy.Polyline(
arcpy.Array([point, arcpy.Point(point.X + X, point.Y + Y)]),
spatialReference
) The above function assumes basic 2D/projected data, nothing fancy with 3D distances or lines. The angle is degrees, distance is in units of the projection (meters for UTM), point is an arcpy.Point, and spatialReference is an arcpy.spatialReference for the projection being used. Since you want to work in decimal increments and Python's range is integer based, I suggest rolling your own decimal-based sequence function. I like the accepted solution of drange on the following StackExchange question: Python decimal range() step value. Assuming you have the 500 points in a point feature class (pointsFC) and a single water body polygon in a feature class (waterbodyFC), the following code might get you in the ballpark:
alpha = 22.5
distance =
pointsFC =
waterbodyFC =
fetchesTable = 'fetches'
arcpy.CreateTable_management("in_memory", fetchesTable)
arcpy.AddField_management(fetchesTable, "POINTID", "LONG")
arcpy.AddField_management(fetchesTable, "FETCH_ANGLE","DOUBLE")
arcpy.AddField_management(fetchesTable, "FETCH_DISTANCE","DOUBLE")
with arcpy.da.SearchCursor(waterbodyFC, "SHAPE@") as searchCur:
for row in searchCur:
pn = row[0]
SR = pn.spatialReference
with arcpy.da.InsertCursor(
fetchesTable,["POINTID", "FETCH_ANGLE", "FETCH_DISTANCE"]
) as insertCur:
with arcpy.da.SearchCursor(
pointsFC,["OID@","SHAPE@"]
) as searchCur:
for row in searchCur:
OID = row[0]
pt = row[1].firstPoint
for i in drange(0, 360, alpha):
pl = linefromPolarCoord(i, distance, pt, SR).intersect(pn,2)
insertCur.insertRow([OID, i, pl.length])
The above code assumes the points are in the water body, and you are interested in the distance to the edge of the water body, i.e., the shore. Using intersect might not be the best option if the water body wraps back on itself or has lots of bays because that could give a length that is more than the length to the shore. That said, the code is meant to demonstrate a workflow that can be scripted.
... View more
11-12-2014
11:12 AM
|
2
|
2
|
4484
|
|
POST
|
I have engaged with the developer in the past to sort out some issues with it. I can't recall how I first found it. I just did a Google search on "mxdperfstat 10.2" (the 10.2 being important), and the second hit is to ArcGIS.com. The same search with 10.1 didn't yield as good of results. When it comes to ArcGIS tools and scripts, I have always found it frustrating how scattered they are under different sites and even domains. I have found using Google with its site: operator as being most useful. I have read that Esri is near deploying a new site for scripts and tools, hopefully it will be better than our current situation.
... View more
11-06-2014
12:07 PM
|
2
|
0
|
1751
|
|
POST
|
There is something straightforward and likeable about "local disk is best," but the situation isn't quite as simple when we move into the realm of best practices and enterprise GIS. Although I have experienced firsthand the performance and stability challenges of exposing file geodatabases over networking protocols, I am trying to recall whether I have seen it documented as being against best practice. Is there a good, singular source for file geodatabase best practices or is it a best practice here and another one over there? The GIS System Design Strategies Wiki has best practices scattered throughout it, but it wasn't until the 34th edition in the spring of 2014 that file geodatabases were included in certain sections of the Network Communications chapter. The struggle with implementing a local-disk-is-best policy in the enterprise is defining what exactly local means. I don’t think anyone could argue that SAS and SATA aren’t local, but does local apply to Thunderbolt, eSATA, USB, Firewire? If so, what about USB 2.0 versus 3.0? What determines calling something network storage? The presense of TCP/IP or maybe Ethernet? Is iSCSI over gigabit Ethernet considered network and bad? What about iSCSI over 10 gigabit? Of course there are the different versions of SMB as well. I think there is value in working with best practices, but practices need to be defined in a meaningful way so they can be used by a wide range of users, including the enterprise.
... View more
11-06-2014
11:04 AM
|
0
|
1
|
1503
|
|
POST
|
Assuming you mean there are thousands of duplicates across the entire dataset and not thousands of duplicates per pole, even a million record dataset shouldn't take that long if you are identifying duplicates the way described above. It may be something else is going on in terms of hindering performance. You may want to check out Resetting your ArcGIS application profile.
... View more
11-06-2014
09:27 AM
|
0
|
0
|
3842
|
|
POST
|
mxdperfstat on ArcGIS.com. Download the ZIP file and there is a version of the program for each ArcGIS version.
... View more
11-06-2014
09:02 AM
|
0
|
2
|
1751
|
|
POST
|
From what you have provided, it looks like you may be using the wrong version. If you are running ArcGIS Desktop 10.1 SP1, try running mxdperfstat10.1.exe instead of mxdperfstat10.exe.
... View more
11-06-2014
07:44 AM
|
0
|
4
|
1751
|
|
POST
|
outputField is a property that returns an object (Field object) that isn't callable. Line 20 is throwing the error. If you are trying to set the property, you need to get the property and change it and then set it back. fld = fm_SiteIdHDMS.outputField
fld.name = "Whatever"
fm_SiteIdHDMS.outputField = fld
... View more
11-04-2014
12:47 PM
|
0
|
3
|
2331
|
|
POST
|
I am running ArcGIS 10.2.2 with Python 2.7.5 on Windows 7 Enterprise x64, and I am able to get your attached script to run from a command prompt with no warnings and no errors, i.e., everything works as one would expect from reading documentation. If I try to run the script from within an IDE, e.g., IDLE or PyCharm, then I get the warning about echoed passwords and they are echoed.
... View more
11-04-2014
07:51 AM
|
0
|
0
|
4943
|
|
POST
|
If you have already uninstalled and reinstalled ArcGIS Desktop, which it seems like you have, then I still think it is related to IE settings somehow, but I am fresh out of ideas. What about if you create a new, temporary user profile on that machine, does running tools work better under that other user profile? (This could give an indication whether it is a machine-level issue or user profile issue.)
... View more
11-04-2014
06:54 AM
|
0
|
0
|
893
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 2 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 2 weeks ago | |
| 3 | 3 weeks ago | |
| 1 | a month ago |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|