ProjNet4GeoAPI icon indicating copy to clipboard operation
ProjNet4GeoAPI copied to clipboard

Add ProjectedCoordinateSystem.ED50_UTM

Open valeriob opened this issue 5 years ago • 0 comments

Hi, i would like to make a pull request but i'm not an expert, i guess it will be rather easy to add this system by adding a method to ProjectedCoordinateSystem class, similar to the WGS84_UTM one, but i have no clue if just changing the datum is enough, there are many strings as parameters, can you give some advice ?

    public static ProjectedCoordinateSystem ED50_UTM(int zone, bool zoneIsNorth)
    {
        var pInfo = new List<ProjectionParameter>();
        pInfo.Add(new ProjectionParameter("latitude_of_origin", 0));
        pInfo.Add(new ProjectionParameter("central_meridian", zone * 6 - 183));
        pInfo.Add(new ProjectionParameter("scale_factor", 0.9996));
        pInfo.Add(new ProjectionParameter("false_easting", 500000));
        pInfo.Add(new ProjectionParameter("false_northing", zoneIsNorth ? 0 : 10000000));
        //IProjection projection = cFac.CreateProjection("UTM" + Zone.ToString() + (ZoneIsNorth ? "N" : "S"), "Transverse_Mercator", parameters);
        var proj = new Projection("Transverse_Mercator", pInfo, "UTM" + zone.ToString(CultureInfo.InvariantCulture) + (zoneIsNorth ? "N" : "S"),
            "EPSG", 32600 + zone + (zoneIsNorth ? 0 : 100), string.Empty, string.Empty, string.Empty);
        var axes = new List<AxisInfo>
            {
                new AxisInfo("East", AxisOrientationEnum.East),
                new AxisInfo("North", AxisOrientationEnum.North)
            };
        return new ProjectedCoordinateSystem(HorizontalDatum.ED50, where else goes here ? :D
    }

valeriob avatar Sep 17 '20 16:09 valeriob