Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suppress "Separator in survey name" warning #5

Closed
wants to merge 2 commits into from

Conversation

speleo3
Copy link
Contributor

@speleo3 speleo3 commented Sep 5, 2018

Current survex allows introducing survey name "a.b" implicitly and then entering "a" and "b" one after the other without any warnings:

; no warnings
1       2       1.0     0.0     0.0
2       a.b.1   1.0     90.0    0.0
*begin a
*begin b
1       2       1.0     180.0   0.0
*end b
*end a

However, entering "a.b" directly gives a warning:

; warning: Separator in survey name
1       2       1.0     0.0     0.0
2       a.b.1   1.0     90.0    0.0
*begin a.b
1       2       1.0     180.0   0.0
*end a.b

I see no reason why syntax 2 should be discouraged. This PR suppresses the warning.

@ojwb
Copy link
Owner

ojwb commented Jun 24, 2020

I'm not really sold on this change. There is a difference between the two cases - in the first case there's an actual definition of survey a (albeit one which only contains the definition of a sub-survey), whereas in the second case a is never actually defined anywhere.

I think the underlying problem here (as it was in #4) is that you want to be able to essentially freely use . as a character in survey station names, but Survex by default interprets . as separating levels in the survey hierarchy, and complains based on that interpretation.

And as with #4, I think the better answer if you want to use . freely is to set a different character as the survey hierarchy level separator and add . to the characters allowed in a name.

@waldekgraban
Copy link

In fact, the option to solve the problem without interfering with the code is probably always the best.

ojwb added a commit that referenced this pull request Mar 5, 2024
This is a step towards addressing the situations raised in
#4 and
#5
@ojwb
Copy link
Owner

ojwb commented Apr 22, 2024

I'm going to close this as it was a deliberate design decision that each survey should be explicitly entered somewhere. This requirement means that there's a place to set metadata for that survey, for example.

If you really want to use . as a survey name character (which seems to be what underlies this proposal), you can do something like:

*set separator :
*set names _-.

Using 1.4.6 or newer is recommended since then the non-standard separator character is stored in the .3d file, which means tools like aven will understand the survey name hierarchy correctly.

@ojwb ojwb closed this Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants