ThinkGeo.com    |     Documentation    |     Premium Support

WPF GeoTiff Example

Hi Mohamad,

The suggestion from Rex don’t works for your data, your data looks cannot be re-project to 4326, that’s why it don’t display, that’s why we just render it under meter before.

And I tried the solution to shows coordinate like you mentioned convert from 3168 to 4326, and it looks the coordinate can be converted to 4326 now.

But you said it’s incorrect and display as meter is correct coordinates. I want to know how to know whether it’s correct, for example let me know the coordinate of a special feature on map, so I can compare its decimal degree coordinate and meter coordinate and try to find where is the problem.

Regards,

Ethan

Hi Ethan,

Yes the coordinates in meter is correct meanwhile the coordinate is wrong. When i check both coordinate on internet the meter coordinate is correct and it point to the exact location that is Pahang, Malaysia. Meanwhile,the degree coordinate is to far off, the coordinate point of to Thailand that another country above Malaysia. Supposedly the degree coordinate should be around :

long : 103°26’50.78"E, lat: 3°30’57.542"N (Pahang,Malaysia) with meter : x: 605770.080150,y : 8756.038425

but the display i get at the map after projection is around :
long : 100°26’56"E lat: 07°30’50"(point at Thailand)

I hope you understand my explanation.

Thank you and best regards

Hi Mohamad,

Could you please let us know where you view the coordinate in meter because it looks Bing and Google just provide the coordinate in decimal degree.

And it looks your x: 605770.080150,y : 8756.038425 is not the same point: long: 103°26’50.78"E, lat: 3°30’57.542"N

Please view this page:

https://epsg.io/transform#s_srs=3168&t_srs=4326&x=605770.0801500&y=8756.0384250

Regards,

Ethan

Hi Ethan,

Sorry i miss the number for y coordinates. This the coordinates.

x: 605770.08015 , y : 388756.038425 = long : 103°26’50.783" lat : 3°30’57.542"

Yes i also use that website that you share link to confirm the coordinates for both meter and lat long.

Thank you and best regards,

Hi Mohamad,

Please try the code as below, why the projection don’t works well should because the projection string of epsg 3168 in default list is incomplete, so please try the code as below, the new projection string of 3168 is copied from http://epsg.io/3168, and you can see the coordinate of p2 is correct now.

    Proj4Projection proj4Projection = new Proj4Projection();
    proj4Projection.InternalProjectionParametersString = "+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=804670.24 +y_0=0 +no_uoff +gamma=323.1301023611111 +a=6377295.664 +b=6356094.667915204 +units=m +no_defs";         // epsg 3168
    proj4Projection.ExternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(4326);
    proj4Projection.Open();

    PointShape p = new PointShape(605770.08015, 388756.038425);
    PointShape p2 = proj4Projection.ConvertToExternalProjection(p) as PointShape;

Wish that’s helpful.

BTW, if there is more question could you please create a new topic? Because it looks this topic is too long to load.

Regards,

Ethan

Hai Ethan ,

Thank you the lat long now is point correctly. I have more question, I will create a new topic.

Thank you and best regards.

Hi Mohamad,

Any question please let us know.

Regards,

Ethan