1

I have this coordinate: 778597.3125000001, 9148353. I am told this coordinate is Arc 1960 / UTM zone 36S.

When I go here and click "Get Position on Map" and enter in the above coordinates, it places the point in the correct place on the map (at the corner of a field).

What kind of transform/projection do I have to do to make it Latitude and Longitude, and then go to the same point in Google Maps?

I have tried various ways but seems to end up 400 - 200m diagonal offset.

The correct latitude and longitude should be: Lat: -7.699944 Long: 35.5262575 (corner of the field, see link):

I am using DotSpatial.

    var Arc1960UTMZone36S = KnownCoordinateSystems.Projected.UtmOther.Arc1960UTMZone36S; 
    Arc1960UTMZone36S.AuthorityCode = 21036;

    var WGS1984 = KnownCoordinateSystems.Geographic.World.WGS1984;
    //4326 google earth  
    //3857 for google maps
    WGS1984.AuthorityCode = 3857;

    double[] xy = new double[2] { 778597.3125000001, 9148353 };
    double[] z = new double[1] { 0d };

    Reproject.ReprojectPoints(xy, z, Arc1960UTMZone36S, WGS1984, 0, 1);

    var latitude = xy[1];
    var longitude = xy[0];

    Debug.WriteLine($"Lat: {latitude} Long: {longitude}");

Would anybody know why it is offset?

Kellie
  • 193
  • 15
  • 2
    Might be worth asking on https://gis.stackexchange.com/ – MrUpsidown Dec 22 '20 at 14:23
  • The tool you mentioned translates the provided coordinates to `-7.69721021, 35.52550186` so why do you believe it should be `-7.7009819, 35.5280201`? – MrUpsidown Dec 22 '20 at 14:27
  • When I go here: https://epsg.io/21036 and click "Get Position on Map" and enter in the above utm coordinates, it places the point in the correct place on the map (At the corner of a field).I did post an incorrect expected LatLong before and have fixed it, but I still have an offset issue. I guess my question is: What kind of transform/projection do I have to do to make it Lat Long, and then go to the same point in Google Maps (which is WGS84?) – Kellie Dec 22 '20 at 23:40

1 Answers1

0

The solution was to use proj4 string instead of the Known Coordinate System.

Instead of

var Arc1960UTMZone36S = KnownCoordinateSystems.Projected.UtmOther.Arc1960UTMZone36S; 
Arc1960UTMZone36S.AuthorityCode = 21036;

Use

String proj4_21036_str = "+proj=utm +zone=36 +south +ellps=clrk80 +towgs84=-160,-6,-302,0,0,0,0 +units=m +no_defs";    
ProjectionInfo proj21036 = ProjectionInfo.FromProj4String(proj4_21036_str);

although, I don't understand why.

Kellie
  • 193
  • 15
  • 1
    please ask any questions that you have regarding the solution in the comments/ as a new question. Please don't ask questions within answers. You can ask that question here in the comments... – Sabito stands with Ukraine Dec 23 '20 at 01:35