[OSRS-PROJ] Re: Proj.4 DLL ?

Bart Adriaanse BartA at DEMIS.nl
Wed Jan 24 10:04:03 EST 2001


Hi Frank,

> Sorry about the datum this, my fault. 
> 
> The proj.exe program itself doesn't include datum shifting 
> support.  I wrote
> a similar mainline program called cs2cs (coordinate system to 
> coordinate 
> system) which internally calls the pj_transform() function as 
> opposed to
> the simple LL<->proj functions pj_fwd() and pj_inv().  
> 
> In short, I think you should be able to do something like:
> 
> cs2cs +proj=stere +lat_0=52.1561605555555 
> +lon_0=5.38763888888888 +k=0.9999079
>             +x_0=155000 +y_0=463000 
>             
> +towgs84=593.16,26.15,478.54,-6.3239,-0.5008,-5.5487,4.077 
>             +ellps=bessel
>       +to +proj=latlong +datum=WGS84
> 
> This would translated between the dutch projection and 
> latlong coordinates 
> in WGS84.  To do the reverse:
> 
> cs2cs +proj=latlong +datum=WGS84
>       +to +proj=stere +lat_0=52.1561605555555 
> +lon_0=5.38763888888888 +k=0.9999079
>             +x_0=155000 +y_0=463000 
>             
> +towgs84=593.16,26.15,478.54,-6.3239,-0.5008,-5.5487,4.077 
>             +ellps=bessel
>       

I have compiled cs2cs and tried, but somehow it produces very odd
results, coordinates that are completely out of range (west instead of
east)
Maybe you would like to check this yourself, if you simply type the +x0
+y0 coordinates as input, the output should be pretty close to +x_0 and
+y0 coordinates right ?


Rather then figuring out how the command line tools work, i will just
try make a DLL which exports pj_init and pj_transform, if i understand
correctly that would be just about all i need ?

I have just made a MSVC native project out of it so it should be easy to
debug the DLL now and see what exactly is going on under the hood....

I'll keep you posted,

Bart Adriaanse
Demis bv

> I hope to better document the datum support, cs2cs, and 
> pj_transform() in the
> next release of PROJ.4.  
> 
> All credit for the quality of transformations in PROJ.4 goes 
> of course to 
> Gerald Evenden who wrote it.
> 
> 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/~warmerda
> and watch the world go round - Rush    | Geospatial 
> Programmer for Rent
> ----------------------------------------
> PROJ.4 Discussion List
> See http://www.remotesensing.org/proj for subscription, unsubscription
> and other information.
> 
----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.



More information about the Proj mailing list