Introduction to Mapping: Import, Transform, and Display Geographical Data - MATLAB
Video Player is loading.
Current Time 0:00
Duration 23:23
Loaded: 0.71%
Stream Type LIVE
Remaining Time 23:23
 
1x
  • descriptions off, selected
  • en (Main), selected
    Video length is 23:23

    Introduction to Mapping: Import, Transform, and Display Geographical Data

    Overview

    In this webinar, you will get started with importing geographical data and creating map displays through real world examples. You will learn some of the new capabilities of mapping toolbox including 3-D map displays, camera settings and selecting basemaps. You will also learn how to create useful map displays, like thematic maps, weather forecasting or animating a flight in only few lines of code.

    About the Presenter

    Alex Roumi joined MathWorks in February 2020. His focus is on computational finance projects. Prior to MathWorks, Alex worked on the electrical design of airport buildings and airfield lighting, including Dubai international airport.

    Recorded: 16 Feb 2021

    Hello, everyone, and welcome to this webinar. My name is Alex Roumi, and I work in the marketing group at MathWorks. In today's webinar, I will be walking you into how to import and display geographical data using mapping toolbox. I will also be focusing on some of the new capabilities of mapping toolbox.

    For someone new to mapping toolbox, there are numerous challenges on getting started. Some of these typical challenges are where to find data. For example, a shapefile of the European countries' boundaries. Another challenge, how to explore data. Once I have data in my hands, how to know if the data is in projected or unprojected systems.

    A third challenge, how to display data. For example, how to display the land and surface temperature over the US. How to import and display data on top of a map like the track log of a glider where data comes in many formats, such as shapefiles, GPX files, or GOT files.

    In this webinar, our goal is to help you get started with importing geographical data and creating map displays through real world examples and show you how getting started with mapping toolbox can be made easy using MATLAB. In the next 30 minutes or so, we are going to see three short demos and explore how mapping features are needed in each one of these.

    In the first one, we will import the UAV flight track and display the data on a 2D and 3D map. In the second demo, we will learn how to access time specified remote sensing data through WMS. In the last demo, we will learn how to create thematic maps with the data of your choice.

    There are hundreds of potentially active volcanoes around the world. If a volcano unrests or an eruption occurs, scientists from the volcano observatories will develop action plans of at risk areas so there is enough time for affected communities to implement response measures. A UAV can travel in regions that are hazardous for a volcanologist. Simulating the flight path of the UAV prior to sending it out on a mission can assist with understanding the topology and terrain and gain a better perspective of the region.

    In this demo, we will use mapping capabilities in visualizing data in 2D and 3D. I will show you how to import and display a simulated flight path of a UAV on top of a volcano in Hawaii and display it in 2D and 3D. Ultimately, we can animate a flight from the observatory to the volcano and view a live location of the UAV along with a detailed view in 3D. Let's jump into MATLAB and get started.

    Here is a script I have already written in Live Editor. First we get the coordinates of the Mauna Loa observatory and the Mauna Loa volcano by specifying the latitude, longitude, and height for each location. A geographic axis displays data and geographic coordinates on a map. To plot the locations of the observatory and the volcano, use the hold on command before calls to plotting, as some graphic functions reset axis properties when plotting.

    Geographic base maps provides this background context when plotting your geographic data. I chose here satellite, but you can choose other options like topography, street view, color terrain, et cetera. The map is live. You can zoom in, zoom out, or pan across the area for a more detailed view. Since the extent of the map is determined by the data you're plotting, it's useful to set the zoom level programmatically at the broader level for more context.

    Now let's import the flight track using the gpxread function. The power of mapping toolbox is that you can read and write data between different types of standard geographic file types such as shapefiles, GPX files, or GOT files. We use gpxread because it's a GPX file. And you can tell from the file extension.

    So to plot the track, we plot the coordinates of the geo points using the geoplot function. You can always switch base maps and view the track on topographic base map. Visualizing data on other base maps informs the user of the environment surrounding that data. Many users throughout the world like to use other base maps for their data. Custom base maps allows the user to view data onto third party based maps, such as OpenStreetMap. In some cases, OpenStreetMap has more details than the streets base map that MATLAB provides.

    To visualize data in 3D, use the geoglobe function. The 3D perspective allows the user to see their data in a real world context. You can interactively navigate the globe using your mouse by zooming in, panning across, tilting, and rotating. Now let's visualize the track in 3D using the geoplot3 function. With the geoplot3 function, you can plot a 3D line on the geographic globe. Like the 2D view, you can change the base map on which to plot data to other base maps, such as streets or topography, for a more detailed view.

    A very useful feature we have now, the camera settings, where you can programmatically move the camera for animation use cases. For example, we can view this mountain with different angle perspectives by adjusting the camera settings. In our example, you can animate a flight from the Mauna Loa baseline observatory to the top of the Mauna Loa volcano. View the location of the UAV on the 2D map by animating a marker and data type and animate the 3D flight by setting and adjusting the camera position. You can check the doc for you to learn more on how to use the camera settings and animate the flight track.

    As seen in this demo, mapping toolbox supports a variety of 2D and 3D map displays. It can be a great addition to your data analysis or design workflows in MATLAB for visualization of data with geographic components. In the previous demo, we saw how to display geographical data in 2D and 3D. Now let's look at our second demo.

    Many MATLAB users need to access time specified remote sensing data for their work. In this example, we are going to use weather data from NOAA and IEA, which are two US government organizations. A weather map is an example of using time specified remote sensing data such as temperature, rain, cloud coverage, air pressure, et cetera. These meteorological features are extremely important in weather forecasting or in aviation to show areas of turbulence.

    To gather time specified remote sensing data, you can use Web Map Service, which provides a visualization of publicly accessible geospatial information from web based sources. You can search and display layers that are of interest to you, such as the elevation in Europe, the sea surface temperature in Africa, or the population density in the US and many others.

    In this example, I'm going to show you how to search rain and cloud layers from the WMS server, combine them, and display them on top of a US map. Ultimately, you can create an animation frame and see an hourly sequence of rain images which are vital in weather forecasting. Let's go into MATLAB for now.

    First let's search for the cloud layer from the NASA Earth observations. The NASA satellites collect information about the atmosphere, oceans, and land surfaces. It's a good reference to bring cloud imagery from. Using the function wmsfind, you can search the database for layers and servers that are of interest to you. Here we are looking to find layers containing both terms neowms and nasa in the server URL field of the database.

    As you have discovered, a search for these two items returned results of 127 layers. And you need to select only one layer. In general, a search may even return thousands of layers, which may be too large to review individually. Rather than searching the database again, you may refine your search by using the refine method to narrow the search to a smaller set.

    We supply here the true color terra modis to the refine method. MODIS is a good reference to study the frequency distribution and properties of clouds. So out of the 127 layers I got in my initial search, I am narrowing my search and selecting the layers with terra modis in any search field. Here is the selected layer. We can clearly see that some information is missing from the layer, such as the coordinate reference system. To return all the information, we use the WMS update function to fill the missing properties of the layer.

    Now that we selected the layer we want, we retrieve it from the server using the function wmsread and display it using the geoshow function. We can see the clouds over the USA.

    We do the exact same thing with the rain layer, but this time we select our layer from the Next Generation Radar. This server has a wide selection when it comes to climate and weather. We search the database for layers that have nexrad and mesonet in the server URL. And as we get many, we refine our search to get the one we want. You can learn more about the layers on the website to search terms like the one you see here. And finally, we update the layer to pull all the missing information.

    Now that we selected the layer, we pull it from the server using the function wmsread and finally, display it using the geoshow function. We can see the rain over the USA. The default settings are different for each server, and our goal is to synchronize both layers. So we need to match both dates.

    When we updated the layers earlier using the WMS update function, some properties were added to the layers, such as the coordinate reference system, and some details here. The time of the layer can be accessed in the dimension field of details. For the cloud layer, the data collection started in 2006, and the satellite is taking a picture of the clouds once a day. As for the rain layer, the data collection started in 1995, and the satellite is capturing rain data every five minutes. This information is useful to synchronize both layers.

    Let's pick, for example, August 4, 2020. On August 4th, we know that the cloud is captured once a day. It doesn't matter at what time, because all we know is that every day we have one image of the clouds. So for the MODIS image, we specify August 4th in the wmsread function. This way we pull the cloud layer from the server on that date. The rain is captured every five minutes. I placed a slide bar here that updates every hour instead of every five minutes to simplify. So for t equals 0, we get the rain at midnight. For t equals 23, we get the rain image at 11:00 PM. Therefore, we specify in the NEXRAD image the date, August 4th, and the time.

    Finally, we combine both images and we use the geoshow function to display both layers. We can clearly see that the rain is over the Carolinas and over the Midwest at midnight. A cool thing you can do is to see how the rain is heading during that day by moving the numeric slider to two. After two hours, the rain stopped over Georgia. Ultimately, you can animate the rain layer during the day and see the rain location and movement.

    If you want to learn how to create this animation in MATLAB, the code is adapted from the Hurricane Katrina example in the doc. You can create a video file and an animated GIF file of the animation.

    Here is a summary of the workflow to create WMS maps. You first searched the database for layers that contains keywords that are of interest to you. You refined your search to return only one specific layer. Next, you update your layer to pull all the missing information, such as the coordinate reference system or the timing. And finally, you retrieve your map using the wmsread function.

    That brings us to the end of this demo. In summary, the Weather Map Service servers is a powerful feature that enables you to import diverse map data. The database is publicly accessible and always getting updated throughout the releases, and it consists of approximately 4,000 servers and 68,000 layers. Ultimately, you can animate your data layers with MATLAB to monitor change.

    Thematic maps lets you display quantified facts to represent a relationship between the theme and the location. The most popular and used one is the choropleth map, which uses colors to represent quantified facts such as statistics for a region. For example, the population density in New England. Scatter plots use dots to display the presence or absence of a feature. For example, the location of the cellular towers in the California area.

    A bubble chart is an extension to the scatter plot where an additional dimension of the data is represented in the size of the bubbles. For example, you can display the locations of the tsunamis around the world. And the size of the bubble represents the strength of the tsunami. Finally, the density plot lets you view the data as a geographic density plot, which converts the points into a grid of values representing the density of the points.

    In this example, we will create a choropleth map of the total population of the European countries. To create this choropleth map, the workflow is the following. Start with the geographic data structure of the European countries boundary. Then create a symbol specification object to map attribute values to face colors. And finally, plot the map. Let's see how we can do that in MATLAB.

    First we need to find a geographic data structure of the European countries. You can look online for a third party data. I found this link where you can download a free shapefile of the European countries. Once you download the file, you can read the shapefile using the shaperead function. The data structure has latitude and longitude. So we know that the data is unprojected. This is important to know, because to this day the boundaries of unrpojected data, we use the geoshow function. If S had projected data such as x and y-coordinates instead, we use the mapshow function.

    On the other hand, I got this table that has the total population for each European country. To add the population column to the structure here, we transformed the structure into a table. We then join it with the population table where you can see that each country now has its coordinates and population into one table. And finally, we convert this table back into a structure.

    Second step consists of making a symbol specification structure that assigns an autumn color to each polygon according to the total population. There's a pretty fine colored maps list you can choose from, such as jet, winter, cool, et cetera. I chose autumn in our example. Last step is to apply either geoshow or mapshow depending if you are working with projected or unprojected data. As you can see, up to August 2020, has the largest population in Europe.

    That brings us to the end of this demo. In summary, mapping toolbox lets you create thematic maps with the data of your choice, such as CO2 emission, unemployment rate, COVID-19 cases, et cetera. You can simply import, read, and display data with few comment lines.

    With mapping toolbox major update, we have for the first time a product overview video for you to check. The page is updated to reflect the most recent features we have, and we added some nice and interesting examples in the doc for you to learn more about visualizing maps in 2D and 3D and terrain analysis. Mapping toolbox enables you to leverage the full suite of engineering tools and workflows and work with various other engineering and science domains.

    Please post your questions in the Q&A panel. We will take a few moments to review them and then come back online to answer your questions. Thank you for watching.