-1

I want to convert my x,y,zone coordinate to latitude-longitude in c#.how can i do that??? i find some function in net but they doesnt work properly.plz help me. if my country is important i live in Iran.

for example: i give this x,y,zone: 271740.00,3250740.00,40

it gives me this [this site]: long,lat:54.648498425894694,29.36515026502202,0

Vahid Akbari
  • 189
  • 7
  • 25

2 Answers2

3

A very good coordinate converter is this one: Proj It is written in C, In order to use it in C#, you can use this wrapper: .NET wrapper for Proj4

Another very good library written in C# is DotSpatial

Other projects are Proj4Net and Proj.Net, however I don't know their quality, perhaps they are just copy/paste of other projects. For sure they are all inspired by the original Proj4 project.

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
1

CoordinateSharp does conversions like this.

Example

 UniversalTransverseMercator utm = new UniversalTransverseMercator("T", 32, 233434, 234234);
 Coordinate c = UniversalTransverseMercator.ConvertUTMtoLatLong(utm);

Your lat/long values can be found in the Coordinate object

Tronald
  • 1,520
  • 1
  • 13
  • 31