| | |
| | | import org.osgeo.proj4j.ProjCoordinate; |
| | | |
| | | public class ProjectionToGeographicUtil { |
| | | |
| | | public static JSONArray getPointAndHight(Double x,Double y) { |
| | | // 创建 CRSFactory 对象 |
| | | JSONArray vertice = new JSONArray(); |
| | | vertice.add(x); |
| | | vertice.add(y); |
| | | vertice.add(0.0); |
| | | return vertice; |
| | | } |
| | | public static JSONArray getPoint(Double x,Double y) { |
| | | // 创建 CRSFactory 对象 |
| | | CRSFactory crsFactory = new CRSFactory(); |
| | |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(getPoint(469257.26224087493,4416938.9521611305)); |
| | | System.out.println(getPoint(116.64058,39.88605)); |
| | | } |
| | | } |