[PROJ] Converting WGS 84 to Gauß-Krüger

Javier Jimenez Shaw j1 at jimenezshaw.com
Tue Apr 22 01:17:50 PDT 2025


Hi

I was talking about DHDN in FOSSGIS last March:
https://pretalx.com/fossgis2025/talk/UYBXMX/
In the slide 42 you can see the zones of your reference systems.
Each zone has an area of use, defined as a bounding box by latitudes and
longitudes
for instance EPSG:31467 https://spatialreference.org/ref/epsg/31467/
Just select the zone that better fits your longitude. But that is not
written in stone. Maybe somebody wants to use the neighbour zone for
convenience.

Cheers
Javier.

On Tue, 22 Apr 2025 at 00:22, Dominik Vogt via PROJ <proj at lists.osgeo.org>
wrote:

> I have a shell script that converts Gauß-Krüger coordinates (which
> are still used by some Germand botanists) to WGS 84.  It looks
> roughly like this:
>
>         # RW and HW contain the "Rechtswert" and "Hochwert" in GK (Potsdam
>         # datum)
>         # Figure out the source coordinate system, depending on the first
> digit
>         # of the "Rechtswert", i. e. the "Meridianstreifen":
>         case "$RW" in
>                 (2*) CS="epsg:31466"  ;;
>                 (3*) CS="epsg:31467"  ;;
>                 (4*) CS="epsg:31468"  ;;
>                 (5*) CS="epsg:31469"  ;;
>                 (**) CS="epsg:31467"  ;;
>         esac
>         # convert to WGS 84
>         echo "$RW" "$HW" |
>                 cs2cs +init="$CS" +to +init=epsg:4326 |
>                 read LON LAT JUNK
>
> Now I need to do the reverse transformation.  There is no obvious
> way to guess the right destination coordinate system.  Is there a
> simpler way than just trying all four and see which one yields the
> correct result?
>
>         for CS in epsg:31466 epsg:31467 epsg:31468 epsg:31469; do
>                 echo "$LAT" "$LON" |
>                         cs2cs +init=epsg:4326 +to +init="$CS" |
>                         read RW HW JUNK
>                 # if RW and HW are good, return them, otherwise try next CS
>         done
>
> Ciao
>
> Dominik ^_^  ^_^
>
> --
>
> Dominik Vogt
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20250422/89cecd12/attachment.htm>


More information about the PROJ mailing list