[Proj4j] ESPG:28992
Frank Warmerdam
warmerdam at pobox.com
Wed Jan 11 13:21:54 EST 2012
On Wed, Jan 11, 2012 at 10:17 AM, <jeffery.fitzgerald at gmail.com> wrote:
> In case I'm using the API wrong, here's my test.
>
> org.osgeo.proj4j.CRSFactory crsFactory = new org.osgeo.proj4j.CRSFactory();
> CoordinateReferenceSystem epsg4326 = crsFactory.createFromName("EPSG:4326");
> CoordinateReferenceSystem epsg28992 =
> crsFactory.createFromName("EPSG:28992");
>
> CoordinateTransformFactory factory = new CoordinateTransformFactory();
> CoordinateTransform trans = factory.createTransform(epsg4326, epsg28992);
> ProjCoordinate inCoord = new ProjCoordinate();
> inCoord.x = 5.387638889;
> inCoord.y = 52.156160556;
> ProjCoordinate outCoord = new ProjCoordinate();
> trans.transform(inCoord, outCoord);
>
> I *think* this case should ignore the datum transform, since the input value
> is already in WG84.
Fitz,
I'm no proj4j guru, but the above statement doesn't make sense to
me. The output coordinate system (28992) is *not* WGS84 so to
transform frm 4326 which is WGS84 to 28992 which is a distinct
datum a datum transformation is required. Of course the
towgs84 parameters are applied in reverse to switch from WGS84
to the target datum.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Software Developer
More information about the Proj4j
mailing list