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

array_filter converting an indexed array to an associative array

I have an indexed array that holds a few associative arrays and I apply a simple $my_arr = array_filter($my_arr, function($obj) { return $obj["value"] < 100; }); function to filter some of the items in the array. This started to make my…
alexandernst
  • 14,352
  • 22
  • 97
  • 197
7
votes
1 answer

Hibernate criteria query using Max() projection on key field and group by foreign primary key

I'm having difficulty representing this query (which works on the database directly) as a criteria query in Hibernate (version 3.2.5): SELECT s.* FROM ftp_status s WHERE (s.datetime,s.connectionid) IN (SELECT MAX(f.datetime), …
Tom S
  • 310
  • 2
  • 4
  • 12
7
votes
1 answer

Howto project a planar polygon on a plane in 3d-space

I want to project my Polygon along a vector to a plane in 3d Space. I would preferably use a single transformation matrix to do this, but I don't know how to build a matrix of this kind. Given the plane's parameters (ax+by+cz+d), the world…
sum1stolemyname
  • 4,506
  • 3
  • 26
  • 44
7
votes
1 answer

set map center in leaflet with 3857 lat/lon

I'm trying to set map center with lat/lon of 3857 projection in leaflet. By using lat/lon of projection 4326 its working fine. var map = L.map('map', { crs: L.CRS.EPSG3857 }).setView([51.40457186188496, -2.3741738081973844], 13); But it…
ARsl
  • 536
  • 5
  • 15
7
votes
3 answers

How can I determine if a point is hidden on a projection?

I'm working of a fairly simple world globe interface using D3 and the D3.geo.projection to create a spinning globe with data points on it. Everything worked fine (i.e. the points "eclipsed" when they rotated away behind the horizon) when I was just…
Craig Soich
  • 145
  • 10
7
votes
1 answer

Projections in NHibernate

suppose in an entity there are attributes id, username, age, address. Now I just want id and username and I use this code for it. Projections enable the returning of something other than a list of entities from a query. var proj =…
Rishabh Ohri
  • 1,280
  • 4
  • 16
  • 28
7
votes
2 answers

ggplot of Dymaxion/Airocean (icosahedral) map projection

I think R. Buckminster Fuller's Dymaxion map is one of the most beautiful map projections ever devised: I was playing with the neat projections in mapproj, which works great with ggplot, but it doesn't look like there are any projections for this.…
bright-star
  • 6,016
  • 6
  • 42
  • 81
7
votes
1 answer

How to query mongodb with a regex in the projection?

Does anyone know if there is a way to query MongoDB and have only certain fields returned by using a regex as part of the projection? For example: Given a collection having arbitrary field names, how might I query the collection and only return…
BrentR
  • 878
  • 6
  • 20
7
votes
2 answers

Analysis of a 3D point cloud by projection in a 2D surface

I have a 3D point cloud (XYZ) where the Z can be position or energy. I want to project them on a 2D surface in a n-by-m grid (in my problem n = m) in a manner that each grid cell has a value of the maximum difference of Z, in case of Z being…
user2969863
  • 75
  • 1
  • 5
7
votes
2 answers

Convert lat/lon to pixel coordinate?

I'm trying to convert a lat/lon pair to a pixel coordinate. I have found this mercator projection but I don't understand the code. What is the factor,x_adj, y_adj variable? When I run the code without those constants my lat/lon pair is not on my map…
Micromega
  • 12,486
  • 7
  • 35
  • 72
7
votes
4 answers

PROJECTION in vertica database

Could someone explain me the concept of PROJECTION in vertica database with an example query?
Murali
  • 811
  • 2
  • 7
  • 12
6
votes
1 answer

How to project a spherical map onto a sphere / cube: "Equirectangular to cubic"

UPDATE: I found that, http://os.ivrpa.org/panosalado/wiki , has an implementation in java. Anyone who has something similar in c or c++? I have this panorama, an spherical map from google streetview, and want to map this on a sphere/cube. Below are…
Poul K. Sørensen
  • 16,950
  • 21
  • 126
  • 283
6
votes
1 answer

Image correction for projection on surface with OpenCV

What is the best way in OpenCV to apply correction on an image projected to a 3D surface like in my examples or shown in Projection on 3D surface? My first tests with OpenCV checkerboard corner detection didn't looked very promising. If the camera…
bkausbk
  • 2,740
  • 1
  • 36
  • 52
6
votes
2 answers

Clip matrix for 3D Perspective Projection

I am trying to create a simple 3D graphics engine and have found and used the equations I found here: http://en.wikipedia.org/wiki/3D_projection#cite_note-0. (I have calculations for Dx, Dy, Dz and Bx, By) I works, but when I rotate the camera…
mclaassen
  • 5,018
  • 4
  • 30
  • 52
6
votes
0 answers

How to change interactively center of a cartopy projection?

Is there a way to improve the rendering of this interactive matplotlib/cartopy script ? Please install first ipympl https://github.com/matplotlib/ipympl I haven't found how to change the central longitude and latitude without instantiate a new…
PBrockmann
  • 303
  • 5
  • 16