[GRASSLIST:2305] m.proj2

Dear Users,
I'm trying to use m.proj2 to translate a point from latlong ed50 coord sistem
to the italian sistem (gaus-boaga, rome40)
I have some difficulties to write the sintax of the command....
thank you...

--
Ivan Marchesini
University of Perugia
Italy

I'm trying to use m.proj2 to translate a point from latlong ed50 coord
sistem to the italian sistem (gaus-boaga, rome40)
I have some difficulties to write the sintax of the command....
thank you...

m.proj2 in GRASS 5.0.3 isn't that great. It's a little better in 5.3 but
for what you want to do I'd suggest using the 'cs2cs' program from
PROJ.4.

http://www.remotesensing.org/proj

The PROJ.4 documentation will give you some insight into what to feed
m.proj2 as well.

Hamish

On Wed, Jan 21, 2004 at 02:10:38PM +0100, Ivan Marchesini wrote:

Dear Users,
I'm trying to use m.proj2 to translate a point from latlong ed50 coord sistem
to the italian sistem (gaus-boaga, rome40)
I have some difficulties to write the sintax of the command....
thank you...

With 'cs2cs' (provided by PROJ4) it should be:
LATLONG/ED50 -> Gauss-boaga Ovest/Roma40

cat coordsED50.txt | cs2cs +init=epsg:4230 +to +init=epsg:26591 \
      +towgs84=-85.88,-28.85,+49.67,-1.003,-2.383,-1.808,-27.82 > coordsGB1.txt

Fuso Est:
Gauss-boaga Est is +to +init=epsg:26592

Be sure to pick the right (local) towgs84 parameters.

Hope this helps,

Markus

--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

On Thu, 22 Jan 2004, Markus Neteler wrote:

On Wed, Jan 21, 2004 at 02:10:38PM +0100, Ivan Marchesini wrote:
> Dear Users,
> I'm trying to use m.proj2 to translate a point from latlong ed50 coord sistem
> to the italian sistem (gaus-boaga, rome40)
> I have some difficulties to write the sintax of the command....
> thank you...

With 'cs2cs' (provided by PROJ4) it should be:
LATLONG/ED50 -> Gauss-boaga Ovest/Roma40

cat coordsED50.txt | cs2cs +init=epsg:4230 +to +init=epsg:26591 \
      +towgs84=-85.88,-28.85,+49.67,-1.003,-2.383,-1.808,-27.82 > coordsGB1.txt

Fuso Est:
Gauss-boaga Est is +to +init=epsg:26592

Be sure to pick the right (local) towgs84 parameters.

Hello Markus
Were you able to find towgs84 parameters for eur50 in Italy? I didn't
reply to this yesterday as I couldn't find any and thought you might know.
I would put them into the GRASS datumtransform.table if I knew. The
NIMA document only seems to have some for Sardinia and Sicily but not
mainland Italy.
At least the general ones for europe should be put in in the command line
above(or does epsg:4230 already contain these?)

Also I have a slight suspicion that the ordering of latlong / longlat
co-ordinates might be different between m.proj2 and cs2cs. It would be worth
somebody confirming this anyway.

Paul

On Thu, Jan 22, 2004 at 11:35:21AM +0000, Paul Kelly wrote:

On Thu, 22 Jan 2004, Markus Neteler wrote:

> On Wed, Jan 21, 2004 at 02:10:38PM +0100, Ivan Marchesini wrote:
> > Dear Users,
> > I'm trying to use m.proj2 to translate a point from latlong ed50 coord sistem
> > to the italian sistem (gaus-boaga, rome40)
> > I have some difficulties to write the sintax of the command....
> > thank you...
>
> With 'cs2cs' (provided by PROJ4) it should be:
> LATLONG/ED50 -> Gauss-boaga Ovest/Roma40
>
> cat coordsED50.txt | cs2cs +init=epsg:4230 +to +init=epsg:26591 \
> +towgs84=-85.88,-28.85,+49.67,-1.003,-2.383,-1.808,-27.82 > coordsGB1.txt
>
> Fuso Est:
> Gauss-boaga Est is +to +init=epsg:26592
>
> Be sure to pick the right (local) towgs84 parameters.
>

Hello Markus
Were you able to find towgs84 parameters for eur50 in Italy? I didn't
reply to this yesterday as I couldn't find any and thought you might know.

I picked them up here:

http://remotesensing.org/lists/proj_archive/msg00484.html

I would put them into the GRASS datumtransform.table if I knew. The
NIMA document only seems to have some for Sardinia and Sicily but not
mainland Italy.
At least the general ones for europe should be put in in the command line
above(or does epsg:4230 already contain these?)

No, unfortunately not (Frank W. told me that PROJ4 needs modifications
to handle multiple datums per line (e.g. Zone 1 and 2 in Italy with
Sardinia, Sicily and mainland Italy).

I have a working copy of 'epsg_v64' in SQL (PostgreSQL), they
kindly provided me in a personal mail with complex SQL routines
to extract datums from EPSG. Find attached the result for Italy
in CSV format.

This indicates that all datum transform parameters are available
in EPSG 6.4, but not present in PROJ4, see also:

http://bugzilla.remotesensing.org/show_bug.cgi?id=422

Looking at attached CSV file, you see, that the datum parameters
differs from what I posted - above version is the local datum
of Trieste, while I have attached now the general Italian
mainland values.

Maybe attached values should go into GRASS.

Also I have a slight suspicion that the ordering of latlong / longlat
co-ordinates might be different between m.proj2 and cs2cs. It would be worth
somebody confirming this anyway.

Possibly - no idea.

Markus

PS: Here the SQL query to extract the Italian datums from EPSG 6.4:

SELECT o.coord_op_name, m.coord_op_method_name, p.parameter_name,
pu.sort_order, pv.parameter_value, u.unit_of_meas_name, a.area_name
FROM epsg_coordoperation o
JOIN epsg_coordoperationmethod m
ON m.coord_op_method_code = o.coord_op_method_code
JOIN epsg_coordoperationparamvalue pv
ON pv.coord_op_method_code = o.coord_op_method_code AND
pv.coord_op_code = o.coord_op_code
JOIN epsg_coordoperationparamusage pu
ON pu.coord_op_method_code = o.coord_op_method_Code AND
pu.parameter_code = pv.parameter_code
JOIN epsg_coordoperationparam p
ON p.parameter_code = pv.parameter_code
JOIN epsg_unitofmeasure u
ON u.uom_code = pv.uom_code
JOIN epsg_area a
ON a.area_code = o.area_of_use_code
WHERE o.coord_op_type = 'transformation' AND o.target_crs_code = 4326
AND o.source_crs_code = 4265 AND o.deprecated = 0

(attachments)

epgs64_datums_italy.csv (3.15 KB)

On Thu, 22 Jan 2004, Markus Neteler wrote:

> > On Wed, Jan 21, 2004 at 02:10:38PM +0100, Ivan Marchesini wrote:
> > > Dear Users,
> > > I'm trying to use m.proj2 to translate a point from latlong ed50 coord sistem
> > > to the italian sistem (gaus-boaga, rome40)
> > > I have some difficulties to write the sintax of the command....
> > > thank you...
> >
> > With 'cs2cs' (provided by PROJ4) it should be:
> > LATLONG/ED50 -> Gauss-boaga Ovest/Roma40
> >
> > cat coordsED50.txt | cs2cs +init=epsg:4230 +to +init=epsg:26591 \
> > +towgs84=-85.88,-28.85,+49.67,-1.003,-2.383,-1.808,-27.82 > coordsGB1.txt
> >
> > Fuso Est:
> > Gauss-boaga Est is +to +init=epsg:26592
> >
> > Be sure to pick the right (local) towgs84 parameters.

Just realised Rome40 also uses the international ellipsoid. So you may not
need any datum transformation parameters at all in this simple example.

cs2cs +init=epsg:4230 +to +init=epsg:26591

should do the trick.
It would be good if there was a test point to check.
But anyway my other point was if neither datum is WGS84 then you need to
provided a set of towgs84 parameters for each side of the transformation
and then the calculation will go through WGS84 as an intermediate stage.

Paul

thanks to all for the answers...
ivan

Alle 14:55, giovedì 22 gennaio 2004, Paul Kelly ha scritto:

On Thu, 22 Jan 2004, Markus Neteler wrote:
> > > On Wed, Jan 21, 2004 at 02:10:38PM +0100, Ivan Marchesini wrote:
> > > > Dear Users,
> > > > I'm trying to use m.proj2 to translate a point from latlong ed50
> > > > coord sistem to the italian sistem (gaus-boaga, rome40)
> > > > I have some difficulties to write the sintax of the command....
> > > > thank you...
> > >
> > > With 'cs2cs' (provided by PROJ4) it should be:
> > > LATLONG/ED50 -> Gauss-boaga Ovest/Roma40
> > >
> > > cat coordsED50.txt | cs2cs +init=epsg:4230 +to +init=epsg:26591 \
> > > +towgs84=-85.88,-28.85,+49.67,-1.003,-2.383,-1.808,-27.82 >
> > > coordsGB1.txt
> > >
> > > Fuso Est:
> > > Gauss-boaga Est is +to +init=epsg:26592
> > >
> > > Be sure to pick the right (local) towgs84 parameters.

Just realised Rome40 also uses the international ellipsoid. So you may not
need any datum transformation parameters at all in this simple example.

cs2cs +init=epsg:4230 +to +init=epsg:26591

should do the trick.
It would be good if there was a test point to check.
But anyway my other point was if neither datum is WGS84 then you need to
provided a set of towgs84 parameters for each side of the transformation
and then the calculation will go through WGS84 as an intermediate stage.

Paul

--
Ivan Marchesini
University of Perugia
Italy