Iván Sánchez Ortega
Brief bio
Afilliation Allegiances
(Opinions and thoughts are my own)
I'm EXTREMELY SKEPTICAL of the MapML proposal.
...and I wrote a lengty essay about that:
https://ivan.sanchezortega.es:444/politics/2020/08/13/mapml-essay-tldr.html
15-minute talk means I gotta focus,
So let me focus on this part of the XKCD joke
There are literally hundreds of Leaflet plugins,
and each of them is a use case...
Focus even more: Leaflet stuff which aligns with the workshop themes
Browser APIs you (probably) didn't even knew existed:
Hwo does the user interact with the map?
Joystick control feels good
This must be useful for something, but I don't know what yet
Accesibility? Haptic peripherals? WebVR?
Can I have joystick/gamepad control in MapML?
How are developers supposed to hack/extend user interaction in MapML?
Breakthrough: realizing that GIS raster data fits natively in GL textures
Store data packed in WebGL1 RGBA textures
let data = geotiff.readRasters({
window: [x1, y1, x2, y2],
samples: [0],
width,
height
});
gl.texImage2D(data, 0, gl.RED, width, height, ...)
...and read the data from a GLSL shader
float texelColour = texture2D(
geoTiffTexture, texCoords.st).r;
WebGL2 introduces:
let data = geotiff.readRasters({
window: [x1, y1, x2, y2],
samples: [0,1,2,3,4,5,6],
width,
height
});
gl.texImage3D(gl.TEXTURE_2D_ARRAY, data, 0, gl.F32, width, height, ...)
// Fetch data from a sample, sample is the Z coordinate of the texture
float data = texture(geoTiffTexture,
vec3(texCoords.st, sampleIdx));
// Or do vertical slices of the datacube
float data = texture(geoTiffTexture,
vec3(sampleIdx, texCoords.st));
Mandatory buzzword-full slide
Real-time GPU-accelerated cloudless edge computing for cloudless imagery, not absent of monetization challenges.
Prediction: by 2023, every GIS person working with raster data will say: «How did we ever work without this?»
Forget about SVG.
How can we squeeze visualization performance?
How do we make non-3D GL more accessible to developers?
Let me present a fact:
Leaflet users want to display Google Basemaps.
And it's easy!
L.tileLayer(
"https://mt0.google.com/vt/lyrs=s&hl=en&x={x}&y={y}&z={z}&s=Ga"
).addTo(map);
...but.
...but Google's Terms of Service (as of 2018) were explicit about not doing this:
10.1 Administrative Restrictions.
No access to APIs or Content except through the Service. You will not access the Maps API(s) or the Content except through the Service. For example, you must not access map tiles or imagery through interfaces or channels (including undocumented Google interfaces) other than the Maps API(s).
Wording of the current ToS is not clear; can I/we have a clarification, please?
Pretty please with sugar on top?
Workaround: Use gmaps JS API and move it
...but there're noticeable lags.
Workaround: Steal the tiles
...but when do new tiles come in?
Enter MutationObserver
var googleMutant = L.DomUtil.create('div', 'leaflet-google-mutant');
var map = new google.maps.Map(googleMutant, /* map options */);
observer = new MutationObserver(onMutationCallback);
// Observe subtree additions in particular
observer.observe(googleMutant, { childList: true, subtree: true });
function onMutationCallback(mutations) {
// Iterate through mutations
// Iterate through DOM nodes in a mutation
// If mutated node is a tiled image:
// Steal the tile
}
«Absolutely brilliant and terrible at the same time»
https://twitter.com/mourner/status/1300719192627347456My (controversial?) hard point of view:
I bet that MapML shall not:
...read the essay later!
https://ivan.sanchezortega.es:444/politics/2020/08/13/mapml-essay-tldr.html
...read the essay later!
https://ivan.sanchezortega.es:444/politics/2020/08/13/mapml-essay-tldr.html