[Proj] Misplaced SHP obtained with PROJ 4.8.0 called from gvSIG CE

Jorge Arevalo jorge.arevalo at geomati.co
Mon Aug 26 09:43:55 PDT 2013


On Mon, Aug 26, 2013 at 6:17 PM, Hermann Peifer <peifer at gmx.eu> wrote:
> On 2013-08-26 16:33, Andre Joost wrote:
>>
>> Am 26.08.2013 14:54, schrieb Jorge Arevalo:
>>
>>>
>>> Actually, my SRSs are:
>>>
>>> source SRS: +proj=tmerc +lat_0=0.0 +lon_0=-3.0 +k=0.9996 +x_0=500000.0
>>> +y_0=0.0 +ellps=intl +units=m +nadgrids=sped2et.gsb
>>>
>>> target SRS: +proj=tmerc +lat_0=0.0 +lon_0=-3.0 +k=0.9996 +x_0=500000.0
>>> +y_0=0.0 +ellps=GRS80 +units=m
>>>
>>
>> The second one is missing +nadgrids or +towgs84. Without it, proj does
>> not make a datum shift, but assumes both CRS to have the same datum.
>>
>
> As André wrote: PROJ.4 version >= 4.6.0 needs a datum specification for
> *both* source SRS and target SRS in order to "make the datum shift".
>
> For PROJ.4, a datum is the definition of an ellipsoid (via +ellps, +a, +rf,
> etc.) in combination with either the +towgs84 or the +nadgrids parameter.
> This could mean in your case: +towgs84=0,0,0 or +nadgrids=@null
>
> +nadgrids=@null is more appropriate as your grid shift file has ETRS89
> offsets (rather than WGS84 offsets, as assumed by PROJ). Practically, the
> difference between both options is in the sub-millimeter range, hence
> irrelevant in most cases.
>
> Hermann
>
>

Ok, so, if I didn't misunderstand:

- These proj strings should be valid for epsg:23030 to epsg:25830
transformation using mentioned grid file:

source SRS: +proj=tmerc +lat_0=0.0 +lon_0=-3.0 +k=0.9996 +x_0=500000.0
+y_0=0.0 +ellps=intl +units=m  +nadgrids=@sped2et.gsb +no_defs

destination SRS: +proj=tmerc +lat_0=0.0 +lon_0=-3.0 +k=0.9996
+x_0=500000.0 +y_0=0.0 +ellps=GRS80 +units=m  +nadgrids=@null +no_defs

(not sure about the need of +no_defs part, but included just in case)

- These proj strings should be valid for the same transformation, but
without using any grid file:

source SRS: +proj=tmerc +lat_0=0.0 +lon_0=-3.0 +k=0.9996 +x_0=500000.0
+y_0=0.0 +ellps=intl +units=m  +nadgrids=@ null +no_defs

destination SRS: +proj=tmerc +lat_0=0.0 +lon_0=-3.0 +k=0.9996
+x_0=500000.0 +y_0=0.0 +ellps=GRS80 +units=m  +nadgrids=@null +no_defs

And the important thing about the change PROJ.4 4.5.0 to PROJ.4 >=
4.6.0 is that PROJ.4 version >= 4.6.0 needs a datum specification for
*both* source SRS and target SRS in order to "make the datum shift".
So, in the case I don't have a datum specification by default, I
should *always* add +nadgrids=@null or +toWGS84=0,0,0.

Am I missing something? It seems to work now with those changes. Need
more testing, but looks promising.

Many thanks!

-- 
Jorge Arévalo
http://geomati.co



More information about the Proj mailing list