Questions tagged [projection]

A projection is the transformation of a set of data from one form into another.

Mathematically speaking a projection is a function that yields the same result if applied multiple times.

The term is used with this meaning in graphics when 'projecting' a 3D scene on a 2D canvas.

The same is often happening when analyzing data with many dimensions (age, gender, number of transactions, ...) and projecting it on fewer dimensions, in the simple case by just dropping dimensions or by creating new dimensions like (might commit fraud).

When dealing with typed languages the dimensions might be attributes of a class. So if I have one or multiple types with attributes (A, B, C, ...) and create from instances of those types instances of a type which has only the attributes (A, B) this is a projection too.

Another example are databases. A projection is an operation which discards some attributes of a tuple, in other words, which omits some columns of a relational database query result. For an object or document database a projection filters out some fields.

After all a database projection yields the same result if applied multiple times, too.

2017 questions
17
votes
2 answers

Projection of a point to a line segment Python Shapely

I have a LineString defined by two points, so essentially a straight line segment, and I wanted to project a point on to it. I am aware of .project and .interpolate. However when the point is "outside" the segment, I don't want the closest point on…
sofaruntitled
  • 275
  • 1
  • 2
  • 6
16
votes
5 answers

Perspective Projection: determine the 2D screen coordinates (x,y) of points in 3D space (x,y,z)

I wish to determine the 2D screen coordinates (x,y) of points in 3D space (x,y,z). The points I wish to project are real-world points represented by GPS coordinates and elevation above sea level. For example: Point (Lat:49.291882, Long:-123.131676,…
Jason
16
votes
4 answers

3d to 2d Projection Matrix

I have 3 points in a 3D space of which I know the exact locations. Suppose they are: (x0,y0,z0), (x1,y1,z1) and (x2,y2,z2). Also I have a camera that is looking at these 3 points and I know the 2D locations of those three points on camera view…
ehsan baghaki
16
votes
1 answer

Periodic Axes class in matplotlib?

I have a collection of latitude/longitude points that straddle the longitude=0 line. I'd like to plot these using a matplotlib Axes class that "wraps" the horizontal dimension such that, when looking towards l=360, points at l=1 are plotted at the…
ChrisB
  • 4,628
  • 7
  • 29
  • 41
15
votes
3 answers

How to apply a transformation matrix?

I am trying to get the 2D screen coordinates of a point in 3D space, i.e. I know the location of the camera its pan, tilt and roll and I have the 3D x,y,z coordinates of a point I wish to project. I am having difficulty understanding…
Mylo
15
votes
3 answers

SQL DateDifference in a where clause

I m doing a query as follows: SELECT * FROM a WHERE DATEDIFF(D, a.DateValue, DateTimeNow) < 3; and not working I m trying to get the data that s not older than 3 days. SQL server. How to do this? DATEDIFF works too slow..
DarthVader
  • 52,984
  • 76
  • 209
  • 300
15
votes
2 answers

How to convert spherical coordinates to equirectangular projection coordinates?

Simplified question How do you convert a spherical coordinate (θ, φ) into a position (x, y) on an equirectangular projection (also called 'geographic projection')? In which: x is longitude, the horizontal position, from -180 to 180 degrees. y is…
Yeti
  • 2,647
  • 2
  • 33
  • 37
15
votes
1 answer

finding the real world coordinates of an image point

I am searching lots of resources on internet for many days but i couldnt solve the problem. I have a project in which i am supposed to detect the position of a circular object on a plane. Since on a plane, all i need is x and y position (not z) For…
14
votes
1 answer

Changing the Projection of Shapefile

I am trying to change or assign the projection of a Germany-Shapefile from NA to +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0, but somehow it doesn't work well. Reproducible Example: Shapefile and other files can be downloaded…
And_R
  • 1,647
  • 3
  • 18
  • 32
14
votes
1 answer

How to return deep nested projections in Spring data rest?

Given this 3 entities: @Entity class Department{ Set employees; Set getEmployees(){ return this.employees; }; } @Entity class Employee{ Nationality nationality; Nationality getNationality(){ …
Songo
  • 5,618
  • 8
  • 58
  • 96
14
votes
3 answers

Why does sign matter in opengl projection matrix

I'm working on a computer vision problem which requires rendering a 3d model using a calibrated camera. I'm writing a function that breaks the calibrated camera matrix into a modelview matrix and a projection matrix, but I've run into an…
Kyle Simek
  • 9,576
  • 4
  • 26
  • 32
14
votes
2 answers

3D Ray Picking use Mouse Coordinates when Mouse isn't locked

So basically I've made a program using OpenGL which can perform 3D Ray Picking. If the Camera View Direction Ray touches/intersects anything (which isn't air) then a little purple box will get rendered at the intersection point/points. If the ray…
vallentin
  • 23,478
  • 6
  • 59
  • 81
13
votes
1 answer

Projection of a plane onto a cylinder

I have a plain bitmap and I want to do a projection on a cylinder. That means, I want to transform the image in a way so that if I print it and wrap around a columnar cylinder and photograph it from a certain position, the resulting image looks like…
tautologe
  • 1,781
  • 2
  • 15
  • 14
13
votes
1 answer

Perspective division explanation?

According to a number sources NDC differs from clip space in that NDC is just clip space AFTER division by the W component. Primitives are clipped in clip space, which in OpenGL is -1 to 1 along X, Y, and Z axes (Edit: this is wrong, see answer). In…
Zebrafish
  • 11,682
  • 3
  • 43
  • 119
13
votes
3 answers

what is a projection in LINQ, as in .Select()

I typically do mobile app development, which doesn't always have .Select. However, I've seen this used a bit, but I don't really know what it does or how it's doing whatever it does. It is anything like from a in list select a // a.Property //…
Michael DiLeo
  • 571
  • 1
  • 4
  • 15