POST
|
Any ideas why the code might encounter a math domain error? At this point, I've created new lines with updated input data and I am trying to test the code for trimming the lines on this new feature class. As before, the code does an exact trace of the lines that were directly output by the Particle Track tool (without catching the angle change of significance). My earlier assumption was that the executed code did not find the acute angles due to the segmented format of the lines drawn by the Particle Track tool (essentially each line segment was treated independently, thus no acute angles existed in the process of the code). I believed that I had accommodated for this by running the Unsplit Line tool before executing the tracing/trimming code. That method seemed to work with my previous run of the data; however, using the tracing/trimming code on the unsplit version of the new lines generates a math domain error (apparently in some part of the "angB = math.degrees(math.acos..." calculation).
... View more
04-29-2015
12:34 PM
|
0
|
0
|
677
|
POST
|
Thank you for all of the advice. Although each comment was certainly constructive, no single suggestion offered a successful solution. At this point, I achieved what I believe to be a usable result after clipping the 3m DEM to the preexisting watershed extent and creating the flow direction and accumulation rasters from that clipped DEM. I created the flow direction raster without using the 'force edge cells to flow out' option. After using an edit session to place the proposed pour points in the approximate locations where I think they belong, I then used the Snap Pour Point tool to find the points of highest accumulation within 12m of the points that I placed and used those results in the Watershed tool. That watershed result is shown here. I think this result is acceptable. If there are any ideas to improve this result, I will certainly appreciate further suggestions. Otherwise, I will convert this to a shapefile and adjust the boundaries as necessary. Thank you.
... View more
04-06-2015
08:40 AM
|
0
|
0
|
1645
|
POST
|
I am attempting to identify a few subwatersheds within a study area; however, the Spatial Analyst Watershed tool has not produced expected results. Apologies if this repeats previous questions, but I did not see any existing discussions that addressed my current situation in enough detail. I have already used the Fill sinks and Snap Pour Points options to adjust the input datasets, yet the output results of the Watershed tool only creates a very small raster in the immediate vicinity of each pour point. I have used a 30m DEM as well as a resampled 10m version. All of the datasets use the same geographic coordinate system, so I'm not sure what else to consider. There must be some step in the process that I am missing that is not identified or explained in the tool help information. I have attached a copy of the current Watershed tool result. Any assistance would be appreciated. Thank you. UPDATE 04/02/2015 17:15 ET I started the process again from the beginning using the following steps: 1. New elevation raster with 3m resolution. 2. Fill sinks. 3. Resampled elevation raster to 10m resolution (per a suggestion that 3m might be too fine). 4. Created flow direction raster (with Force edge cells to flow out selected). tested with Force selected and not selected 5. Created flow accumulation raster. 6. Set Snap Pour Points using flow accumulation raster. 7. Ran Watershed tool using the Snap Pour Points. To clarify, all input datasets use the same projected coordinate system (NAD 1983 HARN State Plane Delaware). The results still seem to be unreliable. An updated version of the output is attached. The flow accumulation raster appears in the background. The black outline (previously created by a colleague) describes the larger watershed area of interest. My goal is to delineate subwatersheds behind sampling sites that are described by the pour points. Is there something else that I'm missing? Does the specific projection matter? Or is the elevation and flow direction data problematic because it is relatively flat?
... View more
04-02-2015
08:40 AM
|
0
|
8
|
6418
|
POST
|
The line feature class is a merge of the individual polylines created by the Particle Track tool. The code finally worked to trim the lines after I ran the Unsplit Lines tool; however, it stripped the feature class attributes, and, in some instances, left some disconnected line segments floating in open space. I can easily disregard the floating line segments with a select by location that only includes those lines that intersect the boundary area. It would be helpful to be able to trim the lines without losing the feature class attributes, though.
... View more
02-23-2015
12:52 PM
|
0
|
0
|
677
|
POST
|
No luck. The new lines created by the code appear exactly the same as the existing lines. See the screen grab. The new lines (ultra blue) overlay the original lines (malachite green). I made the line style wider for the original lines so they can be seen beneath the new lines, but otherwise they appear to trace the same path. Thanks for trying though.
... View more
02-20-2015
07:41 AM
|
0
|
3
|
677
|
POST
|
Thank you for the suggestion, but I don't know what this code means or how I can use it with my existing data. I honestly know very little about Python, or programming in general, so some comments or description that explicitly define and instruct how to use the code might be helpful. I don't know if I could just use the code as is by substituting in the name of the feature class file that contains the polylines, or if I would need to customize the code in some way to suit my needs. I see the indication of the substitution of the feature class file, but what is meant by "SHAPE@"? What is the output of this code and where is it saved? Does it overwrite the existing feature class? If it is necessary to customize the code for my particular situation, I will definitely need some additional guidance. Thank you.
... View more
02-19-2015
03:31 PM
|
0
|
5
|
677
|
POST
|
I developed a Python script to read through a CSV file of coordinate points and use those coordinate points in the Particle Track (Spatial Analyst) tool. Now that I have created the particle track polylines associated with the list of coordinate points, I need to truncate the polylines if the particle track path changes direction by more than 90 degrees. I looked through all of the available toolsets, but I cannot identify one that will trim the polylines in this manner. I thought of a couple of possible solutions, but I do not know how to implement them (or if it is even possible). One method would be to somehow customize the Particle Track tool to end its process if the track direction changes by more than 90 degrees. Alternately, I considered somehow adjusting the input raster to create an artificial zone of zero magnitude that would stop the tracking process, but I have not figured out how I can specify which raster cells to alter. Any suggestions?
... View more
02-19-2015
07:41 AM
|
0
|
7
|
4272
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|