[Proj] How can I convert between cartesian space and WGS84?

Jose Gonçalves jagoncal at gmail.com
Thu Oct 19 04:46:02 EST 2017


Hi
You must have longitude first, or use option -r in cs2cs, to reverse the
order.
Regards

José Gonçalves



2017-10-19 9:26 GMT+01:00 David Grundberg <david.grundberg at oryx.se>:

> Hello,
>
> I'd like to have a cartesian space, ideally in meters, axis-aligned with
> north/east/up, centered on a WGS84 position, so that I can transform
> between this cartesian space and WGS84 coordinates. I attempted to make
> a Mercator projection but quickly ran into problems. Just to illustrate,
> I tested with geocentric projection and known coordinates.
>
> I tested it with coordinates for a track and it should be 100 meters
> between the points.
>
> <https://kartor.eniro.se/?c=63.821347,20.321247&z=18&l=
> aerial&d={%22l%22:[[63.821477,20.321209,63.820758,20.322454,null,0]]}>
> or https://tinyurl.com/ybcxe3sb
>
> $ printf "63.821477N 20.321209E\n63.820758N 20.322454E" | cs2cs -v
> +proj=latlong +ellps=WGS84 +datum=WGS84 +no_defs +to +proj=geocent
> +datum=WGS84 +to_meters
> # ---- From Coordinate System ----
> #Lat/long (Geodetic alias)
> #
> # +proj=latlong +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0
> #--- following specified but NOT used
> # +ellps=WGS84
> # ---- To Coordinate System ----
> #Geocentric
> #
> # +proj=geocent +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
> #--- following specified but NOT used
> # +to_meters
> 2639773.20    5369807.65 2201077.86
> 2639819.46    5369731.56 2201207.11
> $ octave
> octave:1> norm([2639773.20 5369807.65 2201077.86] - [2639819.46
> 5369731.56 2201207.11])
> ans =  156.96 # Should be about 100.7 meters!
> octave:2>
> $
>
> Any advice appreciated!
> David
> _______________________________________________
> 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.maptools.org/pipermail/proj/attachments/20171019/9f4b3678/attachment.htm 


More information about the Proj mailing list