Java: Convert lat/lon from EPSG:4236 to EPSG: 3857
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How would I convert my lat lon to EPSG 3857 projection using geotools or another java library? I'm having trouble finding the proper methods to use. I know OpenLayers (javascript) can do it easily, but I don't see a clear path to getting these coordinates transformed. I would like to see this transformation source lon, lat: -71.017942, 42.366662 destination lon, lat: -71 1.25820, 42 22.0932 So I have created my CRS final CoordinateReferenceSystem source = CRS.decode( "EPSG:4236" ); final CoordinateReferenceSystem dest = CRS.decode("EPSG:3857