惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - 是谁啊?

jenkins 权限控制(用户只能看指定的项目) NoSQLBooster for MongoDB延长-试用期 使用openVPN组建企业局域网,连接之后无法访问互联网的问题解决 - 是谁啊? mac os socks5转http proxy M1 Mac Xcode模拟器无法运行 解决git“Unable to negotiate with 218.244.143.137 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss”的问题 macos 升级后提示 python 命令需要使用命令行开发者工具,你要现在安装该工具吗 解决 Android studio 代理 Connect to 127.0.0.1:[/127.0.0.1] failed: Connection refused nginx 代理https后,应用redirect https变成http centos6无法安装nginx Postfix maillog邮件发送各阶段延时的日志记录 How Do I test James Distributed Version with JMeter? springBoot项目不重新上传jar包,增量升级步骤 mac安装homebrew(国内) 企业微信会话存档消息解密(Java RSA PKCS1解密) 启动apache,将debug日志输出在console窗口 转:solr6.0配置中文分词器IK Analyzer git 忽略提交某个指定的文件(不从版本库中删除) git pull 和本地文件冲突问题解决
高德坐标系转wgs(苹果坐标系) java代码
是谁啊? · 2021-01-06 · via 博客园 - 是谁啊?
private static double PI = 3.14159265358979324;
public static double[] gcj02ToWgs(double lng, double lat) {
double a = 6378245.0; // a: 卫星椭球坐标投影到平面地图坐标系的投影因子。
double ee = 0.00669342162296594323; // ee: 椭球的偏心率。
double lat1 = +lat;
double lng1 = +lng;
double dlat = transformLat(lng1 - 105.0, lat1 - 35.0);
double dlng = transformLon(lng1 - 105.0, lat1 - 35.0);
double radlat = lat1 / 180.0 * PI;
double magic = Math.sin(radlat);
magic = 1 - ee * magic * magic;
double sqrtmagic = Math.sqrt(magic);
dlat = (dlat * 180.0) / ((a * (1 - ee)) / (magic * sqrtmagic) * PI);
dlng = (dlng * 180.0) / (a / sqrtmagic * Math.cos(radlat) * PI);
double mglat = lat1 + dlat;
double mglng = lng1 + dlng;
double [] latlng = new double[2];
latlng[0] = lng1 * 2 - mglng;
latlng[1] = lat1 * 2 - mglat;
return latlng;
}

public static double transformLat (double x, double y) {
double ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x));
ret += (20.0 * Math.sin(6.0 * x * PI) + 20.0 * Math.sin(2.0 * x * PI)) * 2.0 / 3.0;
ret += (20.0 * Math.sin(y * PI) + 40.0 * Math.sin(y / 3.0 * PI)) * 2.0 / 3.0;
ret += (160.0 * Math.sin(y / 12.0 * PI) + 320 * Math.sin(y * PI / 30.0)) * 2.0 / 3.0;
return ret;
}

public static double transformLon (double x, double y) {
double ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x));
ret += (20.0 * Math.sin(6.0 * x * PI) + 20.0 * Math.sin(2.0 * x * PI)) * 2.0 / 3.0;
ret += (20.0 * Math.sin(x * PI) + 40.0 * Math.sin(x / 3.0 * PI)) * 2.0 / 3.0;
ret += (150.0 * Math.sin(x / 12.0 * PI) + 300.0 * Math.sin(x / 30.0 * PI)) * 2.0 / 3.0;
return ret;
}

public static void main(String[] args){
Double lng = 116.315033;
Double lat = 39.945199;
double[] x = gcj02ToWgs(lng, lat);
System.out.println(x[0]);
System.out.println(x[1]);
}