source: issm/branches/trunk-jpl-damage/src/m/kml/kml2exp.m@ 13101

Last change on this file since 13101 was 13101, checked in by cborstad, 13 years ago

merged trunk-jpl through revision 13099 into branch

File size: 508 bytes
Line 
1function kml2exp(input,output)
2%KML2EXP: transform kml file Argus exp file.
3%
4% Usage: kmltoexp('temp.kml','temp2.exp')
5%
6%
7
8
9
10
11%First, read polygon kml file.
12structure=kml_shapefile(input);
13
14%create exp file:
15domain=struct();
16for i=1:length(structure),
17
18 if isfield(structure,'name'),
19 domain(end+1).name=structure(i).name;
20 else
21 domain(end+1).name='NaN';
22 end
23
24 domain(end).density=1;
25 domain(end).x=structure(i).X;
26 domain(end).y=structure(i).Y;
27end
28domain=domain(2:end);
29expwrite(domain,output);
Note: See TracBrowser for help on using the repository browser.