clc
clear

% inlezen data file
[data, names]=xlsread('F:\checkouts\openearthrawdata\rijkswaterstaat\Oosterschelde\Galgeplaat\Shape files\Coordinaten_stroming.dbf');
x = data(1:end,4);
y =data(1:end,5);
z = 1;
label = names(2:end,3);

% conversie naar WGS84
[lon,lat] = convertCoordinates(x,y,'CS1.name','Amersfoort / RD New','CS2.code',4326);
iconStr = 'http://maps.google.com/mapfiles/kml/pal3/icon35.png';

for point_id = 1:size(lon,1)
    kmlStr = ge_point(lon(point_id,1),lat(point_id,1),z,'name',char(label(point_id,1)));
    kmlStr_all(1,point_id)= {kmlStr};
end
   
kmlFileName = 'xy_stroom.kml';
kmlTargetDir = 'F:\checkouts\openearthrawdata\rijkswaterstaat\Oosterschelde\Galgeplaat\netcdf\Processed\';
%ge_output(F,S,Parameter,Value)
ge_output([kmlTargetDir,kmlFileName],[kmlStr_all{1:end}]);






