Hi All,
I would like to be able to generate trajectory 'GIS' text files and then export to shapefile without having to do this manually in display > trajectory and then utilities > GIS to shapefile. Is it possible to do this in batch within the GUI?
Thanks for any help!
Matt
Batch export to shapefile?
-
- Posts: 362
- Joined: November 7th, 2012, 1:39 pm
- Registered HYSPLIT User: Yes
Re: Batch export to shapefile?
There is no option to create a shapefile in one step in the GUI. You could create your own tcl script that does this and add it to the GUI or run a batch script like the following to do that same (this batch script creates a CONTROL file, runs the model, creates the postScript file and then creates the shapefile)...
echo 00 00 00 %1 >CONTROL
echo 1 >>CONTROL
echo 40.0 -90.0 10.0 >>CONTROL
echo 48 >>CONTROL
echo 0 >>CONTROL
echo 10000.0 >>CONTROL
echo 1 >>CONTROL
echo ./ >>CONTROL
echo oct1618.BIN >>CONTROL
echo ./ >>CONTROL
echo tdump.%1 >>CONTROL
\hysplit4\exec\hyts_std.exe
\hysplit4\exec\trajplot.exe -itdump.%1 -a5 -oplot%1
\hysplit4\exec\ascii2shp.exe -i trajplot lines <GIS_traj_ps_01.txt
rem \hysplit4\exec\txt2dbf.exe -C7 -C9 -C5 -C9 -d, -d, -d, GIS_traj_ps_01.att trajplot.dbf
echo 00 00 00 %1 >CONTROL
echo 1 >>CONTROL
echo 40.0 -90.0 10.0 >>CONTROL
echo 48 >>CONTROL
echo 0 >>CONTROL
echo 10000.0 >>CONTROL
echo 1 >>CONTROL
echo ./ >>CONTROL
echo oct1618.BIN >>CONTROL
echo ./ >>CONTROL
echo tdump.%1 >>CONTROL
\hysplit4\exec\hyts_std.exe
\hysplit4\exec\trajplot.exe -itdump.%1 -a5 -oplot%1
\hysplit4\exec\ascii2shp.exe -i trajplot lines <GIS_traj_ps_01.txt
rem \hysplit4\exec\txt2dbf.exe -C7 -C9 -C5 -C9 -d, -d, -d, GIS_traj_ps_01.att trajplot.dbf
Re: Batch export to shapefile?
Thanks for your help Glen!!
I just have one question and would appreciate help from anyone who can do so. I am struggling to invoke HYSPLIT in Tclsh85 using the code that Glen provided, pasted below.
When running this I get the following error: invalid command name: "hysplit4exechyts_std.exe". I'm pretty sure I need to add a command before (exec or open?) but adding in exec didn't work either (couldn't execute "hysplit4exechyts_std.exe" : no such file or directory). As you can see the backslashes are removed.. not sure if this means anything. I also tried including the full path (C:\hysplit4\exec\hyts_std.exe).
Sorry if there is a really obvious answer but this is the first time I've attempted anything like this
Best wishes,
Matt
I just have one question and would appreciate help from anyone who can do so. I am struggling to invoke HYSPLIT in Tclsh85 using the code that Glen provided, pasted below.
Code: Select all
\hysplit4\exec\hyts_std.exe
\hysplit4\exec\trajplot.exe -itdump.%1 -a5 -oplot%1
\hysplit4\exec\ascii2shp.exe -i trajplot lines <GIS_traj_ps_01.txt
rem \hysplit4\exec\txt2dbf.exe -C7 -C9 -C5 -C9 -d, -d, -d, GIS_traj_ps_01.att trajplot.dbf
Sorry if there is a really obvious answer but this is the first time I've attempted anything like this
Best wishes,
Matt
-
- Posts: 362
- Joined: November 7th, 2012, 1:39 pm
- Registered HYSPLIT User: Yes
Re: Batch export to shapefile?
The back slashes are needed, they are the directory names of where the executable file hyts_std.exe resides.
Re: Batch export to shapefile?
Thanks Glenn,
Sorry for the confusion. I included the backslashes in the code but in the error messages that are produced they appear to have been removed. Just wondering - is there a reason that the rem command is included on the 4th line but not on the first 3 lines (pasted again below)?
I have also now tried using braces as below:
I get a different error "forrt1: severe (59): list-directed I/O syntax error, unit-5, file Internal-Directed Read" + a table with image, PC, Routine, Line, Source headings - "Unknown" in Routine, Line, Source.
Not sure if this helps but I'm running on Windows.
Best wishes,
Matt
Sorry for the confusion. I included the backslashes in the code but in the error messages that are produced they appear to have been removed. Just wondering - is there a reason that the rem command is included on the 4th line but not on the first 3 lines (pasted again below)?
Code: Select all
\hysplit4\exec\hyts_std.exe
\hysplit4\exec\trajplot.exe -itdump.%1 -a5 -oplot%1
\hysplit4\exec\ascii2shp.exe -i trajplot lines <GIS_traj_ps_01.txt
rem \hysplit4\exec\txt2dbf.exe -C7 -C9 -C5 -C9 -d, -d, -d, GIS_traj_ps_01.att trajplot.dbf
Code: Select all
exec {C:\hysplit4\exec\hyts_std.exe}
exec {C:\hysplit4\exec\trajplot.exe -itdump.%1 -a5 -oplot%1}
exec {C:\hysplit4\exec\ascii2shp.exe -i trajplot lines <GIS_traj_ps_01.txt}
exec {C:\hysplit4\exec\txt2dbf.exe -C7 -C9 -C5 -C9 -d, -d, -d, GIS_traj_ps_01.att trajplot.dbf}
Not sure if this helps but I'm running on Windows.
Best wishes,
Matt