<div dir="ltr"><div>Hi</div><div><br></div><div>I was talking about DHDN in FOSSGIS last March: <a href="https://pretalx.com/fossgis2025/talk/UYBXMX/">https://pretalx.com/fossgis2025/talk/UYBXMX/</a></div><div>In the slide 42 you can see the zones of your reference systems.</div><div>Each zone has an area of use, defined as a bounding box by latitudes and longitudes</div><div>for instance EPSG:31467 <a href="https://spatialreference.org/ref/epsg/31467/">https://spatialreference.org/ref/epsg/31467/</a></div><div>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.</div><div><br></div><div>Cheers</div><div>Javier.</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, 22 Apr 2025 at 00:22, Dominik Vogt via PROJ <<a href="mailto:proj@lists.osgeo.org">proj@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have a shell script that converts Gauß-Krüger coordinates (which<br>
are still used by some Germand botanists) to WGS 84.  It looks<br>
roughly like this:<br>
<br>
        # RW and HW contain the "Rechtswert" and "Hochwert" in GK (Potsdam<br>
        # datum)<br>
        # Figure out the source coordinate system, depending on the first digit<br>
        # of the "Rechtswert", i. e. the "Meridianstreifen":<br>
        case "$RW" in<br>
                (2*) CS="epsg:31466"  ;;<br>
                (3*) CS="epsg:31467"  ;;<br>
                (4*) CS="epsg:31468"  ;;<br>
                (5*) CS="epsg:31469"  ;;<br>
                (**) CS="epsg:31467"  ;;<br>
        esac<br>
        # convert to WGS 84<br>
        echo "$RW" "$HW" |<br>
                cs2cs +init="$CS" +to +init=epsg:4326 |<br>
                read LON LAT JUNK<br>
<br>
Now I need to do the reverse transformation.  There is no obvious<br>
way to guess the right destination coordinate system.  Is there a<br>
simpler way than just trying all four and see which one yields the<br>
correct result?<br>
<br>
        for CS in epsg:31466 epsg:31467 epsg:31468 epsg:31469; do<br>
                echo "$LAT" "$LON" |<br>
                        cs2cs +init=epsg:4326 +to +init="$CS" |<br>
                        read RW HW JUNK<br>
                # if RW and HW are good, return them, otherwise try next CS<br>
        done<br>
<br>
Ciao<br>
<br>
Dominik ^_^  ^_^<br>
<br>
-- <br>
<br>
Dominik Vogt<br>
_______________________________________________<br>
PROJ mailing list<br>
<a href="mailto:PROJ@lists.osgeo.org" target="_blank">PROJ@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/proj</a><br>
</blockquote></div>