Showing posts with label maps. Show all posts
Showing posts with label maps. Show all posts

Monday, November 10, 2014

Maps for Disease

reposted from

Maps for Disease

A collaboration between Doctors Without Borders, the Red Cross, and other organizations aims to map developing cities across the globe to improve disease response efforts.
By  | November 10, 2014
  • Link this
  • Stumble
FLICKR, SUE CLARKIn 2010, Ivan Gayton of Doctors Without Borders responded to call from a nun in Haiti, who described how her town was suffering from an outbreak of cholera following a massive earthquake. But finding her wasn’t easy, Gayton recounted to The Guardian, in large part because there was no decent map of the area. “Much of the time [the address given] may as well be random syllables,” Gayton said. “If there was a point source for cholera in Haiti, we wouldn’t have known where it was. We needed a map—to be able to correlate the alerts we hear and our patient origins to something on the ground.”
Enter the Missing Maps project, a collaborative effort launched this month by the Humanitarian OpenStreetMap Team (HOT),  Doctors Without Borders, the American Red Cross, and the British Red Cross that aims to create free digital maps for every village and town on the planet. The Guardian called it “nothing less than a human genome project for the world’s cities.”
The method for developing the new maps was created by the HOT, and involves volunteers around the world. Anyone with an internet connection can use a simple point-and-click tool to note the locations of landmarks, such as roads, parks, and buildings on satellite images that have been entered into free mapping software called OpenStreetMap. The satellite images are then removed and the rudimentary maps printed, and more local volunteers head out to verify the information and add the names of streets and buildings. The marked up maps are then shared with the Missing Maps headquarters in London, where even more volunteers input the data into the OpenStreeMap program.
The project has already produced a new digital map of Lubumbashi, a city in the Democratic Republic of Congo, and Doctors Without Borders and the Red Cross have begun recruiting volunteers to help map Ebola-affected regions. The project aims to map the rest of the underdeveloped world in the next two years, according to The Guardian. And because the maps will all be open source, anyone can use and even improve them. “It will be illegal for anyone to charge anyone to use them—meaning local people will have total access to them, not just to look at, but to edit and develop,” Missing Maps coordinator Pete Masters told the publication.
“Finally, I can give volunteers something to do that isn’t just giving money,” Gayton added. “With Missing Maps, they can actually participate in real, genuine fieldwork. That’s huge.”

Friday, April 18, 2014

KML2STRUCT – Easily Import Your KML Files


reposted from


KML2STRUCT – Easily Import Your KML Files

Posted by Sean de Wolski


Sean's pick this week is kml2struct by James Slegers.

Import Your KML Files

Earlier this week, my friend sent me a Google Maps link containing our hiking tracks recorded with the GPS on his smart phone. From Google Maps you can download the data as a KML (Keyhole Markup Language) file.
I wanted to plot it and experiment with the data in MATLAB. Once again, the File Exchange was there for me!
% Read the KML file into a struct:
kmlS = kml2struct('2014-04-12PresidentialTraverse.kml');

% Convert to table (new datatype in R2013b) to make manipulations easier
kmlT = struct2table(kmlS);
Now looking at the table, we can see the four important pieces:
  • Geometry: What is it? A point, line, etc.
  • Lon: Longitude coordinate of tracks
  • Lat: Latitude coordinate of tracks
  • Bounding Box: Bounding box if we want to draw it on a map
First, I'll get the bounding box of the whole trip. To do this, we'll stack each segment's bounding box into the third dimension and then pick the min and the max:
boxes = kmlT.BoundingBox; % Extract Bounding box from table
boxes3d = cat(3,boxes{:}); % Stack along third dimension
bbox = [min(boxes3d(1,:,:),[],3); max(boxes3d(2,:,:),[],3)].'; % Min and max along third dimension give limits
latlim = bbox(2,:)+[-0.01 0.01]; % Buffer them
lonlim = bbox(1,:)+[-0.01 0.01];
Next, I only want to work with the lines, i.e. the actual tracks. The points represent termini, which I don't need right now. Using the new categorical data type and logical indexing, we can extract the latitude and longitude from the table.
% Make Geometry categorical
kmlT.Geometry = categorical(kmlT.Geometry);

% Extract the latitude and longitude for the lines
latlon = kmlT{kmlT.Geometry=='Line', {'Lat','Lon'}};
I'll get the elevation data from NASA using the Web Map Service in the Mapping Toolbox.
nasaLayers = wmsfind('nasa*elev', 'SearchField', 'serverurl');
ned = refine(nasaLayers, 'usgs_ned');
[Z, refmatZ] = wmsread(ned, 'Latlim', latlim, 'Lonlim', lonlim);
Z = double(Z);
And finally, plot a contour map with the tracks overlaid on it.
figure
ax = usamap(latlim, lonlim);
geoshow(Z, refmatZ, 'DisplayType', 'texturemap')
contourm(Z, refmatZ, 20, 'Color', 'k')
demcmap(Z)
title('Presidential Traverse 04/12:13/2014','FontSize',16)

% Add each segment
for ii = 1:length(latlon)
    geoshow(latlon{ii,:}, 'LineWidth', 2)
end

Comments

Have you ever recorded a trip and then tried to analyze it in MATLAB? The tasks above would be more straight-forward if you had access to the original GPX files. These typically come with the elevation data and time stamps allowing you to get even more statistics with more accuracy.
Give it a try and let us know what you think here or leave a comment for James.

Get the MATLAB code 

Published with MATLAB® R2014a