map-projections

Shader that transforms a mercator projection to equirectangular?

早过忘川 提交于 2021-02-18 16:55:14
问题 I am trying to make a shader in Unity taking a mercator projection texture as a source and converting it to an equirectangular projection texture . Input example: Output example: This example does the opposite with an equirectangular as source. If you look at the source of the above example: // mercator float latClamped = clamp(lat, -1.4835298641951802, 1.4835298641951802); float yMerc = log(tan(PI / 4.0 + latClamped / 2.0)) / PI2; float xMerc = xEqui / 2.0; vec4 mercatorPos = vec4(xMerc,

d3.js. Spinning globe with bars

做~自己de王妃 提交于 2021-02-06 04:59:20
问题 I am trying to create spinning globe with bars like in this example. You can see my example here. And everything goes fine until bars go over horizon. I have no idea how to cut bars from the bottom when they on other side of planet. Anybody can suggest me how to do it? /* * Original code source * http://codepen.io/teetteet/pen/Dgvfw */ var width = 400; var height = 400; var scrollSpeed = 50; var current = 180; var longitudeScale = d3.scale.linear() .domain([0, width]) .range([-180, 180]); var

d3.js. Spinning globe with bars

六眼飞鱼酱① 提交于 2021-02-06 04:58:19
问题 I am trying to create spinning globe with bars like in this example. You can see my example here. And everything goes fine until bars go over horizon. I have no idea how to cut bars from the bottom when they on other side of planet. Anybody can suggest me how to do it? /* * Original code source * http://codepen.io/teetteet/pen/Dgvfw */ var width = 400; var height = 400; var scrollSpeed = 50; var current = 180; var longitudeScale = d3.scale.linear() .domain([0, width]) .range([-180, 180]); var

d3.js. Spinning globe with bars

China☆狼群 提交于 2021-02-06 04:55:40
问题 I am trying to create spinning globe with bars like in this example. You can see my example here. And everything goes fine until bars go over horizon. I have no idea how to cut bars from the bottom when they on other side of planet. Anybody can suggest me how to do it? /* * Original code source * http://codepen.io/teetteet/pen/Dgvfw */ var width = 400; var height = 400; var scrollSpeed = 50; var current = 180; var longitudeScale = d3.scale.linear() .domain([0, width]) .range([-180, 180]); var

d3.js. Spinning globe with bars

蓝咒 提交于 2021-02-06 04:55:21
问题 I am trying to create spinning globe with bars like in this example. You can see my example here. And everything goes fine until bars go over horizon. I have no idea how to cut bars from the bottom when they on other side of planet. Anybody can suggest me how to do it? /* * Original code source * http://codepen.io/teetteet/pen/Dgvfw */ var width = 400; var height = 400; var scrollSpeed = 50; var current = 180; var longitudeScale = d3.scale.linear() .domain([0, width]) .range([-180, 180]); var

How to set curvilinear lat lon gridline labels parallel to gridlines with cartopy?

空扰寡人 提交于 2021-01-29 09:40:55
问题 Description Is there a method available (or under consideration) to orient the lat lon gridline labels parallel to the gridlines as they intersect the plot boundary? Something like the labels seen in this plot. There seems to be an automated logic in place for orienting gridline labels as follows: Cartopy version 0.18.0b1 Code import matplotlib.pyplot as plt import cartopy.crs as ccrs rotated_crs = ccrs.RotatedPole(pole_longitude=120.0, pole_latitude=70.0) ax = plt.axes(projection=rotated_crs

Different result when providing a URL and features string

女生的网名这么多〃 提交于 2021-01-29 04:43:49
问题 I am using Openlayers 4.6 and typescript. When I create a simple vectorlayer to render plain, black dots on the map, I may provide it a url like: export interface Options { features: string; url: string; text: string; font: string; textBaseline: string; fillColor: string; } ... constructor(private options: Options) { const { features, url, text, font, textBaseline, fillColor } = this.options; const format = new ol.format.GeoJSON(); this._layer = new ol.layer.Vector({ source: new ol.source

Different result when providing a URL and features string

一曲冷凌霜 提交于 2021-01-29 04:40:11
问题 I am using Openlayers 4.6 and typescript. When I create a simple vectorlayer to render plain, black dots on the map, I may provide it a url like: export interface Options { features: string; url: string; text: string; font: string; textBaseline: string; fillColor: string; } ... constructor(private options: Options) { const { features, url, text, font, textBaseline, fillColor } = this.options; const format = new ol.format.GeoJSON(); this._layer = new ol.layer.Vector({ source: new ol.source

How to project two point line on the map into a curved line OpenLayers

人盡茶涼 提交于 2021-01-27 20:14:35
问题 As for my knowledge, there is no built-in feature in OpenLayers to project the straight line of two points into curved line following the curvature of the Earth. This was a problem when I got a route that was going straight through Madagascar: Is there any solution on the frontend for this problem, any feature that I missed in OpenLayers, or is there any third-party solution to calculate this. I know that this kind of calculation is hard on the frontend, and it also depends on the resolution