我有一个geojson文件,表明蒙特利尔的一些兴趣点,但坐标不是lat和lng,而是MTM nad83,区域8中的X,Y坐标。
我想在谷歌地图中加载文件,但需要转换坐标..
我在互联网上搜索了很多,但我发现的所有内容都是能够转换它的网站:twcc.fr。在js源代码中,我没有找到任何东西,所以它可能是服务器端。
知道坐标转换的任何人?
提前感谢
**编辑:**来自json文件的样本:
{"name":"json_sortie","type":"FeatureCollection"
,"features":[
{"type":"Feature","geometry":{"type":"Point","coordinates":[294079.844,5044618.5]},"properties":{"POTEAU_ID_POT":122476,"DATE_CONCEPTION_POT":20101216000000,"DESCRIPTION_REP":"Enlevé","DESCRIPTION_RTP":"2- Tige et manchon","X":294079.844,"Y":5044618.5,"ID_ARRONDISSEMENT":"25","TRC_ID":1110499}}
,{"type":"Feature","geometry":{"type":"Point","coordinates":[296910.375,5045914.5]},"properties":{"POTEAU_ID_POT":5766,"DATE_CONCEPTION_POT":20090707000000,"DESCRIPTION_REP":"Réel","DESCRIPTION_RTP":"3- Fût","X":296910.375,"Y":5045914.5,"ID_ARRONDISSEMENT":"25","TRC_ID":1090130}}
,{"type":"Feature","geometry":{"type":"Point","coordinates":[296908.938,5045915.5]},"properties":{"POTEAU_ID_POT":66342,"DATE_CONCEPTION_POT":20090707000000,"DESCRIPTION_REP":"Enlevé","DESCRIPTION_RTP":"1- Tige et base","X":296908.938,"Y":5045915.5,"ID_ARRONDISSEMENT":"25","TRC_ID":1090130}}
,{"type":"Feature","geometry":{"type":"Point","coordinates":[296481.188,5045804]},"properties":{"POTEAU_ID_POT":5030,"DATE_CONCEPTION_POT":20121108000000,"DESCRIPTION_REP":"Réel","DESCRIPTION_RTP":"1- Tige et base","X":296481.188,"Y":5045804,"ID_ARRONDISSEMENT":"25","TRC_ID":1100117}}
答案 0 :(得分:1)
我找到了怎么做。如果您知道如何将UTM转换为WMI84纬度,经度,则可以转换MTM。将UTM转换为WGS84(lat,long)的公式为here on Wikipedia。
MTM就像UTM,但更精确。对于UTM,区域为3°大而不是6°。 scaleTM是0.9999而不是0.9996。假东移是304.8公里(而不是UTM的500公里)。要在UTM中使用参考子午线,你可以refMeridian = Zone * 6° - 183°
,但是对于MTM,我使用了一系列与他们的参考经线相对应的区域(我在互联网上找到):
var zone_to_refmeridian = // MTM zone to reference meridian
[0, 53, 56, 58.5, 61.5, 64.5, 67.5, 70.5, 73.5,
76.5, 79.5, 82.5, 81, 84, 87, 90, 93, 96, 99,
102, 105, 108, 111, 114, 117, 120, 123, 126,
129, 132, 135, 138, 141];
// For instance for Montreal city which is in zone 8:
zone_to_refmeridian[8] // for zone 8
答案 1 :(得分:0)
这个网站对我将MTM转换为WGS84非常有用 http://leware.net/geo/utmgoogleapp.htm