Import a scrap into another scrap (or th2-file)
Hi fellows, Sometimes I realize that two scraps should have been one (for instance scrap A in A.th2 should have been a part of scrap B in B.th2), in particular when it's difficult to join them. It's easy to insert the xvi file into the scrap B file. But I have to draw it again. Is there any workaround here? Torstein Finnesand Norway
Hi Torstein, There is an undocumented feature which can help you that I am using once in a while to redraw an elevation with a new projection from the same scraps or to redraw a passage that has been too distorted: you can export the morphed th2 files so that they are consistent with the coordinates with the xvi file. This is working essentially as an xvi export (see eample below). HOWEVER, you should be careful that this feature is not documented for a good reason: most of the th2 options are missing in the exported th2 (eg label location and text, id of lines or points) so that the generated th2 file will not work properly. What I am doing , is comparing the two th2 files (original and warped) using notepad++ compare plugin and reput all the options where they should be. This may take a while for a large drawing, but it is way more efficient than redrawing everything. Hope that help Xavier %%%%%%%%%%%%%%%%%% layout th2-export scale 1 100 grid-size 1 1 1 m sketches on ## rewarped also sketches exported in th2 now endlayout ## Exports the maps and the images rewarped # Do it only when needed! export map -fmt th2 -o Elevation10_ReWarped.th2 -projection [elevation 10] -layout th2-export export map -fmt xvi -o Elevation10_ReWarped.xvi -projection [elevation 10] -layout xvi-export Le 10/05/2015 04:47, torstein finnesand a écrit :
Hi fellows,
Sometimes I realize that two scraps should have been one (for instance scrap A in A.th2 should have been a part of scrap B in B.th2), in particular when it's difficult to join them. It's easy to insert the xvi file into the scrap B file. But I have to draw it again.
Is there any workaround here?
Torstein Finnesand Norway
_______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
--
------------------------- Xavier Pennec Senior Research Scientist / Directeur de recherche Asclepios project-team, INRIA Sophia-Antipolis 2004 Route des Lucioles, BP93 F-06902 Sophia-Antipolis Cedex, France +33 4 92 38 76 64 +33 6 78 35 16 90 http://www-sop.inria.fr/asclepios/ -------------------------------
Can you open the .th2 file in a text editor and copy/paste the relevant features from one file to the other? On May 10, 2015, at 2:10 PM, Xavier Pennec <Xavier.Pennec@inria.fr> wrote: Hi Torstein, There is an undocumented feature which can help you that I am using once in a while to redraw an elevation with a new projection from the same scraps or to redraw a passage that has been too distorted: you can export the morphed th2 files so that they are consistent with the coordinates with the xvi file. This is working essentially as an xvi export (see eample below). HOWEVER, you should be careful that this feature is not documented for a good reason: most of the th2 options are missing in the exported th2 (eg label location and text, id of lines or points) so that the generated th2 file will not work properly. What I am doing , is comparing the two th2 files (original and warped) using notepad++ compare plugin and reput all the options where they should be. This may take a while for a large drawing, but it is way more efficient than redrawing everything. Hope that help Xavier %%%%%%%%%%%%%%%%%% layout th2-export scale 1 100 grid-size 1 1 1 m sketches on ## rewarped also sketches exported in th2 now endlayout ## Exports the maps and the images rewarped # Do it only when needed! export map -fmt th2 -o Elevation10_ReWarped.th2 -projection [elevation 10] -layout th2-export export map -fmt xvi -o Elevation10_ReWarped.xvi -projection [elevation 10] -layout xvi-export Le 10/05/2015 04:47, torstein finnesand a écrit :
Hi fellows,
Sometimes I realize that two scraps should have been one (for instance scrap A in A.th2 should have been a part of scrap B in B.th2), in particular when it's difficult to join them. It's easy to insert the xvi file into the scrap B file. But I have to draw it again.
Is there any workaround here?
Torstein Finnesand Norway
_______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
--
------------------------- Xavier Pennec Senior Research Scientist / Directeur de recherche Asclepios project-team, INRIA Sophia-Antipolis 2004 Route des Lucioles, BP93 F-06902 Sophia-Antipolis Cedex, France +33 4 92 38 76 64 +33 6 78 35 16 90 http://www-sop.inria.fr/asclepios/ -------------------------------
_______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
Thanks to Xavier, Adam and Martin for the answers. Yes, I do copy/paste from one file to the other using text editor, - the problem is that the pasted objects are not positioned in the correct place. Actually, my situation is described in chapter 5.2.5 in this page: http://therion.speleo.sk/wiki/doku.php/tbe:wiki5?s[]=pdftex The text says that copy/paste is not enough: "... the graphical elements have coordinates in different frames of reference. Even if the two scraps have the same ”-scale”, the frame is given by the positions of the points of type “station”." After the copy/paste, the text says "Now you can open the second file with the map editor of xtherion and position the elements that you pasted in in the proper places." The keyword for me is "position". But I haven't found a simple way to move all the new objects into their proper places. It takes a lot of time If have to move the objects one by one, in particular for the lines. The cave we are drawing is a maze. Many scraps and many connections. Not always easy to get good scraps & joins, :-) Torstein Den 10.05.2015 21:18, skrev Adam Sampson:
Can you open the .th2 file in a text editor and copy/paste the relevant features from one file to the other?
On May 10, 2015, at 2:10 PM, Xavier Pennec <Xavier.Pennec@inria.fr> wrote:
Hi Torstein,
There is an undocumented feature which can help you that I am using once in a while to redraw an elevation with a new projection from the same scraps or to redraw a passage that has been too distorted: you can export the morphed th2 files so that they are consistent with the coordinates with the xvi file. This is working essentially as an xvi export (see eample below).
HOWEVER, you should be careful that this feature is not documented for a good reason: most of the th2 options are missing in the exported th2 (eg label location and text, id of lines or points) so that the generated th2 file will not work properly. What I am doing , is comparing the two th2 files (original and warped) using notepad++ compare plugin and reput all the options where they should be. This may take a while for a large drawing, but it is way more efficient than redrawing everything.
Hope that help
Xavier
%%%%%%%%%%%%%%%%%%
layout th2-export scale 1 100 grid-size 1 1 1 m sketches on ## rewarped also sketches exported in th2 now endlayout
## Exports the maps and the images rewarped # Do it only when needed! export map -fmt th2 -o Elevation10_ReWarped.th2 -projection [elevation 10] -layout th2-export export map -fmt xvi -o Elevation10_ReWarped.xvi -projection [elevation 10] -layout xvi-export
Le 10/05/2015 04:47, torstein finnesand a écrit :
Hi fellows,
Sometimes I realize that two scraps should have been one (for instance scrap A in A.th2 should have been a part of scrap B in B.th2), in particular when it's difficult to join them. It's easy to insert the xvi file into the scrap B file. But I have to draw it again.
Is there any workaround here?
Torstein Finnesand Norway
_______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
I have only had to do the 'position with a few lines and points. To achieve this I moved one point, a station as it happens, then looked at the difference in x and y co-ordinates from the old and new position. I then manually added these to all the other points by editing the text file manually. I only had about 30 points, so was lazy and just did it manually. However a regular expression search and replace would not be that difficult to write! Andrew On 10/08/15 20:15, torstein finnesand wrote:
Thanks to Xavier, Adam and Martin for the answers.
Yes, I do copy/paste from one file to the other using text editor, - the problem is that the pasted objects are not positioned in the correct place. Actually, my situation is described in chapter 5.2.5 in this page:
http://therion.speleo.sk/wiki/doku.php/tbe:wiki5?s[]=pdftex
The text says that copy/paste is not enough: "... the graphical elements have coordinates in different frames of reference. Even if the two scraps have the same ”-scale”, the frame is given by the positions of the points of type “station”."
After the copy/paste, the text says "Now you can open the second file with the map editor of xtherion and position the elements that you pasted in in the proper places." The keyword for me is "position". But I haven't found a simple way to move all the new objects into their proper places. It takes a lot of time If have to move the objects one by one, in particular for the lines.
The cave we are drawing is a maze. Many scraps and many connections. Not always easy to get good scraps & joins, :-)
Torstein
Yes. A friend of mine (Svein Grundstrøm) and I got the problem this year as well. He developed a solution in Access (some tables and the aid of Visual Basic) that handles the problem programmatically. Two conditions apply: - The two th2-files (source and target files) must have a common point (station) from which the coordinate differences can be calculated. - The two th2-files must have the same ratio between scale and resolution. The problem will maybe be solved in a later version, since the information needed is in the bottom part of the xvi-file. If the source file contains more than one scrap, all of them are transferred. If one single scrap from a multi-scrap th2-file is to be moved, we must isolate the wanted scrap in a new th2-file before moving it. This works fine for us. The main result was that we avoided to "code" some complicated joins. But, did you Andrew create something similar? Or perhaps someone else has? It would be nice to have a feature like this in the Therion map editor. But I guess that could be considered only if others think it's useful. Torstein Den 10.08.2015 21.54, skrev Andrew Atkinson:
I have only had to do the 'position with a few lines and points. To achieve this I moved one point, a station as it happens, then looked at the difference in x and y co-ordinates from the old and new position. I then manually added these to all the other points by editing the text file manually. I only had about 30 points, so was lazy and just did it manually. However a regular expression search and replace would not be that difficult to write!
Andrew
On 10/08/15 20:15, torstein finnesand wrote:
Thanks to Xavier, Adam and Martin for the answers.
Yes, I do copy/paste from one file to the other using text editor, - the problem is that the pasted objects are not positioned in the correct place. Actually, my situation is described in chapter 5.2.5 in this page:
http://therion.speleo.sk/wiki/doku.php/tbe:wiki5?s[]=pdftex
The text says that copy/paste is not enough: "... the graphical elements have coordinates in different frames of reference. Even if the two scraps have the same ”-scale”, the frame is given by the positions of the points of type “station”."
After the copy/paste, the text says "Now you can open the second file with the map editor of xtherion and position the elements that you pasted in in the proper places." The keyword for me is "position". But I haven't found a simple way to move all the new objects into their proper places. It takes a lot of time If have to move the objects one by one, in particular for the lines.
The cave we are drawing is a maze. Many scraps and many connections. Not always easy to get good scraps & joins, :-)
Torstein
Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
This could be achieved by some perl or bash. Maybe also php PEAR::File_Therion is also already capable of doing this. Maybe you could also just comment the scrap command in the to-be-included file and place an import statement in the sourcing scrap. Am 2017-10-08 20:17, schrieb Martin Sluka via Therion:
8. 10. 2017 v 18:50, torstein finnesand via Therion <therion@speleo.sk [1]>:
some tables and the aid of Visual Basic
Not on Mac and linux…
ms
Links: ------ [1] mailto:therion@speleo.sk
On 08/10/17 17:50, torstein finnesand via Therion wrote:
Yes. A friend of mine (Svein Grundstrøm) and I got the problem this year as well. He developed a solution in Access (some tables and the aid of Visual Basic) that handles the problem programmatically. Two conditions apply:
- The two th2-files (source and target files) must have a common point (station) from which the coordinate differences can be calculated.
- The two th2-files must have the same ratio between scale and resolution. The problem will maybe be solved in a later version, since the information needed is in the bottom part of the xvi-file.
If the source file contains more than one scrap, all of them are transferred. If one single scrap from a multi-scrap th2-file is to be moved, we must isolate the wanted scrap in a new th2-file before moving it.
This works fine for us. The main result was that we avoided to "code" some complicated joins.
But, did you Andrew create something similar? Or perhaps someone else has?
Sorry I did my original by had, well very short script to just as the difference to the number pairs. Not needed it since so not done anything further Andrew
It would be nice to have a feature like this in the Therion map editor. But I guess that could be considered only if others think it's useful.
Torstein
I am currently work on a large topographic project of a hypogenic cave in the south of the france. Is it possible to define secondary stations or to define shoot which are not take ino account for the length of the cave. Thanks for your help.
Hi, Check please „flags" in centerline. There is "flags duplicate", which does exactly you need. ms
11. 10. 2017 v 7:46, Matthieu Egels via Therion <therion@speleo.sk>:
I am currently work on a large topographic project of a hypogenic cave in the south of the france. Is it possible to define secondary stations or to define shoot which are not take ino account for the length of the cave. Thanks for your help. _______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Thanks for your answer it works fine ----- Mail original ----- De: "Martin Sluka via Therion" <therion@speleo.sk> À: "List for Therion users" <therion@speleo.sk> Cc: "Martin Sluka" <martinsluka@mac.com> Envoyé: Mercredi 11 Octobre 2017 08:21:45 Objet: Re: [Therion] Secondary station Hi, Check please „flags" in centerline. There is "flags duplicate", which does exactly you need. ms
11. 10. 2017 v 7:46, Matthieu Egels via Therion <therion@speleo.sk>:
I am currently work on a large topographic project of a hypogenic cave in the south of the france. Is it possible to define secondary stations or to define shoot which are not take ino account for the length of the cave. Thanks for your help. _______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
_______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
If I may advise you. Always check Thbook, what are the commands and parameters you may use for your particular case. ms.
11. 10. 2017 v 9:48, Matthieu Egels via Therion <therion@speleo.sk>:
Thanks for your answer it works fine
----- Mail original ----- De: "Martin Sluka via Therion" <therion@speleo.sk> À: "List for Therion users" <therion@speleo.sk> Cc: "Martin Sluka" <martinsluka@mac.com> Envoyé: Mercredi 11 Octobre 2017 08:21:45 Objet: Re: [Therion] Secondary station
Hi,
Check please „flags" in centerline. There is "flags duplicate", which does exactly you need.
ms
11. 10. 2017 v 7:46, Matthieu Egels via Therion <therion@speleo.sk>:
I am currently work on a large topographic project of a hypogenic cave in the south of the france. Is it possible to define secondary stations or to define shoot which are not take ino account for the length of the cave. Thanks for your help. _______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
_______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion _______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Salut, I think you can use the "flag" directive : (extract from the THBook) *flags ▷ set flags for following shots. The supported flags are: surface (for surface measurements), duplicate (for duplicated surveys), splay (for short side legs that are hidden in maps and models by default). These are excluded from length calculations. All shots having one of the stations named either ‘.’ or ‘-’ are splay shots by default (see also data command). If flag is set to approx[imate], it is included to total length calculations, but also displayed separately in survey statistics. It should be used for shots, that were not surveyed properly and need to be resurveyed. Also “not” is allowed before a flag.* Example : survey XXXX -title "Blablabla" centerline date 2017.10.01 team "zzz ZZZZ" notes team "tttt TTTTT" clino compass tape units length meters units compass clino degrees data normal from to length compass clino flags duplicate 0 - 1.39 30.0 -0.8 0 - 2.56 344.8 -3.6 0 - 3.46 313.9 -2.2 0 - 2.13 270.4 1.5 0 - 2.56 339.4 45.3 0 - 2.43 276.2 26.0 0 1 10.47 336.5 -46.1 # .... # all the shots you xwant to exclude from cave total length # .... flags not duplicate # ... # the normal shots # ... endcenterline endsurvey When you export a survey-list, you can see the total of each length type (surveyed, explored, duplicate, surface...). Bonnes explos ! Bertrand 2017-10-11 7:46 GMT+02:00 Matthieu Egels via Therion <therion@speleo.sk>:
I am currently work on a large topographic project of a hypogenic cave in the south of the france. Is it possible to define secondary stations or to define shoot which are not take ino account for the length of the cave. Thanks for your help. _______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
participants (8)
-
Adam Sampson -
Andrew Atkinson -
Benedikt Hallinger -
Bertrand Hauser -
Martin Sluka -
Matthieu Egels -
torstein finnesand -
Xavier Pennec