Android 如何将坐标转换为lac/cid
我们都知道如何使用google gears将lac/cid转换为纬度/经度,如下所示:Android 如何将坐标转换为lac/cid,android,geolocation,geocoding,Android,Geolocation,Geocoding,我们都知道如何使用google gears将lac/cid转换为纬度/经度,如下所示: public Location callGear(ArrayList<CellIDInfo> cellID) { JSONObject data,current_data; JSONArray array = new JSONArray(); current_data = new JSONObject(); current_data.put(\"cell_id\", cellID.get(0).
public Location callGear(ArrayList<CellIDInfo> cellID) {
JSONObject data,current_data;
JSONArray array = new JSONArray();
current_data = new JSONObject();
current_data.put(\"cell_id\", cellID.get(0).cellId);
current_data.put(\"location_area_code\", cellID.get(0).locationAreaCode);
// do something...
Location loc = new Location(LocationManager.NETWORK_PROVIDER);
loc.setLatitude((Double) data.get(\"latitude\"));
loc.setLongitude((Double) data.get(\"longitude\"));
return loc;
public Location callGear(ArrayList cellID){
JSONObject数据,当前_数据;
JSONArray数组=新的JSONArray();
当前_数据=新的JSONObject();
当前\u数据.put(\'cell\u id\,cellID.get(0.cellID));
当前\u数据.put(\“位置\u区域\u代码\”,cellID.get(0.locationAreaCode));
//做点什么。。。
位置loc=新位置(LocationManager.NETWORK_PROVIDER);
loc.setLatitude((双)数据.get(\“latitude\”);
loc.setLongitude((双精度)data.get(\“longitude\”);
返回loc;
}
但是,是否可以进行反向转换?
从有效坐标获取lac/cid?
有什么建议吗?我认为实现这一点没有简单的方法。一个给定的位置可以由多个小区提供服务,移动设备选择的小区取决于许多因素(例如,信号强度)
唯一可以确定哪个单元格服务于给定位置的情况是,您确定有一个且只有一个单元格覆盖该位置。检查答案。这可能会有帮助。似乎您的链接与我的问题不同。我的问题是:给定一个有效的坐标(纬度和经度),输出相应的lac/cid。而且,可以使用任何方法,不限于android。。。