ThinkGeo.com    |     Documentation    |     Premium Support

Issue reprojecting Shapefiles from EPSG:5650 to EPSG:25832 (ThinkGeo 14.2)

Hello,

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:

  1. Are there known issues with the EPSG:5650 definition in the version 14.2?
  2. Is there a specific requirement for the ExternalProjectionParameters string when dealing with the “zE-N” variant of UTM?
  3. Should I prefer GdalProjectionConverter over the standard ProjectionConverter for these specific European CRS?

Any suggestions or a small code example would be greatly appreciated.

Regards,
Torsten

Hi Juergen,

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:

  1. there’s no known issues, nor specific requirement about epsg: 5650. Check out the changelog here: https://docs.thinkgeo.com/products/desktop-maps/changelog/ to find the projection related updates.
  2. I would recommend GdalProjectionConverter, which is more up to date, if you can.

Thanks,
Ben

Hi Ben,

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:

  1. When I load this file into the “HowDoI” sample without using a ProjectionConverter , nothing is displayed on the map.
  2. 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?

Best regards,
TorstenTestfelder.zip (12.8 KB)

Hi Juergen,

It’s recreated and fixed in the latest beta087, thanks for the demo! Let us know if you see any new issues.

Thanks,
Ben