%
% DESCRIPTION: Program to create the Geopolygon 3D GDF file in the Matlab format.
%
% [TimeZone] and [Description] have text format so the values give in ''


clear;clc;
[FormatName] = 'GDF';
[FormatVersion] = 2.1;
[CRS] = 'n/a'%['EPSG:' num2str(input('[CRS] EPSG code (just number) = '))];
[TimeZone] = 'UTC';%input('TimeZone (char) = ');
[Description] = 'Description of dataset'; %input('Description of data (char) = ');

[FieldDescription] = {
    'Name','Name of 3-D polygon'
    'Lat','Latitude of 3-D polygon'
    'Long','Longitude of 3-D polygon'
    'Elevation','Elevation of 3-D polygon in meters above sea level'
    };
[FieldType] = {
    'Name',3
    'Lat',24
    'Long',14
    'Elevation',21
    };
[FieldUnit] = {
    'Name','char'
    'Lat','deg'
    'Long','deg'
    'Elevation','m'
    };
[d] = struct();


d.Name='Name';
d.Lat=[48.6773;48.6769;48.6764;48.6773;48.6764];
d.Long=[6.3201;6.3203;6.3204;6.3205;6.3207];
d.Elevation=[42.6000;5.6000;56.3000;6.6000;66.8000];
 
 


clear k 
save('GDF_EpisodeName_Geopolygon_3D_example.mat')
