coordinates

How to convert MGRS to decimal degrees

谁都会走 提交于 2019-12-09 07:43:32
I am making an iPhone application. I want my app to Convert MGRS co-ordinates to Decimal Degrees. How to do this Programatically ? I searched and founded : Determine the grid coordinates of a point on a military map . Here, they have given the manual process of how to determine the six-digit grid coordinates for the point on the map with a 100meter tolerance. You can go through that process and can create your Objective-C code for that. Take a look at this C++ Class : GeoCoords.cpp . Another thing I founded is : GDGeoCocoa . It is the Collection of Classes to convert co-ordinates. You can

Coordinate compression

烈酒焚心 提交于 2019-12-09 06:22:24
问题 Problem: You have an N x N grid (1 <= N <= 10^9). Each square can either be traversed or is blocked. There are M (1 <= M <= 100) obstacles in the grid, each one shaped like a 1xK or Kx1 strip of grid squares. Each obstacle is specified by two endpoints (A_i, B_i) and (C_i, D_i), where A_i=C_i or B_i=D_i. You are also given a start square (X,Y). The question is: how many squares are reachable from the start square if you can go left, right, up, and down, and you cannot traverse obstacles? I

Draw Bitmap in Custom ImageView and get the Co-ordinates of the ImageView irrespective of the device

拈花ヽ惹草 提交于 2019-12-09 06:21:53
问题 I want to get the co-ordinates of the ImageView , Irrespective of device size. Is there any possible way !! I have tried to create specific size for the ImageView ,Even specific size for the Parent View also ,but its not working. I have tried the following possible ways. int[] posXY = new int[2]; imageview.getLocationOnScreen(posXY); int MoveX = posXY[0]; int MoveY = posXY[1]; I have tried with Matrix too ,But not working. Matrix m = imageview.getImageMatrix(); Tried the below code, but it is

How to determine if a GPS coordinate lies within a rectangular area?

℡╲_俬逩灬. 提交于 2019-12-09 04:57:07
问题 I went through many similar questions on Stackoverflow and other websites and I based my solution on those answers but I still can't get it to work… My problem: I want to determine whether or not a certain GPS location P lies within a rectangular area bounded by four given GPS coordinates A , B , C , D . At the moment I am calculating the areas of triangles ABP , BCP , CDP and DAP . If any of those areas is bigger than zero (don't be upset, mathematicians) the point lies outside my rectangle

CLLocationManager didUpdateLocations not being called

半城伤御伤魂 提交于 2019-12-09 03:24:51
问题 I am in the process of learning iOS 8 app development with Swift. I have followed a tutorial on Treehouse that walks you through building a weather app in Swift and iOS 8. As an improvement to the app, the author/tutor suggests using CLLocationManager to get the location of the device to feed into the weather API instead of the hard coded latitude and longitude values. So having read various tutorial online, I have gone ahead and attempted to implement this suggested improvement. I have

Translating between cartesian and screen coordinates

谁说胖子不能爱 提交于 2019-12-08 23:05:10
问题 For my game I need functions to translate between two coordinate systems. Well it's mainly math question but what I need is the C++ code to do it and a bit of explanation how to solve my issue. Screen coordiantes: a) top left corner is 0,0 b) no minus values c) right += x (the more is x value, the more on the right is point) d) bottom +=y Cartesian 2D coordinates: a) middle point is (0, 0) b) minus values do exist c) right += x d) bottom -= y (the less is y, the more at the bottom is point) I

is canvas in android proportional on different devices

末鹿安然 提交于 2019-12-08 22:33:51
问题 I am trying to make an app using canvas and a surfaceview, and I am worrying that in the future I would have many problems with it because I am not sure if the canvas is proportional with every device. currently I can only use my emulator since my phone's usb cable doesn't work(I know.. I have to get a new one..). anyways, i would like to know if the canvas would transfer my coordinates and make everything proportional, what I mean by that is that if i have something in point a, lets say (10,

Saving coordinates and data from Google maps in a database

蓝咒 提交于 2019-12-08 18:44:26
I am making a map project where when I choose an area (with google maps drawing tools) an info window pops up and I can write a Name and a Description and then save these and its coordinates. I am using a POST form and to this moment I am able to save in my DB the Name and Description but I cant find a way to save the coordinates. I have already tried with no success to pass it through POST or put some PHP in my JS. Here is my js code for the rectangle drawing tool: google.maps.event.addListener(drawingManager, 'rectanglecomplete', function(rectangle) { var ne = rectangle.getBounds()

Can a Robot reach a Point (x, y)?

那年仲夏 提交于 2019-12-08 15:53:27
问题 I came across this question in one of the Job Interviews & i am unable to find the correct alogorithm of the solution so, i am posting this question here: There is a robot who can move on a co-ordinate plane in eithr of the 2 ways: Given that the robots current position is (x,y), The robot can move equal to the sum of x & y in either if the directon like so: (x,y) -> (x+y, y) (x,y) -> (x, x+y) Now given a initial Point (x1, y1) and an destination point (x2, y2) you need to write a programme