Quantcast
Channel: DotSpatial
Viewing all articles
Browse latest Browse all 3973

New Post: Convert from WGS1984

$
0
0
Thanks jany_ for Replay

If I use ProjectionInfo.FromEpsgCode then this works well
but not from Listview another problem I need to find out
       For Each item As ListViewItem In Me.ListView1.Items

            Dim stringtest1 As String = item.Text
            Dim result1 As Double
            Dim stringtest2 As String = item.SubItems.Item(1).Text
            Dim result2 As Double

            Dim XY(1) As Double
            Dim z(0) As Double
            z(0) = 0
            XY(1) = 64.147612642 'result1
            XY(0) = -21.9376785421 'result2 
            Label1.Text = XY(0)
            Label2.Text = XY(1)

            'Dim XY_from As ProjectionInfo = KnownCoordinateSystems.Geographic.World.WGS1984
            'Dim XY_to As ProjectionInfo = KnownCoordinateSystems.Geographic.Europe.ISN1993
            Dim XY_from As ProjectionInfo = ProjectionInfo.FromEpsgCode(4326)
            Dim XY_to As ProjectionInfo = ProjectionInfo.FromEpsgCode(3057)
            Reproject.ReprojectPoints(XY, z, XY_from, XY_to, 0, 1)
            x.Text = XY(0)
            y.Text = XY(1)

            Dim lvi As New ListViewItem(XY(0))
            lvi.SubItems.Add(XY(1))
            ListView2.Items.Add(lvi)

        Next

Viewing all articles
Browse latest Browse all 3973

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>