Script to Convert Compass files to Walls?

Techniques, equipment and issues. Also visit the NSS Survey & Cartography Section.

Moderator: Moderators

Script to Convert Compass files to Walls?

Postby jlillest » Apr 1, 2012 6:59 pm

Has anybody written a script to convert their Compass survey files to Walls format?

I could probably whip one out in a few days but figured I'd ask around so to save re-inventing the wheel. I wrote one last year in Python to convert a project from SMAPS to Walls, which was really handy.

FWIW, I've looked around for apps elsewhere and have yet to find anything that does what I'm looking for. Taco's Rosetta Stone is limited and doesn't convert anything to or from Walls and is not open-source which is a must for me. Or at least being able to see the inner-workings for myself.

Thanks,
-Jon
jlillest
Infrequent Poster
 
Posts: 24
Joined: Jan 31, 2008 11:23 pm
NSS #: 53971
Primary Grotto Affiliation: CDS
  

Re: Script to Convert Compass files to Walls?

Postby Bob Thrun » Apr 1, 2012 11:54 pm

Garry Petrie has upgraded Taco's RosettaStal to version 3.0. It reads Walls format, but does not have provision for writing Walls format. Garry has posted source code for Microsoft C++.
http://www.resurgentsoftware.com/rosettastal.htm

I have written a converter for Compass to CMAP format. I favor individual converters over one does-all program. This approach has been criticised for requiring too many programs, but I like it.

Has anyone written a converter or exporter to convert Survex's hierarchial station names to a system of shorter unique names?
Bob Thrun
NSS Hall Of Fame Poster
 
Posts: 322
Joined: Jul 18, 2006 12:50 pm
  

Re: Script to Convert Compass files to Walls?

Postby Bob Thrun » Apr 2, 2012 12:38 am

The Walls distribution includes CSS2SRV to convert DAT files to SRV. It does not convert MAK files. The conversion progran dates to 1999, but I do not remember any changes in the Compass format.
Bob Thrun
NSS Hall Of Fame Poster
 
Posts: 322
Joined: Jul 18, 2006 12:50 pm
  

Re: Script to Convert Compass files to Walls?

Postby chac » Apr 2, 2012 1:34 am

In Compass, export a SEF file (a SMAPS Exchange File or Survey Exchange File) of the Compass DAT file and save it. In Walls, select and import this SEF file to a new Walls survey file. When exporting/importing from Compass format, underwater survey data using the depth parameter (Depth rather than the Inc parameter) may or may not produce a clean transfer file. I have had fairly good results with SMAPS to Compass, Walls to Compass, and Compass to Walls exchange routines.

As Bob mentioned, MAK files (the Compass Project's DAT inclusion and GPS information) won't transfer. Many cave survey programs utilize the SEF exchange routine. I'd suggest you try all your available options and use the best result. You will probably need to edit the final product.
Jim Coke
User avatar
chac
Frequent Poster
 
Posts: 91
Joined: Sep 5, 2005 7:42 am
Location: Near Quintana Roo
NSS #: 26442
  

Re: Script to Convert Compass files to Walls?

Postby driggs » Apr 2, 2012 11:49 am

Bob Thrun wrote:Has anyone written a converter or exporter to convert Survex's hierarchial station names to a system of shorter unique names?


This may be slightly off-topic, but relevant to the conversation about format conversions:

I wrote a crude Python script for converting from Therion's .th format to the similar Survex .svx format. I have no idea why the Therion developers chose to cosmetically change the Survex format just enough to make them incompatible! This script was used to convert data managed with Therion to an intermediate .svx so that Survex could be used to programmatically output lineplots; it likely only supports the subset of Therion's commands that I was using at the time. If nothing else, it could serve as an example for how elegantly Python can be used for text processing, albeit a simple example.

http://csee.wvu.edu/~riggs/th2svx

Code: Select all
usage: th2svx *.th
User avatar
driggs
NSS Hall Of Fame Poster
 
Posts: 495
Joined: Sep 12, 2005 9:40 pm
Location: State of Jefferson
Name: David A. Riggs
NSS #: 56189
Primary Grotto Affiliation: Monongahela
  

Re: Script to Convert Compass files to Walls?

Postby jlillest » Apr 2, 2012 5:33 pm

chac wrote:In Compass, export a SEF file (a SMAPS Exchange File or Survey Exchange File) of the Compass DAT file and save it. In Walls, select and import this SEF file to a new Walls survey file.


I did a quick run-through and the round-about process spit out a bunch of garbage.

One of the files compiled, but the next two didn't, so looks like I'm either doing a bunch of editing or I could work on a new script.

Thanks to everyone for the help and input.

driggs, thanks for including the script. Though it doesn't directly help me, that's the same type of thing I did for my SMAPS to Walls script. It certainly has use as a framework for other converters though.

-Jon
jlillest
Infrequent Poster
 
Posts: 24
Joined: Jan 31, 2008 11:23 pm
NSS #: 53971
Primary Grotto Affiliation: CDS
  

Re: Script to Convert Compass files to Walls?

Postby Stan Allison » Apr 5, 2012 4:25 pm

Jon,

No need to edit or write a new script. Give the CSS2SRV.exe program that Bob Thrun mentioned a try. It comes with the Walls installation and I have used it literally hundreds of times to convert Compass files to Walls and it works great. You just need to open windows accessories, go to the command prompt and dredge up those fading memories of how to use DOS commands and then convert the files. If you have troubles remembering DOS commands email me and I'll help. Or you can just send me the .dat files and I'll convert them for you. I just got a Windows Vista 64 bit computer at work and CSS2SRV.exe doesn't seem to work with that computer, but it works great on my Windows XP 32 bit computer at home.

Hope you are well,

Stan
Stan Allison
Occasional Poster
 
Posts: 45
Joined: Jun 6, 2007 5:08 pm
  

Re: Script to Convert Compass files to Walls?

Postby rchrds » Mar 27, 2013 12:14 pm

I just had the same problem with a Win64 computer. CSS2srv.exe wont stay open, It pops up and then shuts down. Frustrating.
User avatar
rchrds
Prolific Poster
 
Posts: 197
Joined: Sep 6, 2005 8:54 pm
Location: Fayetteville, NC
Name: Jason Richards
NSS #: 41539
Primary Grotto Affiliation: None at the moment
  

Re: Script to Convert Compass files to Walls?

Postby Jeff Bartlett » Mar 28, 2013 4:58 pm

Stan Allison wrote:No need to edit or write a new script. Give the CSS2SRV.exe program that Bob Thrun mentioned a try.

I'll "third" Stan on this one. Just did it again myself 2 weeks ago to convert an old project I inherited. It'll spit out a big .SRV file with all trips in it, and from there you can split out and create a reasonable project tree should you so choose.

Edit: On a 64-bit Win7 PC. It's a command line program, but I didn't have to use any of the variables when running it.

Edit 2: Jon, if you can't get it to work on your machine, just send me your .DAT file via email and I'll shoot you back a Walls project.
"Although it pains me to say it, in this case Jeff is right. Plan accordingly." --Andy Armstrong
User avatar
Jeff Bartlett
NSS Hall Of Fame Poster
 
Posts: 948
Joined: Jun 29, 2007 12:19 am
Location: Chattanooga, TN
Name: Jeff Bartlett
NSS #: 59325
Primary Grotto Affiliation: Tennessee Cave Survey
  

Re: Script to Convert Compass files to Walls?

Postby Stan Allison » Mar 30, 2013 6:04 pm

Since my last post almost a year ago, I've figured out how to run CSS2SRV.exe on a 64-bit Win7 PC. When I had XP I used to run the CSS2SRV.exe in the c: root directory, but for some reason Win7 doesn't like that so I created a c:\CSS2SRV folder with CSS2SRV.exe in it and now it runs fine. As Jeff mentions just go to programs, accessories, command prompt and practice up on your rusty DOS command skills.
Stan Allison
Occasional Poster
 
Posts: 45
Joined: Jun 6, 2007 5:08 pm
  

Re: Script to Convert Compass files to Walls?

Postby Chads93GT » Mar 30, 2013 9:48 pm

Jeff Bartlett wrote:
Stan Allison wrote:No need to edit or write a new script. Give the CSS2SRV.exe program that Bob Thrun mentioned a try.

I'll "third" Stan on this one. Just did it again myself 2 weeks ago to convert an old project I inherited. It'll spit out a big .SRV file with all trips in it, and from there you can split out and create a reasonable project tree should you so choose.

Edit: On a 64-bit Win7 PC. It's a command line program, but I didn't have to use any of the variables when running it.

Edit 2: Jon, if you can't get it to work on your machine, just send me your .DAT file via email and I'll shoot you back a Walls project.


You also helped me convert 7 miles of survey data from compass to walls, and for that I am grateful! lol :banana: :banana: :banana: :banana: :banana: :banana: :banana:
User avatar
Chads93GT
NSS Hall Of Fame Poster
 
Posts: 2294
Joined: Jun 24, 2008 1:27 pm
Location: Missouri
  


Return to Survey and Cartography Forum

Who is online

Users browsing this forum: No registered users

cron