coordinate-systems

Hexagonal Grid Coordinates To Pixel Coordinates

这一生的挚爱 提交于 2019-12-02 13:54:28
I am working with a hexagonal grid. I have chosen to use this coordinate system because it is quite elegant. This question talks about generating the coordinates themselves, and is quite useful. My issue now is in converting these coordinates to and from actual pixel coordinates. I am looking for a simple way to find the center of a hexagon with coordinates x,y,z. Assume (0,0) in pixel coordinates is at (0,0,0) in hex coords, and that each hexagon has an edge of length s. It seems to me like x,y, and z should each move my coordinate a certain distance along an axis, but they are interrelated

SpriteKit Coordinates differ between iPad and iPhone

馋奶兔 提交于 2019-12-02 09:20:15
I have a very simple SpriteKit scene that is not behaving like I would expect. It is a universal app and the code that I am using to draw a single red square in the scene is as follows: let redSquare = SKSpriteNode(color: UIColor .redColor(), size: CGSizeMake(100.0, 100.0)) redSquare.anchorPoint = CGPointMake(0.0, 0.0) redSquare.position = CGPointMake(1.0, 1.0) addChild(redSquare) This code is in the GameScene didMoveToView method of the default app that xCode creates for you when you select SpriteKit game. When run on the iPad it behaves as expected drawing the red square 1 point off the

Convert a bounding box in ECEF coordinates to ENU coordinates

耗尽温柔 提交于 2019-12-02 07:25:43
问题 I have a geometry with its vertices in cartesian coordinates. These cartesian coordinates are the ECEF(Earth centred earth fixed) coordinates. This geometry is actually present on an ellipsoidal model of the earth using wgs84 corrdinates.The cartesian coordinates were actually obtained by converting the set of latitudes and longitudes along which the geomtries lie but i no longer have access to them. What i have is an axis aligned bounding box with xmax, ymax, zmax and xmin,ymin,zmin obtained

Convert a bounding box in ECEF coordinates to ENU coordinates

霸气de小男生 提交于 2019-12-02 07:14:38
I have a geometry with its vertices in cartesian coordinates. These cartesian coordinates are the ECEF(Earth centred earth fixed) coordinates. This geometry is actually present on an ellipsoidal model of the earth using wgs84 corrdinates.The cartesian coordinates were actually obtained by converting the set of latitudes and longitudes along which the geomtries lie but i no longer have access to them. What i have is an axis aligned bounding box with xmax, ymax, zmax and xmin,ymin,zmin obtained by parsing the cartesian coordinates (There is no obviously no cartesian point of the geometry at xmax

How do I convert ECI coordinates to longitude latitude and altitude to display on a Map?

怎甘沉沦 提交于 2019-12-01 14:50:49
问题 I would like to be more specific about what I want to do. I get coordinates in ECI and I need to get the latitude and longitude from this. How can I do? I was searching but I could'nt find anything about it. Thanks again. (I'm doing a small program in java that shows the position of a satellite in a given time. So, I used the NORAD SGP algorithm, and I have the position (x,y,z) and velocity(Vx,Vy,Vz). But the coordinates system used by this algorithm is the ECI, according what I read. Now I

How do I convert these coordinates to google map readable coordinates?

风格不统一 提交于 2019-12-01 09:52:05
Hi guys I need to convert coordinates in the following form: N42-53.9° W072-16.2° INto something thats kinda like the following: -90.7311 0.346944 A php function would be greatly appreciated - or just a formula would also be nice enough :) I found an online JS calculator and a PHP solution : <?php function DMStoDEC($deg,$min,$sec) { // Converts DMS ( Degrees / minutes / seconds ) // to decimal format longitude / latitude return $deg+((($min*60)+($sec))/3600); } function DECtoDMS($dec) { // Converts decimal longitude / latitude to DMS // ( Degrees / minutes / seconds ) // This is the piece of

XY Caret Coordinates inside a contenteditable div

纵饮孤独 提交于 2019-12-01 06:39:08
问题 I am looking for a way to get the caret x y coordinates inside a contenteditable div, in a similar manner to how you can get the mouse coordinates using window.event since I need to open a pop-up exactly where the user is with the caret inside the contenteditable div. How can I do this? Many thanks! 回答1: Here's one approach: Coordinates of selected text in browser page However, in some circumstances this will not give you coordinates, in which case you'd need to fall back to inserting an

How do I convert these coordinates to google map readable coordinates?

安稳与你 提交于 2019-12-01 06:33:35
问题 Hi guys I need to convert coordinates in the following form: N42-53.9° W072-16.2° INto something thats kinda like the following: -90.7311 0.346944 A php function would be greatly appreciated - or just a formula would also be nice enough :) 回答1: I found an online JS calculator and a PHP solution: <?php function DMStoDEC($deg,$min,$sec) { // Converts DMS ( Degrees / minutes / seconds ) // to decimal format longitude / latitude return $deg+((($min*60)+($sec))/3600); } function DECtoDMS($dec) { /

Matplotlib imshow offset to match axis?

梦想的初衷 提交于 2019-11-30 17:25:49
I'm plotting a bunch of UTM coordinates using a matplotlib.pyplot.scatter. I also have a background air photo that I know matches the extent of the figure exactly. When I plot my data and set the axis I can display the scatter correctly. If I plot the air photo using imshow it uses the pixel number as the axis location. I need to shift the image (numpy array) to it's correct UTM position. Any ideas? I'm fairly new to matplotlib and numpy. For example: I know that the top left corner of the image (imshow coordinate: 0,0) has the UTM coordinate (269658.4, 538318.2). How do I tell imshow the same

Matplotlib imshow offset to match axis?

孤街醉人 提交于 2019-11-30 16:40:15
问题 I'm plotting a bunch of UTM coordinates using a matplotlib.pyplot.scatter. I also have a background air photo that I know matches the extent of the figure exactly. When I plot my data and set the axis I can display the scatter correctly. If I plot the air photo using imshow it uses the pixel number as the axis location. I need to shift the image (numpy array) to it's correct UTM position. Any ideas? I'm fairly new to matplotlib and numpy. For example: I know that the top left corner of the