0

I use Google Earth KMZs for fiber optic network designs and I need to transfer info over to Excel for ordering purposes. I'm using the Placemark and Path features in GE to correspond to items we order, like fiber cable and fiber pedestals, and the only way I can find to keep a running tally for these items is to personally copy/paste the info from GE to Excel which can get extremely tedious and time consuming. I can convert the KMZ to KML and then convert that to plain text but my problem is that for each placemark/path when converted is the metadata and lat/long coordinates are included. I was wondering if there is a way to just get the Placemark/Path names/labels in plain text.

Here is an example of one fiber pedestal (labled "BDO4") location in kml using Notepad++:

    <name>Example.kml</name>
    <StyleMap id="m_ylw-pushpin">
        <Pair>
            <key>normal</key>
            <styleUrl>#s_ylw-pushpin</styleUrl>
        </Pair>
        <Pair>
            <key>highlight</key>
            <styleUrl>#s_ylw-pushpin_hl</styleUrl>
        </Pair>
    </StyleMap>
    <StyleMap id="msn_triangle">
        <Pair>
            <key>normal</key>
            <styleUrl>#sn_triangle</styleUrl>
        </Pair>
        <Pair>
            <key>highlight</key>
            <styleUrl>#sh_triangle</styleUrl>
        </Pair>
    </StyleMap>
    <Style id="s_ylw-pushpin">
        <IconStyle>
            <scale>1.1</scale>
            <Icon>
                <href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
            </Icon>
            <hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
        </IconStyle>
        <LineStyle>
            <color>ff0000ff</color>
            <width>2</width>
        </LineStyle>
    </Style>
    <Style id="s_ylw-pushpin_hl">
        <IconStyle>
            <scale>1.3</scale>
            <Icon>
                <href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
            </Icon>
            <hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
        </IconStyle>
        <LineStyle>
            <color>ff0000ff</color>
            <width>2</width>
        </LineStyle>
    </Style>
    <Style id="sh_triangle">
        <IconStyle>
            <color>ff0000ff</color>
            <scale>0.945455</scale>
            <Icon>
                <href>http://maps.google.com/mapfiles/kml/shapes/triangle.png</href>
            </Icon>
        </IconStyle>
        <LabelStyle>
            <scale>0.6</scale>
        </LabelStyle>
        <BalloonStyle>
        </BalloonStyle>
    </Style>
    <Style id="sn_triangle">
        <IconStyle>
            <color>ff0000ff</color>
            <scale>0.8</scale>
            <Icon>
                <href>http://maps.google.com/mapfiles/kml/shapes/triangle.png</href>
            </Icon>
        </IconStyle>
        <LabelStyle>
            <scale>0.6</scale>
        </LabelStyle>
        <BalloonStyle>
        </BalloonStyle>
    </Style>
    <Folder>
        <name>Example</name>
        <open>1</open>
        <Folder>
            <name>Example Ped 1</name>
            <Placemark>
                <name>BFO</name>
                <styleUrl>#m_ylw-pushpin</styleUrl>
                <LineString>
                    <tessellate>1</tessellate>
                    <coordinates>
                        -82.40814649086957,32.24450319977755,0 -82.40817186764822,32.24450659469282,0 -82.40832125380264,32.24516071894323,0 -82.40863739256636,32.24667276720609,0 -82.40859999009885,32.24668066649382,0 -82.4085852926052,32.2466953491004,0 
                    </coordinates>
                </LineString>
            </Placemark>
            <Placemark>
                <name>BDO4</name>
                <LookAt>
                    <longitude>-82.40641705128608</longitude>
                    <latitude>32.2463484610605</latitude>
                    <altitude>0</altitude>
                    <heading>0.0165812563777296</heading>
                    <tilt>0</tilt>
                    <range>1304.494385276825</range>
                    <gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
                </LookAt>
                <styleUrl>#msn_triangle</styleUrl>
                <Point>
                    <gx:drawOrder>1</gx:drawOrder>
                    <coordinates>-82.40815049771055,32.24450608753064,0</coordinates>
                </Point>
            </Placemark>
        </Folder>

Using a kml to plain text table converter it comes out as:

W   32.244506088    -82.408150498   #ff0000         0.8 http://maps.google.com/mapfiles/kml/shapes/triangle.png BDO4    
W   32.246697349    -82.408587262   #ff0000         0.8 http://maps.google.com/mapfiles/kml/shapes/triangle.png BDO4    

type    latitude    longitude   color   opacity width   scale   sym name    desc
T   32.244503200    -82.408146491   #ff0000 1.00    2           BFO 
T   32.244506595    -82.408171868                           
T   32.245160719    -82.408321254                           
T   32.246672767    -82.408637393                           
T   32.246680666    -82.408599990                           
T   32.246695349    -82.408585293   

It is much less convoluted but it's not what I need especially when a typical kmz/kml I use has over 100 locations for the triangle Pushmarks used for the fiber pedestals alone and not including all other GE Pushmarks/Paths we use for all equipment used to build a fiber network per pedastal location (not included in the above just to keep it short; but things like cable, ground rods, handhold vaults, stub poles, locates, boring footage etc each have their own Placemark/Path). When in kmz format, these Pushmarks/Paths are organized in a cascading folder per pedestal location and named sequentially according to the network area (in these examples the name of the cascading folders is simply Example>Example Ped 1 and Ped 2 with the two "Ped" folders having the triangle GE Pushmark used for fiber pedastals and a red Path used to indicate fiber cable). What I need is a way to keep the name of the folder and then have every GE Pushmark and Path listed out beside it in spreadsheet form without all the code and coordinates. For the Paths, I need the cable name (in the example it's named "BFO", for "Buried Fiber Optic," but for real world purposes the size of the cable would also be included in the name. ex: "BFO24R") as well as the footage of the cable to know what size and length of cable to order.

I'm not sure it's possible to pull the exact data I need from these kmz/kml's for a spreadsheet or it might be too time consuming to come up with something easy.

1
  • Could you share some test data? The structure is important, you can use fake coordinates and attribute values if you wish.
    – user30184
    Commented Mar 21, 2023 at 7:48

1 Answer 1

1

For temporary purposes, to fulfill your question, import your kmz into ArcGIS Pro or QGIS and use an exporting tool from their. Both applications allow you to modify how an excel sheet is derived from your data. With ArcGIS, you can create a developer account which should allow you access to some paid applications.

Long term solution, especially if you are designing fiber routes, I highly recommend using a full-fledged GIS software like ArcGIS Pro or QGIS. I personally use the Crescent Link extension on ArcGIS Pro because it allows me to manage the cable count and splice configurations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.