java点到直线的投影点到经纬度_将纬度/经度点转换为墨卡托投影上的像素(x,y)...

你不能仅仅将经度/纬度转换为x / y,因为世界并不平坦。你看看这篇文章了吗?

我决定给它一个刺,这是我怎么做的: -public class MapService {

// CHANGE THIS: the output path of the image to be created

private static final String IMAGE_FILE_PATH = "/some/user/path/map.png";

// CHANGE THIS: image width in pixel

private static final int IMAGE_WIDTH_IN_PX = 300;

// CHANGE THIS: image height in pixel

private static final int IMAGE_HEIGHT_IN_PX = 500;

// CHANGE THIS: minimum padding in pixel

private static final int MINIMUM_IMAGE_PADDING_IN_PX = 50;

// formula for quarter PI

private final static double QUARTERPI = Math.PI / 4.0;

// some service that provides the county boundaries data in longitude and latitude

private CountyService countyService;

public void run() throws Exception {

// configuring the buffered

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值