[Gdal-dev] Re: [whatever] toWGS defintions
Tomas R
monshi at home.se
Thu Aug 9 08:07:30 EDT 2007
So for now I need to find a WKT for every projections I wish to support?
To bad, for me, but hopefully I can get a big set of users to help me
getting the correct WKT with a toWGS for their maps. I have two working
now, RT90 and CH1903+. Working really good with no visible offset when
drawing a GPS-track on the map.
or wait for you to do what you *ought* to do :)
No, that will not do.
No tip on a source for WKT-strings? Perhaps one with all UTM-zones? Or
one with the different projections used in Europe?
Big thanks
Tomas
Frank Warmerdam skrev:
> Tomas R wrote:
>> Do there exist any general source for correct [whatever] to WGS
>> definitions?
>>
>> I have an application which by use of GDAL translates WGS coordinates
>> to and from [whatever] projection. I have it working with a few fully
>> defined WKTs but it is no fun searching the web after all WKTs I
>> possibly would need.
>>
>> So I tried instead to define the Spatialreferences with EPSG-codes
>> instead of WKT. And as suspected the result wasn't what I had hoped
>> for since the EPSG lacked the toWGS information. The result in the
>> projection I tried (RT90 2.5 gon V, EPSG 3020) the transformation was
>> offset by approximately 200 meters west and 50 meters north.
>>
>> Am I correct in that the error occurs because the EPSG-code do not
>> specify the toWGS? If I am correct - what approach do you suggest?
>>
>> The goal of the application, which is written in C#, is to be able to
>> take any map the user provides, with or without geodata in it, and
>> serve it to another application which internally works with WGS84.
>> That is my application is to be able to set up and translate from a
>> projection the user selects to and from WGS84.
>>
>> The Q is simple - any source for correct definitions of [whatever]
>> toWGS that I can use?
>> Or can I make the EPSG-codes work? Or do they work but I have made an
>> error?
>
> Tomas,
>
> Some EPSG datum definitions do not have mappings to EPSG, but many do.
> If EPSG has exactly one transformation to get to WGS84 for a datum, then
> it should be incorporated into the WKT generated by OGRSpatialReference.
> However, if there are more than one possibility the initialize-from-epsg
> code chooses to play it safe, and use none of them rather than risk
> picking one that is inappropriate to the situation and hide the fact that
> it is guessing.
>
> This is a questionable choice on my part.
>
> Libraries like GeoTools take the approach of picking one of the available
> transformations with some jiffy rules that they hope will pick better
> ones.
>
> But the core of the problem is that every TOWGS84 transformation for a
> datum is at best an approximation. Often several transformations
> exist, and are applicable to particular regions, minimizing error in
> that region.
>
> Think that I *ought* to do:
> o Implement methods to get a list of all known transformations for
> a given datum with the descriptive name so that applications could
> offer the choice to the user.
> o Pick one by default when generating WKT for an EPSG coordinate system,
> ideally with some sort of hint that the towgs84 value is just one of
> several possibilities.
>
> Best regards,
More information about the Gdal-dev
mailing list