latitude-longitude

Converting latitude/longitude to Alberta 10 TM Projection

可紊 提交于 2019-12-12 07:16:27
问题 I need to convert latitude/longitude coordinates into Easting/Northing coordinates in the Alberta 10 TM Projection. The 10 TM projection is similar to UTM, but it is a custom projection for the province of Alberta, Canada. I think (with some effort) I could code it myself but would rather not reinvent the wheel if it's been done already. 回答1: Grab PROJ.4 Cartographic Projections library - open source library. Suggested parameters for 10TM: +proj=tmerc +lon_0=-115 +k_0=0.9992 +x_0=500000

Move markers by a specific distance in meters from where they are

…衆ロ難τιáo~ 提交于 2019-12-12 05:14:36
问题 I have a collection of items and some of them may have the same coordinates. As a result they are displayed as 1 marker in Google Maps since the markers are painted one on top of each other. To address this I tried to "move" those markers by a few meters so that the markers do not collide. I would like to move them to a 5 meters from where their location is. I did the following following another SO answer: double newLat = item.getLatitude() + (Math.random() - .005) / 15000; double newLon =

PHP - get data from database compare it to variable and sort by less value

允我心安 提交于 2019-12-12 04:37:36
问题 Script should: Take latitude and logitude from database of each cinema with while() Compare to location of a user Get the output in kilometers Show all of them based on less kilometers Everything is solved on the script down below, only number 4 is not implemented. I have no idea how to compare every item of while() loop and show everything in the ascending order. <?php $sql = "SELECT DISTINCT * FROM cinemas WHERE city='$city'"; $result = $conn->query($sql); if ($result->num_rows > 0) { //

Get TimeZone by lat and long in android?

风流意气都作罢 提交于 2019-12-12 04:35:52
问题 I need Time Zone by lat,long ,for that I have found this post helpful Get Time Zone From Lat Long. As described in this link if I use Google Api then its response is { "dstOffset" : 3600, "rawOffset" : -18000, "status" : "OK", "timeZoneId" : "America/New_York", "timeZoneName" : "Eastern Daylight Time" } but my requirement is that if India`s Time Zone is 5:30 then I need it to be 5.5 or if Any country time zone is 7:0 then 7.0. My question is how I get timezone from lat long also in custom

Unable to build a bicycle route in Google maps

一个人想着一个人 提交于 2019-12-12 04:25:51
问题 i am wonder ! when i using origin1 and destinationA not working status = "ZERO_RESULTS"; but if used origin2 and destinationB it is working perfectly do i missed anything var origin = "55.930385, -3.118425" var destination = "50.087692, 14.421150" override func viewDidLoad() { super.viewDidLoad() durationDestance(origin: origin, destination: destination, mode:"bicycling") } func durationDestance(origin: String, destination: String, mode:String) { var urlString : String = "https://maps

GetDistance Javascript not returning nothing whilst having some values for as parameters

二次信任 提交于 2019-12-12 04:07:00
问题 I am trying to get a result from this function. However, nothing is being returned onto my page, just "This example calls a function which performs a calculation, and returns the result:". I need this function to get every postcode in the database from the properties tables and find the distance. Also, one postcode is set always going to be the same so I need to set that and the other postcode is going to be a postcode from the properties table. <?php include ("../connect.php"); ?> <!doctype

get latitude and longitude from image camera Android

不羁的心 提交于 2019-12-12 03:45:19
问题 I need to pick up the longitude and latitude of an image taken by the camera. @Override public void onClick(View v) { Intent i= new Intent("android.media.action.IMAGE_CAPTURE"); startActivityForResult(i,TAKE_PHOTO); } @Override protected void onActivityResult(int requestCode, int resultCode,Intent data){ super.onActivityResult(requestCode,resultCode,data); switch(requestCode){ case TAKE_PHOTO: Bitmap imagen =(Bitmap) data.getExtras().get("data"); Uri seleccion = (Uri) data.getExtras().get(

How to extend polygon by a certain distance in PHP/Mysql?

℡╲_俬逩灬. 提交于 2019-12-12 03:30:02
问题 I have a location defined by a polygon (e.g.(-8.87 41.86,-8.74 41.98,-8.63 42.06,-8.16 42.13 ...) ) and want to search for places from db within the polygon extended by a distance. Google maps algorithm: http://www.geocodezip.com/v3_map-markers_ConvexHull_extend.asp Any idea how to get extended polygon in PHP/MySQL in order to search for records from MySQL? I use ST_CONTAINS mysql function to search for records within an exact polygon. 来源: https://stackoverflow.com/questions/35848073/how-to

LatLng and distance between returning incorrect values on newer phones

佐手、 提交于 2019-12-12 02:06:42
问题 My app works great on my old HTC One M7 in terms of calculating distance. However, on my wife's HTC One M8 and on my new Sony Xperia Z3, the distance it calculates is off. It's telling me that I've gone further than I really have. I've noticed this more when I'm hiking or running. If I'm skiing, it seems to be more accurate. I'm guessing that speed has something to do with it (if I'm going faster, the calculations are more accurate). I'm calling a method to update my total distance on every

Convert Long Lat wrong location when displaying

余生长醉 提交于 2019-12-12 01:48:06
问题 I have a long lat I don't know if it is in decimal or in degrees format. So I would like to ask if what in my two computation is correct or if it both wrong. I tried both computation and shows both wrong location so I guess that there's something I'm missing. Here's the raw long lat which I can't figure out if it is in degrees or decimal. LAT = 1430.4903N LONG = 12059.8999E My first computation would be like LAT = 1430.4903 / 100 = 14.304903 LONG = 12059.8999 /100 = 120.598999 while my