Combining caves using different co-ordinate systems
I have been converting a project from an old datum to a more recent one following the issuing of new maps using the newer datum. So all my entrance GPS coordinates changed. I updated the cs statements in my survey data files and my KML output is still in the correct place. So all was looking good. Then I discovered that if I include a survey in the old cs with one using the new cs then Therion appears to treat both caves as having the same cs. Whichever cs is used by the first included cave is applied to subsequent caves too. Is there a way to deal with this? Footleg
You can use cs in config file, either inside layout, or outside layout (most likely what you want to do) to control the output co-ordinate system, which I think is what you are trying to do? Andrew On 19 Sep 2014 14:00, "Footleg" <drfootleg@gmail.com> wrote:
I have been converting a project from an old datum to a more recent one following the issuing of new maps using the newer datum. So all my entrance GPS coordinates changed. I updated the cs statements in my survey data files and my KML output is still in the correct place. So all was looking good. Then I discovered that if I include a survey in the old cs with one using the new cs then Therion appears to treat both caves as having the same cs. Whichever cs is used by the first included cave is applied to subsequent caves too. Is there a way to deal with this?
Footleg _______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
I had put one cave using a cs and gps fix coordinates into one survey block in a .th file. Then a second cave using a different cs and gps fix coordinates in a second .th file. My project then uses a master.th file which inputs both of these. If I run my config on either of the individual files then they appear at the correct place on Google Earth from an output kml file. If I include both caves then they appear in different places. The one I include first is in the correct place. If I swap the order they appear in the master.th file then this confirms the first one is alway put in the correct place, and the second is positioned using the cs of the first one. The same in a lox model file (except I cannot confirm which is correct, but I see them in different places when I give them the same entrance location to test this). Footleg On 19 Sep 2014 14:33, "Andrew Atkinson" <andrew@wotcc.org.uk> wrote:
You can use cs in config file, either inside layout, or outside layout (most likely what you want to do) to control the output co-ordinate system, which I think is what you are trying to do?
Andrew On 19 Sep 2014 14:00, "Footleg" <drfootleg@gmail.com> wrote:
I have been converting a project from an old datum to a more recent one following the issuing of new maps using the newer datum. So all my entrance GPS coordinates changed. I updated the cs statements in my survey data files and my KML output is still in the correct place. So all was looking good. Then I discovered that if I include a survey in the old cs with one using the new cs then Therion appears to treat both caves as having the same cs. Whichever cs is used by the first included cave is applied to subsequent caves too. Is there a way to deal with this?
Footleg _______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
_______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
We have been using multiple coordinate systems for a number of years, and it seems to work perfectly. We mix and match at will between lat-long, NZMG and NZTM (ie old and new datums) within the same cave survey and between cave surveys. So, Footleg, unless you have other reasons to do so, there is no need to convert your old datum coords to new datum coords. There seem to be a couple of rules to keep things working smoothly. Have a look at Therion Book pg 14 and 46-47 and keep in mind the distinction between input and output. 1. Each centerline with fix statement(s) should have a date and cs specification (prior to the fix I think). 2. So that you can be sure of the cs applied to the outputs, specify the output cs that you want in the th-config (not in a layout). 3. I have avoided using cs in layout, as, even if Therion is consistent in the way it applies it, in the situation where there are multiple coordinate systems in use, it is not abundantly clear to a user which cs will be used, for example where some centrelines have no explicit cs or for the output. (Although reading Therion Book pg 47, maybe that is for Atlas outputs - been a while, I forget). Now that we have output variables in 5.3.15 that echo the cs that has been used for output, it will be possible to have this stamped in the pdf header. I have a 'proof that it works' layout drafted up, and one day I will make a modular set of layouts to make it readily useable The first file embedded on this page http://therion.speleo.sk/wiki/doku.php/templates (ie http://therion.speleo.sk/wiki/lib/exe/fetch.php/templates:thconfig-templates imple.txt) shows how I use it in a th-config file. Bruce _____ From: therion-bounces@speleo.sk [mailto:therion-bounces@speleo.sk] On Behalf Of Footleg Sent: Saturday, 20 September 2014 4:13 a.m. To: List for Therion users Subject: Re: [Therion] Combining caves using different co-ordinate systems I had put one cave using a cs and gps fix coordinates into one survey block in a .th file. Then a second cave using a different cs and gps fix coordinates in a second .th file. My project then uses a master.th file which inputs both of these. If I run my config on either of the individual files then they appear at the correct place on Google Earth from an output kml file. If I include both caves then they appear in different places. The one I include first is in the correct place. If I swap the order they appear in the master.th file then this confirms the first one is alway put in the correct place, and the second is positioned using the cs of the first one. The same in a lox model file (except I cannot confirm which is correct, but I see them in different places when I give them the same entrance location to test this). Footleg On 19 Sep 2014 14:33, "Andrew Atkinson" <andrew@wotcc.org.uk> wrote: You can use cs in config file, either inside layout, or outside layout (most likely what you want to do) to control the output co-ordinate system, which I think is what you are trying to do? Andrew On 19 Sep 2014 14:00, "Footleg" <drfootleg@gmail.com> wrote: I have been converting a project from an old datum to a more recent one following the issuing of new maps using the newer datum. So all my entrance GPS coordinates changed. I updated the cs statements in my survey data files and my KML output is still in the correct place. So all was looking good. Then I discovered that if I include a survey in the old cs with one using the new cs then Therion appears to treat both caves as having the same cs. Whichever cs is used by the first included cave is applied to subsequent caves too. Is there a way to deal with this? Footleg _______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion _______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
Could it be that it comes from cs specifications in the same centerline environment? I have been using multiple datums (e.g lat-long, UTM, old and new lambert coordinate systems for France) for fixing coordinates in a system of multiple caves without any problem. However, I believe that I have a single cs statement per centerline. Indeed, at some point I discovered that the equal statements were now working properly outside the centerline environment, so that I centerlined individually all my pieces of survey, even in the same survey. My 2 bits Xavier Le 19/09/2014 23:10, Bruce a écrit :
We have been using multiple coordinate systems for a number of years, and it seems to work perfectly. We mix and match at will between lat-long, NZMG and NZTM (ie old and new datums) within the same cave survey and between cave surveys. So, Footleg, unless you have other reasons to do so, there is no need to convert your old datum coords to new datum coords. There seem to be a couple of rules to keep things working smoothly. Have a look at Therion Book pg 14 and 46-47 and keep in mind the distinction between input and output.
1. Each centerline with fix statement(s) should have a date and cs specification (prior to the fix I think). 2. So that you can be sure of the cs applied to the outputs, specify the output cs that you want in the th-config (not in a layout). 3. I have avoided using cs in layout, as, even if Therion is consistent in the way it applies it, in the situation where there are multiple coordinate systems in use, it is not abundantly clear to a user which cs will be used, for example where some centrelines have no explicit cs or for the output. (Although reading Therion Book pg 47, maybe that is for Atlas outputs - been a while, I forget).
Now that we have output variables in 5.3.15 that echo the cs that has been used for output, it will be possible to have this stamped in the pdf header. I have a 'proof that it works' layout drafted up, and one day I will make a modular set of layouts to make it readily useable The first file embedded on this page http://therion.speleo.sk/wiki/doku.php/templates (ie http://therion.speleo.sk/wiki/lib/exe/fetch.php/templates:thconfig-templates...) shows how I use it in a th-config file. Bruce
------------------------------------------------------------------------ *From:* therion-bounces@speleo.sk [mailto:therion-bounces@speleo.sk] *On Behalf Of *Footleg *Sent:* Saturday, 20 September 2014 4:13 a.m. *To:* List for Therion users *Subject:* Re: [Therion] Combining caves using different co-ordinate systems
I had put one cave using a cs and gps fix coordinates into one survey block in a .th file. Then a second cave using a different cs and gps fix coordinates in a second .th file.
My project then uses a master.th <http://master.th> file which inputs both of these. If I run my config on either of the individual files then they appear at the correct place on Google Earth from an output kml file. If I include both caves then they appear in different places. The one I include first is in the correct place. If I swap the order they appear in the master.th <http://master.th> file then this confirms the first one is alway put in the correct place, and the second is positioned using the cs of the first one.
The same in a lox model file (except I cannot confirm which is correct, but I see them in different places when I give them the same entrance location to test this).
Footleg
On 19 Sep 2014 14:33, "Andrew Atkinson" <andrew@wotcc.org.uk <mailto:andrew@wotcc.org.uk>> wrote:
You can use cs in config file, either inside layout, or outside layout (most likely what you want to do) to control the output co-ordinate system, which I think is what you are trying to do?
Andrew
On 19 Sep 2014 14:00, "Footleg" <drfootleg@gmail.com <mailto:drfootleg@gmail.com>> wrote:
I have been converting a project from an old datum to a more recent one following the issuing of new maps using the newer datum. So all my entrance GPS coordinates changed. I updated the cs statements in my survey data files and my KML output is still in the correct place. So all was looking good. Then I discovered that if I include a survey in the old cs with one using the new cs then Therion appears to treat both caves as having the same cs. Whichever cs is used by the first included cave is applied to subsequent caves too. Is there a way to deal with this?
Footleg _______________________________________________ Therion mailing list Therion@speleo.sk <mailto:Therion@speleo.sk> http://mailman.speleo.sk/mailman/listinfo/therion
_______________________________________________ Therion mailing list Therion@speleo.sk <mailto:Therion@speleo.sk> http://mailman.speleo.sk/mailman/listinfo/therion
_______________________________________________ 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/ -------------------------------
I have checked that both my survey files have date and cs declarations inside centreline blocks. Each file generates the correct position when I generate a KML from either file alone. Next I tried to add a cs statement in my thconfig file. This appears to over-ride the cs I declared in the centreline block. So if I put a different cs declaration in the thconfig file to the cs declared in the survey data file, then this results in the kml output putting the cave in the wrong place. I have created a bear bones set of examples (attached). The cave should be on the edge of the open grass area and trees. thconfig-eur79Only.thc Puts the cave declared with Eur79 datum in the correct place. thconfig-EPSGOnly.thc Puts the cave declared with EPSG:25830 datum in the correct place. thconfig-eur79csconfig.thc Declares the cave with Eur79 but specifies EPSG:25830 in the thconfig, and the cave now appears in the wrong place. The other files show various ways of including both caves, and they are rendered always with one in the correct place and one in the wrong place. Footleg
Hmm, Seems you are right that it is wrong. I tried adding explicit select statements to the thconfig-both_csconfig.thc and changing the position of the cs within the file, with no change in behaviour. Looks like a bug to me. Only difference that I can see with how I use it is that I am using lat-long (sometimes but not always) and two variants of an EPSG specification (which if exhibited same behaiour would give 1000's km error), whereas you have not used an EPSG code for eur79z30. Clutching at straws... Does eur79z30 have an EPSG code, and if it does, does using it's EPSG code in place of eur79z30 fix the behaviour? Bruce -----Original Message----- From: therion-bounces@speleo.sk [mailto:therion-bounces@speleo.sk] On Behalf Of Footleg Sent: Saturday, 20 September 2014 11:55 p.m. To: List for Therion users Subject: Re: [Therion] Combining caves using different co-ordinate systems I have checked that both my survey files have date and cs declarations inside centreline blocks. Each file generates the correct position when I generate a KML from either file alone. Next I tried to add a cs statement in my thconfig file. This appears to over-ride the cs I declared in the centreline block. So if I put a different cs declaration in the thconfig file to the cs declared in the survey data file, then this results in the kml output putting the cave in the wrong place. I have created a bear bones set of examples (attached). The cave should be on the edge of the open grass area and trees. thconfig-eur79Only.thc Puts the cave declared with Eur79 datum in the correct place. thconfig-EPSGOnly.thc Puts the cave declared with EPSG:25830 datum in the correct place. thconfig-eur79csconfig.thc Declares the cave with Eur79 but specifies EPSG:25830 in the thconfig, and the cave now appears in the wrong place. The other files show various ways of including both caves, and they are rendered always with one in the correct place and one in the wrong place. Footleg
Something goes definitely wrong here... If no CS is defined in thconfig file, therion uses first CS that it founds as output CS - therefore if you reverse input files, results change. It looks to me, that transformations to coordinate systems you are using do not work as expected. Unfortunatelly, I have no idea why it is like that - it needs some more sophisticated debugging, but using WGS84/UTM as output CS seems to work fine - see attached file. Does it solve your problem? S. On 20 September 2014 23:12, Bruce <bruce@tomo.co.nz> wrote:
Hmm, Seems you are right that it is wrong. I tried adding explicit select statements to the thconfig-both_csconfig.thc and changing the position of the cs within the file, with no change in behaviour. Looks like a bug to me.
Only difference that I can see with how I use it is that I am using lat-long (sometimes but not always) and two variants of an EPSG specification (which if exhibited same behaiour would give 1000's km error), whereas you have not used an EPSG code for eur79z30.
Clutching at straws... Does eur79z30 have an EPSG code, and if it does, does using it's EPSG code in place of eur79z30 fix the behaviour?
Bruce
-----Original Message----- From: therion-bounces@speleo.sk [mailto:therion-bounces@speleo.sk] On Behalf Of Footleg Sent: Saturday, 20 September 2014 11:55 p.m. To: List for Therion users Subject: Re: [Therion] Combining caves using different co-ordinate systems
I have checked that both my survey files have date and cs declarations inside centreline blocks. Each file generates the correct position when I generate a KML from either file alone. Next I tried to add a cs statement in my thconfig file. This appears to over-ride the cs I declared in the centreline block. So if I put a different cs declaration in the thconfig file to the cs declared in the survey data file, then this results in the kml output putting the cave in the wrong place.
I have created a bear bones set of examples (attached). The cave should be on the edge of the open grass area and trees.
thconfig-eur79Only.thc Puts the cave declared with Eur79 datum in the correct place. thconfig-EPSGOnly.thc Puts the cave declared with EPSG:25830 datum in the correct place.
thconfig-eur79csconfig.thc Declares the cave with Eur79 but specifies EPSG:25830 in the thconfig, and the cave now appears in the wrong place.
The other files show various ways of including both caves, and they are rendered always with one in the correct place and one in the wrong place.
Footleg
_______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
Yes, adding that different cs declaration to my thconfig file does solve the problem. Thank you for this work around. Footleg On 22 September 2014 17:27, Stacho Mudrak <lists@group-s.sk> wrote:
Something goes definitely wrong here...
If no CS is defined in thconfig file, therion uses first CS that it founds as output CS - therefore if you reverse input files, results change.
It looks to me, that transformations to coordinate systems you are using do not work as expected. Unfortunatelly, I have no idea why it is like that - it needs some more sophisticated debugging, but using WGS84/UTM as output CS seems to work fine - see attached file.
Does it solve your problem?
S.
On 20 September 2014 23:12, Bruce <bruce@tomo.co.nz> wrote:
Hmm, Seems you are right that it is wrong. I tried adding explicit select statements to the thconfig-both_csconfig.thc and changing the position of the cs within the file, with no change in behaviour. Looks like a bug to me.
Only difference that I can see with how I use it is that I am using lat-long (sometimes but not always) and two variants of an EPSG specification (which if exhibited same behaiour would give 1000's km error), whereas you have not used an EPSG code for eur79z30.
Clutching at straws... Does eur79z30 have an EPSG code, and if it does, does using it's EPSG code in place of eur79z30 fix the behaviour?
Bruce
-----Original Message----- From: therion-bounces@speleo.sk [mailto:therion-bounces@speleo.sk] On Behalf Of Footleg Sent: Saturday, 20 September 2014 11:55 p.m. To: List for Therion users Subject: Re: [Therion] Combining caves using different co-ordinate systems
I have checked that both my survey files have date and cs declarations inside centreline blocks. Each file generates the correct position when I generate a KML from either file alone. Next I tried to add a cs statement in my thconfig file. This appears to over-ride the cs I declared in the centreline block. So if I put a different cs declaration in the thconfig file to the cs declared in the survey data file, then this results in the kml output putting the cave in the wrong place.
I have created a bear bones set of examples (attached). The cave should be on the edge of the open grass area and trees.
thconfig-eur79Only.thc Puts the cave declared with Eur79 datum in the correct place. thconfig-EPSGOnly.thc Puts the cave declared with EPSG:25830 datum in the correct place.
thconfig-eur79csconfig.thc Declares the cave with Eur79 but specifies EPSG:25830 in the thconfig, and the cave now appears in the wrong place.
The other files show various ways of including both caves, and they are rendered always with one in the correct place and one in the wrong place.
Footleg
_______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
_______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
Hi, the problem is in the Proj4 internal definition of EPSG:25830, which doesn't specify any geodetic datum or parameters of transformation to wgs84 datum. On the other hand, eur79z30 definition in therion specifies transformation parameters (using +towgs84 keyword). If Proj4 calculates the transformation beetween coordinate systems and either source or target system is missing datum specification (using either +datum, +towgs84 or +nadgrids parameters), the datum transformation is silently skipped (see the third bullet in http://trac.osgeo.org/proj/wiki/FAQ#HowdoIdebugproblemswithNAD27NAD83datumsh...) resulting in positioning errors. In your dataset, transformation from EPSG:25830 to any cs using other geodetic datum may be off by a few dozen meters. Coincidentally, the datum shift between EPSG:25830 (ETRS89 datum) and UTM30 (WGS84 datum) is really minimal (see e.g. http://www.killetsoft.de/t_1009_e.htm), so the result in Therion seemed to be correct when you selected UTM30 as an output cs. If output cs uses other datum than WGS84 or ETRS89, the difference will be substantial, as was in your examples. The issue can be fixed by changing Proj4 definition of EPSG:25830 from +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs to +proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0 +units=m +no_defs You can do this in therion.ini file using cs-def command. Martin On Tue, Sep 23, 2014 at 4:35 PM, Footleg <drfootleg@gmail.com> wrote:
Yes, adding that different cs declaration to my thconfig file does solve the problem.
Thank you for this work around.
Footleg
On 22 September 2014 17:27, Stacho Mudrak <lists@group-s.sk> wrote:
Something goes definitely wrong here...
If no CS is defined in thconfig file, therion uses first CS that it founds as output CS - therefore if you reverse input files, results change.
It looks to me, that transformations to coordinate systems you are using do not work as expected. Unfortunatelly, I have no idea why it is like that - it needs some more sophisticated debugging, but using WGS84/UTM as output CS seems to work fine - see attached file.
Does it solve your problem?
S.
On 20 September 2014 23:12, Bruce <bruce@tomo.co.nz> wrote:
Hmm, Seems you are right that it is wrong. I tried adding explicit select statements to the thconfig-both_csconfig.thc and changing the position of the cs within the file, with no change in behaviour. Looks like a bug to me.
Only difference that I can see with how I use it is that I am using lat-long (sometimes but not always) and two variants of an EPSG specification (which if exhibited same behaiour would give 1000's km error), whereas you have not used an EPSG code for eur79z30.
Clutching at straws... Does eur79z30 have an EPSG code, and if it does, does using it's EPSG code in place of eur79z30 fix the behaviour?
Bruce
-----Original Message----- From: therion-bounces@speleo.sk [mailto:therion-bounces@speleo.sk] On Behalf Of Footleg Sent: Saturday, 20 September 2014 11:55 p.m. To: List for Therion users Subject: Re: [Therion] Combining caves using different co-ordinate systems
I have checked that both my survey files have date and cs declarations inside centreline blocks. Each file generates the correct position when I generate a KML from either file alone. Next I tried to add a cs statement in my thconfig file. This appears to over-ride the cs I declared in the centreline block. So if I put a different cs declaration in the thconfig file to the cs declared in the survey data file, then this results in the kml output putting the cave in the wrong place.
I have created a bear bones set of examples (attached). The cave should be on the edge of the open grass area and trees.
thconfig-eur79Only.thc Puts the cave declared with Eur79 datum in the correct place. thconfig-EPSGOnly.thc Puts the cave declared with EPSG:25830 datum in the correct place.
thconfig-eur79csconfig.thc Declares the cave with Eur79 but specifies EPSG:25830 in the thconfig, and the cave now appears in the wrong place.
The other files show various ways of including both caves, and they are rendered always with one in the correct place and one in the wrong place.
Footleg
_______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
_______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
_______________________________________________ Therion mailing list Therion@speleo.sk http://mailman.speleo.sk/mailman/listinfo/therion
participants (6)
-
Andrew Atkinson -
Bruce -
Footleg -
Martin Budaj -
Stacho Mudrak -
Xavier Pennec