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
11
votes
1 answer

Error in production only - "The specified value is not an instance of type 'Edm.Int32' Parameter name: value"

I'm receiving the following error: The specified value is not an instance of type 'Edm.Int32' Parameter name: value whilst using the entity framework. I believe this to be a projection problem with enums as previously mentioned in the following…
Hercules
  • 113
  • 1
  • 5
11
votes
3 answers

Why does OpenGL have a far clipping plane, and what idioms are used to deal with this?

I've been learning OpenGL, and the one topic that continues to baffle me is the far clipping plane. While I can understand the reasoning behind the near clipping plane, and the side clipping planes (which never have any real effect because objects…
exists-forall
  • 4,148
  • 4
  • 22
  • 29
10
votes
3 answers

Perspective Projection with OpenGL

I am confused about perspective projection. Here is the scenario that is confusing me. My frustrum's front plane is basically positioned at at positive z-axis and the back plane at a negative axis and rotated about some deg along the posive…
John Cassidy
  • 103
  • 1
  • 1
  • 4
10
votes
1 answer

How to projection element in array field of MongoDb collection?

MongoDb Collection Example (Person): { "id": "12345", "schools": [ { "name": "A", "zipcode": "12345" }, { "name": "B", …
g.sui
  • 1,550
  • 3
  • 15
  • 20
10
votes
4 answers

Unexpected result when unprojecting screen coordinates in DirectX

In order to be able to determine whether the user clicked on any of my 3D objects I’m trying to turn the screen coordinates of the click into a vector which I then use to check whether any of my triangles got hit. To do so I’m using the…
ackh
  • 1,648
  • 2
  • 18
  • 36
10
votes
1 answer

Angular2: ng-content attributes passing to child component

Is something like this possible? I want to pass an "hasfocus" variable from cjc-box through ng-content attributes to the cjc-input component. app.component.html
cic-box.component.html
Christoph Janik
  • 103
  • 1
  • 4
10
votes
1 answer

Scala projections in Slick for only one column

I'm following the Slick documentation example for autoincrementing fields and I'm having trouble creating a mapped projection that ... well, only has one column. case class UserRole(id: Option[Int], role: String) object UserRoles extends…
Meredith
  • 3,928
  • 4
  • 33
  • 58
10
votes
5 answers

Projection- Transforming 3d to 2d

I have problem or well, I do not know how to transform 3d point with x,y,z values to 2d point, I have to draw projection, where I do have x,y,z values for points but I don't know how to transform them into 2d so I can move them onto my axis. I have…
user2141889
  • 2,255
  • 5
  • 23
  • 25
10
votes
1 answer

Circle clip and projection with D3 orthographic

I'm working on this and I'm having trouble with clipping the red circle elements as they appear on the globe even past the 90˚ clip angle. Also, is there a way you can apply the projection to the red circles, as in so it looks like they're on the…
Tom Stove
  • 177
  • 1
  • 7
10
votes
3 answers

transform world space normals to screen space normals

What is the proper way to transform surface normals defined in world space to normals in screen space? I don't think they can simply be multiplied by the projection matrix, because perspective division transforms things into clip space and as far as…
matthias_buehlmann
  • 4,641
  • 6
  • 34
  • 76
9
votes
3 answers

Java using filtering at different models before and after the projection

Consider the following JAVA model for hibernate: @Entity @Table public class Person { @Id @GeneratedValue(strategy = GenerationType.AUTO) public Long id; @Column public String firstName; @Column public String…
jvitor83
  • 220
  • 8
  • 20
9
votes
2 answers

Grails Criteria projections on joined table

I have an issue with grails criteria builder, I want to do a projection on a column that is on a table that is in one-to-many relation to parent table example: Car.createCriteria() { projections { property('name') …
csviri
  • 1,159
  • 3
  • 16
  • 31
9
votes
1 answer

spring jpa nested projection generating incorrect query

Lets consider these entities @Entity public class Room{ @Id private Integer id; private String number; private String floor; @ManyToOne private RoomType roomType; // Setters & Getters } @Entity public class RoomType{ @Id …
belnxkkk
  • 375
  • 1
  • 3
  • 11
9
votes
1 answer

Perspective projection - how do I project points which are behind 'camera'?

I'm writing my own software rasterizer in Java, and I ran into some trouble with it... take a look at a sample image, please: Image This sample just draw simple square grid on a plane. Everything works fine until I move camera close enough for some…
Alex
  • 923
  • 9
  • 21
9
votes
3 answers

Full object projection with additional values in LINQ

Is it possible to project every property of an object and add more, without specifically listing them all. For instance, instead of doing this: var projection = from e in context.entities select new…
CodeGrue
  • 5,865
  • 6
  • 44
  • 62