POST
|
I'll give these os.path functions a try - still pretty new to scripting as you can probably tell. My odd setup comes changing from using a simple ListFeatureClasses (to get all the features) to only wanting certain features to be processed, hence the array. From there I just messed with the variables until the script worked, haha.
... View more
03-26-2015
12:23 PM
|
0
|
0
|
687
|
POST
|
So I've got this great, simple loop running thanks to a member here. I set the workspace, pass in the array of files to be processed, run my tool, and append a descriptor to the filename. However this is all done in the same workspace. Is there a way to change the output directory to a different location while keeping my input workspace? The script is below. import arcpy from arcpy import env #where we're working env.workspace = r"D:\Broomfield.Lidar\HARN_Vertices.gdb" #array of files to be processed fc = ['D:\\Broomfield.Lidar\\HARN_Vertices.gdb\\VertexN2W187North', 'D:\\Broomfield.Lidar\\HARN_Vertices.gdb\\VertexN2W188', 'D:\\Broomfield.Lidar\\HARN_Vertices.gdb\\VertexN3E180', 'D:\\Broomfield.Lidar\\HARN_Vertices.gdb\\VertexN3E190', 'D:\\Broomfield.Lidar\\HARN_Vertices.gdb\\VertexN3E191'] vertices = arcpy.ListFeatureClasses() print vertices for fc in vertices: arcpy.MinimumBoundingGeometry_management(fc, fc + "_Poly", "RECTANGLE_BY_AREA", "ALL", "", "NO_MBG_FIELDS")
... View more
03-26-2015
10:34 AM
|
0
|
3
|
3324
|
POST
|
ArcGIS Help 10.1 is ESRI's help article that explains the different in-line variable substitutions. That plus Darren's reply helped me get the iterator running properly. Thanks! I'm not convinced that doing this in ModelBuilder was any faster or easier than scripting it out with a loop; in fact, I accidentally sabotaged the Model when I started poking around in the workspace the Model was working in.
... View more
03-17-2015
12:20 PM
|
0
|
1
|
334
|
POST
|
Check this out and see what's wrong. I'm working on a model and have the workflow down; I get the result I'm looking for. However my iterator is not kicking in. I've Run the Model, Validated the Model, and Run the Entire Model. How do I change this to make the iterator kick in? My inputs are multipoint feature classes.
... View more
03-12-2015
12:43 PM
|
0
|
5
|
3768
|
POST
|
I am having trouble setting up a basic loop. Most of the examples I'm finding online are either rudimentary "this is what a loop does" examples or don't seem to apply to what I'm doing. It's entirely probable that my workflow is just still not right. Please take a look at my code and help me become less of an amateur! I have multiple processes to run on multiple files of the same type. So I build out the workflow in ModelBuilder and export that to a python script. In this case, I'm running the Minimum Bounding Geometry tool on a multipoint feature, converting the resultant vertices to points, then adding XY fields. It works great running in ModelBuilder or as a script on a single file, and the code is below in bold; however, I want to run this tool on a whole folder's worth of files. import arcpy # Local variables: N2E100 = "D:\\Broomfield.Lidar\\Projection\\ReProject.gdb\\N2E100" N2E100_MinimumBoundingGeomet = "D:\\Broomfield.Lidar\\GeometryResults.gdb\\N2E100_MinimumBoundingGeomet" N2E100_MinimumBoundingGeomet1 = "D:\\Broomfield.Lidar\\GeometryResults.gdb\\N2E100_MinimumBoundingGeomet1" # Process: Minimum Bounding Geometry arcpy.MinimumBoundingGeometry_management(N2E100, N2E100_MinimumBoundingGeomet, "RECTANGLE_BY_AREA", "ALL", "", "NO_MBG_FIELDS") # Process: Feature Vertices To Points arcpy.FeatureVerticesToPoints_management(N2E100_MinimumBoundingGeomet, N2E100_MinimumBoundingGeomet1, "ALL") # Process: Add XY Coordinates arcpy.AddXY_management(N2E100_MinimumBoundingGeomet1) I'm quite familiar with the syntax of loops and how they work in theory, but it's putting the loops into practice that I struggle with.
... View more
02-05-2015
12:59 PM
|
0
|
2
|
4060
|
POST
|
Is there a way to extract the XMin, YMin, XMax and YMax coordinate values from a feature without using ArcMap's Field Calculator? Is there a tool or other way to programmatically pull out these particular coordinates? I'm in ArcGIS 10.2, working with multipoint features. I also have an ASCII text file with coordinates of each point, if that helps.
... View more
01-29-2015
10:25 AM
|
0
|
2
|
6733
|
POST
|
I'm just thinking that instead of re-creating the multipoint feature, which will take about 12 hours of processing, it would be great to be able to simply pull points out of the multipoint I already have... like a "Refine Multipoint" tool. Haven't found anything that resembles this so looks like I'll just be starting over. Despite this, I'm still thankful for your responses Alex
... View more
01-22-2015
11:03 AM
|
0
|
0
|
491
|
POST
|
The goal is to get a X,Y,Z text file from the points found in the LAS files. THe workflow as I understand it should be LAS ----> multipoint (with proper classifications to pull out only the bare earth points) ----> text file. I've got the text file conversion down, and the LAS are all solid, its just the specifications for the middle multipoint conversion that's in question. Perhaps there's an easier way?
... View more
01-22-2015
10:47 AM
|
0
|
1
|
491
|
POST
|
I'm in 10.2. When I pull in the las dataset and use their predefined "Ground" setting, it selects class 2, class 8, and All Returns. I think I'm just going to have to re-do the multipoint with the correct classes selected. However, can I trust these predefined settings? Tests on a small space look accurate enough...
... View more
01-22-2015
10:31 AM
|
0
|
3
|
491
|
POST
|
Also, is there a quick and easy way to figure out which of the returns are bare earth, or does this depend on the way the data was gathered?
... View more
01-22-2015
09:19 AM
|
0
|
6
|
491
|
POST
|
Hello, I am working with a very large LIDAR dataset. I have a multipoint feature that was created from all the returns of the LAS files. What I'm wondering is if there is a way to extract the bare earth points from this multipoint that has all the returns in it, or if it is necessary to start from scratch and create a brand new multipoint feature where I only bring in bare earth points from the get-go. Does anybody have experience extracting bare earth points out of a multipoint feature that was created using all returns? Thanks, Alex
... View more
01-22-2015
09:17 AM
|
0
|
7
|
4425
|
POST
|
Made progress so I'll share. The stretched symbology, which is what I want, by default is grey. So I set the stretch type to Minimum-Maximum and then entered the minimum & maximum values under the "Value" field - NOT under the "Label" field as I was before. With this method, I can get the mosaic DEM and the original DEM to look very similar, nearly identical. What remains to be solved is what minimum/maximum range to choose for the mosaic. Each individual DEM has its own range, but the mosaic will be composed of probably 100 individual DEMs, so it remains to be seen what the min/max values end up being, as well as how those values are found (manually vs programmatically). Here is another screenshot of the DEMs; the left-hand image is the original DEM, the right-hand image is part of the mosaic after following the aforementioned processes.
... View more
12-18-2014
11:50 AM
|
2
|
0
|
1992
|
POST
|
This is great. Getting closer. Thanks! Switching from "Stretched" to "Discrete Color" is now allowing the mosaic to display. I am able to select a proper color ramp and it looks *pretty good*, though not quite the same as the original DEM. The colors are definitely discrete, unlike the original DEM which had a smooth gradation between colors. What's still not working: With the "Stretched" option, I was able to select the range of values manually; in this case, I know my minimum and maximum elevation because the individual DEM files display that automatically in the Table of Contents. But with the "Discrete Color" option, it doesn't allow these values to be entered. And in the Key Metadata tab, the Minimum & Maximum values are listed as "unknown", but I am unable to edit them and enter values. So the lights are very light and the darks are very dark in the mosaic, but in the original DEM they are more in between. Below is a screenshot of the two images. On the left (of the ArcMap window) is the original DEM. On the right (of the ArcMap window) is the mosaic with "Discrete Color" and a white-black color ramp. Some more information that may clarify the issue: Using "Stretched", the default minimum & maximum values are way off from what they should be (i.e. the minimum is a negative number, the maximum is a number with an E exponent) and when I set them manually to the proper values, the grey displays. Thanks,
... View more
12-18-2014
11:38 AM
|
0
|
1
|
1992
|
POST
|
Hello, I am writing about a seemingly simple problem. I am trying to create a mosaic of DEM files that are the "Disc Image File" format. I create an empty mosaic dataset in my geodatabase, run the add rasters to mosaic dataset tool, and use "Raster Dataset" as my file type (generic). And I check the "create overview" box. The resulting mosaic is grey at all scales despite its settings to display at all scales. I've tried multiple ways of creating this mosaic (including Append, Raster Catalog, Table data type, and the Mosaic tool), all with either grey or non-displaying results. However, the images display completely normally when added to ArcMap by themselves. And I'll add that while I'm relatively new to GIS, I've tried just about everything I can find on ESRI and Google to resolve this issue. Also, I've successfully & easily created mosaics out of TIFFs so I'm familiar with the workflow but perhaps I'm just missing some particular setting. The DEMs each perhaps a square quarter mile in area and about 20 MB in data size. Thanks for reading.
... View more
12-18-2014
10:46 AM
|
1
|
4
|
6028
|
Title | Kudos | Posted |
---|---|---|
1 | 12-18-2014 10:46 AM | |
2 | 12-18-2014 11:50 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|