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#HowdoIdebugproblemswithNAD27NAD83datumshifting)
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 at 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 at 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 at 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 at speleo.sk [mailto:therion-bounces at 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 at speleo.sk
>>> http://mailman.speleo.sk/mailman/listinfo/therion
>>
>>
>>
>> _______________________________________________
>> Therion mailing list
>> Therion at speleo.sk
>> http://mailman.speleo.sk/mailman/listinfo/therion
>>
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> http://mailman.speleo.sk/mailman/listinfo/therion

Reply via email to