Skip to content

Commit

Permalink
#26
Browse files Browse the repository at this point in the history
  • Loading branch information
ratamiez committed Aug 18, 2017
1 parent 7f7b5a5 commit 9c71dbf
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/Projection/AbstractProjection.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ define(['../Renderer/GeoBound'],
*/
AbstractProjection.prototype.project = function (geoPos, dest) {
throw "Not implemented";
};
};

AbstractProjection.prototype.getDefaultZ = function () {
return 100000;
};

/**************************************************************************************************************/

Expand Down
3 changes: 2 additions & 1 deletion src/Projection/AitoffProjection.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ define(['./AbstractProjection', '../Utils/Utils', '../Renderer/glMatrix'],

dest[0] = 2 * cosPhi * Math.sin(lambda) * sinciAlpha;
dest[1] = Math.sin(phi) * sinciAlpha;
dest[2] = geoPos[2];
dest[2] = this.getDefaultZ();
//dest[2] = geoPos[2];

// Triple winkel: mode
// TODO: inverse
Expand Down
3 changes: 2 additions & 1 deletion src/Projection/AugustProjection.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ define(['./AbstractProjection', '../Utils/Utils', '../Renderer/glMatrix'],

dest[0] = 4 / 3 * x * (3 + x2 - 3 * y2);
dest[1] = 4 / 3 * y * (3 + 3 * x2 - y2);
dest[2] = geoPos[2];
dest[2] = this.getDefaultZ();
//dest[2] = geoPos[2];
return dest;
};

Expand Down
3 changes: 2 additions & 1 deletion src/Projection/AzimuthProjection.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ define(['./AbstractProjection', '../Utils/Utils', '../Renderer/glMatrix'],
o *= this.pole === "south" ? -1 : 1;
dest[0] = p * Math.sin(o);
dest[1] = -p * Math.cos(o);
dest[2] = geoPos[2];
dest[2] = this.getDefaultZ();
//dest[2] = geoPos[2];

return dest;
};
Expand Down
3 changes: 2 additions & 1 deletion src/Projection/MercatorProjection.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ define(['./AbstractProjection', '../Utils/Utils', '../Renderer/glMatrix'],

dest[0] = x;
dest[1] = y;
dest[2] = geoPos[2];
dest[2] = this.getDefaultZ();
//dest[2] = geoPos[2];
return dest;
};

Expand Down
3 changes: 2 additions & 1 deletion src/Projection/MollweideProjection.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ define(['./AbstractProjection', '../Utils/Utils', '../Renderer/glMatrix'],

dest[0] = mollX;
dest[1] = mollY;
dest[2] = geoPos[2];
dest[2] = this.getDefaultZ();
//dest[2] = geoPos[2];
return dest;
};

Expand Down
6 changes: 4 additions & 2 deletions src/Projection/PlateProjection.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,23 @@ define(['./AbstractProjection', '../Utils/Utils', '../Renderer/glMatrix'],
dest[0] = position3d[0] * 180 / Math.PI;
dest[1] = position3d[1] * 180 / Math.PI;
dest[2] = position3d[2];

return dest;
};

/**
* @function project
* @memberOf PlateProjection#
*/
*/
PlateProjection.prototype.project = function (geoPos, dest) {

if (!dest) {
dest = new Array(3);
}
dest[0] = geoPos[0] * Math.PI / 180;
dest[1] = geoPos[1] * Math.PI / 180;
dest[2] = geoPos[2];
dest[2] = this.getDefaultZ();
//dest[2] = geoPos[2];
return dest;
};

Expand Down

0 comments on commit 9c71dbf

Please sign in to comment.