ethoms-usgs / Cross-Section

Geoprocessing tools for working with geologic cross-sections in ArcGIS
35 stars 13 forks source link

Fencediagram not working #10

Open SavelevGeo opened 4 years ago

SavelevGeo commented 4 years ago

Hello!

I was really happy to find that somebody is working on making fence diagrams for ArcGIS, but I can't make it work, this message appears, and I don't undersatand what file is it about

p.s. I'm using ArcGIS 10.2.2 and I don't have other options

`Executing: fenceDiagram sectl_155 D:\three\demArcGis.tif northwest D:\three\p560506\main.gdb\baseb_pgn 1 D:\three\p560506\main.gdb Start Time: Wed Nov 13 16:17:44 2019 Running script fenceDiagram... Getting elevation values for cross-section line in sectl_155 sectl_155_z written to C:\Users\Georgiy_Savelyev\Documents\ArcGIS\Default.gdb Measuring the length of the line in sectl_155_z sectl_155_zm written to C:\Users\Georgiy_Savelyev\Documents\ArcGIS\Default.gdb Converting D:\three\p560506\main.gdb\baseb_pgn to 3D features Writing XYZ coordinates to D:\Current\Publications_Reviews\H\Haeussler_Kodiak\Kodiak_SIM\geologic_data\baseb_pgn_xyz.txt File "D:\three\GeologicCrossSectionTbx\scripts\threeDsection.py", line 376, in outF = open(xyzFile, 'w')

<type 'exceptions.IOError'>: [Errno 2] No such file or directory: u'D:\Current\Publications_Reviews\H\Haeussler_Kodiak\Kodiak_SIM\geologic_data\baseb_pgn_xyz.txt' Failed script fenceDiagram...

Traceback (most recent call last): File "D:\three\GeologicCrossSectionTbx\scripts\threeDsection.py", line 458, in raise SystemError SystemError

Failed to execute (fenceDiagram). Failed at Wed Nov 13 16:17:52 2019 (Elapsed Time: 8,04 seconds) `

ethoms-usgs commented 4 years ago

Ah, yes, I left in a path to a file I was using during testing. I deleted line 374 in the script. You can do the same in a text editor or replace the existing file on your computer (D:\three\GeologicCrossSectionTbx\scripts\threeDsection.py) with the attached copy (rename with the .py extension) threeDsection.txt

Note that I just edited the file; I did not test it.

SavelevGeo commented 4 years ago

Thanks for the quick response! but actually, I've already found that all that was needed to be done was to use the pervious commented line instead of the line 347. Now the problem is the following

`Messages Executing: fenceDiagram sectl_155 H:\three\demArcGis.tif northwest baseb_pgn 1 # Start Time: Wed Nov 13 18:58:39 2019 Running script fenceDiagram... Getting elevation values for cross-section line in sectl_155 sectl_155_z written to C:\Users\basse\Documents\ArcGIS\Default.gdb Measuring the length of the line in sectl_155_z sectl_155_zm written to C:\Users\basse\Documents\ArcGIS\Default.gdb Converting baseb_pgn to 3D features Writing XYZ coordinates to C:\Users\basse\Documents\ArcGIS\baseb_pgn_xyz.txt Using C:\Users\basse\Documents\ArcGIS\baseb_pgn_xyz.txt in ASCII 3D to Features Tool Copying baseb_pgn_3D to File "H:\three\GeologicCrossSectionTbx\scripts\threeDsection.py", line 450, in arcpy.CopyFeatures_management(srcFC, outPath)

<class 'arcgisscripting.ExecuteError'>: Failed to execute. Parameters are not valid. ERROR 000733: Output Feature Class: Same as input C:\Users\basse\Documents\ArcGIS\Default.gdb\baseb_pgn_3D Failed to execute (CopyFeatures).

Failed script fenceDiagram...

Traceback (most recent call last): File "H:\three\GeologicCrossSectionTbx\scripts\threeDsection.py", line 458, in raise SystemError SystemError

Failed to execute (fenceDiagram). Failed at Wed Nov 13 18:58:47 2019 (Elapsed Time: 8,36 seconds) `

ethoms-usgs commented 4 years ago

Ok, it looks the problem is that your Default.gdb is set to both the scratch workspace and your output directory. Try using an existing file geodatabase as your output directory or a folder if the output in shapefile format will work.

SavelevGeo commented 4 years ago

Well, it worked, but the result wasn't really what i was expecting. Maybe the interpreted crosssection polygons sholud be drawn in the same "place" as map, because my interpreted crossection is placed around 0,0 and it left there?

What file should be input to make it work?

Screenshot_60 The result) that vertical line is the 3d polygons, that horizontal line is the map

ethoms-usgs commented 4 years ago

Sorry, I don't understand. Is that a screenshot from ArcMap or ArcScene or ArcGlobe? The result of the tool should create 3D features that you would look at in ArcScene or ArcGlobe.

SavelevGeo commented 4 years ago

that result was from ArcScene, but the resulting 3d shapes are really thin, and the horizontal map lies there far away, because the map coordinates are about 51000 m (X) and coordinates of cross section are 0 to 2000 m

I'm sorry to disturb you that much, but I really want this to work)

ethoms-usgs commented 4 years ago

I really want this to work)

Ha! No kidding. Me too! It's been a while since I looked at this tool and it could be that I never got it working just right. I have a pressing deadline right now but I will try to get back to this soon.