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
6
votes
3 answers

opengl oblique projection

I want to create a oblique (cavalier) projection in OpenGL. I know this operation is not default supported and instead I need a Shear Matrix and then make an Orthogonal Projection. Can you tell me what are the OpenGl steps / functions that I have to…
Alina Danila
  • 1,683
  • 1
  • 24
  • 60
6
votes
1 answer

Android: MapView draw circle with dynamic radius (in meters)

My known data are my current location (GeoPoint) and radius in meters. I want to draw circle around my current location based on map projection and radius. My map view overlay does override draw method like @Override public void draw(Canvas canvas,…
zmeda
  • 2,909
  • 9
  • 36
  • 56
6
votes
1 answer

How to project x,y coordinates to lat/lon in netcdf file

I have downloaded the velocity field of the Greenland ice sheet from the CCI website as a NetCDF file. However, the projection is given as (see below, where x ranges between [-639750,855750] and y [-655750,-3355750]) How can I project these data to…
6
votes
2 answers

How to automatically add all fields except one when doing aggregation?

I have a mongodb collection which contains objects which have multiple properties (possibly a lot). One of this is an array of another object type, and this type has a boolean property StateChanged. I want to make a query returning all the records…
Shimrod
  • 3,115
  • 2
  • 36
  • 56
6
votes
0 answers

boilerplate free projection of case class to change data type of enum

I have an Enumeratum enum and need to load it into a spark data frame. Obviously, this fails due to a missing encoder. import enumeratum._ sealed trait Foo extends EnumEntry object Foo extends Enum[Foo] { val values = findValues case object…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
6
votes
2 answers

c# - Enum description to string with AutoMapper

I'm trying to project from my Order model to my OrderDTO model. Order has an enum. The problem is that projection doesn't work if I try to to get the Description attribute from the Enum. Here it's my code: OrderStatus.cs: public enum OrderStatus { …
Sergio
  • 317
  • 1
  • 7
  • 18
6
votes
2 answers

Unity C# Firing a projectile at a target rotating around moving axis

I'm developing a 3D spacegame where the camera is in a constant 2D (top down) state. I am able to fire a projectile of speed (s) at a target moving at a given velocity and hit it every time. Great! Okay so what if that target has an angular velocity…
Chris
  • 69
  • 4
6
votes
1 answer

How to correctly add map to raster image in R

I'm trying to plot sea surface temperature data and add a colored image of land so that data isn't confused with NAs. I've tried multiple methods to do so, but as you'll see in the images below, the maps do not line up properly relative to the…
James
  • 149
  • 1
  • 10
6
votes
2 answers

Projection Matrix for Pseudo Cylindrical Projection

Imagine having a mixed group of 3D objects contained within a sphere, and your goal is to create a cylindrical equal-area projection of the entire scene. Using OpenGL, you might think to stitch together multiple render target textures (4 to be…
Blake Regalia
  • 2,677
  • 2
  • 20
  • 29
6
votes
1 answer

Converting EPSG projection bounds to a D3.js map

Given an EPSG projection (say, this Alabama one: [http://spatialreference.org/ref/epsg/26729/][1]) How can you take the given WGS84 projection bounds in such a way that you can use them in a D3.js projection. For example, how would you know what…
Union find
  • 7,759
  • 13
  • 60
  • 111
6
votes
0 answers

Spring Data Projection not working

I want to use spring projection in my project. I am doing exactly as mentioned at this url http://docs.spring.io/spring-data/jpa/docs/current/reference/html/#projections interface NoAddresses { String getFirstName(); String getLastName(); …
user2745862
  • 103
  • 3
  • 8
6
votes
3 answers

IQueryable Lambda Projection Syntax

I have an IQueryable whose Entity Framework 4 objects I would like to project to their DTO equivalents. One such object 'Person' is an EF4 class, and the corresponding POCO PersonP is a class I've defined. I am using Automapper to map between them.…
Harper
  • 1,285
  • 3
  • 15
  • 35
6
votes
3 answers

Conditionally include a field (_id or other) in mongodb project aggregation?

I've got a mongodb aggregation pipeline with a $project stage and I'd like to include certain fields only if conditions are met. Specifically, I'd like to exclude the _id in one condition and include a second field 'second_id' in the other…
jadware
  • 165
  • 1
  • 9
6
votes
4 answers

Radius of projected Sphere

i want to refine a previous question: How do i project a sphere onto the screen? (2) gives a simple solution: approximate radius on screen[CLIP SPACE] = world radius * cot(fov / 2) / Z with: fov = field of view angle Z = z distance from camera…
fho
  • 6,787
  • 26
  • 71
6
votes
2 answers

Z Value after Perspective Divide is always less than -1

So I'm writing my own custom 3D transformation pipeline in order to gain a better understanding of how it all works. I can get everything rendering to the screen properly and I'm now about to go back and look at clipping. From my understanding, I…
Jon
  • 263
  • 4
  • 19