iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.1k stars 298 forks source link

EPSG:3857 (PseudoMercator) projection not handled for WMS layers #478

Closed elias75015 closed 6 years ago

elias75015 commented 7 years ago

Context

WMS layers can't be added in PseudoMercator (EPSG:3857), but only in WGS84 (EPSG:4326).

If we change the projection property of a WMS layer object to "EPSG:3857", the following error is launched and the WMS layer isn't displayed :

non-coherent result 0 0 vs 1. [object Object]

On the other hand, there is no problem with WMTS layers added in EPSG:3857.

Steps to Reproduce

  1. Change the projection property of a WMS layer to "EPSG:3857" (itowns/examples/layers/JSONLayers/Region.json for instance)
  2. Add it to the globe (see itowns/index.html)

Expected Behavior

The region layer is displayed.

Actual Behavior

The region layer is not display and error is launched in the dev console.

peppsac commented 7 years ago

FYI I've started working on this. I'll also fix the split.html example in the process...

elias75015 commented 6 years ago

Hello,

in your opinion, is it possible for the patch to be delivered within the next 2 weeks ?

peppsac commented 6 years ago

Hu. No idea, I didn't had any time to continue my work on this for the past 2 weeks.

I pushed my current branch here: https://github.com/iTowns/itowns/tree/fix_tms

There are some oddities in OGCWebServierHelper.computeTMSCoordinates that I don't understand yet and at least another issue regarding texture count (see TileFS.glsl hack-change).

Feel free to push more commits to improve this branch.

Edit: forgot to write that both split.html and orthographic.html work on this branch...