Monday, December 14, 2015

Nerdy Mapping Fun with Faerun and Google Earth, Part IV, KML Files

In Part I, I discussed the process of getting this awesome and massively detailed map of Northern Faerun by Mike Schley, onto Google Earth.
Going a little further than in previous posts, I wanted to see if I could display different maps at different zooms. For this I needed to create a KML file. This is actually easy to do manually, just create an xml file with a KML extension. You can get a lot of information on what is possible from KML files on Google Maps. Also, KML files use decimal degrees so I had to use the translated coordinates from previous posts.

I created two KML files. You can probably do it in one, but I had some issues with properly nesting the xml, so I separated them.

The first file just positions the same four maps (though I'm using versions I created without text overlays) I used in my other posts. Getting the "href" path in the xml right on a Windows machine took a while to sort out, but otherwise this was fairly straightforward.

Then I created a second KML to bring in a detailed view of the Dessarin Valley and set the zoom level so it would only show up when you were in close. For this, I used another one of Mike Schley's maps. It took some work to get the edges more or less lined up and the scale to match, and I could delete the borders, to clean it up a bit more, but in this case I was just testing out creating KML files so I wasn't overthinking it. Clearly, it would also be easier with maps designed for this purpose (Mike!?)
Here is the view zoomed out:
And zoomed in just a little:
I also added a placemark for Neverwinter, just to experiment with adding individual elements on the page. You can of course swap out the icons, position the text more elegantly but this was enough for a test.
Here is the first KML file.
<kml xmlns="http://www.opengis.net/kml/2.2">
  <folder>
    <name>Northwest Faerun</name>
    <description></description>
    <groundoverlay>
      <name>Faerun SW Corner</name>
      <description></description>
      <icon>
        <href>D:\[filepath]\nw-faerun-sw.jpg</href>
      </icon>
      <latlonbox>
        <north>41.250</north>
        <south>26.0000</south>
        <east>-118.475</east>
        <west>-150.000</west>
        <rotation>0</rotation>
      </latlonbox>
    </groundoverlay>
    <groundoverlay>
      <name>Faerun SE Corner</name>
      <description></description>
      <icon>
        <href>D:\[filepath]\nw-faerun-se.jpg</href>
      </icon>
      <latlonbox>
        <north>41.250</north>
        <south>26.0000</south>
        <east>-89.950</east>
        <west>-118.475</west>
        <rotation>0</rotation>
      </latlonbox>
    </groundoverlay>
     <groundoverlay>
      <name>Faerun NE Corner</name>
      <description></description>
      <icon>
        <href>D:\[filepath]\nw-faerun-ne.jpg</href>
      </icon>
      <latlonbox>
        <north>56.500</north>
        <south>41.250</south>
        <east>-89.950</east>
        <west>-118.475</west>
        <rotation>0</rotation>
      </latlonbox>
    </groundoverlay>
     <groundoverlay>
      <name>Faerun NW Corner</name>
      <description></description>
      <icon>
        <href>D:\[filepath]\nw-faerun-nw.jpg</href>
      </icon>
      <latlonbox>
        <north>56.500</north>
        <south>41.250</south>
        <east>-150.000</east>
        <west>-118.475</west>
        <rotation>0</rotation>
      </latlonbox>
    </groundoverlay>
    <placemark>
      <name>Neverwinter</name>
      <description>A city.</description>
      <point>
        <coordinates>-124.92085,50.227359,0</coordinates>
      </point>
    </placemark>
  </folder>
</kml>

And here is the Dessarin Valley KML file.
<kml xmlns="http://www.opengis.net/kml/2.2">
    <folder>
          <name>Dessarin Valley</name>
        <description></description>
      <groundoverlay>
        <name>Dessarin Valley</name>
        <description></description>
        <icon>
          <href>D:\[FilePath]\dessarin-valley.jpg</href>
        </icon>
        <region>
          <latlonbox>
            <north>50.400</north>
            <south>45.8</south>
            <east>-117.640</east>
            <west>-122.150</west>
            <rotation>0</rotation>
          </latlonbox>
          <lod>
              <minlodpixels>65000</minlodpixels>
              <maxlodpixels>-1</maxlodpixels>
            </lod>
        </region>
           <latlonbox>
               <north>50.400</north>
            <south>45.8</south>
            <east>-117.640</east>
            <west>-122.150</west>
            <rotation>0</rotation>
          </latlonbox>
      </groundoverlay>
    </folder>
</kml>

Getting this into Google Earth is now just a matter of File | Open and select each KML file. KML files can be used in other mapping software as well.
Nerdy Mapping Fun
  1. In Part I I overlay a map of Faerun on Google Earth.
  2. In Part II, Stitching it Together I repeat this process with the 34 part PDF map.
  3. Part III, Higher Resolution and now moving it around.
  4. In Part IV, KML Files I use KML files to display maps at different zoom levels.

11 comments:

  1. Replies
    1. Big data is a term that describes the large volume of data – both structured and unstructured – that inundates a business on a day-to-day basis. big data projects for students But it’s not the amount of data that’s important.Project Center in Chennai

      Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Corporate TRaining Spring Framework the authors explore the idea of using Java in Big Data platforms.

      Spring Training in Chennai

      The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Delete
  2. I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... visit the website

    ReplyDelete
  3. I like your post. It is good to see you verbalize from the heart and clarity on this important subject can be easily observed... this page

    ReplyDelete
  4. Hi everyone! I would like to recommend you the boot camp en programación full stack from ID Digital School. It is the perfect training to learn programming with the most used programming languages. The possibility of find a good job increase with this training. Have a look!

    ReplyDelete
  5. It is good to see you verbalize from the heart and clarity on this important subject can be easily observed. i like your post. thanks for sharing Kinemaster Gold

    ReplyDelete