R: [Proj] cs2cs usage

marco.pasetti at alice.it marco.pasetti at alice.it
Thu Mar 20 08:07:33 PDT 2008


Hi,
 
thanks you all for the precious help.
 
I entered both *versions* of the command:
 
cs2cs +init=epsg:4326 +to +proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +uni
ts=m +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +no_defs
10.73602778 45.75333333
1635050.62      5068127.39 -45.30

cs2cs +init=epsg:4326 +to +init=epsg:3003 +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68
10.73602778 45.75333333
1635050.62      5068127.39 -45.30
 
as you can see, the result it's the same, ...as it should be ;-)
 
Markus, because I'll work on Lombardia DEM rasters only using WGS84 *input points* (for r.horizon and r.sun2 computations), do you think that I should transform *all rasters* from the current projection to WGS84 projection?
 
About the *check-out procedure*, I fear I must trust the result as it is, I cannot see another solution :-( ....
 
Thanks
 
Marco
 
PS: Frank, thank you very much for CRTL+Z; it was really frustrating to kill the process every time!... ;-)
 

________________________________

Da: proj-bounces at lists.maptools.org per conto di Frank Warmerdam
Inviato: gio 20/03/2008 15.49
A: PROJ.4 and general Projections Discussions
Oggetto: Re: [Proj] cs2cs usage



marco.pasetti at alice.it wrote:
> Hi all,
> 
> I read cs2cs manual page, but I still have big doubts about it! quickly:
> 
> 0. Preamble: I built PROJ.4 4.6 on windows using MinGW
> 
> 1. Question 1: when I launch cs2cs from command line it executes the requested operation and then waits for others inputs... how can I quit, without the need of killing the process in task manager?

Marco,

You normally need to indicate "end of input" to terminate cs2cs.  On unix
this is done with control-D, on windows with control-Z.

> 2. Question 2: I need to trasform single points from WGS84 (EPSG ID = 4326) to Gauss-Boaga Roma40 West (EPSG ID = 3003)
> while ID=4326 determinates an univocal datum, to correctly define Gauss-Boaga Roma40 West I need to specify also +towgs84 parameters, retrieved by GRASS (creating a new location in GRASS using 3003 EPSG code, it asks for furthers options, suggesting the correct parameters to set):
> the complete datum definition for Gauss-Boaga Roma40 West is as follows (from GRASS):
> 
> EPSG ID = 3003
> Option 2
> Used in Italy (Peninsular Part)
> towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68
> Accuracy 3-4m
> 
> how can I use cs2cs respecting the previous parameters?
> I tried with cs2cs +init=epsg:4326 +to +init=epsg:3003
> but I don't know how to set towgs84 parameters (and even if they are needed)

The epsg:3003 definition looks like:

+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl
+units=m +no_defs  <>

So you should use it directly and then add your towgs84 parameter.

eg.

cs2cs +init=epsg:4326 +to \
+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl \
+units=m +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +no_defs

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    | President OSGeo, http://osgeo.org <http://osgeo.org/> 

_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20080320/ab1f9396/attachment.html>


More information about the Proj mailing list