這篇文章主要介紹如何解決pythongdal投影坐標(biāo)系轉(zhuǎn)換的問(wèn)題,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
作為一家“創(chuàng)意+整合+營(yíng)銷”的成都網(wǎng)站建設(shè)機(jī)構(gòu),我們?cè)跇I(yè)內(nèi)良好的客戶口碑。創(chuàng)新互聯(lián)公司提供從前期的網(wǎng)站品牌分析策劃、網(wǎng)站設(shè)計(jì)、成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)、創(chuàng)意表現(xiàn)、網(wǎng)頁(yè)制作、系統(tǒng)開(kāi)發(fā)以及后續(xù)網(wǎng)站營(yíng)銷運(yùn)營(yíng)等一系列服務(wù),幫助企業(yè)打造創(chuàng)新的互聯(lián)網(wǎng)品牌經(jīng)營(yíng)模式與有效的網(wǎng)絡(luò)營(yíng)銷方法,創(chuàng)造更大的價(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)**想想之前也沒(méi)發(fā)現(xiàn)過(guò)這個(gè)問(wèn)題呀,最后發(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)換的問(wèn)題”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!