我正在使用可以在此处找到的 Proj.4 java 库 而且我非常不确定如何在 Proj.4JS 中实现如下所示的代码:
// include the library
<script src="lib/proj4js-combined.js"></script> //adjust the path for your server
//or else use the compressed version
// creating source and destination Proj4js objects
// once initialized, these may be re-used as often as needed
var source = new Proj4js.Proj('EPSG:4326'); //source coordinates will be in Longitude/Latitude, WGS84
var dest = new Proj4js.Proj('EPSG:4141'); //destination coordinates in meters, global spherical mercators projection, see http://spatialreference.org/ref/epsg/3785/
// transforming point coordinates
var p = new Proj4js.Point(-76.0,45.0); //any object will do as long as it has 'x' and 'y' properties
Proj4js.transform(source, dest, p); //do the transformation. x and y are modified in place
//p.x and p.y are now EPSG:3785 in meters
我是整个投影主题的新手,我真的很想知道我在做什么。我需要将我的坐标系从 WGS84 转换为 EPSG:4141 但 Proj.4 Java 库根本没有记录,我真的不知道如何使用它。
有人熟悉这个吗?