Hi there, good evening, good afternoon, good morning, welcome to joining us from. I'm sort of going to introduce you to a really interesting person today, this is my guest today is Iyer Rostovsky and Iyer is one of the top lawyers of Israel and you know he's going to talk to us about the Israeli people's group of startups but those of you who are following the news may be aware of you know the fact that there is a sort of a war going on right now in Israel as we speak. So I hope you are welcome to the show and I sort of you know say that we hope that you and your family are all safe. Where are you joining us from today? I'm joining you from Tel Aviv, I should be in my office which is also in Tel Aviv but I'm at home at the moment and unfortunately we could have we had last night we had some bomb scares in Tel Aviv in the area so we all had to go into the bomb shelters so if unfortunately there will be an event during our talk today I may have to take a break, I very much of course but unfortunately it's a possibility. And how far is that bomb shelter? It's in my house where every house, modern house built in the last 20 plus years has to have a it's a room, it's a room but it's reinforced concrete with special windows and special doors so if a bomb lands outside on the roof it won't you'll stay safe. So the trick is to get into the bomb shelter in time you have around about one and a half minutes from the siren, there's a siren and you have to be in the bomb shelter within one and a half minutes that's the drill. Okay I just do hope that you and your family are safe and yes at any point in time you know if you need to but of course that's a priority. Thank you so much for talking to us today and Ian I just want to understand your sort of involvement with the startup scene. Usually when you think about startups you don't really quite think about lawyers so how is it that you got so involved in the startup scene talk to me about that. Well yeah well Israel is maybe special in this in this matter maybe in America they also have lawyers like that but lawyers who rarely deal in the high tech ecosystem are very much part of the ecosystem like that at our firm we represent literally hundreds of technology companies and investors so you're very much at a crossroads that you see a lot of deal flow a lot of a lot of things happening so you know you're very much involved in the ecosystem and we we also try to take a very proactive approach and help our clients get finance and get investments and find and help our venture funds find companies to invest in so we very much involved and you know I've been doing this for 30 plus years so I know you know that the ecosystem very well and you know that's what I do for a living so I'm not on the technology side and I've learned that I you know things that I thought were great were not so great and things that I thought were less great and were great success so we we understand that we don't really understand a lot of investors think they understand but you know it's a lot there's a lot of luck involved but we know as as lawyers that you can't really evaluate something's going to succeed or not but have a lot of experience with work with founders and at the end of the day the management and the founding team that is what determines success or not you know you are absolutely spot on that the management team the leadership team and of course the rest of the team there actually determines the kind of success that you have but I want to you know do that in the second half I just want to first get an idea of you know just what makes Israel I mean it's the third largest startup ecosystem in the world and when you really look at Israel's startup system Israel from the size of the country Israel is about half the size of the state of Kerala in India is reasonable you know comparison right it's a it's it's about nine million people it's small country it's in in US standards it's the size of New Jersey which is a small state and one of the reasons for success is that it is a small country which means from practically speaking the ecosystem is very close it's all within a two-hour drive okay you can get from the most southern point which says Beresheva of the big high-tech hubs to you know going north south east or west it's a two-hour drive maximum maybe two and a quarter hour drive if you have a helicopter you can do it in 15 minutes but and so so so it's very easy to get around a lot of people know each other you know a lot of because of the school system university system the army system a lot of people you know coming through that funnel know each other okay so they they that that also helps to to create found founder teams which are you know successful more they understand each other they're less arguments and splits there are issues between founders that less I think and then in a lot of other countries because they they have a similar culture similar background similar goals so there's also very tight cooperation between the academic institutions which give a lot of in licensing to technology companies between the military where a lot of people are trained in technology and high-tech companies mainly in the cyber field so you know the whole ecosystem I mean it because the size of the country and the culture and the way the academic and school system and military system are built it all helps to create the the ecosystem perfect so thanks for the benefit of our listeners those who just joined us I'm talking to Ian Rostowski he's talking to us you know from Israel he's been an all-time observer three decades of working with the startup ecosystem in Israel and one of the questions that I was exploring with him is you know what makes the Israeli startup system so powerful because it's the third largest ecosystem of startups in the world and Ian talks about a couple of different factors eight the size of the country is small so you can go from one end to the other not to south east you can do it in all the three hours if you will and the other thing that is happening is that you know there is a very strong sort of a pipeline from the academic institutions so the school college and you know you also have the military service that people have to negatively go in at which stage do they get in for military service Ian and Israel at the age of 18 the age of 18 you boys are supposed to do three years and girls two years quite a lot of people get exemptions for some reason or the other but there's a lot of people who do their military service and a lot of them go into units that are that they actually get trained in technology whether it's with weapons the Air Force Navy you know the the cyber units their intelligence units that they trained in computers and technology which gives them an advantage because it's it's not as if you go to university and have academic education and learn mathematics and you know it's actually very practical stuff so the the Israeli entrepreneur has a very practical approach to solving problems because that's that's how they are taught to to deal you just have to solve problems find solutions in the quickest way the most cost-effective way and you know to learn on your feet kind of thing yeah and you know I've been fascinated with the you know the ecosystem which is so strong in the area of cyber security you know if you look at intelligence cyber security these are some of the firms in Israel are really well known for the work that they do in this space what gives them the kind of an advantage why is it that Israel is so strong specifically in you know the cyber security yeah the cyber security is definitely tied to the military because as I said there there is a lot of elite units that deal with with cyber issues things that you know are not not public knowledge and people don't don't exactly know what they do and what they but they they come out of the army as I said you have to sign in for three years which is the basic training but people who who advance in in the cyber units a lot of them sign on for four five six seven years okay so you come out of the army say at the age of 24 25 you've had like six seven years of dealing with cyber you know in the in the in the highest levels and so you then maybe going to university or maybe during your army service they will pay for your university education so you come out of their fairly highly skilled with with a skill set that you know the average student from other in other areas of the world would not have any anything near the same kind of the same kind of background education experience in fact yeah and and you know a lot of it has to do with the fact that you're saying the six or seven years of working in the cutting-edge technology in the cyber field gives Israel that advantage what other you know you get the unicorns in Israel what are some of the broad clusters where you see a larger number of Israel at the moment has about 65 unicorns which is the third biggest in the world and it's more than Europe you know and and and a lot of those are cyber the reason is that because of people somehow come through that funnel of the army and whatever with with ideas of how how they can deal with with real issues real cyber issues and and they form startup founding teams that have succeeded statistically building significant companies they have really brown groundbreaking technology they get you know a bit of government funding and a lot of funding from from funds funds like to to bet on these kind of teams because they have good ideas and statistically a good fairly good chance to to succeed not all of them succeed but statistically a lot of them have succeeded and succeeded in a big way so and and and they even and they even entrepreneurs on their third fourth fifth startup having sold or IPOed others you know and also in in Israel if you fail in a startup you know that that doesn't mean that you necessarily are out of the game you can fail and and you know form with another teammate another startup and it doesn't you know you learn from your mistakes it doesn't mean that you burnt and and no one will will touch you anymore okay so so you know how how does that tolerance for failure risk you know comfort with risk where does that come from what is the origin of that I mean you know what does Israel do as a society when kids are growing up in school college and the family system where does that risk taking element come from well because it's a it's a country born out of war and conflict and you know and and the people who a lot of people immigrated to Israel you know or the you know the founding fathers were a lot of them were Holocaust survivors coming from the Holocaust from from Europe from other area so so they they say no you know we've we've a lot of them also in the army they see you know very serious things going on so they they say you know we prepare to take risks you know the worst worst we can do is fail and failing as a start is not the worst thing that can happen and statistically uh quite a lot fail but quite a lot a lot of succeed succeed and people remember their successes they don't remember the failures okay and we've seen investors who have lost money with founders and some of them set up with a different team if it's the same team that's not going to work but they set up a different team maybe founder here founder there and you know people are if they've got a good idea and and they didn't you know they they failed not because they they were dishonest or you know or crew people you know they failed because not a reason to start a fail start up or fail so uh often they they get a second chance maybe because of the other founders you know or um the founding team is more well-rounded or the other factors and so you know people are prepared to take risks the whole society is tolerant of of failures and you know don't write people off because someone maybe failed in a start up once and and uh I would agree that you know the ability to take quick you know responses be comfortable with you know war potentially comes into you know the degree I was taking but I also agree the role of the government can be the start up I I'm not trying to understand the question I'm sorry so you know does the government have policies that support uh fail or when they want to try out something what is the role of the government okay so the the government has a has a history from even the 70s and the 80s in supporting the startup industry where it was rarely in its in its infancy uh and uh so so today the government provides financing through all kinds of programs for the for the startup it's it's generally matching funds so you have to bring funds from investors as well the government says that if investors are prepared to match it's between uh the government will give between 30 to 60 percent of the funding okay so there has to be matching and they say if it's matching from investors we we prepare to take the risk so so they um you you obviously have to uh file applications and have the startup checked out by people who you know have experience in the field so so the government on balance hasn't lost money it maybe makes money because the startups have to pay back if they succeed okay if you fail you fail you don't pay back anything if you succeed you have to pay back so so the government um on balance has has done well but because it created jobs created tax revenues if a uh you know people get salaries they pay tax on that people buy food who the money buy pay rent and everything comes back somehow to the government so so it's an ecosystem that feeds itself and and grows it's not that the money is thrown away and uh uh you know what happens when let's say if the government has invested 30 percent or 40 percent of the startup capital and the company just you know collapses it goes into liquidation it fails the idea doesn't take off the there's no market all of that you know and we know that it happens um in the situation what happens when you don't do the people need to pay back to the no no you only pay back from success so so uh the startup writes off the government writes it off uh sometimes you do a fire sale of the technology for for nothing and someone else takes it on uh you know uh sometimes you you know freeze it and maybe in two three years time someone can use it there are our cases like that but but if you fail and and and you haven't done you know you haven't frauded the government or you know it just failed because it didn't work out fine people people accept that you know there's no personal guarantees so when you uh you know when you look at the ecosystem of uh Israel as it has evolved let us say over the last um yeah let's take last 10 years what seems to have changed uh in the patterns that you see as compared to when you started 30 years back as compared to that where do you see the uh release what is what do you notice right so so their internal factors within israel and obviously macroeconomic factors all israel is very uh um close to the to the uh u.s. hub technology hub silicon valley new york uh boston area a lot of medical devices and cyber companies there a lot of venture capital funds a lot of money in the israeli high tech in in um uh ecosystem comes from the us so so um trends in the us find themselves to israel sooner rather than later so so what's happened the last 10 years is that first of all the ecosystem has grown uh people have become more mature people have uh more experience there's there's more money generally in technology these days than the world was back there there's just more money um a lot of i i don't think there's any technology company in the world any significant technology company in the world including indian companies like uh you know all uh i think the the top uh indian technology companies also have a uh r and d center in in israel okay what what the companies do is they i know investors have and a lot of others um so what they do is they purchase an israeli company and that as their basis for r and d centers now they're literally hundreds of those multinational or big technology companies all over the world a lot of them have done a lot of acquisitions in your microsoft ibm facebook apple um uh cisco a lot of companies have done double digit acquisitions as well so they build intel so they build an israeli r and d centers mainly r and d okay so those so those people get a lot of good experience and then um at the age of 35 40 they leave the multinationals and they start and they set up their own startup with with other teams from the same companies from other companies from the army from academia and and those are very fundable teams because people have experience they have good ideas and and so as as the ecosystem has grown and and people get more and more experienced more and more that the world becomes more technology driven so the ecosystem grows there's more demand for the products so i think that is what's happened in the last 10 years now now also what's happened is that uh israelis used to sell out early okay they used to uh intel would come and say you know we want to buy your your company um you know google bought ways for a million dollars in like for a billion dollars in like five years ago or six years ago today you know uh people okay that's okay we know we'll sell today you know and people rarely think they have a a good product and they can compete and they can grow the company and then and their investors who can continue to finance it they will hold on they will grow the company so it won't be sold for a billion it will be sold for 10 billion or 5 billion or 3 billion today okay so people there's more financing for later stage companies that can keep them going and the investors say don't sell out now we'll get to another couple of milestones and then you can now at the at the end of the day you know it's very difficult to compete with the big big technology companies and so at the end of the day people get bought out most of the companies get bought out sooner or later it's not only in israel it's in the us as well there's a lot of consolidation but the companies are getting bigger and bigger and the the israelis are becoming more and more experienced in managing big companies which which we didn't have that before people just didn't know how to manage a a company that sells 10 for hundreds of millions dollars of revenue you know they can develop the product but as soon as the company started becoming a real company that that has income and clients they did not manage that and sold out you know so the world is changing israel is becoming more mature the ecosystems becoming more so it's internal factors and also external factors fabulous so just for the benefit of all our listeners I'm talking to Ian Rostowski joining us from israel again is one of the top partners the law firms there and he's got about almost 30 years of experience and you know funding startups so a couple of things that Ian has talked to us about you know is the fact that A i think you have you know a couple of streams that work together so you have people who get into military from in the age of 18 you know boys do about three years girls do two years and this in turn gives them exposure so there's a large number of people who get exposure to the cyber as sort of the israeli army and that becomes part of the reason they form a number of these products here I think you may want to just serve me on mute this background so set up okay now hold on that that's that's fine I mean that that's fine so so I think you know that's one part of it the other part of it is also that you know I think Ian talked about a very powerful example that you have a great academic collaboration here so people sort of look at that the government looks at funding the ecosystem and if your company grows then you know you pay back the government and you sort of pay taxes you employ people so it's sort of in some sense is an incentive but also more importantly people can take risk because if the company genuinely fails then the government is willing to write it off so that's a very powerful incentive system the other part of it which I really think you know I liked in the way Ian explained the center to us is the fact that it's it's a you are seeing a trend that a number of companies which earlier let's say you know 10 years back or five years back they used to sell out at a pretty early stage so the example of that being you know Google bought the navigation company Waze they bought it for about a billion dollars but today companies are willing to hold on longer because of the fact that they are better risk takers they also think that you know if people have learned to manage larger ecosystems and that really makes sure that you know people can hold on and instead of you know this company selling it out at a billion dollars they are happy to you know hold on and sell it at 5 billion or 10 billion so I think that's another shift which is an interesting shift the third byproduct that I think which was interesting is that these same people once they sort of even if it fails you know they these people will find another combination of talent which could be that maybe the founder of one startup which failed another one which is working they get a few friends together friends could be from the army friends could be from the startup world or because a number of you know leading companies have put together their offices and things you know from Facebook Google Apple Amazon a lot of Indian companies as well and so people get the experience of working with these they also build their own teams for the future from these companies and that's so far been some of the fascinating things that Ian has talked to us about the startup system in Israel Ian have I missed out anything that you know you would have wanted to say did I miss that out you have to unmute and then just respond no I think that is the main reason I think you know technology the technology ecosystem is very international so so you know people look you know there are a lot of sources of funding as I said the main source is the US but the other you know the Europeans the Japanese the Chinese which is an issue in itself you know because you know whether how much Chinese money to get especially when you have American money you have to choose sometimes between you one American funding or Chinese funding and that's where we are today basically maybe in India so but but it's you know there are a lot of sources of funding and technology cooperation there's also bilateral agreements maybe I can mention I think there's with the India as well between Israel and and Europe America Singapore there's also there's some joint development projects that get financed by government funding or government related R&D grants it's many for generic technology like platform technologies and from then on there everyone can build build their own product so that that's also a source of technology fabulous so we have a question from one of our viewers you know what to understand a little bit in depth about the academic collaboration you know between the academics and the startups what is the kind of floor okay okay so so every academic institution in Israel or any any of you know Israel only has like five or six universities and and a few colleges as well so all of the universities have a commercialization arm which is a significant entity that that deals with licensing technology to to the startups to the private sector so a lot of startups are based on a license from an academic institution they'll give them a license to patent and know how each of those institutions also has a very organized charter of how the cake gets distributed inside the university how much the university gets how much the professor gets you know the professor who who is in charge of that technology or it's his team that that is responsible for that technology so there's there's a lot of incentive for for professors also to do to develop technologies to do research which has real life applications because they know that they can like you know there's a reasonable chance that they can license that technology out and get something in return not not only academic recognition but also real you know real money thanks sorry please continue right so so so there are a lot of a lot of projects like that most of the projects I think you know percentage wise are in the healthcare healthcare medical devices food sector maybe maybe maybe a bit in the in the cyber technology but you know we talk about sectors that are very heavy technology you know projects that need heavy technology okay that that it helps that someone already has done research has a patent you know so you you you hit the ground running kind of thing you don't start from scratch perfect when you look at you're the way forward I mean you sort of emphasize a lot on the um technology driven innovation yeah when you look at that technology driven innovation and you are also sort of you're into the fact that besides technology you also focus on the teams so I want to spend a couple of minutes really talking to you about you said you look at the founding teams you know when you start to work with a product what are some of the worst yeah so you know I'd say it's evolved evolved evolved over the years but I think you know when we see a founding team and we we talked about the importance of risk taking if you see a founder team and they say you know say there's a three three founders and uh all three of them have a day job and say you know when when we get funding we will leave our day job and we'll do the startup that is probably not gonna work out okay most of the time when people are invested and that is their job and that they know that you know they've taken the risk and they have to uh and and they've decided that this is their baby and and they need to bring it to fruition there's much bigger chance of success um we you you also look at the background of of of the um founders uh the balance between the team if they're all marketing guys and don't have any technology guys and and they need technology for their product it's probably not gonna work they can do it theoretically outsourcing but it generally doesn't work that way uh if if they don't have any a lot of experience you know they just come out of university or had a relatively low level job in a in google or something like that then you know the the chance of them succeeding are probably less than then it's worth betting on um and um sometimes you have founding groups and we see it more and more coming to the table we're already investors willing to invest is it just start started up and we'll invest okay and those have funding from day one and can build a proper startup from day one instead of bootstrapping a lot of bootstrapping startups do succeed but if you have funding early on so you can get proper ip protection proper legal documentation you know everything you build it the right way from the start obviously you improve your chances of success so um so a couple of things that you mentioned that you know you notice that when people come in and they've got a you know they don't have a day job this is what they're going to do they are fully vested that actually increases the chances of success no question I heard you say is that if these guys actually have a techie in the founding team that makes sure that you know the thing that sees um I have a corollary to just clarify do you see a lot more of two member three member teams kind of thing or do you see solar founders also succeeding which of the two solar founders do exist the chances of funding and succeeding are lower statistically more mostly teams are two or three sometimes you even see up to five but solar founders it's a very difficult very difficult why why is it difficult for a solar founder because it's a it's it's not something today to have a successful startup you you need multi uh disciplinary team to to to really see it through it's very difficult to do that without sourcing and if uh you know if you have a founding team like ever say you know you start the startup with with three founders everyone has say for argument sake a third of of the startup to maybe one guy has 40 percent others have 30 percent each but you know they have real skin in the game right if you are a sole uh founder and you're bringing people you'll give them two three percent you know you'll never have uh real co-founders so it will never be real corporation or you'll never have a team that that are really with you really behind you working in cooperation will be a boss and has people working for him which can work by the chance of as compared to a proper founding team or less and when you think about um uh you know the uh the people working together but what is the median age of successful founders so founding teams what is it you know you you because and the reason why I asked that question is you're very interesting observation that if somebody is worked at a new level even if it's in a very well known company you you're not that impressed with I mean why because you you uh you wouldn't have you wouldn't have the necessary experience maybe I'm not saying it's it's not uh you know it's a it's quite a fine fact in in all cases but someone who's who's led a development team or product development team or some like that or marketing team instead of being just you know one of the marketing people obviously has been experienced sees the the whole picture rather than then you know just uh part of the picture um the the medium age I think you can say it's a young people young people's game startups the average founding I I'm not sure I have the statistics but I would say the average founding team is between uh made early to mid 30s to 40s 40s that's an average founding team if you over 45 you probably won't get vc funding ah so uh no one writes it and no one says that but a lot of teams when they older say over 50 you probably won't get vc funding that's interesting uh you know they they look for people who are younger sure I mean and everybody can have their own there are exceptions there are exceptions uh maybe 30 percent of the the startups are are 50 but most of them are young teams and one of the one of the uh you know reasons that if you sort of talk to many of the people in the vc ecosystem they all will say off the record because they want the people to be working 80 hours a day and uh you know if you have a family to go back to and all of that then many people they say don't put in those kind of arse so uh that they crunch the one people to crunch the time is that uh is that a commonly held view yeah yeah yeah I I think so um I think they look for for people who who are hungry okay and a lot of people who have made it and or have been around for a while are less hungry you know less dynamic less hungry um also the the um people coming out of the army and the university is looking looking for jobs or in their mid mid 20s or 25 26 and they they they like working with with people who are not that far from their age right so so I think that's that's another factor so you know you've actually worked in this particular space for about three decades do you find that you know your perspective on what to look for in in a firm the investment the probability as it says your prediction all of that has improved with with your experience of three decades or do you feel that you know it was pretty much the same the processes have not changed what's your take on that um I think maybe uh in in the in the past I'm talking about 20 years ago you could maybe understand the founder would say you know have a day job and I would you know if I have finally I'll start start up nowadays it doesn't work but it's it's very difficult for us to evaluate the technology so you can only evaluate the the founding team okay the balance between them experience and and and the fact that they this is what they've decided to they've taken the risk gives a lot of confidence because they're intelligent people and they know what they're doing and if if they say you know we think we have something and we prepare to see it through and take the risk I think that that says a lot and so I think what we've learned over the years is that the chance of success if you have people who have not made that leap of faith much less much much less Ian when you look at the Israeli ecosystem of startups I mean obviously there are loads and loads of really impressive things what would you define to be you know if you want to look at it from the outside what are some of the gaps that you would see where you know you wish it had those elements as you know what would those people what would be a couple of those elements that you would add in to make it even better what would that be? Well first of all there's a big shortage in Israel of qualified technical people even though Israel has percentage-wise a very very I think one of the highest in the world percentage of academic degrees among people but there's a shortage of skills a serious shortage of skills so a lot of people you know are outsourced to other countries development work or programming or things like that including India and including other places which is maybe good but I think the experts say that that's something that's holding back the whole the whole ecosystem right to a certain extent the other thing is money you know there can be there were cases I'm old enough to have experienced the the internet bubble of you know before 2000 where everything any project you added a dot com at the end and you can raise financing so there maybe there was too much money you know there can be a case that there's too much money chasing startups and then there's a lot of junk around but I I don't think we're there yet and there are areas that that there's a shortage of financing for instance in I think in in a clean tech and water technologies which is very very prominent I think that there is an issue with with funding so in cyber there's a lot of funding and a lot of other areas there's a lot of funding there's some areas which are important and have a lot of potential that they're just not a lot of funding sources in those areas and I think that's a significant issue you may have government funding that can get you started but then you get stuck for the growth fund or you know to move to the next stage clean tech water technologies to a certain extent in medical technologies I think the funds look for more mature projects so there's a stage that there's a funding gap which is difficult to bridge. One of our listeners asked this question that you know talking about lack of technological skilled people does it include biotech as well I mean it includes biotech definitely definitely I don't think there's a single field in which we don't have a lack of or we have a lack of engineers or people you know with with technological skills there's a they're talking about 10,000 by Israel 10,000 people missing who need so what happens is that companies post from one another and they have to compete with the multinational companies I mean Google they pay salaries which are outrageous okay so why would someone work for a startup but not for Google the startup has to pay maybe not what Google pays but a significant salary enough to to live quite well and then you and the equity in in addition so startups burn a lot of cash a lot of cash because because and a lot of that goes on people okay they just there's a lot of competition for good people. You know Ian I just want to say thank you so much we are coming up to the end of beyond I want to say thank you for taking the time today especially at a point of time when you know as we started by saying that there is a war going on in Israel and you know as we said you could have at any point of time the silent go on and you would have to take I'm thankful that they gave us a reprieve I also wanted to say that our firm has a dedicated Indian desk we have a partner I have a partner his name is Benjamin Grossman and that's what he does before COVID he you know India doesn't allow any foreign legal presence the the the Indian board or whatever the legal profession have succeeded keeping off but so so you know we so we have a desk that Benjamin Grossman spends a lot of time in India helping Indians do business in Israel Israelis do business in in India and you know we we believe in in the connection between Israel and India there's a lot of a lot of business has been done and there's a lot of business to be done and a lot of synergies so you know it's not not something that should be taken likely no I totally agree with that and you know and our our friend Gary you know so Gary is also here and he's a common friend and you know so it's very good to good to have guys like you as part of our legal system look forward to conversations all the way to stay safe you know look forward to catching up take care thank you thank you very much goodbye bye bye


1917. An uneasy neutrality is shattered. Unprepared, but grimly determined, the nation mobilizes to help win World War I. It is a war that has already raged across Europe for three brutal years. Trench by trench, crater by crater. A conflict in which the Allies and the Central Powers unleash every weapon in their growing arsenals. By the time the United States enters the war, a new weapon has established itself over the western front. This is the first major war where soldiers can look down on the battlefield, where combatants can use the air to carry war to the enemy. It is a weapon to be reckoned with, not only over the battlefields, but over the sea, where the airplane has already demonstrated its value in naval operations. Thus, as the United States Navy goes to war, its new air arm must be mobilized to support allied operations. New planes and equipment must be developed. Men must be trained to service a growing number of aviation units and fly the new Navy planes. Naval aviation must be prepared for the first test of war. The Navy enters the war with 54 planes. Most of them unfit for combat. Yet these planes must be flown. Blown by men like C. E. Sugden, a Coast Guard. I'll never forget one of the first flights I took out of Montauk. With the war off the throne, I flew to Martha's Vineyard on a search for submarine. I had no bombs, which to attack them, if I saw them, but I didn't see any anyway. Returning from Martha's Vineyard, and being rather careless, a fog came in below the ship. And the first thing I knew, there was no land in sight and I didn't know where I was. War off the throne said he didn't know where he was either. So I put the ship down on the ocean, figured that perhaps the vessel would come along and I could see her and go over and get directions as to where we were and how to get home. Fortunately, and it's rather peculiar, a ship did show up, flew over to her, waved her down, they sent over a boat, and I went to the ship. Found she was a Belgian tramp. She gave us our position at 65 miles from Montauk, 125 miles from the entrance to New York, Harvard. He had no gasoline, but he did lend me a boat compass. Though, as we sounded our tanks, we had enough gas, one hour's gas. So, Ron took the compass on his left and just circulated right, her left, to keep us on course, and we hit Montauk's mic on the nose. And when it landed and went up to the runway, everybody came down, all excited in exercise, wanted to know where I'd been all that time. And then they thought I was lost. They had sent a plane out to look for me, didn't find me, and then we were getting ready to send out two destroyers from the New York Navy Yards to look for me. And then they sounded the tanks and all that was left in it was smell, it wasn't a drop of gasoline in there. So, it was quite an experience and they never sensed of playing out again without a compass from that station. There was no compass in my plane, otherwise I would never have gotten lost. No compass, no bombs, and in the Atlantic the sinkings continue unabated. Aircraft are desperately needed to protect allied shipping. Industry mobilizes to produce planes for the Navy. But the demand for military aircraft is tremendous. So, the Navy establishes its own aircraft factory in Philadelphia to manufacture flying boats. Prominent in the design of these planes is Dr. Jerome C. Hunzacker. After the war had started in Europe, the British made rapid progress in flying boats for anti-submarine work and we benefited from a knowledge gained from their experience. And by the time we were in the war we were building at the Curtis Company, again Glenn Curtis's help, the H-16 and later the F-5 flying boats of which thousands were built in this country and shipped abroad as anti-submarine patrol craft. They were possible only because of the Liberty Engine. Two Liberty Engines gave the power plant that was needed for such a large flying boat with the heavy gasoline load needed to stay out on patrol for long periods of time so that our flying boats were doing anti-submarine patrol and we also used blimps for anti-submarine patrol, not only there but on the approaches to our own ports. And the Navy got into a lighter than air venture then in developing what later came to be called blimps. In that we had copied the French and the British to some extent who had started lighter than air work. The gas for inflating such ships was hydrogen, highly inflammable and dangerous but through the Bureau of Mines in this country it was found that some of the natural gas in Texas in the southwest had helium in it and by extracting the helium from the natural gas we could get helium to inflate our blimps and they would become non-inflammable. To employ the growing number of new aircraft in naval operations the Navy needs bases and men. Naval air stations are established on both coasts. Civilians throughout the nation join the Naval Reserve to become the fliers and ground crewmen so urgently needed to bring naval aviation to combat strait. Commanding an early reserve unit is E.O. McDonald. Early in 1917 Admiral Towers then Lieutenant Towers who is the assistant chief of the aviation division of the Navy in Washington offered me the job of taking charge of the training of the first Yale Naval Aviation Unit. I was very glad to accept and was promptly ordered over to West Palm Beach where the unit had assembled. For the most part these boys were juniors at Yale and I must say that I don't think anybody ever had charge of a finer more enthusiastic group. We trained at West Palm Beach and at that time we had mostly civilian mechanics. All the planes that were in use there had been furnished by private subscription members of the families and friends of the members of the unit. Later when we got to the unit was transferred to Huntington Long Island and about this time Navy planes, Navy personnel were furnished and gradually the operation took on more of a real Navy flavor. Throughout the instruction I attempted to teach these boys something about the Navy as well as flying. I gave them lectures and ordinance, gunnery, seamanship, navigation and so on. There was no doubt about the enthusiasm about flying however when it came to my lectures I found that there was not quite the same enthusiasm. I found out that there was a certain amount of competition among members to the seats behind the pillars in the room where I gave the lectures so they could take a nap while I was talking. They didn't know that I knew this but I was on to it all the time. Among the first Americans to sail for Europe after the outbreak of hostilities are naval aviators. Men like David Ingalls, a Yale undergraduate. After we were all qualified and received our certificates as naval aviators we were distributed to various parts. First three of our crowd were sent overseas. A number were then sent to different where they were starting different naval air bases in this country and then eight of us went over in one group to London. There we really had a good time because we had just been given or bought our new uniform. The forest green naval aviators' uniform and it had a shoulder strap with a star on it, an ensign of course, and the British and any other troops in London knew nothing about this uniform and they saw the star and we were saluted by practically everybody in London and of course we were all kids and we didn't mind being given a little acclaim as we walked down the streets of London and enjoyed ourselves. Soon they are arriving by the thousands, fighting men of the American expeditionary force bound for the front. To escort them into port, sea planes, blown from French bases by navy airmen of the first aeronautic detachment, the first American combat unit to arrive in France. One of its members is Joseph C. Cline. On a small lake outside Bordeaux, a place called Mouchic was being established by the Navy at that time, which was like as a pilot's pool. Our group was split up there. I was assigned to the U.S. Naval Air Station in La Croix-de-France, which at that time was operated by the French Navy. One of the riders there, Lieutenant Commander William Corey, the United States Navy, was in command. And our operations from that station consist of escorting the troops ships from the United States in the south of there, convoy. We flew the French Territory A.C. plane and the patrols were long and teachers were very artsy, but we got to be like an old milk rather than a gang that were there for anything to die. Our group consists of two marked four bombs, which were slung underneath the wings on either side of us, lost machine guns of Alice Lamb, and two carrier pigeons. Of course, we had radio, which was a God out system in those days, but sometimes it didn't work and I was suddenly sure we're not very good anyway. This went on for many, many months. We didn't see any submarine, but we understand that the month of operation from our commanding officer that the sinkings within our area were greatly reduced since taking over from the French Navy. We had been operating many months in the station on anti-submarine patrol. We were still lads with the quartermaster at $17.60 a month until one day, a surprise inspection came aboard consisting of Admiral Benson and Admiral Sins.  Admiral Sins said, young man, why is that you're wearing? No one else said that. That's a French purvey, sir. He said it is. What is it for when it's a signify? Well, he says, it's a designation by the French government. He says, that's so, what sort of a designation? What's for flying? He said, are you an aviator? Yes, sir.  Yes, sir. You apply the patrols out of here, bring the crew ships in? Yes, sir. How long has this been going on? About 11 months now, sir. And he looked, he turned and looked to me and he said, is that your status, too? And I said, yes, sir. He said, Lieutenant Corey, why aren't these men commissioned? In two weeks, we took our examinations and became Benson. On constant patrols, American sea planes step up the fight against the submarine, but the vulnerable flying boat must be protected by other Navy pilots, men like A. A. Elliott. My job at Dunkirk was flying fighter cover to protect the under submarine patrol planes. One morning, on patrol, I was in formation of three honraeos at about 3,000 feet out of the patrol plane, about 500 feet. It was very hazy. Suddenly, I saw a submarine, they lost. And the first thing I noticed was that they were firing at the patrol plane and the bursts were coming in, coming to be close. In fact, they forced him to turn around. However, they hadn't seen the honraeos and we were in a bad with our machine guns open. And I believe that we shot some of the gun crew off the deck. As we were closing on the submarine, it started to submerge. And at that point, the patrol plane turned around and came back and dropped two death charges on the spot. We circled and about a minute, the submarine came up about first at an extreme angle and then sent back against turn first. We received official credit for submarine on this patrol. And now the war enters its fourth year, 1918. German submarines continue to patrol the Atlantic, but now the U-Vote has a new enemy, a deadly enemy. First with experience and new planes, naval aviation goes on the offensive. The target? German submarine vents, where the U-Vote can be attacked before it can threaten Allied shipping. To spearhead the attack, the Northern Bombing Group is formed, consisting of Navy and Marine Corps units flying with the Allies. Taking part in its operations is Francis Mulcahy, a marine aviator. The squadron I was in, 218 Royal Air Force, was equipped with DH-9 airplanes with a Sidley Puma engine of 260 horsepower. The mission of these planes initially to attack submarine pens in Belgium required considerable climbing because of the very accurate German anti-aircraft fire. The mission around trip from our base near Calais, two bruise and return would take about two hours and 45 minutes. The most of this time spent in climbing 15,000 feet. These airplanes had a pilot and a gunner observer. The observer seated immediately behind the pilot also operated a very crude bomb site. While the marine aviation operations initially involved bombing of the German submarine facilities in Belgium, with the ground offensive beginning in September 1918, and from then on, marine aviation was engaged in support of ground operations by bombing enemy supply points and railroad facilities. One day on a mission to bomb one of the railroad junctions behind the lines, our squadron was jumped by German fighters. The plane that we had, being on the flank of the squadron, got the brunt of the attack. I was certainly very glad to have with me that day as a gunner, an old marine gunnery sergeant named McCullough, who was a crack shot. According to squadron reports, he knocked down one of the German fighters and probably destroyed another. While these people were shooting into us, some Belgian fighters came down to help and between McCullough and the Belgians the Germans retired. Many of the Navy's pilots are especially assigned to fly with the Allies in the famous dogfights of World War I. First to become an ace is Dave Ingoats. Some of us were trained on large flying boats, but three of us were picked to fly fighters in a hope to be Navy squadron that might be formed at some later date, and it was hoped that we might be flight commanders. So we were trained on the British airplanes and sent to Gosport, Turnberry and Air, where we flew avros and camels. There I remember running into a lot of good Army pilots that were also training and were quite famous. Elliott Springs was there. Clayton Knight, who painted and gave me this painting of the camel airplane that I flew at the front, was there at that time and one of the pilots. The camel, I think probably, was more or less the same as all other fighters at that time, accepting that it was the slowest of the better fighters and without doubt the most maneuverable of the fighters that the Allies had. It, as I recall, landed perhaps 45 or 50 miles an hour with a top speed of about 120 miles. It was made by plane and had a lot of wires and things sticking out all over so that it couldn't go very fast.  They were synchronized with propeller and the machine guns were one of our greatest difficulty because either due to the timing mechanism or something, they would shoot only at the most seven or eight times before there would be a misfire and then the pilot would have to hit the handle of the loading apparatus and reload and then his gun would shoot again for five to seven times so that while you, it was a rather primitive kind of shooting but you did have a machine gun or two machine guns that would actually shoot. The instruments were about as primitive as possible. We had, as I recall, a compass and an airspeed indicator and an allometer and some of the normal engine instruments and that was about the limit of instrument flying. In that way it made it a lot simpler. You flew by the seat of your pants and you didn't have to worry about the modern method of flying on instruments. Flying in these planes was a good deal simpler in combat than the modern combat missions that the boys went on in the last wars because of course the plane was much slower and the guns shot slowly and there weren't many guns on each particular airplane and an actual fight was usually developed into a dog fight between two planes and one on each side in the number of different groups and they would fly around and round trying to get on the other man's tail and shoot him down. That was where the camel had to decide at advantage because it would turn inside of any airplane that I ever saw. It couldn't run away from a fight so that once you were actually involved you stayed until something happened one way or the other but at least you had an aircraft that would turn inside the other plane and give you a chance that I thought was better than simply speed which would enable you to dive safely away. Thus Navy pilots add a first memorable page to Naval aviation's combat record. Flying with the allies on all fronts and on the sea approaches to the United States and Europe and then November 11th 1918 the last shot is fired for the first time in four years the western front is silent. The great war has ended giving to the victory on land and victory at sea is aviation. For the Navy World War I has brought about the first test of this important new arc a harsh test that has greatly accelerated the development of aircraft and aviation equipment. The training of naval air personnel and has fostered a better understanding of the role aviation can play in combat operations. In its aircraft and its men the Navy has a potentially powerful weapon a weapon that must now be tempered for a harsher test of another world war.


All right, good morning everybody. I'm Leo Su, Regina O'Bay. So today we're going to give you what we think are the 10 most relevant problems that you can solve by post-GIS. Post-GIS is the spatial extension to post-grace. And by that, you add spatial data types such as polygons, lines, points, et cetera. But post-GIS actually goes much further than that. And we hope through these 10 problems or that we're going to solve that you can actually get a breadth of what post-GIS has to offer. And you'll find that it's a lot more than just simple geometries that you're working with. I'm going to turn everything over to Regina. And she's going to present the first eight or nine problems. And if there's time left for me, I'll do the last two or three. OK. So the very first problem that post-GIS is used to solve are what I'll call proximity problems. And these are questions like, what's the distance between this and that? Are these set of points within a certain distance of this other set of points? And also aggregation based on containment. So how many things are within this region? So if you have, for example, a sales region and you need to catalog how many people are in each sales region, you would use these functions. So the first set is finding the closest things to a point. And here for this example, I try to find the first, the five closest restaurants to a particular location. And this is using the geography data type, which uses longitude latitude but returns distance in meters. The next common thing is how many things are within a particular area. And the area could be either a point, so within a distance of a point, or it could be a polygon, it could be a road. And so this would, you'd use a function called STD within, which takes two geographies or two geometries and a distance measure, which is how close you want to compare things to be. The third is containment. So if you want to count things, you can use standard SQL aggregation counting. And you can use functions like ST covers, ST intersects. And so for this example, if you want to know, for example, how many subway stations are in each borough of New York, then you would use the ST covers function to say, for each borough, how many station points does it contain? And you would just get a list by borough name and number of stations. And fairly recently, in Postious 2, Postious added a whole bunch of functions for dealing with 3D data. So this is interesting if, for example, you're doing wire cabling. So in those cases, the Z index becomes really important. You can't just treat line strings as 2D. So we have functions that will consider the Z index, the elevation. So these functions, instead of ST distance, you would use ST 3D distance, which considers not just x and y, but x, y, and z. And similarly, you'd have ST 3D d within, ST 3D intersects. And if you have the extended 3D, which is the Postious extension, Postious SF seagull, you get additional functions like ST 3D intersection, which will return a new geometry, a new 3D geometry, which is the intersection of, for example, two 3D polygons in the area that's shared between those two. And one thing that a lot of people don't know is that Postious supports raster, which a raster is pretty much a picture. And in a mathematical sense, you can think of it as an n-dimensional array matrix, an n-dimensional matrix. So you can have, for example, each band is a separate matrix. And you can align that matrix with a geometric location on Earth and then do things like intersections with geometry. So for example, if you got elevation data, which is usually expressed as raster, you can ask for a set of points, what is the elevation at each of those. And you would use, again, the ST intersects. But ST intersects has an overloaded function that takes a geometry and a raster. So you can actually figure out if geometry intersects with an elevation area. And then the ST value function is a raster function that, for a given geometric point, it will return the pixel value, which is the value on the specific band you want, in this case, band 1. And for elevation data, there's usually only one band. So the value would be the value in the band, which is usually in meters. So these ones are. So this would be elevation in meters for each of these locations. The other thing that's special about postures, which you'll rarely find in other spatial databases, is the ability to re-project in the database. And what re-projection means is that for 2D geometries and rasters, it's really just a grid. And in order to be able to say that this grid is the same as this grid, they have to share what's known as a spheroid, a datum, and the way you kind of squash the earth into a flat surface. And if they don't, you can't overlay them. So transform. So in order to overlay two disparate grids, you have to transform one to the other. And so there are lots of mathematical functions that allow you to do that. And the table in postures called spatial refsis basically tells the system this number is a unique identifier in the spatial refsis table. And it tells the system how to project from one to another to another projection. So if you had a table of geometries, for example, this one is in New York State Plain Feet.  You can project it to State Plain Feet if all your other data is in State Plain Feet. And in order to intersect two things, you need them to be all in the same projection. So both geometry, so geometry has a projection. Geography is, since it's feroidal, it doesn't need to be projected on a flat surface. So it generally doesn't. But you can convert geography to a geometry and geography to geometry. And you can also transform rasters because you can, for example, if you're doing a flyover and you're doing it in State Plain Feet to feed it so that it's standard across the US, you might want to convert it to longitude latitude projection. And so the functions in postious ST transform also work for raster. And it's a different set of functions. And raster is a little bit more complicated with the transformation because really the idea with rasters you're warping the pixels. So you're kind of changing the shape of them. So you have extra arguments that tell you what algorithm to use to warp the raster. And another common use case for postious is map tile generation. And you'll see that a lot in open street map data. And common tools that are used are tile mill, which is a desktop tool. And map nick, which has a set of APIs that can be plugged into Python and PHP and other things for doing tile generation. And postious has numerous output formats. So the most common one used is the GeoJSON format, which goes nicely with the PostGrace JSON format to create, for example, feature collections, which can easily be laid on mapping tools such as OpenLayers and Leflip, which are the most common ones. And then there's a new one in 2.5, which outputs data as a map box vector tile, which is a new output format that it's not an image. It's basically the vector data and all the features. And it's in a binary format, so it's very small. And it can be styled on the client side, however you want. And there's also a X3D function in postious, which is useful for 3D visualization. And there's also the 3D bounding box operator to intersect 3D geometries or see if they intersect in space. There's another extension called postious tiger geocoder that comes packaged with postious, which uses the tiger census data for geocoding all of the US. And it uses street center lines. And the first piece of it is the address standardization, which will take an address and split it into its component parts. So for example, if you have an address like 29 Fort Green Place, it'll break it out into city state zip and the house number, which is what you'd need to be able to align it with street center line data to determine where it is along the street. And once you have your address standardized, then you can geocode it. So the geocode function internally standardizes it first and then geocodes it. So here's an example where we just take an address and we return the best answer. In some cases, you could end up with 10 or 100 if for example, you gave the wrong zip code or you spelled the street name wrong. And there's also a reverse geocode function or reverse geocoding is basically saying if you have a longitude latitude, give an expression of that in English terms or Spanish terms or any terms that you want. So this will give in a point, it will try to give English description of what the address is. And for raster, not only can you use it for geospatial, you can also use it just to change pictures in your database. So for example, if you wanted to, if you had a folder of pictures that you wanted to load them in, you can load them in using this command line tool called raster2pgsql or you can use the feature in Postgrease that allows you to run an operating system command like LS to pull in the listing of the pictures and then you can convert the path to a reference to the raster. So this one is really just what's called an out-of-db raster in the sense that it's not gonna pull the raster in the database but it references the raster that's outside of the database. And even if the raster is outside of the database, you can still use the raster functions like for example you can get the width in pixels, the height in pixels, the number of bands. So this example tells us that there are three bands for each of the pictures which correspond to the RGB channels of the image. And even though it's still outside of the database, you can create resized versions of it. So in this example, we take all the pictures and we convert them to 25% of the original size and we output it back using the Postgrease large object support. So this basically, this function is a post just function that converts it to a PNG format and then we can export it out using the large object byte A and then so it's on the server in a folder in the TMP folder and then you can just pick it up. And so what you get is here's the original picture and here's the resized picture. You can also do things like change the pixel values of a raster so if you wanna change the coloring of a picture you can use the reclass function. So for example, this is the picture we had before and this is the picture after we change all the blacks to whites and the whites to blacks. And then the most commonly used raster function is the ST clip function and that one is used to take a portion of a raster and just take that area that's within a geographic region. So for example, if you have a picture, you can take the centroid of the bounding box of the raster and then you can buffer it so that you end up with a crop picture. So for example, this is the original picture and then this is after you crop it by the center and then 120 pixel. And then the more common use for raster is for analyzing environmental data. So for example, if you had a, elevation data and you have a set of roads and they're in the same projection, you can use several functions and posts just to get stats. One of the common ones is the summary stats function which will return min, max, count and mean. And you normally use this with the ST count function because if you have a road, it could overlap several tiles. And so you need to summarize those. So the way you can summarize it is, well, getting the min is easy, getting the max is easy, but to summarize the mean, you'd have to multiply it by the count of the pixels to get an accurate mean value which is over. Okay, so here's a rather non-traditional use of post just. So if you think of time ranges, the period, the range type was introduced in post grace 9.3 or thereabouts. And so that allows you to specify two points in time, one is the beginning, one is the end and that's the date range. So if you think about it, a line string is really a time continuum. So you can take advantage of post just to do a lot of the date time range operations that are not packaged with the period, with the time range data type itself. So let me just show you an example of that. The key thing is you have to map a point in time. In this case, we've chosen some point in time as a negative infinity. And then you have to map negative infinity in time to some point on a number line and then you have to pick infinity as some number on the number line. And then so this particular function converts your line string back to a date and then there is the other function which converts it to a date range from a geometry. So let me go back. Okay, so this one, this one, you start with the date range, it will convert it to a line string and then the one before will convert it back. So once you have these two functions, you can flip between the time dimension and the line dimension or the linear dimension. And then you can use all the functions and post just for your time computations. So here's an example of three date ranges. And I want to know, well, what do they collapse down to? So in this case, you have a date range that goes from 1970 to 80s and then you got something that's from 75 to 95. And then something that cuts in from 90 all the way to infinity. And I want to know, well, what is the total coverage of these three distinct date ranges I can just use the line merge function after I union them and dump them out and use my conversion back to the date range and I get my answer. This is if the date ranges are not adjacent, you could end up with multiple answers. This is not something that you can do in with the data type range data type right now because there's no function that will return more than one row right now. So, but you can take advantage of post just to take your date range and collapse it down to however many that we need to end up with. In this case, you have two. Am I unnesting an array in this function? I in the two date range, no, I would not say not strictly in the two date range. Let's go back to date range. No, I'm not, I am not, I avoid the unnesting of the array but I do do it later on where there's another function when I build a aggregate function, there is some unnesting involved. But this is simply taking advantage of the, it's the stdump function that will do the unnesting and that's the post just function that does the unnesting. Any more performance? Not necessarily more performance, but it works. And then this is, this one's all continued to give us and so everything collapses down to just one date range. And so once we have enough of these uses, we created an aggregate function out of it. So we can pass in a set of date ranges and then just, let me show you how to call it, we can pass in this set of date ranges and then use our collapse period function to collapse them instead of going through all the separate functions and postures. And then because we only wrote one that will return as an array, so we have to do a final unnest. No, because you're starting with a date range which is unprojected. So it, so there's not much relevance to projecting it. We're talking completely about a number line. Yeah, because if you have postures, you don't have to worry about, you can define your own coordinate system and it's just arbitrary. It could be start from anywhere to anywhere. And it's only if you need to align it with some place in space that you need to worry about projection. Okay, so we took this one step further. All right, this is a common case where we just have a lot of date ranges and we have in this case, test scores, but you could have stock prices, you could have a lot of anything with a date beginning and a date end. And it's just thrown at you and you want to say not only collapse the range down to what is minimally feasible, but also to find in this case, the highest grade that was given for these time series for each of the person taking the test. So this first step here, so these are the input ranges, you got this guy Alex and this lady Beth and these are the dates and these are the scores that they have on these dates. And so the first part of it will take all the distinct cuts that could result from just overlaying these low segments on top of each other. So let me see, I think the Beth example is probably a little bit easier to show. So from January one to January three, she has an A from five to nine, she has a B and then there's an overriding X from one to nine. That's if you weren't evaluated, then we should see an X during that time period. And then here is the results for Beth. So on the date that she's not evaluated, which is the third to the fifth, which we don't have any other score for, she falls down to an X. And then there's just one more step if you want to combine two contiguous scores like right here, because this could be collapsed down to one score that goes from the third all the way to the sixth. And that's just another step here where we pass it through what I've shown you before to collapse the dates. So now we're down to what is the minimal number of date ranges needed to specify the highest grade that each person received. And again, you can throw as many date ranges and scores at this, and it will just take care of it by running through the function. I've only given a small sample. So that's post just, and then we wrote a book on PG routing. PG routing is another add-on that works with post just which allows you to do routing.  So traveling salesman problem, this is a classic resource optimization problem. You've got this salesperson that has to visit various towns to sell vacuum. And you want to find what is the shortest distance that the salesperson should take because you don't, because say he or she is driving the company car and you don't want that many miles on it, okay? So that's a traveling salesman problem. And after you install PG routing, the PG routing comes with algorithms to solve this automatically. Pretty much it's just one function. Once you set up your network, you just run it through the function, you get the result. And in this example, I pulled all the longitude latitude of nuclear power plants around the world, at least as of a few years ago. And I pretended that the salesperson is the IEA inspector who needs to go around to all these plants and check them out. So I have their coordinates and then I assign each power plant a unique ID. And then that's pretty much all I need to do for the input. And then I just run this TSP function. And out comes the results. So, can't load this up too much, but so the inspector starts somewhere off here in the Czech Republic, which is closest one to Geneva, which is where I think IAEA is based. And then he or she will go through Eastern Europe, go through Russia, go down to that broken one in Japan, and then make his or her way down Asia, fly over to South Africa, South America, and then back to the United States and then get back to Europe. So all this can be easily done. You know, now I don't know what magic goes into the TSP algorithm. I'm sure there's extensive literature on that, but to me, I got a problem. I write a function call and I got a solution. It seems plausible. So that's one use of PG routing. Another one is what we were going to call catchment areas.  Well, it's not a made up term, but the way we're using it is kind of made up. Okay, yes, it's standard. Okay, so the idea is we took the OSM data from Washington, D.C. So that's got all the streets and where all the points of interest are restaurants or points at least people wanted to identify on OSM. It's got road networks too. And all the road networks. And then we have a, we have one fire station. We set up a fire station somewhere in the city. It's a real fire station. It's a real fire station. It's a real location. Real location, right. And then we want to say, well, based on five minutes, what are the areas that can be serviced by this particular fire station? And this is really the code to it. It's a, the key function here is PGR driving distance. And it's kind of a misnomer because your network doesn't have to involve driving. You could be flying, you could be biking. It doesn't really matter. It's really the network and the cost that you give it in the past. Right, so I mean, the cost. It might not even be time. You might be measuring like the cost of tolls or how hard it is to drive across the fuel that you're using. Right, fuel consumption. You can put in, you can have routes that are illegal, like illegal, going down a one-way street in the wrong direction where you can assign a big cost to it. Truck routes, things like that. So this is our resultant. This is our fire station here at the Little Star. And I think we picked up a pretty big station that has all sorts of trucks. So within five minutes, and this is Washington DC. And this fire station looks to be in the southwest, southeast quadrant of the city. And so it can reach, Washington DC is not that big. So it can reach this area and beyond if it needs to go into Virginia and so forth within five minute time. And then. But we ignored one-way, so it probably.  Okay, and then another, a very common use is to use the Dijkstra algorithm, which is to find the best route between two different places. That's a little bit different from a traveling salesman problem, which is trying to minimize the total length of travel. So for this, we took the London subway system. Let me see if I can get to the site. We may not have internet, but so the London subway system is, as you can imagine, a complicated web of subway lines and stations. So we download that data and it comes natively from the government in longitude latitude. And once we have all the stations and the lines, it, we just did some cleanup because they have some stations that seems to be floating above ground but not much cleanup needed. And then we can start routing with the data that we prepared. And in this particular problem, I am trying to see what is the best way to get from Cheshire station to West Croydon. And this is the optimal path. This is the entire network. As you can see, it gets pretty hairy in inside center of London right here. So there's actually, you start here, you end up here. And then within it, you have to take multiple, you have to make multiple transfers to get to your destination. But again, it's as simple as this function. And most of the time it's spent downloading and preparing the data. And then it's just calling the function. And there are multiple variants of Dijkstra. Like for, there's one where you can specify all the points, the order you want to go and it will give you the itinerary. And that's usually used with TRSP because you first use TRSP to figure out the order you want to travel. And then you use Dijkstra to figure out the actual path to go. Okay. And so, that's it for the presentation part of it. Here are some links. And oh, this is where you can go to buy our book. That we have one on, we wrote one on PostGIS in its second edition. And then we have one on PostGRACE. And we're working on the third edition. Which should be out in another month or two. You can actually buy it now. It's just, we have eight of the 10 chapters. We're still working on the two chapters but they'll give you the electronic. And then the final version when it comes out. And then the PG routing, that's- That you can also buy too. That you can also buy- It's just not in hard copy. Not in hard copy. We just turn it in. But many people have already bought it. Even without having, we like how modern day publishing works. You can sort of give people piecemeal chapters and somehow they'll still buy. Okay, so that's it for the presentation. And we'll take questions if you have any. Yeah, there's a PG routing layer which supports, I didn't have a picture of it. Which supports all the routing algorithms that PG routing has. So as long as you have PG routing installed on your database, you can pick from the dropdown all the different algorithms and then use QGIS to pinpoint the points. You can always get data. Like one place that I like getting OSM data is, I remember, Geofabric. Actually it's probably easier to go to mine. We also have a GIS site which I've kind of embarrassed I haven't kept. Oh wait, we don't have internet. Oh I know. Yeah, so Geofabric I've found is the best.  So for example, if you want all of Africa or of North America, you can download a single file and load that into your postures database. And there are tools like Impossum and OSM to PG SQL. And then there's also OSM to PG routing which will take the data and prepare it for routing for you. So you don't even have to think about it. I think there's a whole bunch that are tied against OpenStreetMap. And ideally we'd want to create a geocoder against OpenStreetMap. We've just gotten around to it. Yeah. But that would be, but yeah there isn't any reason why you can't create a geocoder against OpenStreetMap data. Because it has all the street center lines. And a lot of the governments, they feed into OpenStreetMap their data. And a lot of it is just pulled in also, as in addition to being crowdsourced. Yeah, it's an approximate, yeah. So it uses, yeah, it uses heuristics. Heuristics, yes. And there's another one which is still kind of in beta, the VRP, the vehicle routing problem, which is kind of, it's more of an advanced problem to TSP. So if you have a fleet of vehicles and you have a schedule of customer that you need to visit, you need to visit customer A between eight and nine and customer B between 10 and 11, it will come up with, okay, you gotta send this vehicle here. This vehicle will visit these customers and this vehicle will visit this set of customers. And it also considers weight constraints. So if your truck can only hold 500 pounds, you can only load so much. That's, and so basic Uber ride sharing problem, you got a car and it can hold five people and here are the people who are hailing for you. So it will, you can determine, well, who do I pick up first and then where did I drop them off? And then it will let you see up to the number of people that you have. And you can pick up people from where you left the other one off. Yeah, so that's... There's a whole, it's gonna be more beefed up than in 2.6 and 2.5, it's already got some of it. 2.3 S. 2.3, yeah, it's gonna be beefed up and the whole family of functions is called... Vehicle routing. Vehicle routing problem, VRP. There are, there's some, you have to look at the different variants that's offered by Dijkstra, but I would not say that you can do much with the underlying algorithm, but it accept different scenarios, different type of inputs. Yeah, so the way PG routing works, they have a set of functions that they call proposed. They're really inside the version, but they haven't been super tested, so they haven't been officially sanctioned, but they're always in the extension, so you can try them out. So the VRP are considered proposed, but they'll be more official in 2.6 and there's gonna be multiple variants which allow you to say, I want this to finish in X amount of time. Don't take more than this amount of time to figure out which ones to do. I prefer having fewer vehicles versus more vehicles. Longer time. You can optimize over different metrics. So you can set those metrics. In the post just book, there is well, linear referencing is you sort of, we would use it whenever we end up with data that we need to sort of pin down to a... It's only in the post just book that we have that copy. It's not like a full chapter. It's not like a full chapter. It's like three examples. But it's a big book. Yeah, it's a separate page book. Yeah, so there's a set of functions called turn restriction functions. They're not, it's kind of a misnomer because it's used for other than turn restriction. So you can specify a sideline table and in that sideline, you could have traffic flow and apply additional costs. So you have your main cost table and then you can have these adjacent tables that change constantly and it would impute additional costs to certain routes and it's also, you can also impute costs in such a way that you say, you can't go from route A to route B because that's an illegal left turn and you can pose a super high cost on that. Or there's like an accident there, you can't go there.  You can't end up on this route and you're next. So the specification for cost is a little bit more sophisticated with the turn restriction. You would swap out, you would have to swap out the information in the side table but it is a side table so that makes it easy. It's not part of your core cost table. It doesn't affect your network. It's just something you add on. Well, because it's, well, we see it this way. If you have a million of these things, it's probably easier to just run it all on the database because the database, the SQL allows for bulk operation and so we're talking one function here rather than each piece. Right, or breaking it into separate rows and I think it would be, sometimes it may be easier to write a function if you consider individual but then once you get into the millions of rows, it gets slow. And especially since databases have, they changed the plan that they use based on how much data you have and how many people are using it and getting that data. So it's more efficient if you're gonna have lots of people hitting it, you're taking advantage of what people are using. Anybody else? Okay, so, our book. All right, thank you.