|
POST
|
Actually at that point you would have polygons for the entirety of Great Britain that would have integer values between 0 and 3. Places where they overlap would already by a polygon with a Value Field with a value of 3, so I don't believe any further steps would be needed. The method I used would Sum the three binaries, leaving only one polygon feature to create from the sum raster. You could raster to polygon each binary of course then do an intersect, but I'd rather save two geoprocessing operations if I could help it.
... View more
01-24-2017
02:24 PM
|
0
|
1
|
2505
|
|
POST
|
apologies, it should be filePath, not filepath. I didn't test it, just cobbled it together from the python interpreter and some old code I had to check for broken data links. I added the print statements so you knew what was going on with the program. They are also a great way to see what values are actually being used in python and make sure they are doing what you want. Thats how I figured out your elm.name value earlier wasn't the right one for your code to work. Not sure about line 13, whitespace can be annoying to work with, especially when cutting/pasting code, like I said I cobbled it together quickly.
... View more
01-24-2017
01:50 PM
|
0
|
9
|
2582
|
|
POST
|
I would produce your DEM, Slope, and Aspect rasters separately, then use the Con(Raster Calculator) Tool to create a binary raster for each of your criteria. I would then Raster Calculator Tool to sum up the 3 binary rasters then use the raster to polygon tool to create polygons that each contain areas where the sum of the binaries. Once you have that, Definition Query the data into a new dataset and export to a new file if you wish.
... View more
01-24-2017
01:25 PM
|
1
|
4
|
2505
|
|
POST
|
The reason your script wasn't changing anything was because as I noted above the image name was no longer just the file name of the picture, but the full path to the picture. I used the python window in the map document and managed to change your picture element to a site plan jpg on my desktop. Your code would have worked fine, but since the elm.name wasn't what you thought it was, it actually didn't change anything. If that is the particular path you need to replace on all your mxds, here is some starter script to get you going on editting them all. This should walk through all the .mxd files in a workspace and any .mxds in any folders within that workspace, check for picture elements with the broken file name and fix to your new image. I would take 2 or 3 map documents into a separate folder to test this. Only thing you need to do is change the workspace to the folder where the map documents are. import arcpy
from arcpy import env
#Change to Directory with you map documents,
env.workspace = r"YourDirectoryHere"
#Recursively walking workspace
for root, dirs, files in os.walk(env.workspace):
for f in files:
if f.endswith(".mxd"):
mxd = arcpy.mapping.MapDocument(os.path.join(root , f))
print "Current map being checked is " + mxd.filepath
for elem in arcpy.mapping.ListLayoutElements(mxd, "PICTURE_ELEMENT", "*logo")):
if elem.name == r"\\Jackson\gis_dept\Data\Images\County-logo-1x1Small.JPG":
elem.sourceImage = r"P:\Images\County-logo.JPG"
del elem
del mxd
... View more
01-24-2017
12:16 PM
|
0
|
11
|
2582
|
|
POST
|
Is the path for all the broken pictures the one you noted above? It would be fairly easy to have a script walk through all the map documents in a directory and replace all the picture elements with that specific path with a new path. Also I noted something fairly interesting, when a link is working to an picture element, the element name is just the name of the image itself without the file extension, whereas when I opened your map with broken links, the name was now the filepath to where the image was, instead of just the file name.
... View more
01-24-2017
11:35 AM
|
0
|
0
|
2582
|
|
POST
|
Hi Jared, Can you open you map and check to make sure your picture element is still named? Alternatively, instead of checking against the name property of the picture element, you could always check against the current imageSource property is "" \\Jackson\gis_dept\Data\Images\County-logo-1x1Small.JPG" and if so then change to r'P:\Images\County-logo.JPG'. Unfortunately there is no method in arcpy for checking if Picture Elements to see if the link is no longer valid. There is probably some python module somewhere that could do this and could be used in conjunction with arcpy to check and update picture element paths
... View more
01-24-2017
09:37 AM
|
0
|
14
|
6670
|
|
POST
|
Hi Robert, A few questions are you points classified into classes(ground, low veg, high veg, overlap, non-ground, etc.)? What program are you planning to use for your flood modelling? What data type input will be using for the flood modelling(Las File, DEM, etc.)? Are the specular reflection points classified as ground, are there points that are actually along the water surface beneath the reflection points(I can't tell from the image)? I'm assuming you want to work with the bare earth only, so you will likely need to subset your LiDAR data into only ground classified points(If the points are classified). If this does not remove the spurious reflection points, you may need to digitize the area that is the water surface that has the spurious reflection points, create a constant value raster for the approximate elevation of the water surface for that area, then burn that into any DEM you would need for modelling.
... View more
01-24-2017
07:02 AM
|
1
|
0
|
1256
|
|
POST
|
I would guess it would have something to do with the projection you are using, and whether you used a planar or Geodesic Buffer when you used the Buffer tool. If you are working with a geographic coordinate systems instead of a projected coordinate system, it does not take into account the curvature of the earth when calculating distances with the select by location(within a distance). http://gis.stackexchange.com/questions/131766/why-the-select-by-location-analysis-calculates-distance-in-a-wrong-way
... View more
01-23-2017
07:23 AM
|
3
|
0
|
845
|
|
POST
|
Thanks for posting the link, I was digging through old threads and couldn't find it, but found lots of old broken ones... But yea, I guess its just ESRI Logic to put a tool at all license levels that is dependent on a license restricted tool to function.
... View more
01-20-2017
11:00 AM
|
0
|
0
|
3093
|
|
POST
|
Could you make a FeatureLayer using the input layer and SQL, then run a Get Count on the table to get the number of records. If count greater than 0 proceed, else break. arcpy.MakeFeatureLayer_management(selectExport, 'temp_Layer', sql)
arcpy.GetCount_management('temp_Layer')
if int(result.getOutput(0)) > 0:
pass
else:
break
... View more
01-20-2017
10:25 AM
|
1
|
2
|
1749
|
|
POST
|
"Failed to execute (Frequency)." I'm wondering if Split Layer by Attribute is dependant on the Frequency Geoprocessing Tool, which is an advanced only license, therefore causing the script to fail. http://pro.arcgis.com/en/pro-app/tool-reference/analysis/frequency.htm Dan_Patterson, bixb0012, someone smarter than me have any idea on this?
... View more
01-20-2017
10:00 AM
|
1
|
1
|
3093
|
|
POST
|
I can find anything obviously wrong (with the exception of your outputRaster variable is not defined, but I'm guessing you left it out in the copy/paste.) and cannot duplicate your error. I have a script tool that uses this and it has no issues. The only difference is that I used clipping_geometry = 'ClippingGeometry' for my 6th parameter, but that shouldn't make any difference.
... View more
01-20-2017
09:53 AM
|
1
|
0
|
3154
|
|
POST
|
You can check to see if your code is pulling a license and what license level using the licensing functions. You can also manually set your license level for the script using this. http://desktop.arcgis.com/en/arcmap/latest/analyze/python/access-to-licensing-and-extensions.htm You mind posting your code as well?
... View more
01-20-2017
08:59 AM
|
0
|
3
|
3093
|
|
POST
|
The spatial join tool's help states: "When the Match Option is set to CLOSEST or CLOSEST_GEODESIC, it is possible that two or more join features are at the same distance from the target feature. When this situation occurs, one of the join features is randomly selected as the matching feature (the join feature's FID does not influence this random selection). If you want to find the 2 nd , 3 rd , or N th closest feature, use the Generate Near Table tool." Effectively it is ignoring your subsequent points for using the sum merge rule. I have no answer for why this is different when doing this manually in the TOC. Why not use Intersect for your map option if your points are on the line, it should allow you to get all the points along your line. Ian
... View more
01-19-2017
12:12 PM
|
1
|
0
|
5073
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-22-2017 08:58 AM | |
| 1 | 10-05-2015 05:43 AM | |
| 1 | 05-08-2015 07:03 AM | |
| 1 | 10-20-2015 02:20 PM | |
| 1 | 10-05-2015 05:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|