richsmith / sexytopo

The SexyTopo cave surveying app for Android
GNU General Public License v3.0
29 stars 13 forks source link

Native File Format #12

Open riggsd opened 8 years ago

riggsd commented 8 years ago

Sexytopo doesn't really have a format per se for sketches - it just holds the data in memory as native Android objects and saves it as .json.

With regard to SexyTopo's native save/load format:

Currently survey data is persisted and read in an extremely basic Survex-compatible format. It uses the Survex .svx extension, and consists of absolutely nothing except the raw survey data in Survex default "data normal" format.

1   2   3.77    299.23  18.23
2   -   5.00    0.00    0.00
2   3   10.00   90.00   0.00
3   4   15.00   180.00  45.00

I've got a local branch which implements magnetic declination calculation and correction. This requires persisting and loading the declination value associated with a given survey.

Additionally, there will be more metadata associated with a given survey as the software grows. Examples include the name of the cave, the survey date, perhaps the survey team, etc.

I have implemented a slightly more thorough Survex export/import based upon the following format:

*title TestSurvey
*date 2016.01.21
*declination 14.48 degrees

1   2   3.77    299.23  18.23
2   -   5.00    0.00    0.00
2   3   10.00   90.00   0.00
3   4   15.00   180.00  45.00

The parser makes it easy to add support for new Survex commands as features warrant them.

The real question, however, is whether a subset of the Survex format is desired as the native SexyTopo format, or whether a SexyTopo-specific format is preferred. My opinion is that the world doesn't need Yet Another Cave Survey Format, and I do like the Survex format (as well as the similar but changed-for-absolutely-no-reason Therion centerline version) but the decision isn't mine to make.

richsmith commented 8 years ago

I was talking about how the sketch is saved - whether to keep it as json or something more related to Therion.

Regarding data save format I wasn't planning for SexyTopo to have a new native format unless something pushed me in that direction. Providing there's import/export functions for the major formats (at least Survex/Therion) then the default format should be just specifying which one to use.

Only real definite is that it'll be a text-format and not something like PocketTopo's save format.

ojwb commented 8 years ago

I've got a local branch which implements magnetic declination calculation and correction.

*date 2016.01.21
*declination 14.48 degrees

If that 14.48 is just calculated using the date, location and the latest IGRF model, it would make more sense to instead use *declination auto <coordinates>.

The current IGRF model only offers a prediction for 2016, but when the next IGRF model comes out it will calculate declinations for 2016 based on actual observations. Hence it's preferable to give Survex the data needed to calculate the declination based on the latest available IGRF model.

AndrewAkinson commented 6 years ago

This basic data format probably should be a high priority, so how do I move a survey from one pda to another? So for one I can just save the files, or probably use a Therion export inport, but the latter is not ideal as any bugs in the export import will get in the way and potentially loose data, I have just found some, but not tried the import as yet.

More importantly if on an expedition, 2 pdas with full data set on go out for a days surveying and survey different parts of the cave, how are these all going to be synced? My feeling is that the data set off the pda should just be able to be copied to the pda and it just works (some features missing, like the final drawing up etc)