kml_gib2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
kml_gib2 [2016/04/07 10:07] – Stefan Ene | kml_gib2 [2019/11/21 12:26] (current) – Stefan Ene | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Lab4. KML ====== | ====== Lab4. KML ====== | ||
- | |||
- | '' | + | {{tag> |
- | ==Export from ArcMap== | + | '' |
+ | == Export from ArcMap == | ||
- | Download the file areas.shp (and associated files) | + | Download the file areas.shp (and associated files) |
Save and extract the data on your computer and open it in ArcMap. | Save and extract the data on your computer and open it in ArcMap. | ||
Line 16: | Line 16: | ||
(output file name).kmz | (output file name).kmz | ||
- | ==Read and Create in Google Earth== | + | == Read and Create in Google Earth == |
Start Google Earth and open the KMZ file you exported from ArcMap using: | Start Google Earth and open the KMZ file you exported from ArcMap using: | ||
- | File > Open... | + | File > Open… |
You can try to click at the polygons and see the associated attribute data. | You can try to click at the polygons and see the associated attribute data. | ||
Line 38: | Line 38: | ||
In the sidebar you can put your polygon and other things you add into folders and also change name and properties. | In the sidebar you can put your polygon and other things you add into folders and also change name and properties. | ||
- | When you have created a folder containing some different things in different colors, right click at the folder and click: '' | + | When you have created a folder containing some different things in different colors, right click at the folder and click: '' |
It is possible to choose if you want to save it as a KML or a KMZ. Save the folder you created using Google Earth both as a KML and a KMZ file. | It is possible to choose if you want to save it as a KML or a KMZ. Save the folder you created using Google Earth both as a KML and a KMZ file. | ||
- | ==Read and Create using Code (in Notepad)== | + | == Read and Create using Code (in Notepad) == |
- | The data in KML files following the structure of a code language called '' | + | The data in KML files following the structure of a code language called '' |
- | @@ | + | @@ <?xml version=" |
- | <?xml version=" | + | |
- | < | + | <code> |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | </ | + | </ |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | </ | + | </ |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | </ | + | </ |
- | </Region> | + | |
- | @@ | + | </code> |
+ | |||
+ | </ | ||
The first part tells the computer that this is XML code and also define the method (in this case '' | The first part tells the computer that this is XML code and also define the method (in this case '' | ||
- | The rest of the XML code is built on a hierarchical structure were parts start with <xx& | + | The rest of the XML code is built on a hierarchical structure were parts start with <xx> and end with </xx>. |
- | ===Open in Notepad=== | + | === Open in Notepad === |
Open Notepad and open your files: | Open Notepad and open your files: | ||
- | File > Open... | + | File > Open… |
Change '' | Change '' | ||
- | The content of the KML file should exist of more symbols than the compressed KMZ file, but it is possible to read by a human. | + | The content of the KML file should exist of more symbols than the compressed KMZ file, but it is possible to read by a human. |
- | ===Start with a new KML using Notepad=== | + | === Start with a new KML using Notepad === |
We will now create a new KML file using Notepad. Start from a empty Notepad document and state that this is a XML dokument by writing: | We will now create a new KML file using Notepad. Start from a empty Notepad document and state that this is a XML dokument by writing: | ||
- | @@ | + | @@ <?xml version=" |
- | <?xml version=" | + | |
- | @@ | + | |
The second part starts the XML code. Copy this row to your document: | The second part starts the XML code. Copy this row to your document: | ||
- | @@ | + | @@ <kml xmlns=" |
- | <kml xmlns=" | + | |
- | @@ | + | |
The third part is the actual information that in this case give coordinates for the point '' | The third part is the actual information that in this case give coordinates for the point '' | ||
- | @@ | + | @@ < |
- | < | + | |
- | < | + | <code> |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | </ | + | < |
- | </ | + | </ |
- | </Document> | + | </ |
- | @@ | + | |
+ | </code> | ||
+ | |||
+ | </ | ||
The last part end the KML code. | The last part end the KML code. | ||
- | @@ | + | @@ </ |
- | </ | + | |
- | @@ | + | |
Save the file with the file extension '' | Save the file with the file extension '' | ||
Line 118: | Line 117: | ||
Also save this file with the file extension '' | Also save this file with the file extension '' | ||
- | | ||
(Save all the files on a place you can find tomorrow.) | (Save all the files on a place you can find tomorrow.) | ||
- | More about how KML files are built can be found here: [[https:// | + | More about how KML files are built can be found here: [[https:// |
+ | |||
+ | And more about XML can be found here: [[http:// | ||
- | And more about XML can be found here: [[http:// |
kml_gib2.1460016442.txt.gz · Last modified: 2016/04/07 10:07 (external edit)