|
POST
|
This worked for me: sc = line.replace("[", "") # 082640-000-07332/001 convert to 0826400000733200100
sc2 = sc.replace("]", "")
sc21 = sc2.replace("-", "")
sc22 = sc21.replace("/", "")
sc23 = "{}{}".format(sc22, str("00"))
sc24 = sc23.replace("'", "")
sc25 = sc24.encode('ascii')
sc26 = sc25.replace("u", "")
sc3 = "{} = '{}'".format(field, sc26)
print sc3
... View more
05-08-2020
05:00 AM
|
0
|
2
|
781
|
|
POST
|
Hello, I have an array looking like this 082640-000-07332/001 and would like to convert it to 0826400000733200100 for a search clause? I tried this: sc = line.replace("[", "") # 082640-000-07332/001 convert to 0826400000733200100
sc2 = sc.replace("]", "")
sc21 = sc2.replace("-", "")
sc22 = sc21.replace("/", "")
sc23 = "{}{}".format(sc21, "00")
sc3 = "{} = '{}'".format(field, sc23)
print sc3 but this code results in this (print sc3): FLURSTUECKSKENNZEICHEN = 'u'08264000007138/000'00' Any help would be great?
... View more
05-08-2020
03:55 AM
|
0
|
3
|
829
|
|
POST
|
Yes like a perimeter/area ratio. I would like to differentiate between compact features I want to preserve and slivers I want to delete after the use of a geoprocessing tool?
... View more
05-04-2020
11:57 PM
|
0
|
1
|
4484
|
|
POST
|
I'm searching for a possibility to calculate landscape metric "shape index" in the field calculator? Shape index = 1 when the patch is circular and increases without limit as the patch becomes more irregular.
... View more
05-04-2020
04:10 AM
|
0
|
3
|
4637
|
|
POST
|
Hi Norman, Thank you for your answer and the hints concerning the arcpy sa module. Yesterday I used a dem with 5m resolution. Now I get some kind of relatively hight resolution laserdata with 8 points/m². I calculated a dem raster with a resolution of 0.3 m out of this data. The only reason I use fill infront of the resampling is to smoothe the dem slightly in an appropriate manner without changing the data too much. Especially the local hights I don't want to change. With this resolution I get a very rough surface so the fill tool is in my opinion the better solution to smooth the dem than resampling the data at this step? After the fill step I resampled the data to a cellsize of 3m bilinear. Would you use nearest neighbor in this step? After that I go on with flow direction ... sink ... To your questions: 1. I'm not interested in all (small) sinks, I need sinks larger than an area (let's say about 5000m²) which are worth to be considered as rewetting area. 2. Yes I would like to get the total areas of all available sinks that meet the certain > 5000m². 3. The only purpose of changing the resolution is that I get otherwise only millions of very small sinks because of the "hight" resolution of my data. How would you arrange the steps of the calculation? Would you put in a fill step after the resampling to a cellsize of 3m?
... View more
04-08-2020
10:02 PM
|
0
|
1
|
4118
|
|
POST
|
You are right, if I resample to strong I get totally different areas (which didn't existed before) after a unknown threshold. The fill tool does a good job to smooth the elevation data. Didn't know the Aggregate Tool, will try it. Thank you for your thoughts.
... View more
04-08-2020
04:53 AM
|
0
|
0
|
4118
|
|
POST
|
I'm searching for areas for rewetting, so my intentions is to get some aggregated areas where it's worth to try build barriers to dam the water.
... View more
04-08-2020
01:13 AM
|
0
|
5
|
4118
|
|
POST
|
Thank you for the link. I thought if I fill the dem first it would sum the sinks better up. Would you remove the fill calculation? I don't really understand why the small lakes in the area are not all thrown out as sinks? Even in the best result I could reach so far.
... View more
04-08-2020
12:53 AM
|
0
|
7
|
4118
|
|
POST
|
Sink results in very different demarkations depending on the resampling of the raster data. Could someone explain why? I don't understand this? In the attached images you could see the differences. I use elevation data with a resolution of 5 meters. Sink06m ... is in my opinion better because nearly all lakes are demarked as sinks. Sink06m is resampled to a cellsize of 6m biliniear. Sink10m is resampled to a cellsize 10 meters, but the results are totally different? Am I doing something wrong? This is how I calculated the areas: import arcpy, os
from arcpy.sa import *
arcpy.env.overwriteOutput = True
arcpy.env.workspace = r"MyPath\DGM.gdb"
# Local variables:
DGM005_tif = r"MyPath\DGM005_3.tif"
Fill_tif1 = "Fill_1"
resample = "resample"
FlowDir_Fill2 = "FlowDir_1"
Sink_FlowDir1 = "Sink_FlowDir1"
absenkung = "Absenkung"
arcpy.CheckOutExtension("Spatial")
outCon2 = Con(Raster(DGM005_tif) > 0, DGM005_tif)
# Process: Füllung
arcpy.gp.Fill_sa(outCon2, Fill_tif1, "")
print("fill")
arcpy.Resample_management(Fill_tif1, resample, "8", "BILINEAR")
print("resample")
# Process: Fließrichtung
arcpy.gp.FlowDirection_sa(resample, FlowDir_Fill2, "NORMAL", absenkung)
print("flowdir")
# Process: Senke
arcpy.gp.Sink_sa(FlowDir_Fill2, Sink_FlowDir1)
print("sink")
arcpy.RasterToPolygon_conversion(Sink_FlowDir1, "{}{}".format("Senke08mfill", os.path.basename(os.path.splitext(DGM005_tif)[0])), "SIMPLIFY",
"VALUE")
print("Done")
arcpy.CheckInExtension("Spatial")
... View more
04-08-2020
12:17 AM
|
0
|
9
|
4246
|
|
POST
|
Don't know if I'm up to date but I think you have to use make feature layer infront of your select by location. Out of the help files: import arcpy
arcpy.env.workspace = "c:/data/mexico.gdb"
# Make a layer and select cities which overlap the chihuahua polygon
arcpy.MakeFeatureLayer_management('cities', 'cities_lyr')
arcpy.SelectLayerByLocation_management('cities_lyr', 'intersect', 'chihuahua') you should use: arcpy.env.workspace = r"C:\folder\Data.gdb" and not arcpy.env.workspace = r"C:\folder\Data.gdb\"
r"C:\Data.gdb\%Name%_selection" will not work in python code,
you will need to create a unique name for your output file.
... View more
04-06-2020
03:55 AM
|
0
|
0
|
2008
|
|
POST
|
It's not really clear what you want to do? Feature Class to Excel you can use table to excel tool?
... View more
03-24-2020
02:14 AM
|
0
|
0
|
4811
|
|
POST
|
Could this help you? arcgis pro - arcpy.ListFields() displaying numerical field names instead of actual field names - Geographic Information …
... View more
03-24-2020
12:36 AM
|
0
|
2
|
4811
|
|
POST
|
Could this help you: arcgis 10.0 - Generating regular sample points in a polygon - Geographic Information Systems Stack Exchange
... View more
02-25-2020
12:24 AM
|
0
|
0
|
2431
|
|
POST
|
Could this help you: Grundlagen des Verbindens von Tabellen—Hilfe | ArcGIS Desktop
... View more
02-18-2020
05:23 AM
|
0
|
0
|
815
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-10-2025 08:08 AM | |
| 1 | 05-13-2025 05:05 AM | |
| 1 | 04-28-2025 03:40 AM | |
| 4 | 08-13-2024 10:49 PM | |
| 1 | 08-13-2024 09:52 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|