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
0
votes
0 answers

How to project a point (x,y,z) onto (x,y) in Python?

Note: q is the azimuthal angle, and j is the polar angle. Here is my code so far: from math import pi, sin, cos, sqrt, acos from pynput.mouse import Button, Controller import pyautogui import cv2 import numpy as np import sympy as sp zoom = 0.5 d =…
0
votes
1 answer

Improve aggregation query to get distinct results

I have this aggregation query that returns Operation objects with field amount:BigDecimal higher than minAmount and within a date range.I would like to get only distinct results (each Operation object has an operationId:String), based on…
user13709439
0
votes
1 answer

Problem rendering the result set columns names with interface projection method names - Fetching Multiple Columns from Multiple Tables

I need multiple columns from multiple tables data. Using Native Query: @Query(value = "select t1.name as name, t1.phone as phone, t2.address as address, t2.pincode as pincode from tablet t1, table2 t2 where t1.id=t2.tab1_id", nativeQuery =…
Durga Prasad
  • 81
  • 1
  • 9
0
votes
1 answer

Projection across multiple UTM zones in R

I have a set of GPS points in decimal degrees for 120 samples from 13 sampling sites (data below are the centroids) data.frame(x=c(122.4978, 122.1819, 113.7757, 123.0335, 113.0614, 116.8117, 113.6997, 118.8820, 116.8047, 114.0167, 115.0560,…
Sam
  • 89
  • 6
0
votes
1 answer

Trouble projecting point data from csv file in ArcMap

I'm trying to project some point data in ArcMap. I created the point data in excel, then summarised it in R and exported it as a csv. Then added it through 'add XY data' tool in ArcMap, and exported it from an events file to a shapefile. The points…
0
votes
1 answer

MongoDB - findOne with nested subdocuments and projection

I am currently using the code below in node.js to find and return data on various nesting levels from a mongo database. I'd like to add another layer of nesting (as mentioned in #3). Collection: [ { "title": "Category A", "link": "a", …
Lukas
  • 409
  • 1
  • 5
  • 15
0
votes
1 answer

Recompute 3D coordinates of points in 2D image with depth map

I'm fairly new to graphics and vision, and have some problems figuring out how to compute 3D coordinates. I am given a image and would like to recompute the original coordinates for a certain pixel. I have the depth of that pixel as well as the…
0
votes
1 answer

MongoDB assymetrical return of data, first item in array returned in full, the rest with certain properties omitted?

I'm new to MongoDB and getting to grips with its syntax and capabilities. To achieve the functionality described in the title I believe I can create a promise that will run 2 simultaneous queries on the document - one to get the full content of one…
0
votes
1 answer

I am not getting Expected results using spring Data JPA

I have a repository: MEOfferRepository @Repository public interface MEOfferRepository extends JpaRepository { @Query("select carrierId, carrierName from MEOfferDetailEntity entity where " + "(:countryCode is null…
Shubham Parmar
  • 147
  • 1
  • 13
0
votes
0 answers

Automapper - v5.2.0 Nullsubstitute String working with Map but not with ProjectTo

I tried to use AutoMapper NullSubstitute feature with source member and destination member of type string. It doesn't seem to work with Projection. As an example, I adapted src/UnitTests/Projection/NullSubstitutes.cs. namespace…
0
votes
1 answer

How can I reduce the duplicate data from my aggregation pipeline?

I have a pipeline that works great for what I need... but I think there is some redundant data that can be removed from the pipeline. Expected output This is what I want the output to look like { "_id": "5ecee2189fdd1b0004056936", "name":…
MLissCetrus
  • 423
  • 3
  • 21
0
votes
2 answers

How do I SORT only the fields ($project) returned from Mongodb aggregation, while also using $match, $lookup AND $filter

I am VERY close to getting what I want out of this query... but now I want to sort on a notification field NOTE: This is a refinement : I am now asking how to return SORT on notification fields, while my similar question asks how to return the data…
MLissCetrus
  • 423
  • 3
  • 21
0
votes
0 answers

Spring Data Repository - composite key & don't need to save entity

I'm working with a third party database that is read-only. I have the following Spring Data repository: public interface FolderRepository extends Repository { @Query(value = "SELECT f.folderId, a.fileId, a.fileName, "…
James
  • 2,876
  • 18
  • 72
  • 116
0
votes
2 answers

How do I only return SOME fields ($project) from Mongodb aggregation, while also using $match, $lookup AND $filter

I am VERY close to getting what I want out of this query... but I only want SOME of the fields returned and right now it is returning all of them NOTE: This is a refinement : I am now asking how to return only certain fields, while my similar…
MLissCetrus
  • 423
  • 3
  • 21
0
votes
0 answers

Projecting a rectangular image onto a curved background

Given a rectangular company logo, I want to project it on a curved background similar to the ones in this picture. I'm looking for a programmatic solution rather than a manual one, because I need to apply the transformation to a lot of…
Eyal D
  • 169
  • 1
  • 15