Questions tagged [coordinate-systems]

Coordinate systems use one or more numbers, or coordinates, to uniquely determine the position of a point or geometry in space.

Coordinate systems use one or more numbers, or coordinates, to uniquely determine the position of a point or geometry in space.

Latitude and longitude is part of a common coordinate system to refer to points relative to the Earth's surface. Global Positioning System (GPS) uses a coordinate system with latitude and longitude for navigation and locating objects on or near the Earth.

A Cartesian coordinate system uses X-Y-Z values to represent points in a 3-D space.

928 questions
171
votes
3 answers

How do android screen coordinates work?

I am working with Android Animation and I have found the Android coordinate system to be quite confusing so I am here to ask this question about how coordinates work in Android. I am following this image for moving one view to another but it seems…
Yasir Khan
  • 2,413
  • 4
  • 20
  • 26
86
votes
9 answers

flip svg coordinate system

Is there a way to flip the SVG coordinate system so that [0,0] is in the lower left instead of the upper left?
Nippysaurus
  • 20,110
  • 21
  • 77
  • 129
85
votes
11 answers

Python conversion between coordinates

Are there functions for conversion between different coordinate systems? For example, Matlab has [rho,phi] = cart2pol(x,y) for conversion from cartesian to polar coordinates. Seems like it should be in numpy or scipy.
cpc333
  • 1,493
  • 1
  • 11
  • 10
66
votes
8 answers

Are the x,y and row, col attributes of a two-dimensional array backwards?

If I think of the x,y coordinate plane, x,y is the common notation for an ordered pair, but if I use a two-dime array I have myArray[row][col] and row is the y and col is the x. Is that backwards or am I just thinking about it wrong? I was…
johnny
  • 19,272
  • 52
  • 157
  • 259
62
votes
4 answers

Check if geo-point is inside or outside of polygon

I am using python and I have defined the latitudes and longitudes (in degrees) of a polygon on the map. My goal is to check if a generic point P of coordinates x,y falls within such polygon. I would like therefore to have a function that allows me…
Federico Gentile
  • 5,650
  • 10
  • 47
  • 102
59
votes
6 answers

Changing the Coordinate System in LibGDX (Java)

LibGDX has a coordinate system where (0,0) is at the bottom-left. (like this image: https://i.stack.imgur.com/jVrJ0.png) This has me beating my head against a wall, mainly because I'm porting a game I had already made with the usual coordinate…
Sosavpm
  • 693
  • 1
  • 5
  • 6
53
votes
1 answer

Hexagonal Grid Coordinates To Pixel Coordinates

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…
captncraig
  • 22,118
  • 17
  • 108
  • 151
39
votes
11 answers

Free tool for watching coordinates in PDF

Is there any tool in some PDF Viewer/Editor like Acrobat, Evince, etc. where I can navigate and watch coordinates(i.e. (x,y)) of any selected point in PDF-document?
Michael Z
  • 3,883
  • 10
  • 43
  • 57
35
votes
4 answers

Convert a UIView origin point to its Window coordinate system

I want to get the origin of scrollView in the window coordinate system. For Example, presently, scollView origin is (0,51). But in window coordinate system it should be 51 + 44(navigation bar height)+20(status bar height) = 115. Means in window…
Nishit
  • 591
  • 1
  • 6
  • 17
33
votes
2 answers

Difference between layerX and offsetX in JavaScript

There are different co-ordinate system for JavaScript, such as e.clientX, e.screenX. I understand those two well, but there are some like e.layerX and e.offsetX. These two are not very clear to me. Can someone explain those two co-ordinates for me?
AL-zami
  • 8,902
  • 15
  • 71
  • 130
33
votes
1 answer

R - plot human body in 2d

I was wondering if there is a package to plot a 2D representation of the outline of a human body? Being in 2D, plotting either the front/back/side at any one time would presumably be the easiest way to accomplish this. The output would be something…
thelatemail
  • 91,185
  • 12
  • 128
  • 188
31
votes
5 answers

Generating triangular/hexagonal coordinates (xyz)

I'm trying to come up with an iterative function that generates xyz coordinates for a hexagonal grid. With a starting hex position (say 0,0,0 for simplicity), I want to calculate the coordinates for each successive "ring" of hexagons, as illustrated…
John Schulze
  • 2,198
  • 3
  • 20
  • 22
30
votes
4 answers

Acceleration from device's coordinate system into absolute coordinate system

From my Android device I can read an array of linear acceleration values (in the device's coordinate system) and an array of absolute orientation values (in Earth's coordinate system). What I need is to obtain the linear acceleration values in the…
26
votes
5 answers

Algorithm for finding nearest object on 2D grid

Say you have a 2D grid with each spot on the grid having x number of objects (with x >=0). I am having trouble thinking of a clean algorithm so that when a user specifies a coordinate, the algorithm finds the closest coordinate (including the one…
random
  • 353
  • 1
  • 3
  • 5
26
votes
3 answers

Convert Axis ⇔ Data coordinates systems

My question is quite simple : in matplotlib, how can I easily convert coordinates in Axis system to/from Data system (Ideally I'm looking for a simple function output_coords = magic_func(input_coords) ) Actually my exact problem is : I'd like to…
Covich
  • 2,544
  • 4
  • 26
  • 37
1
2 3
61 62