Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ProjectedCoordinateSystem.ED50_UTM #81

Open
valeriob opened this issue Sep 17, 2020 · 0 comments
Open

Add ProjectedCoordinateSystem.ED50_UTM #81

valeriob opened this issue Sep 17, 2020 · 0 comments

Comments

@valeriob
Copy link

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
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant