 All right. Welcome all to this session. It's all about spatial Drupal. I'm Floris van Giel. And I call myself a Drupal entrepreneur, which means that I work about 60% for my clients to keep my chimney smoking and to pay for my people. And 40% is developing own products and own ideas. My company is called 040Lab. And you can find me with at 040Lab on the Twitter. And on IRC, I still do IRC and do support there, I'm Zelfje. So first let's do a show of hands. Who is here to learn something about mapping? Yes, great, great, great. Who knows other kinds of context for content that is not necessarily text images? Yeah. Who's here for the Drupal superhero stickers? Oh, yeah, yeah. But I expected, like, a halter that would say, oh, you're just for the stickers. OK, cool. Please sit down, come on in. I just explained something about me. You didn't miss anything important yet. So today, we're going to talk about how to use Drupal in a content context that is not text images or videos. It will handle about, yes, please, come in. No problem. Come in, come in. Don't be shy. Mapping, like GIS, Geographical Information Systems, Urbania, city planning, building engineering, like so facilitation of the building within your website, which is really awesome. And then as a grand source over all of it, we will have the internet of everything. And I brought some sensors you can look at. I will talk about those. And with the cheap hardware, we can make the internet of sensors and things accessible today. So let me first start with mapping. In the old days, the world was flat, and we would believe that if we sailed to the end of the world, we would fall off. And then at a certain point in time, 1569, Mr. Mercator, he made a projection. And the projection divided the world on the equator and through, in which meantime, with zeros. And from there on, we could map out all the quadrants of the world, conquer it, and find our roots safely back home. Then a lot of time passed. And Google came along in 2005. And they had two revolutionary ideas. First, they made the world flat again in order to fit in a 265 tile. And then once you zoom in, you have the Web Mercator. And you see that Greenland is way too high. And that things don't really fit that well on a far-soomed out level. But if you get closer on the map, you will have perfect squares of 265 tiles with the actual buildings, roads, and infrastructure. So thanks to Google, we have this great mappy thing. And we can do it in Drupal. Then skip a bit further away. 2014, I got a phone call. And somebody said, yeah, we are building this mapping GIS system. I said, oh, that's great. I've already done Google Maps and find my nearest beer store application. So why not? I can look up for the challenge. And what I found there was a very nice IS server with Windows. And it did some kind of a mapping. But it wasn't actually a product. So what we did, just please come in. Take a seat. Don't be shy. I focus on my badge. Yeah, that's true. You didn't even come for the stickers. But I think one of the attendants brought it to the help desk. So feel free to sit down and enjoy. No problem, no problem. So after this phone call, we've been working for two years now. And now we have the second minimal viable product, where you have a map of the Netherlands. And this is for digging trenches for glass fiber connections up to the home and to the office. So if you click on a little flag, you get a pop-up balloon. And then you go to the next phase where the actual value has been presented. We have a connection here, and it has a location. And the total work in relation to what is planned is measured by the day. And the contractors and the sub-subcontractors, with this, they can meet their challenges and finish their workloads on time. If you zoom in for a certain map area, then we have the gutters, the trenches, and the holes where the whole fiber optic cable system comes together. This thing is being built using an open-source Drupal distribution, which is called Cartaro. And it has the best of the Drupal 7 integration of modules. So the CAD drawing, which is made with AutoCAD, has been eaten by feet. The feet will throw it through a geocoder, geofield. It's then stored in a post-gist database. The geoserver will pick that up and make it into a nice WFS, which is an open standard for vectors on the map. And then we can get the layer back, style it with behaviors on the map, and present it to the end user within the Drupal. That's great. Another great thing that we have in Holland is that with my tax money, we have humongous sets of open data. And this open data is accessible to everyone, not only the government, but also to companies and civilians. Anyone who is willing to use this data can use it for free. So we used a lot of those in the systems as well. And I see far more opportunity with these open data sets. So if we look at this product, how can we improve it for future usage? We all know that Drupal isn't that well in handling files and handling revisions. So on the file side, there is a lot of improvement possible, especially with versioning, either with using file entity or integrating a file document management system like Al fresco. And the next challenge is to get that one working. We already implemented the organic groups LDAP connection. So we have a central authentication service with Drupal. And it talks to the client, and then we know who belongs to what stack and what project. The geocomponents can become a lot leaner. And I, myself, want to have real-time presentation on the map of the progress that's been made in this project. And of course, you can always add more caching, more performance. Please come in, take a seat. So the next thing is, how can we use this in Drupal 8? Not now, but tomorrow. The good thing is that Paul built the new OpenLayers 3 on top of the service container framework, which means that it has a symphony base, component injection, and those kind of things. So it wouldn't be that hard a challenge to migrate that to Drupal 8. The services are in core. With these kinds of systems, we notice that if we have many Drupal sites that work together, they are much stronger than one monolithic site that does everything. No problem, come in, have a seat. And another great challenge for having Drupal 8 mapping is MapBender. And MapBender is an open source project that is being built on symphony and has been targeted at mapping. But that's a very interesting one. Later on, I might push the demo to show it to you, but I have another one which might be more interesting. The next chapter will be about Albania city planning. This is what we did for our local municipality of Eindhoven, the town where I come from. You have all the plans that are made by the government, by the municipalities, together as an open data source on the map. And what we did, we took these data sources and made a nice CMS around for them so they could buy their own data back and have an insight on, for example, if you live here and you click on the map, you get a pop-up, you're not allowed to extend your house more than this amount of meters. In the Netherlands, there's really strict building compliance rules. That's why old houses look the same and so nice. Envisioning that, I was really fascinated with SimCity, especially the latest version, because our collector for statistical data, the CBS, they have 100 meters squared tiles with an index of how the poverty is going on, how the housing is going on, how the social state, the welfare, et cetera, going on. So I foresee that these data layers can be in between within the 100 meters square. You can just make a nice column. And you can show, OK, this data has a relation. This data makes a meaning. And in that case, build the next generation web components and web systems. And there's already two nice frameworks available. And they both happen in the front end. These days, computers got much more graphical power than they used to have. So we can just render the 3D buildings in the front end. One of the main components is OSM buildings. And OpenStreetMap has already the storage for the height of the building, as well as the shape of the roof. So if you have some kind of data there, please give it back to the guys from OpenStreetMap and Girls. Because that way, we can have an enriched environment. For example, if you go to Paris, by Google Map Travels, or TomTom, and you go to Disneyland, on OpenStreetMap, every fun fair is indexed and mapped within OpenStreetMap, because people could. Another great one is from UK Origins. And that takes OpenStreetMap contour and extrudes it. So that's a front end JavaScript framework with whom you can easily project and make city scenes, city scapes. Now we go to the third part of my presentation. That's about building information management systems. The eye is the most important one. These days, all buildings, well, all buildings that are bigger and built under architecture, they do have a building information model, which means you have all the geometry that you see around you, including all the metadata. For example, what kind of a doorknob is that one? And what kind of a plan goes with the key? And this information usually ends up at the architect on the Z drive, where they store the data. And in my opinion, it belongs to the owner of the building. So I just explained what a BIM is. It's a digital representation of the building where there's information is the most important about the thing. And you can point at the thing. So some people say it's all about processes. Some people say it's all about philosophy. There's even people staggering that it's about a level of detail, like how detailed you model this little device. That's not the case. It's all about data, because the smartest people say it's about data. But this whole building information model, it's not completely about software. So how does this process fulfill itself? It's about the same as that we did in software development before we had Scrum. You had a client that had an idea, threw it over the shed, and then the architect cut it and made a nice drawing plan, threw it over the shed again, and then the contractor thought, oh, that will be expensive and made a construction drawing. Then the work preparator would make another plan on how to facilitate the work. And then finally, the guy who's supposed to do the work could do the work. If you compare a traditional 2D CAD drawing building process with a BIM, BIM workflow, then you see that you are, just like Agile, more able to adapt to changing circumstances. And you're more able to do changes and improvements without increasing the budget. So there were some real smart guys and girls who together made an open standard for the building information models, which has been defined by the IFC, Industry Foundation class. And that way, you just have a huge text file that contains all the information about the building, so the geometry, as well as the information model. And we use that with open source technology made by TNO in the Netherlands, which is called BIM server. And the BIM server will eat the drawings. And with the Drupal, we ask it for the meta information. And then we use one entity for one or more items in the building. And that way, if we link those up, we can do multi-year maintenance planning, calculations, room booking, and all kinds of other cool stuff. And the great thing about an open data text format is that you're not reliant on the CAD software. So you can read it in 20 years because it's just text. And you are able to be up to date about all your objects in the building. Then also, just like software, but it goes a bit quicker, a building has a lifecycle. We have a great idea. We design it and plan it. Then it's been built and delivered. That's a big hassle between contractors who hit each other around the ears with contracts. And then we get the most interesting part of the building, the 30 years or more that's been operated and maintained. So as an entrepreneur, I believe that the first phases to construct products for is this operational phase. And if you do that well, and if you know the deterioration and how much is changed in the building, you also know it's components. So you can recycle them or reuse them in other buildings. That helps us around with the environment very much. So this whole process is all about democratizing this building information system and also democratizing the open government data sets in order to provide the people with insights. You don't need specific computer experience. You just need to be able to operate a CMS. And in the end, it will be applicable throughout the whole lifecycle. Although I believe that there need to be two models. Here, when the design is done, you have a freeze model. And then just before you start operating, you check if what is built is actually still consistent with the model. That's a slight detail. So with that, we have a new definition of the BMS. The BMS has been used for facility management only. And these are monologous systems with a lot of fill-in forms, just like SAP. Maybe somebody heard about SAP. It's a lot of fun for the end user. They will not keep that much hair at the end. So in Holland, we have a rule, which is defined by the NEN. It's like ISO. And with that, we have a determination of the total lifecycle of a building component. And then after half time, so it's an inverse atomic bomb, it degrades from excellent to good, and so on, and so on, and so on. So with that, you can ask the contractor, OK, what is important in your building? Do you have beliefs in aesthetics? Some do for the entrance. But most of them just say, OK, we found safety and health satisfied, and we have some usability in business. And with those, it's just linear calculation. And you can do linear calculation pretty well in the Drupal. So with that, we're going to shape multi-year maintenance planning. And then we get to the Drupal superpower. Because we have a link from one entity to one or more components in the building, we can add issue queues. We can add documentation. We can add calculations. We can add workflows, references, and all the regular Drupal site building modules that we can all download from Drupal.org. So technically, we have this BIM server that eats the BIM model. And so far, it's one monolithic application. So I'm going to scratch the whole process on how this is built. However, the individual components will still be there. Since the next step is to enrich it with sensors and to have actors visible in the building. For example, this room, you can't book it as a room at this point because I'm giving a presentation. So you can see it on the outside of the door. And in the end, we want a happy user who can operate this building through the internet. So first development will be this five-year maintenance planning I explained about. There's still a big challenge in IT on covering and capturing expert logic in our systems. And that's still an open thing, maybe something for a buff. I tried it in Munich, but it didn't come that much ideas out of it. But maybe we tried it again. And another thing is to have a Kickstarter in the building field. And now currently, the 3D visualization is built in CNJS. And 3JS just has a lot more potential in having textures and having interactive components. Like I said before, add real-time sensors. So you actually get data from the environment and visualize it inside the buildings as well as inside the environment. And all the building blocks that we make in order to use the buildings as well as the city planning will be provided on Drupal.org on their GPL2. Now we get to the source that covers it all, the internet of everything. So if we predict like 2020, we have half of the world population. By that time, we have over 8 billion people. They are connected to the internet. It will be a market of $4 trillion US. And there will be more than 25 million apps around. Imagine that you have to download a few. Every person will have five screens at this disposal. And we will all blow like 50 trillion gigabytes of data, just like nothing. We already have good infrastructure, and it will be growing for years on Moore's law. So what can we do today? There is three interesting devices. Maybe a lot of you have seen the Arduino and the Raspberry Pi, which are microcomputers who go slightly up in cost. But they also grow in power. And these days for 45 euros, a Raspberry Pi 3 will give you four cores and one gigabyte of RAM. So it's a great thing to start prototyping with now. And another thing I bought is the Parallela. And the Parallela is when you need a little bit more computing power, it has 16 cores on board. And you can also use that with open source in order to have a local microcluster. Then on top of that, there is all kinds of different sensors. And I just picked one for show and tell. That is a motion sensor. It's over there on the table. So if you hang it in this room, you can see which is actually used and use that, for example, in a cleaning program. So the cleaning lady can just look at the map and say, oh, these parts are not used that much. And this one is really, really dirty, so I start there. And another great thing I bought is a 433 megahertz receiver. And the cool thing is that it works with IKEA stuff and Philips stuff. And click on, click out, which is a home automation that you can just buy around in shops in the construction market for 30 euros. And with these devices, I want to couple all this data back and start with my building, of course. And from there on, keep on building. Another one, which is a great Kickstarter that just been launched from the high tech campus in Eindhoven, is the Wi-Fi. It consists of minimal Python. And it has Wi-Fi as well as the new Laura. Laura is a low-power, long-range, machine-to-machine, radio channel. So every Wednesday, I don't do software. I do my hardware experiments. So these new gadgets will keep me going for the next two, three months. All in all, how do these things have to communicate with each other? We all know, I'm sorry, we all know this. I just don't beam. We all know HTTP, Wi-Fi, UDP. And I want to zoom in into one specific protocol. Top left, MQTT. MQTT is a very ancient protocol, if you talk about protocols. It's well over 10 years old and defined by IBM, Philips, Facebook, they all got together. And they thought, OK, if machines have to talk with each other, we have to have some kind of a protocol that is more efficient than the default HTTP that we have. So it's optimized for low bandwidth. If we compare HTTP with MQTT, then we see that it only consists of two bytes to send a message. And it is a set and forget protocol. So if I'm a device and I have some information, I just throw it around. And then another device will get that and say, well, it's not for me. But we just keep on transmitting until it's finally at the receiving point. And you only need 80 kilobytes for full back and forth broker connection. A packet would look like this. And this packet would say, hello, world, just about there. And then for interpreting, the last time I give the presentation, there weren't that many implementations. And now we already see a nice Drupal 8 sandbox on Drupal.org that implements MQTT. And there's a good PHP layer library for it. And there's also a Revit MQ. And that is an open source tool to exchange this kind of data. There's loads of Java middleware of whom two are open source and the others are not. I had a slide before, but I don't deep dive in that one anymore. And you can also make a custom Node.js data runner that makes sense out of all this central data and acts upon your web solution. Then we get to the semantic web. We all heard about the semantic web. And all around, there is many talks about how to use RDF schema.org. If you don't know anything about it, Google it on YouTube. There's great presentations about schema.org and graphing tools, and so on. I want to point out one new kid on the blog. And tomorrow at 10.45 in the auditorium, Pooby will give a presentation with two other guys about GraphQL in combination with React.js. And the cool thing about GraphQL is that you just ask it, give me your schema. And it will provide you with all its possibilities. And with that, you can interactively query the rest endpoint. So that's one thing to put in your agenda for tomorrow. In summary, we've seen that we have some city engineer. Oh, gee. Oh, oh, oh, oh. I got it for my birthday in August. Anyway, we have some city planning with some open data on top of that from the government. And then we can place sensors in the buildings as well as in the environments. Combining those, we can give next level of web systems inside in what is actually happening and how we can improve our own world and each other's world. So this is about the talk. This slide is for Friday. I hope you all join the contributor sprints. There's 15 minutes left. I can show a little demo because just about how this building management thingy is working system that you have, for example, if I click on a window and I can ask it for its properties. This is all the metadata that the architect put in when he loaded this window into this building. It also has a three where you can put off and on all the objects. It has its own query language, like BIMQL. And we did some tests and investigation on that of that. But it's not that universally scripted. And it's, in fact, quite hard to write proper BIMQL. So I see a lot of opportunity with GraphQL, especially when we are able to add buttons to query sets. So the end client can just click the button and get the result. He doesn't have to know how to query this thing. Just get things done. Is there any questions for now? Oh, yeah. In the presentation there, everything is clickable. This is a thank you note at the end. So for example, this one leads to the link, and in the start I didn't have a good image for the world. That was flat, so I just created one in 3JS. So if you open this one, it opens in there. Yeah, but then you have the 3JS object that I used to construct. So thank you very much for your attention. And if there's any questions afterwards, feel free to, oh, you have a question, great. Can you please walk up to the mic so it's in the recording? It's not really a technical related question. It's more towards the democracy of information that you mentioned. Do you have any sort of pointers for approaching the architects or the powers that be to release that sort of information, the metadata about the buildings, especially in developing countries like where I'm from in South Africa, if you have any sort of pointers of just how to table the conversation without stepping on any toes. Because I have dealt with architects and projects previously, and we have had those issues in the hand of the blueprints and that sort of thing. It's quite a sensitive topic, I think. Yes, that's true. However, with municipality data and improving neighborhoods, if you, for example, look at the availability of clean water in relation to public help, getting clean water in a place helps boost the population. In Holland, they did a study with broadband internet. They had a neighborhood. Half of it had broadband internet with glass fiber. The other one didn't. And they looked at the effects in schools. It was amazing what a little bit of internet did for the education of the children. And the problem with the architects is that they just sit on their drawings because they think it is their own intellectual property. However, it is the client or the set of owners of the building who actually paid for the building to be built. So they own the intellectual property on the drawings. So you have to go through the owner or through the municipality and then get to the architect. Any other questions? Yes? I am interested in how can you suggest translating a CID drawing into Drupal entities. How, for instance, if you want to make a website for architects agency where they can actually just import their CID data, and then you can view it with 3GS in the browser. Yeah. You're talking about CID. That means DWG, AutoCAD drawings. Most of them are actually 2D, flat, like the old world. And a lot of them started to develop in 3D. However, then it would be smarter to have the buildings made with something like Revit or ArchiCAD because those programs are able to add the metadata as well. If you would just want to visualize a 3D DWG and you look for 3JS and its libraries, there are already libraries who can visualize that without that good of a texture. But you're able to rotate 3D around them and maybe add some interactivity. We did it in the end of the 90s with VW-RML, a VRML, which was an export of a 3D geometry with links and a 3D web and those kind of things. But yeah. In the end, open standards as the endpoint for the data is much better than use a proprietary DWG format. And what we did is have a middleware component, in this case the BIM server, convert the objects that the architects make into open standard. It can even export a Geo, JSON, or other kinds of city GML open standard, open formats. And that empowered us to just work with the data because if you want to read a proprietary format, you have to buy yourself into a license system in order to get the latest component to read it and then implement that. It's too much money, too much fuss. Last question. Have you implemented real time data from the IoT sensors for Drupal? No. Did you have any project? What I did is on my Wednesday hardware hack, I hooked up the radio sensor to a Linux box and then just read out the computer and did the switch, turned the line on and off. And then underneath, it's translatable as JSON arrays. And with that, we're going to play a little bit more and start automating stuff. Another question. First, thank you for the session. You just more or less describe what I've been just digging into in the past two, three months. So my company is working in a project in Gothenburg in Sweden and they're doing is building a house of apartments with the Chalmers University. And they are filling it with sensors and more or less is describing what you want to approach from the perspective of the building integrating with sensors and also integrating with applications. So right now, it's a pilot between NASA and a few companies. And the people that is living in the apartment is they come from the Chalmers University. They're students. And the idea is to develop applications as well to interact with the house. So I guess we should talk a little bit later. Yeah. And for, did they look into some kind of middleware to make sense out of sensor data? Yeah. Something like Apache Spark or? No, right now, they just put the sensors there. They are just retrieving data. The idea is they don't know how to continue. The first logical step would be to hook them up to an MQTT message broker. So you have your data set and you will see that it will generate heaps and heaps of data. So then you have to decide in relation to privacy rules, what are we going to track, and how long are we going to track that? What are the assences that we want to filter out of this data? And that can be consumed by your website, and by your apps, and so on. Yeah. We were thinking about this map reduction and having analytics. But the idea is right now they want to get the data and later on just study the energy consumption during the day, or the night, or this kind of thing. And then see what we would do with it. Yeah. We have one equivalent project with a library, and they put solar panels on the roof, and they deliver solar energy to the neighboring municipality office and school. And then we also want to show the community how much is the balance of what we collectively invested in this building, and how green can they be. Yeah. Cool. Anyway, congratulations. Your session is super inspiring. Thank you. Bye. Quick question. Right at the start, you had a map embedded in Drupal website. And when you showed the architecture of it, it was post-GIS, GeoServer. Yeah. So I was just wondering if that means you're actually storing the GIS data itself, the spatial data, outside of Drupal completely, and therefore, how are you linking it to, presumably, you're using some kind of entity in Drupal for the metadata, and how are you making the link between the two? Yeah. What we used was the GeoServer building blocks, specifically, the Drupal GeoServer module. And we used feeds and then put all the meta in empty collections, because at that time, there weren't good alternatives there now. And then the geodata is being sent by this module to the GeoServer, and that will generate the maps. And they're done because we already have the data, a little bit of patching, and then also the metadata is in the GeoServer. So we just have the metadata twice. So we can use it directly in views, as well as use it while clicking on the map with the feature pop-up. So that possibly answers my next question. I'm going to say, why use WFS when you could just use WMS and get the data straight out of Drupal, because then you only potentially need to have the... That's a performance thing, because the Java GeoServer we can cluster, as well as WMS is tiles. So it's all image. So every text, all the meta, has to be printed on the map, and that's not desired by the client. They want to click on the line or hover over a line, see a little pop-up, or see it changing color, have another component in the website change, et cetera. So what do you use to render the map? Open layers. Open layers? Yes. Any other questions? No? I'm here for the rest of the week, and maybe if people are interested in capturing expert logic, we could find a buff slot. If not, we do it at Iron Camp. Now we get to the most interesting part of this story. For promo of this talk, I made sheets for whiteboard magnets. They're designed by Ruben, who's also in the room, and for everybody, there is a sheet, but there is still one set of magnets left. And the trick question is, how many superheroes are in the presentation? So if anybody knows, please raise your hand. The first person to raise their hand may do a guess. Wrong. Wrong. Wrong. Wrong. Wrong. No. How much? 10? No. Yes! There you go. Because one of the 14 was my logo, and that's not a superhero yet, but it's still practicing to be one. So for all of you, there is one of these sheets. There's 500 of those. Once this room is done, I go down to the sprint room and give them a sheet because they're always sprinting and miss out on the cool stuff. And afterwards you can find the rest at the druid stand. Because, yeah, they like cool stuff. Thank you.