您好,登錄后才能下訂單哦!
這篇文章主要介紹如何解決pythongdal投影坐標(biāo)系轉(zhuǎn)換的問題,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
要將xian80地理坐標(biāo)系轉(zhuǎn)換成投影坐標(biāo)系:
xian1980 = """GEOGCS["GCS_Xian_1980", DATUM["Xian_1980", SPHEROID["Xian_1980",6378140.0,298.257]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]]"""prjreference = 'PROJCS["Xian_1980_3_Degree_GK_Zone_37",GEOGCS["GCS_Xian_1980",DATUM["D_Xian_1980",SPHEROID["Xian_1980",6378140.0,298.257]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Gauss_Kruger"],PARAMETER["False_Easting",37500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",111.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]'
轉(zhuǎn)換后會(huì)報(bào)錯(cuò):
latlong = transform.TransformPoint(x,y) File "/usr/lib/python3/dist-packages/osgeo/osr.py", line 711, in TransformPoint return _osr.CoordinateTransformation_TransformPoint(self, *args)NotImplementedError: Wrong number or type of arguments for overloaded function 'CoordinateTransformation_TransformPoint'. Possible C/C++ prototypes are: OSRCoordinateTransformationShadow::TransformPoint(double [3]) OSRCoordinateTransformationShadow::TransformPoint(double [3],double,double,double)**想想之前也沒發(fā)現(xiàn)過這個(gè)問題呀,最后發(fā)現(xiàn)之前投影坐標(biāo)系:**'PROJCS["Xian_1980_3_Degree_GK_Zone_37",GEOGCS["GCS_Xian_1980",DATUM["D_Xian_1980",SPHEROID["Xian_1980",6378140.0,298.257]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",37500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",111.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]'**不是高斯-克呂格投影而是橫軸墨卡托,我想原因可能是gdal庫(kù)里只能支持高斯-克呂格投影吧。**
以上是“如何解決pythongdal投影坐標(biāo)系轉(zhuǎn)換的問題”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。