[OSRS-PROJ] Re: Quick 'how-to' to on PROJ.4
Petri J. Riipinen
petri.riipinen at nic.fi
Fri Jul 27 11:49:13 EDT 2001
Precedence: bulk
Reply-To: osrs-proj at remotesensing.org
At 02:24 27.7.2001 , Felipe G. Nievinski wrote:
>On 26/07/01 at 23:44 Petri J. Riipinen wrote:
> >Ok, I almost managed to do it, except that fl_transform returns an error
> >code (100)
>(...)
> >GPS-measurements:
> >1 6010.570 2455.930 GPS: FINLANDIA-HOUSE
> >2 6012.467 2456.127 GPS: RAILWAY YARD
> >3 6013.045 2458.826 GPS: VIIKKI MUSEUM
>(...)
> >Do you any idea what might be the problem? Are the values '6010.570' etc in
> >correct form for input to pj_transform?
> >
>Petri, unfortunately I cannot test your transformation, but these values
>are not in the standard format. Longitude ranges from -180 to +180
>degrees, so, based on Finland's position, 6010.570 seems to be 60 degrees
>+ 10.570 minutes = 60,176 degrees (60+10.570/60). The same for
>latitude: 2455.930 -> 24d55.930' = 24,932d (What's this, Helsinki?)
>
>Try this.
>hope this helps.
>
>Felipe.
Well, Now I got that part. But my transform-call still fails.
I think that the return status value of '100' comes from a defined macro
named 'PJD_ERR_GEOCENTRIC' in pj_transform.c-file. There is a comment "/*
datum system errors */" above the define in projects.h
So, I guess that means that there is something wrong with my
datum-setting...?!?
Here are the settings that I use:
Destination = "+proj=tmerc +lon_0=27 +x_0=3500000 +towgs84=-87,-98,-121
+ellps=intl +units=m";
Source = "+proj=latlong +datum=WGS84";
The the exact above strings work nicely (when put together) with 'cs2cs'
program. What's the matter when using them with pj_init() and/or
pj_transform(), that I can' t understand.
If I use pj_pr_list() to print out the projection definitions, I get:
Source:
#Lat/long (Geodetic)
#
# +proj=latlong +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
Destination:
#Transverse Mercator
# Cyl, Sph&Ell
# +proj=tmerc +lon_0=27 +x_0=3500000 +towgs84=-87,-98,-121 +ellps=intl
# +units=m
#--- following specified but NOT used
# +ellps=WGS84
Any ideas?
- Petri
PS. To recap: I want to translate from GPS (lat/lon) to Finnish KKJ (x,y).
<><><><><><><><>
Petri J. Riipinen
petri.riipinen at nic.fi
<><><><><><><><>
----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.
More information about the Proj
mailing list