Skip to content

Tutorials

Samuel302 edited this page Apr 30, 2023 · 1 revision

How to create a KML file

Requirements

  • Google Earth Pro
  • Python
  • Git
  • A text editor (ex. VSCodium)
  • Basic JSON-Knowledge

Steps

  1. Create a layer directory
    First of all, you need to create a layer directory in which you place the lines.
    The name doesn't matter but you could use following naming schemes:

    • Historic layers: City Year (ex. Karlsruhe 1997)
    • General layers: City (ex. Karlsruhe)
    • Transport-type layers: City Vehicle (ex. Karlsruhe Tram)
  2. Create the lines Now you need to create the lines.

    • Add a new Path and call it using this Naming Scheme: No. From-To (ex. 1 Durlach-Neureut)
    • Change the color to the color used in Real-life if any is used.
    • Change the Path width to 2, if you want to. It might make your life easier, but it's not required.
  3. Export the layer

    • Right click the layer directory and click Save as....
    • Inside the Save-File-Dialog choose KML as File extension.
    • If you're creating a general layer for a new city, save it directly inside the /kml/ folder.
    • If you're creating an additional layer, save the file inside the city you built it for.
  4. Update the Index file

    Creating a new city...

    • To generate the directory, just run weblnp sort using the Pipeline.
    • Now add the city's name to the cities array inside the /kml/index.json.

    Adding a layer to a existing city...

    • If the city has only a main.kml, you need to rename the main.kml to some fitting name and add a entry to the cityData array.
    • If the city has already other layers, just add your layer into the variants array of your city.
  5. Create the Pull-Request
    The last step is to push your local changes to your fork and create a Pull-Request.
    These steps are explained inside the README.

Important links

Clone this wiki locally