I am working with ThinkGeo UI (v14.2) and I’m facing issues reprojecting Shapefiles from ETRS89 / UTM zone 33N (zE-N) ( EPSG:5650 ) to EPSG:25832 .
I have tried using both GdalProjectionConverter and ProjectionConverter , but without success. The data is either not displayed correctly or the transformation does not seem to take effect.
My questions:
Are there known issues with the EPSG:5650 definition in the version 14.2?
Is there a specific requirement for the ExternalProjectionParameters string when dealing with the “zE-N” variant of UTM?
Should I prefer GdalProjectionConverter over the standard ProjectionConverter for these specific European CRS?
Any suggestions or a small code example would be greatly appreciated.
We couldn’t recreate the issue. Here is our test code using v14.2.1:
using System.Globalization;
using ThinkGeo.Core;
const int SourceEpsg = 5650; // ETRS89 / UTM zone 33N (zE-N)
const int TargetEpsg = 25832; // ETRS89 / UTM zone 32N
// EPSG:5650 uses a zone-prefixed easting (33,500,000 m for zone 33).
var sourcePoint = new PointShape(33500000, 4649776);
GdalConfig.ConfigureGdal();
using var gdalConverter = new GdalProjectionConverter(SourceEpsg, TargetEpsg);
gdalConverter.Open();
var gdalPoint = gdalConverter.ConvertToExternalProjection(sourcePoint) as PointShape;
gdalConverter.Close();
var corePoint = ProjectionConverter.Convert(SourceEpsg, TargetEpsg, sourcePoint) as PointShape;
Console.WriteLine($"Source EPSG:{SourceEpsg} (E,N): {sourcePoint.X.ToString(CultureInfo.InvariantCulture)}, {sourcePoint.Y.ToString(CultureInfo.InvariantCulture)}");
Console.WriteLine($"GdalProjectionConverter -> EPSG:{TargetEpsg} (E,N): {gdalPoint?.X.ToString(CultureInfo.InvariantCulture)}, {gdalPoint?.Y.ToString(CultureInfo.InvariantCulture)}");
Console.WriteLine($"ProjectionConverter -> EPSG:{TargetEpsg} (E,N): {corePoint?.X.ToString(CultureInfo.InvariantCulture)}, {corePoint?.Y.ToString(CultureInfo.InvariantCulture)}");
the output:
which aligns well with the expected result:
So can you let me know how to recreate the issue?
And for your questions:
there’s no known issues, nor specific requirement about epsg: 5650. Check out the changelog here: Changelog - ThinkGeo Docs to find the projection related updates.
I would recommend GdalProjectionConverter, which is more up to date, if you can.
Thanks for your answer. To clarify my previous post: I am using ThinkGeo Version 14.4.0 , specifically the ThinkGeo.Core.Gdal package.
I have attached one of the shapefiles I am working with.
I’ve encountered two main issues:
When I load this file into the “HowDoI” sample without using a ProjectionConverter , nothing is displayed on the map.
When I try to use the GdalProjectionConverter (Internal: 5650 , External: 25832 ) and call GetBoundingBox() , it returns an invalid result (or an invalid feature).
Could you please take a look at the attached file and provide some suggestions on how to handle this projection correctly?