kkk-kppi commented on issue #18975: URL: https://github.com/apache/echarts/issues/18975#issuecomment-2058163719
> > > Is there any way to convert lng/lat coordinates into x/y coordinates有没有办法将 lng/lat 坐标转换为 x/y 坐标 > > > > > > Yes, provided that the geographic coordinate system used for drawing the SVG map is WGS 84. In my [Demo](https://echarts.apache.org/examples/en/editor.html?c=geo-svg-scatter-simple&code=PTAECMHsFcDsBMCWsDmFIA9TNAGwIYAuwuqAULpLgKYBmhoAvKANoBsAzADSgC0ATAFYAdGwCM_ALoBuMtAAOAJ0QoAFg2bsA7MP7itPXhN1iZZeEXwBnahtABvMqFBIAttVhXEkTwC5WAOSw-O4BPAEEhGGgEagBklxOoFYwigDG1P4sSc4sAQBK1ACeANYAVvgAbgC3JdFsACzCYhwAnK1srYb8YsKtDVqtABxaCTmBAGr4uASw1Fb1ImKtHA2CDYZiTYIcbGx6Y865AQDKhPi0F9Qz9U0NWw2dm01Dgvz8AAwNh0d5ABLQKxVRB1Hh7YRfLb8TY6DgcLQND6jRJHQKUGj0aLouiEFgfBJ4Kg4limH7HBTKNRRHgUlTqPEE2lUkmSSRJNkAX1kAHdEPBCKomKAxENVtJnKpqHS7Fshq1xaAQKAThMAOIuRDuTzeTxkVRpIWS6WK0AACiZ9PxfEJGNx-IAlOKlbRIIo8EQyNyDcxefzBWBzUppSzrdj6CzHYqwC63aQUGQrPwhSwzBZzjZCMIUtB0tRhK58PJTaaMPamAA-BxJRPCeSA1Sm7KojAMlFHACyRFUwnw4CsJZDvFAFrtkjLACpQPq285OwKe32B1JQ0Tw6YJ6AvezHWQOTu09ZbFnUhkhYmnWBAdRQGkfJVqIpCNR4KBKtNoPMyGQACTCFC2U18gAeSAgAVAB9AAFABBUC_lAABqGJgAPYBrAzYB_0gYBO3kcDIFocCAEkMlmeAs0qFBoloOA0kIHUzSsSiy0cZxqDSVR8EfKxhEUagUEQKwn0U XDTQCRBSPwBBwKYqieHsZJKP8WTQD3WRnEgeR6J8IVWKOQhICoej5H8ewORnUAsNM8ZnAMozEBMhxklUSBuX8QhFA_VSLOcAtHPEyTpNksIbNARRIBCdzPOocZzPGA8MwsmxlHmazUVsop5EyGI6FodjCBONIiGEkL0pvQzFCQYInxOIohOoVx_ACLDSvSxAn1cM4ihoUzysoRQmoAYnAD5-HwUaAm80KPFveBsoUyJ_DEHg438aFQDs3BjP8D5VNipIuSSVwigAYU4x8s1sICtJ1U1NO02AdzUoA) I assume _Iceland.svg_ is WGS 84 (turns out it's close, but not 100%). The only, but difficult, task is to find the lat/lng coordinates of the **SVG bounding box** - lower left and upper right corner points. Then convert all points' coordinates from (lat,lng) to (x,y) and display them. <img alt="image" width="54.140625" height="21" src="https://private-user-images.githubusercontent.com/13038071/313376947-3b81222f-754b-4de7-9ccd-4e45bec3ee94.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTA3MjUxNjQsIm5iZiI6MTcxMDcyNDg2NCwicGF0aCI6Ii8xMzAzODA3MS8zMTMzNzY5NDctM2I4MTIyMmYtNzU0Yi00ZGU3LTljY2QtNGU0NWJl YzNlZTk0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzE4VDAxMjEwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRkNzk3OWI4ZjEyMjk0YjhlMDQ5ODI3YzE0ZDUxMTVhZjM3MWU0OTY0MDJhMDk2YWRjMGU5ODM0MzM3N2IwZTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.HuuUt3Hnl4F3MDdtJuYJXsYZqz_AhgfUZpIiHD2CyzE">可以,前提是用于绘制 SVG 地图的地理坐标系为 WGS 84。在我的演示中,我假设Iceland.svg是 WGS 84(事实证明它很接近,但不是 100%)。唯一但困难的任务是找到 SVG 边界框的纬度/液度坐标 - 左下角和右上角点。然后将所有点的坐标从 (lat,lng) 转换为 (x,y) 并显示它们。 <img alt="image" width="54.140625" height="21" src="https://private-user-images.githubusercontent.com/13038071/313376947-3b81222f-754b-4de7-9ccd-4e45bec3ee94.png?jwt=eyJhbGciOiJIUz I1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTA3MjUxNjQsIm5iZiI6MTcxMDcyNDg2NCwicGF0aCI6Ii8xMzAzODA3MS8zMTMzNzY5NDctM2I4MTIyMmYtNzU0Yi00ZGU3LTljY2QtNGU0NWJlYzNlZTk0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzE4VDAxMjEwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRkNzk3OWI4ZjEyMjk0YjhlMDQ5ODI3YzE0ZDUxMTVhZjM3MWU0OTY0MDJhMDk2YWRjMGU5ODM0MzM3N2IwZTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.HuuUt3Hnl4F3MDdtJuYJXsYZqz_AhgfUZpIiHD2CyzE"> > > Thank you very much for your reply.Do you have any good methods to find the lat/lng coordinates of the SVG bounding box?非常感谢您的回复。你有什么好的方法来找到SVG边界框的lat/lng坐标吗? > > Is there any way to convert lng/lat coordinates into x/y coordinates有没有办法将 lng/lat 坐标转换为 x/y 坐标 > > Yes, provided that the geographic coordinate system used for drawing the SVG map is WGS 84.可以,前提是用于绘制 SVG 地图的地理坐标系为 WGS 84。 In my [Demo](https://echarts.apache.org/examples/en/editor.html?c=geo-svg-scatter-simple&code=PTAECMHsFcDsBMCWsDmFIA9TNAGwIYAuwuqAULpLgKYBmhoAvKANoBsAzADSgC0ATAFYAdGwCM_ALoBuMtAAOAJ0QoAFg2bsA7MP7itPXhN1iZZeEXwBnahtABvMqFBIAttVhXEkTwC5WAOSw-O4BPAEEhGGgEagBklxOoFYwigDG1P4sSc4sAQBK1ACeANYAVvgAbgC3JdFsACzCYhwAnK1srYb8YsKtDVqtABxaCTmBAGr4uASw1Fb1ImKtHA2CDYZiTYIcbGx6Y865AQDKhPi0F9Qz9U0NWw2dm01Dgvz8AAwNh0d5ABLQKxVRB1Hh7YRfLb8TY6DgcLQND6jRJHQKUGj0aLouiEFgfBJ4Kg4limH7HBTKNRRHgUlTqPEE2lUkmSSRJNkAX1kAHdEPBCKomKAxENVtJnKpqHS7Fshq1xaAQKAThMAOIuRDuTzeTxkVRpIWS6WK0AACiZ9PxfEJGNx-IAlOKlbRIIo8EQyNyDcxefzBWBzUppSzrdj6CzHYqwC63aQUGQrPwhSwzBZzjZCMIUtB0tRhK58PJTaaMPamAA-BxJRPCeSA1Sm7KojAMlFHACyRFUwnw4CsJZDvFAFrtkjLACpQPq285OwKe32B1JQ0Tw6YJ6AvezHWQOTu09ZbFnUhkhYmnWBAdRQGkfJVqIpCNR4KBKtNoPMyGQACTCFC2U18gAeSAgAVAB9AAFABBUC_lAABqGJgAPYBrAzYB_ 0gYBO3kcDIFocCAEkMlmeAs0qFBoloOA0kIHUzSsSiy0cZxqDSVR8EfKxhEUagUEQKwn0UXDTQCRBSPwBBwKYqieHsZJKP8WTQD3WRnEgeR6J8IVWKOQhICoej5H8ewORnUAsNM8ZnAMozEBMhxklUSBuX8QhFA_VSLOcAtHPEyTpNksIbNARRIBCdzPOocZzPGA8MwsmxlHmazUVsop5EyGI6FodjCBONIiGEkL0pvQzFCQYInxOIohOoVx_ACLDSvSxAn1cM4ihoUzysoRQmoAYnAD5-HwUaAm80KPFveBsoUyJ_DEHg438aFQDs3BjP8D5VNipIuSSVwigAYU4x8s1sICtJ1U1NO02AdzUoA) I assume _Iceland.svg_ is WGS 84 (turns out it's close, but not 100%).在我的演示中,我假设Iceland.svg是 WGS 84(事实证明它很接近,但不是 100%)。 The only, but difficult, task is to find the lat/lng coordinates of the **SVG bounding box** - lower left and upper right corner points.唯一但困难的任务是找到 SVG 边界框的纬度/液度坐标 - 左下角和右上角点。 Then convert all points' coordinates from (lat,lng) to (x,y) and display them.然后将所有点的坐标从 (lat,lng) 转换为 (x,y) 并显示它们。 ![image](https://private-user-images.githubusercontent.com /13038071/313376947-3b81222f-754b-4de7-9ccd-4e45bec3ee94.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTMyMzcxOTEsIm5iZiI6MTcxMzIzNjg5MSwicGF0aCI6Ii8xMzAzODA3MS8zMTMzNzY5NDctM2I4MTIyMmYtNzU0Yi00ZGU3LTljY2QtNGU0NWJlYzNlZTk0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDE2VDAzMDgxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE3MmFlZDlmMDMyYjlmYzY4ZmJjMzBiZTM2NGFkNDY3ZmM2YmExYjY5NzVlODU1MDg3NTU4NjQxOTQ5MGVlZWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.j_t8MWr9SF_aLn-VQUBGeNWfqjN6qSDP9h_Kmhry0P8) I want to know how to convert longitude and latitude into x, y of SVG; Looking forward to your reply -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org