We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Meshes are needed for geospatial work

00:00

Formal Metadata

Title
Meshes are needed for geospatial work
Title of Series
Number of Parts
50
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Meshes are needed for geospatial work
GeometryPolygonProjective planeMultiplication signPresentation of a groupRaster graphicsSampling (statistics)Line (geometry)Library (computing)Dimensional analysisVertex (graph theory)Visualization (computer graphics)Subject indexingDatabaseNetwork topologyGeometryRevision controlBitLink (knot theory)Quantum statePrimitive (album)TriangleInterpreter (computing)Cellular automatonArithmetic meanShape (magazine)Series (mathematics)Independence (probability theory)Point (geometry)Direction (geometry)Data structurePolygonCodeMatrix (mathematics)Software frameworkField (computer science)Triangulation (psychology)Theory of relativityKnotVector spacePower (physics)Point cloudVirtual realityComplex (psychology)Computer graphics (computer science)File formatPolygon meshImmersion (album)MeasurementGraphics processing unitQuicksortTrailRepresentation (politics)Software bugCategory of beingEndliche ModelltheorieFocus (optics)Function (mathematics)RandomizationReading (process)Analytic setDivision (mathematics)Physicalism1 (number)Row (database)NeuroinformatikResampling (statistics)Set (mathematics)Level (video gaming)Right angleRemote procedure callWeightOrder (biology)
PolygonTriangleRaster graphicsPolygon meshDemosceneCoordinate systemMatrix (mathematics)MetreComputer graphics (computer science)Level (video gaming)Multiplication signGUI widgetData structureQuicksortIntegrated development environmentTrianglePolygonCASE <Informatik>Video gameCategory of beingTexture mappingMedical imagingCodeSubject indexingPlotterReliefBitGeometry1 (number)ProgrammschleifeHelmholtz decompositionVertex (graph theory)Line (geometry)AreaLocal ringWeb 2.0Projective planeNetwork topologyQuadrilateralLibrary (computing)Triangulation (psychology)Arithmetic meanSphereTopostheorieDivisorRight angleMathematical analysisInterpreter (computing)Field (computer science)CountingBit rateGraph (mathematics)Set (mathematics)Cellular automatonMetadataState of matterGrass (card game)Shape (magazine)Insertion lossUniformer RaumPredictabilityDiscrete element methodOpen setComputer animation
Texture mappingMedical imagingPolygon meshDiscrete element methodMereologyEndliche ModelltheorieTesselationConstructor (object-oriented programming)Data conversionAbstractionCASE <Informatik>QuicksortCuboidMathematical analysisCross section (physics)Moment (mathematics)Type theoryLibrary (computing)SurfacePrimitive (album)Function (mathematics)Different (Kate Ryan album)Level (video gaming)Streaming mediaProper mapVisualization (computer graphics)Partition (number theory)Dimensional analysisVolumenvisualisierungRight angleObject modelSimilarity (geometry)Subject indexingVector spaceMappingStructural analysisInformationReading (process)String (computer science)Mobile appMeasurementThermal conductivityData structureLecture/Conference
Transcript: English(auto-generated)
Yeah, okay, so I work at the Australian Antarctic Division, I actually work with a lot of managed data, I work with a lot of unmanaged data, I work directly with a lot of researchers on all kinds of data, like raster, very complicated net CDF, physical model output,
lots of remote sensing, lots of random stuff from the field in all kinds of formats and dimensionalities, stuff we collect on voyages and stuff people measure in the atmosphere and stuff people collect off animals, we have a huge array of kinds of data and what I've
really learnt is that I need meshes all the time and the more I learn about them, the more power I'm getting and there isn't a kind of a general framework for them that I can find. We let go of a lot of stuff with old topology GISs, we weren't ready for triangulations, it was really hard and I think we've left meshes behind but we're getting back to them
now with computer graphics and it's becoming a lot more accessible. So the major questions I'm talking about are what are meshes and topology and what are their relations of them to raster and vector data in the usual way we treat them.
And terminology is really hard here, like when I say topology I mean something particular, although I don't mean the GIS meaning of it that has become established. What I mean is the shape of things in their relationship, so we can forget about geometry
completely and topology is, you know, is it a bowl or a cup, you know, it's actually what is the relationship of pieces and shapes to each other. The geometry is really in the raw, the where of things and it can be where it is in longitude, latitude, it could be where it is on a geocentric globe.
That's kind of independent of the shape of the data. And then indexing is what links those two together. So when you look at computer graphics, you're always going to be dealing with data this way. It actually separates the primitives, the topology into a data set and it separates
the vertices, the geometry into another data set and it actually is a pretty neat way to operate because you get a lot of cool things for free that way and you get to make some cool 3D visualisations as well. When I say indexing, I mean two data structures relating to each other, not the technical speed up indexing in databases, although they're related, I think.
So topologies, I've got a great typo there, topology is not geometry. And topopology, topology merges as an index into geometry. So this is about the most code I want you to look at in detail.
In R I'm creating a three dimensional matrix of geometry. So there's three points and they exist in X, Y, Z and they don't have any structure. There's nothing that tells me how to link them together, they're not ordered, they're just there. But if I want to link them together as a pair of line segments, I actually built an index
of start and end vertices, so zero, one, start and end and I have two. So it's the first two rows of my geometry to find a one line segment and then the second two defines the next. What's neat about that is I don't have to store the coordinates twice,
even though one's shared between two line segments. And in some ways that's what topology meant in old GIS too. If I want to treat exactly the same data as a triangle, I don't have to do anything to the geometry. I'm just creating a new index and this time there's only one primitive,
but it addresses all three coordinates in the right order. And when I plot that with the magic of OpenGL, you can see exactly the same geometry is now shared between two versions of the topology and that's all that really means.
And this is a bit controversial I guess, but I see these things are wrong with Spatial about the way we do some of the things we do. We confuse topology and geometry,
we confuse topological dimension and geometric dimension. And polygons are really just lines, like technically they're lines. There's magic tricks that go on to define the inside and the outside and to visualize the inside and the outside. And they're kind of magic tricks and we don't really have access to them
at that higher levels. And that last one, that's hard. This is really hard. I've met people who know how to do that. There's not many in the world and it is accessible now. We do have access to libraries that can do it. I'm motivated by lossless raster reprojection,
so all those kinds of data have to do constantly. I often have to preserve quantities not just resample data across projections. I use projections all the time, not just for presentation but for analytical reasons because they have all kinds of excellent analytical properties. I'm interested in using them for topological fixes and neighbor
classifications, like that kind of comes out when you treat data in this way. It's not a main what's going on. I have to work with a lot of track data and point clouds and GIS has tended not to be able to do that. We still have a plethora of ways of going about
track data and point cloud and we have some emerging principles but it's still something that was left behind by GIS. It doesn't work in simple features. And I'm motivated by three-dimensional and four-dimensional visualizations because we have
really complex high-dimensional data. And immersive experiences like virtual reality are now really helping us bring the accessibility of these technologies. And it's really about jumping the chasm from this geospatial into computational graphics, computer graphics.
And what is a raster at root? There's two ideas, there's two implicit interpretations and we can switch between them, it doesn't really matter. One is a discrete cell that has a constant value across it and the other is a sort of a sample of a point that has a value and that implicitly
varies across the field. We get a bit tied up in knots when we try to apply this interpretation over here but we don't really care normally because the half cell doesn't matter. But I think technically you can't treat this as continuous in any sensible way.
And what is a polygon? Like in one sense it's a series of grouped paths and that's all it is, that's actually the data, that's all we have. We trace those coordinates around in whatever the right direction is.
I think my reading is, I thought it was clockwise but what you said I think is exactly right. So it's supposed to not matter. And it matters in the tricks in the graphics card.
But what this doesn't give me, this simple features representation doesn't tell me that there's a shared edge between these two features and that bugs me. I can ask the geometry library what its neighbours are but it doesn't tell me about the edges, it tells me who's a neighbour. It gives me simple features back and I want this graph.
So the other thing about the trick, if we want to represent this in 3D, we've actually got to really fill it. We can't just pretend it's filled in 2D. And we can't use this trick in 3D graphics and we can't use that trick in some analyses.
And so polygon triangulation, it's really hard. It has a lot of complicated implications like
a triangulation of that polygon that didn't insert new vertices along the edges is really ugly triangulation. This actually holds to the Delaunay criterion and it has a maximum area of a triangle property that I've told the very complicated library that I used to do it to preserve. But it's nice,
it's a nice looking triangulation. It can be as dense as I want it to be. And I kind of let go, I have to sort of let go of simple features completely because I don't want to store every vertex four times for every triangle.
But when I separate the geometry and the topology it's actually a really efficient way to do things. I've got a tiny bit about when things go wrong and I was glad that this was named before it's called a spike. I didn't have a name for it. This is a degeneracy on this
polygon so there's a line with no area coming off the end of the yellow polygon. And if I ask geos or lwgeon, I'm not sure which one it is, if the second polygon is valid it's like no it's
not. I'm like okay what's wrong with it. One thing I can do is I decompose this to edges and if I know the vertices I know which ones I can actually find those degeneracies. Not all degeneracies come out this way like for
loops that intersect you'd have to triangulate and it's not clear what you should do. In this case you can just delete that that vertex or those two degenerate edges. And this is you know this is code I have in R to do that. So from the unique vertices we had this degenerate polygon and I was hoping that it highlighted a bit
but you can basically see we go from 13 to 15 and we're all good and then we go 15 to 14 and 14 to 15 and we can detect that. So if we've decomposed to edges we can actually find that case and lots of other properties about storing this index to these edges. That means
open up R and run some code. So these aren't the greatest three-dimensional plots in the world but they're designed to show that this code is available and we're working on it and it works
and it's really easy to do if it works. I've got to do some sort of kind of preparation with the
the HTML environment so that it knows to build an OpenGL widget and you know there's a lot of packages there that I have no idea about technology that I don't understand in detail. But this is the kind of eponymous raster matrix volcano in R represented in an OpenGL widget. And what I've done is actually treated the raster as cells as a mesh
and so there's a set of vertices they're indexed by four the four vertex indexes per cell and that translates straight into graphics data structures it's quite simple.
The next one is actually a little piece of e-topo very very heavily decimated and cropped to the southern hemisphere and I'm again turning it into a quad mesh and plotting it with material properties that show the elevation in situ. So I've cropped a tiny bit of very very coarse e-topo
and cropped out our region of the world and plotted that up. Lots of kind of interesting problems come out of this because if you do it in long lat you'll have this ridiculous z scaling factor with meters versus unpredicted coordinates. And so lots of map problems
come at you in different ways and for a long time I didn't think I could do this at all because I just wasn't seeing what was in the scene probably. This one is now I actually
triangulate a polygon layer and I copy down values off a global DEM raster. I'm doing it across a couple of projections like I can kind of just handle that metadata internally and then I plot up those counties of North Carolina. I think it's the grass GIS
example data set with the elevation of the background of that state. So there's mountains in North Carolina. You know I didn't really know the shape of North Carolina until I made this plot and I'm really interested in the that's the continuous case. So you need a lot of triangles
per county to carry that shape. But if we're simply copying down a discrete valley we don't actually need nice triangles we just have one constant value for each polygon which is the next plot. And this is actually a valley that's measured against that county. I
think it's a SIDS rate for 1979. It actually showed me that I actually have to break the mesh right because now we're unique in xyz and not unique in xy. So it's a different
you know a completely valid different interpretation of what 3d means for a polygon. The final one's a little bit more showy and it takes our etopo, turns it into a quad mesh, projects it onto the xyz coordinate system for the globe and then puts a texture image on top. And what I
really need is these computer graphics stuff is really powerful like for looking at and exploring our geospatial data. And it performs really well when you have a local
open gl device. Doing it through the web all the time is a pretty um it's too slow for my mind needs. But so there's a rough little globe with relief on it
so the sort of relief of Antarctica there. As always there's a problem with the seam at the anti-meridian because it's always a total pain in my life. But that's actually the DEM with an image texture DOM. So that's me for today, thank you.
So you're doing stuff in R, are people doing meshes in other languages? I find it really hard like the the really advanced stuff is really like abstract you know. I think the most powerful stuff is the cdel library. That's too hard for me to use yet
but I'm going to get there. It turns out it actually turns up in a lot of different places but there's no consistent culture around it you know. It's like little pockets and subcultures it's my reading of it. Any more questions? What's the what's the killer act for meshes
that's going to make everyone go we need meshes you know. Oh well we'll stream down the map box RGB DEMs and texture images onto them and plot them in 3D for anywhere you want. So we're we're going to do that. Actually one of the uses but it's not of this kind of meshes has been if you see the windy DEM similar weather apps with the vectors for wind and
temperatures and so on. It's actually a really nice. Yeah visualization of scientific output and it's really hard we just can't do it very well. Yeah it's more of a sort of a
use case because I mean in the construction industry and we're actually using meshes for like 3D modeling and stuff like that as well. So use like FME to convert CAD data and push it into like mesh data and stuff like that. So 3D modeling and BIM and stuff like that's pretty good for the meshing. I feel like it's like it's like the world
partition around these big corporations and I don't know I don't understand why it's so distinct you know. It just seems to be controlled by technology masters and it's opening up for us.
Yeah but the meshes are really like the true 3D analysis because at the moment with the surfaces and stuff like that you've got the extrusion is there any really like 2.5D but the mesh gives you proper 3D analysis. So within post years with that 3D mesh library you can do proper 3D intersections and things like that and then analysis and
cross-sections and stuff like that. So yeah like I've just been working construction the last two years but it's just massive how you know how much information you can get out of it for what you know use cases and what people need. Well mechanical engineering with aircraft parts and things like that they're using meshes.
Yeah I mean it's got to be got to be volumetric as well. You're only using suits? Yeah that's right. But it generalizes to end dimensions because the primitives just you add another column. So I think structural analysis uses meshes.
I'll answer the question about libraries. QGIS 3.4 has got mesh support built into it now and part of that was building a MDAL mesh abstraction like GDL. So it's meant to be eventually like open source like GDL so that other maps can be tuned to mesh like data
basically straight out of the box without having to worry about the finer details. So it's future for it at least hopefully. Yeah I should have mentioned MDAL. I'm not quite ready for it but yeah I'm excited to see it. I believe and I was waving his butt actually.
All right any more questions? These meshes are compatible with why have you used 3D tiles and meshes and 3D tiles data structures? No I don't understand them yet. Yeah so we can talk to anyone about that. I haven't looked at them enough. I don't get it.
Yeah I think the 3D tiles use the sort of object modeling which is a mesh type sort of rendering and stuff like that. So the tile is just the index but then within that tile is the actual model which gets rendered. So you get different levels of detail so it sort of works in that sort of way I guess but I'm not going to lack with them.