SetLatitudeFromString() public méthode

Set the latitude value from a string. The string is parsed based on given format
public SetLatitudeFromString ( string value, WGS84Format format ) : void
value string String represenation of a latitude value
format WGS84Format Coordinate format in the string
Résultat void
        public void WGS84ToSweref()
        {
            WGS84Position wgsPos = new WGS84Position();

            wgsPos.SetLatitudeFromString("N 59º 58' 55.23\"", WGS84Position.WGS84Format.DegreesMinutesSeconds);
            wgsPos.SetLongitudeFromString("E 017º 50' 06.12\"", WGS84Position.WGS84Format.DegreesMinutesSeconds);

            SWEREF99Position rtPos = new SWEREF99Position(wgsPos, SWEREF99Position.SWEREFProjection.sweref_99_tm);

            // Conversion values from Lantmateriet.se, they convert from DMS only.
            // Reference: http://www.lantmateriet.se/templates/LMV_Enkelkoordinattransformation.aspx?id=11500
            double xPosFromLM = 6652797.165;
            double yPosFromLM = 658185.201;

            Assert.AreEqual(Math.Round(rtPos.Latitude, 3), xPosFromLM);
            Assert.AreEqual(Math.Round(rtPos.Longitude, 3), yPosFromLM);
        }