ThinkGeo.com    |     Documentation    |     Premium Support

Empty proj string when resolving by SRID

Hi
I’m trying to get a PROJ string via “Projection.GetProjStringByEpsgSrid” for srid 7415 but I get an empty string back. Is this because it’s a compound crs? Using latest 12.3.12
Cheers

Hi Kev,

GetProjStringByEpsgSrid is kinda out of date, we’ll update it in the near future.

For this case, proj4 string of EPSG 7415 can be found on https://epsg.io/7415. Then we can pass this proj4 string to ProjectionConverter, below is sample code.

        string proj7415Str = "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +units=m +vunits=m +no_defs";
        ProjectionConverter projectionConverter = new ProjectionConverter(proj7415Str, Projection.GetDecimalDegreesProjString());
        projectionConverter.Open();

        PointShape originalPoint = new PointShape(142892.19, 470783.87);
        PointShape convertedPoint = (PointShape)projectionConverter.ConvertToExternalProjection(originalPoint);

Thanks,
Leo