<div dir="auto"><div>Even, Carsten, thanks.</div><div dir="auto"><br><div dir="auto">Indeed I looked through what Even sent, and it worked. I did very much the same thing as the C# example you just posted. </div><br>However it got me thinking. Will I need to do this in the future? Or are there plans for coordinate transformation to use the new axis ordering system?</div><div dir="auto"><br></div><div dir="auto">Anyways, thanks again.</div><div dir="auto"><br></div><div dir="auto">Mike<br><br><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2020, 00:30 Carsten Lockenkötter <<a href="mailto:carsten.lockenkoetter@gon.de">carsten.lockenkoetter@gon.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I ran into the same problem a while back.<br>
My solution was to change the AxisMapStrategy to OAMS_TRADITION_GIS_ORDER.<br>
<br>
You can read more about this here:<br>
<a href="https://gdal.org/tutorials/osr_api_tut.html" rel="noreferrer noreferrer" target="_blank">https://gdal.org/tutorials/osr_api_tut.html</a><br>
<br>
My code in C#:<br>
<br>
var source = new SpatialReference("");<br>
var destination = new SpatialReference("");<br>
Geometry ogrGeom = null;<br>
CoordinateTransformation transform = null;<br>
<br>
//set spatialrefrence for source and destinaton epsg<br>
source.ImportFromEPSG(sourceEPSG);<br>
destination.ImportFromEPSG(destEPSG);<br>
<br>
source.SetAxisMappingStrategy(AxisMappingStrategy.OAMS_TRADITIONAL_GIS_ORDER);<br>
destination.SetAxisMappingStrategy(AxisMappingStrategy.OAMS_TRADITIONAL_GIS_ORDER);<br>
<br>
//create coordinate transformation with source and destination spatialreference<br>
transform = new CoordinateTransformation(source, destination);<br>
<br>
//create a gdal geometry object from Wkt and transform it<br>
ogrGeom = Geometry.CreateFromWkt(geom.Value);<br>
<br>
ogrGeom.Transform(transform);<br>
//export transformed geometry<br>
ogrGeom.ExportToWkt(out string outGeom);<br>
<br>
-------------------------------------------------------------------------------------------------<br>
<br>
-----Ursprüngliche Nachricht-----<br>
Von: gdal-dev <<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev-bounces@lists.osgeo.org</a>> Im Auftrag von Even Rouault<br>
Gesendet: Dienstag, 28. Januar 2020 17:12<br>
An: <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev@lists.osgeo.org</a><br>
Betreff: Re: [gdal-dev] Transform produces different results from 2.2.4 and 3.0.2 or 3.0.3<br>
<br>
> What might I need to do to get it working correctly? I know there was <br>
> a lot of changes with gdalbarn/proj.<br>
<br>
Indeed. See<br>
<a href="https://lists.osgeo.org/pipermail/gdal-dev/2020-January/051425.html" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/pipermail/gdal-dev/2020-January/051425.html</a><br>
<br>
--<br>
Spatialys - Geospatial professional services <a href="http://www.spatialys.com" rel="noreferrer noreferrer" target="_blank">http://www.spatialys.com</a> _______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div></div></div>