EU mapping tool in MatLab
Citation for published version (APA):Schijndel, van, A. W. M., & Schellen, H. L. (2011). EU mapping tool in MatLab. In 3rd Annual Meeting of Climate for Culture Project (CfC), EU-FP7-Project no.: 226873, Visby, Sweden, September 2011 (pp. 1-7)
Document status and date: Published: 01/01/2011 Document Version:
Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers) Please check the document version of this publication:
• A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website.
• The final author version and the galley proof are versions of the publication after peer review.
• The final published version features the final layout of the paper including the volume, issue and page numbers.
Link to publication
General rights
Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain
• You may freely distribute the URL identifying the publication in the public portal.
If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, please follow below link for the End User Agreement:
www.tue.nl/taverne Take down policy
If you believe that this document breaches copyright please contact us at: openaccess@tue.nl
providing details and we will investigate your claim.
EU mapping function
Jos van Schijndel
Eindhoven University of Technology, 2011 April
Abstract This document shows a function in MatLab for the mapping and interpolation of data on
the EU. The function is general applicable. The Matlab Mapping Toolbox is required
Input is a data (txt) file with: Column 1: Longitudes, Column 2: Latitudes, Column 3-n: the
parameters to be mapped
Output see below:
Fig 2. Map of Column 3: Mean external temperature
Fig 4. Map of Column3: Mean indoor solar irradiance in reference building
Fig 6. Map of Column 7: Mean indoor RH of reference building
%MAPSTART MAP Example start % %JvS 2011/04 clear all close all filename='Mapvar.txt' EUmapfun(filename)
% EUMAPFUNV4 EU mapping function v4
% Usage: EUmapfunv1(filename) % filename is text file with: % col 1 col2 col3 .. coln % LON LAT Par1 .. Parn-2 %
% Output: EU map of each parameter % %JvS 2011/04 function EUmapfun(filename) Datvar=load(filename); nDatvar=size(Datvar); nMap=nDatvar(2)-2; LONvar=Datvar(:,1); LATvar=Datvar(:,2); LONmin=min(LONvar); LONmax=max(LONvar); LATmin=min(LATvar); LATmax=max(LATvar); nvar=length(LATvar); for i=1:nvar Stations(i).Geometry='Point'; Stations(i).Lat=LATvar(i); Stations(i).Lon=LONvar(i); Stations(i).Name=num2str(i); end EUCo=[-30 45 30 75]; [X,Y]=meshgrid(EUCo(1):0.2:EUCo(2),EUCo(3):0.2:EUCo(4)); figure(1) h = worldmap('Europe'); mstruct = getm(h);
geoshow('landareas.shp', 'FaceColor', 'black') geoshow('worldlakes.shp', 'FaceColor', 'cyan') geoshow('worldrivers.shp', 'Color', 'blue')
geoshow(Stations,'Marker','o','MarkerFaceColor','c','MarkerEdgeColor','k'); textm([Stations(:).Lat],[Stations(:).Lon],{Stations(:).Name})
title([filename ' CfC MAP Locations']) drawnow
xx=find(filename == '.');
if ~isempty(xx)
else
filename2=filename;
end
pname=[filename2 '_' num2str(1) '.tif']; print('-dtiff',pname)
for i=1:nMap
Z=griddata(LONvar,LATvar,Datvar(:,i+2),X,Y,'v4'); figure(i)
h = worldmap('Europe'); mstruct = getm(h);
geoshow('landareas.shp', 'FaceColor', 'black') geoshow('worldlakes.shp', 'FaceColor', 'cyan') geoshow('worldrivers.shp', 'Color', 'blue')
%geoshow(Stations,'Marker','o','MarkerFaceColor','c','MarkerEdgeColor','k'); %textm([Stations(:).Lat],[Stations(:).Lon],{Stations(:).Name})
surfm(Y,X,Z) colorbar
title([filename ' CfC MAP Locations Column ' num2str(i+2) ]) drawnow
pname=[filename2 '_' num2str(i+1) '.tif']; print('-dtiff',pname)
end