POST
|
I have been generating kriging layers which contain small regions of detail that are not appearing at certain levels of zoom. Areas which appear as a flat signal actually have a small pocket of increased material in a certain location, but this detail will only appear with the "Refine on Zoom" visualization option turned on (i.e. invisible at 1:80,000, visible at 1:60,000). Questions: Q1. Is it possible to adjust ArcMap so that it will draw these finer detail from a further out viewing window? I don't mind if the details are small. Q2. After kriging, I convert the layer to a contour file for downstream analyses (i.e. intersection). However, when I do "GA Layer to Contour", the smaller detail I refer to above is ignored (not present in the generated shape file), even if I perform this conversion while I have zoomed in on the layer file so that the small details are visible. Is there an option that will allow for these finer details to appear in this conversion? Thank you.
... View more
01-20-2021
08:02 AM
|
1
|
0
|
60
|
POST
|
I've written code which imports data from a file and creates a shape file, then uses "arcpy.Project_management" to create a second shape file with a specific spatial reference (an abbreviated version of the code is provided below; there are downstream steps after this point, but I am not going to get into specifics as it is not pertinent). On my local system, everything works fine. However I have recently been using ArcMap on sensitive data that can only be accessed in an external system that is "locked down", where permissions are highly restricted. Now when the program reaches the "arcpy.Project_management" step: > "arcpy.Project_management(newfcName, newfcNameProject, out_coordinate_system)" I get two "cannot acquire lock" messages in a row, and a failure to execute message that kills the program: "Error 999999: Error Executing Function. Cannot acquire a lock. Cannot acquire a lock. Failed to execute (Project)" Any ideas on why this is happening, I would be thankful. Note that this problem only occurs if running python within the ArcMap GUI. If run on the Python IDLE, the program runs without issue. And here's an abbreviated version of the code below: import arcpy outpath = r"C:/PATH/TO/OUTFOLDER/" dataFile = "C:/PATH/TO/INPUT/input.csv" arcpy.env.overwriteOutput=True arcpy.env.workspace= outpath newfcName = "OriginalData.shp" newfcNameProject = "ProjectedData.shp" # Shapefile with the coordinate system of the coordinate data within input projectedexample = "ExampleData-in-Input-Coordinate-Format.prj" # creating table to be filled newfc = arcpy.CreateFeatureclass_management(outpath, newfcName, "POINT", "", "", "", projectedexample) arcpy.AddField_management(newfc, "X", "FLOAT", field_length = 50) arcpy.AddField_management(newfc, "Y", "FLOAT", field_length = 50) arcpy.AddField_management(newfc, "Data", "FLOAT", field_length = 50) arcpy.AddField_management(newfc, "Time", "TEXT", field_length = 20) # Reference Cursors cursor=arcpy.da.InsertCursor(newfc, ["X", "Y", "Data", "Time", "SHAPE@XY"]) # Read Input File a = open(dataFile,"r") inputF = a.readlines() for line in inputF: mySplit = line.split("\t") xCoordinate = float(mySplit[0]) yCoordinate = float(mySplit[1]) timeData = str(mySplit[2]) zValue = float(mySplit[3]) newRow = (xCoordinate, yCoordinate, zValue, timeData, (xCoordinate, yCoordinate)) cursor.insertRow(newRow) a.close() # Desired Spatial Reference out_coordinate_system = arcpy.SpatialReference('Projected Coordinate Systems/World/WGS 1984 World Mercator') # New Projection for better accuracy of downstream analysis arcpy.Project_management(newfcName, newfcNameProject, out_coordinate_system) ____________________________________________________________________ Thank you.
... View more
10-09-2020
12:23 PM
|
0
|
0
|
58
|
POST
|
We are using the standard Python IDE that was added during ArcMap installation. I am unaware how one could disable it, and therefore don't know how to check this. I do know that the "idle.bat" installed by ArcMap does exist and runs when double-clicked. I do want to re-iterate that these Python scripts run normally, just with this odd "on-click" behavior, and that this behavior will sometimes go away without any change to the code itself (e.g. simply re-running the program until it runs normally, or after resetting ArcMap or the PC entirely).
... View more
09-08-2020
08:54 AM
|
0
|
0
|
52
|
POST
|
Recently, many of my Python scripts run through the Python window (in ArcMap v10.8.1) will not progress past the first step unless the Python window is clicked. When run (using the 'execfile' command or when loading the program), only the first step is performed. The notification for that step appears, but is much slower to appear/disappear than normal. The program will then not progress to the next step until the ArcMap window is clicked (the location of this click does not seem to matter). Background processing is enabled. The problem is not script-related (as it has occurred when using two different Python scripts) nor computer related (as it has occurred on two different systems). Oddly, this issue comes and goes. The same program can be run twice in succession, and the program will progress normally on the second run. Sometimes resetting ArcMap will fix the issue, and sometimes it won't. Obviously this is a major detriment to my automation efforts, so any help on this matter would be appreciated.
... View more
09-04-2020
11:52 AM
|
0
|
2
|
99
|
POST
|
I have written Python code to perform the following (sample code attached): 1) import a tab-delimited coordinates file; 2) add this information into a '.shp' file; 3) convert the coordinate system of the '.shp' file into a projected coordinate system. However, when running this code through ArcMap, I've been experiencing issues on step (3) where the Projected output from the "arcpy.Project_management" command sometimes returns an empty result (there is no error message; ArcMap says the conversion occurred successfully). The problem seems linked to the size of the input file. I describe this (and other oddities) below: 1) The input files are of the exact same tab-delimited structure ('X_Coord Y_Coord Date Data'), the only difference between them is the amount of data within them. One ~1500 line file converted fine, but I discovered that I could make this error occur when I manually removed lines of data in Notepad: reduction to 1002-1499 lines of data would still work properly, but reducing it to <= 1001 lines lead to an empty result (it didn't seem to matter which lines I deleted). But the number of lines where this error occurs isn't set to the suspicious ~1000 line threshold: A ~450 line file would return a blank output, but doubling this input file (making it ~900 lines) did properly get processed by the Project command. 2) In the majority of cases when this error occurs, the attributes of the input '.shp' file (from step (2) above) is also emptied after the Project step is called. Note that this issue does not happen if the Project command is comment out (in other words, the data was there before Project was called). Despite being empty, if I use the "zoom to layer" command, ArcMap does zoom in to the proper region (even though it isn't displaying any information, it's still there in some capacity; this is not true for the Projected output however). 3) As I mentioned earlier, there is no error message. ArcMap acts as if the "arcpy.Project_management" step was successful. 4) These troublesome input files will converted just fine when processing these files manually through ArcMap (these steps being: 'Add Data' > 'Display XY Data' > 'Save as a Shape File' > 'Project' tool). But if I run my program (without the Project command), and then try to manually use the Project command within ArcMap itself on the input generated by my code, the error occurs, which seems to indicate this issue may be on how the input file is set up, and not the Project command itself. Any help would be most appreciated, thank you! Apologies if this was far too much detail. EDIT - some progression on the problem 1. The problem does not occur when Editor mode turned on within ArcMap 2. When Editor mode turned off, I could fix the problem by exporting the input as a new shape file (the new shape file would no longer cause the issues the original shape file was experiencing) 3. When attempting to simulate this "export" fix programmatically (in ArcPy), the following functions did NOT work: - "FeatureClasstoShapeFile" (empty output, no error) - "CopyFeatures" (empty output, error code '000117') - "Project_management" without changing the coordinate data (empty output, no error) - "RecalculateFeatureClassExtent" (input file becomes greyed out [with an !] and unusable in the Table of Contents) Well, I found a solution for now, but I'd love any ideas on why this issue was happening in the first place.
... View more
07-24-2020
02:10 PM
|
0
|
0
|
63
|
POST
|
Thank you for this resource. I better understand the purpose of the two pages. Just to be clear, are both formulas essentially two ways that Kriging can be represented? The purpose of this post was to help me define the second formula [Z(s) = µ(s) + ε(s)] for a document I am writing. Would it be accurate to say that this formula represents Kriging as a "spatial autocorrelated processes, accounting for random error"? Thanks again.
... View more
04-25-2019
07:53 AM
|
0
|
1
|
57
|
POST
|
Hello, I was reading the documentation on kriging on the ArcGIS website, and I am having trouble understanding the difference between the two formulas presented on these separate pages discussing Kriging. How Kriging works—Help | ArcGIS for Desktop What are the different kriging models?—Help | ArcGIS Desktop From my understanding, it seems like the first page describes the general kriging formula, while the second has more to do with autocorrelation. But it's not clear. I was hoping someone could try and clarify what the two formulas represent, or provide a source that does. Thank you.
... View more
04-24-2019
02:00 PM
|
0
|
4
|
357
|
POST
|
I don't think it has to do with the source file of the .lyr file, because this densify function can succeed on one computer, meaning the .lyr file is correct and can be accepted.
... View more
01-08-2019
06:38 AM
|
0
|
1
|
11
|
POST
|
It can succeed when using ArcMap GUI on all computers. From the documentation the function seems to only accept .lyr files as input. Yes the spatial reference is WGS 1984 (plain latitude/longitude). I feel this is definitely a bug.
... View more
01-07-2019
02:12 PM
|
0
|
3
|
40
|
Online Status |
Offline
|
Date Last Visited |
01-20-2021
12:54 PM
|