1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Polygon with multiple Holes

Discussion in 'FSX KML' started by mendiola_loyola, 21/1/07.

  1. mendiola_loyola

    mendiola_loyola Resource contributor

    Joined:
    18/10/06
    Messages:
    268
    Country:
    peru
    Dear MatthewS:

    Is there a way to create a polygon with multiple holes in FSXKML?

    I just want to have one kml with a polygon and make n holes on it with another polygons.

    For example if i have a water polygon and i have 10 island polygons, how can i make the 10 holes on the polygon?

    Is there a kml example with nested kml folder and polygons to avoid to have a lot of kml files for each polygon i design? (.kml)

    Thanks.
    Alfredo Mendiola Loyola
    Lima Perú
  2. MatthewS

    MatthewS

    Joined:
    28/9/06
    Messages:
    333
    Country:
    australia

    You should be able to do this... (Make sure you use the latest version 1.05.1)

    In Google Earth

    1) Draw your water polygon
    2) Draw your multiple island polygons
    3) Save your KML file

    In FSX KML

    4) Open the the KML file
    5) Tag the water polygon
    6) Tag all the island polygons with POLYGONHOLE tag
    7) Make sure all the island polygons appear underneath the water polygon. This is because FSX KML associates the polygon holes with the preceding polygon.
    8) Ensure the ReversePointsInPolygonHoles build option is on. Because GE writes all polygons in a clockwise direction, we need FSX KML to reverse the order of points in holes, because this is needed by the Shp2Vec sdk tool.
    9) Build

    Having done that you should find your lake has lots of islands.

    Also... I'm not sure why you are using multiple KML files. I just create a folder in Google Earth for my project (called say "MyProject"), and then create all my polygons (and sub folders) in that MyProject folder. Then I simply save that one MyProject folder as MyProject.KML. So irrespective of how many folders or polygons I have in my project I just have a single KML file.


    Please let me know if you don't get it working and I will upload an example KML with lake and multiple islands. I cant do it at the moment because I'm not at home and don't have access to FSX.
  3. mendiola_loyola

    mendiola_loyola Resource contributor

    Joined:
    18/10/06
    Messages:
    268
    Country:
    peru
    Dear Matthew, thanks for your help and for your useful tool, congratulations.

    Alfredo Mendiola Loyola
    Lima Perú
  4. Mace

    Mace

    Joined:
    2/12/06
    Messages:
    997
    Country:
    us-missouri
    You can do that. The only thing we cannot do, is put an island inside an island. Isn't that correct? I think I read somewhere, where a person cannot put an PolygonHole tagged item inside another PolygonHole tagged item.

    An example would be, an island with a pond in it. Can this be done?
  5. DougMatthews

    DougMatthews

    Joined:
    23/10/06
    Messages:
    288
    Country:
    us-washington
    The pond would be a polygon. The pond polygon would be positioned within a hole in another (separate) polygon.

    -Doug
  6. MatthewS

    MatthewS

    Joined:
    28/9/06
    Messages:
    333
    Country:
    australia
    Yes... Doug is right. Here is a screen shot and the attached KML file.

    Attached Files:

Share This Page