본문 바로가기

우리나라

Chat GPT에서 구글어스 KML 코드 만들기

반응형

[공공데이터]   

 

 


 

■ 관련 데이터

 

질문 내용
Please write KML code that can display each city on Google Earth. 1. 홍성군, 부여군, 서천군, 보령시 : 붉은색 마커. 2. 계룡시, 대전시, 서산시, 강릉시, 공주시, 경주시 : 노색 마커

 

 

ChatGPT
ChatGPT

Below is the KML code to display the cities you mentioned on Google Earth. Cities from the first group (Hongseong-gun, Buyeo-gun, Seocheon-gun, Boryeong-si) will be marked with red markers, and cities from the second group (Gyeryong-si, Daejeon-si, Seosan-si, Gangneung-si, Gongju-si, Gyeongju-si) will be marked with yellow markers.

 

코드


<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <!-- Define styles for red and blue markers -->
    <Style id="redMarker">
      <IconStyle>
        <Icon>
          <href>http://maps.google.com/mapfiles/kml/paddle/red-circle.png</href>
        </Icon>
      </IconStyle>
    </Style>
    
    <Style id="blueMarker">
      <IconStyle>
        <Icon>
          <href>http://maps.google.com/mapfiles/kml/paddle/ylw-blank.png</href>
        </Icon>
      </IconStyle>
    </Style>

    <!-- Placemarks for cities with red markers -->
    <Placemark>
      <name>Hongseong-gun</name>
      <styleUrl>#redMarker</styleUrl>
      <Point>
        <coordinates>126.654346,36.597721</coordinates> <!-- Longitude, Latitude -->
      </Point>
    </Placemark>

    <Placemark>
      <name>Buyeo-gun</name>
      <styleUrl>#redMarker</styleUrl>
      <Point>
        <coordinates>126.912345,36.278827</coordinates> <!-- Longitude, Latitude -->
      </Point>
    </Placemark>

    <Placemark>
      <name>Seocheon-gun</name>
      <styleUrl>#redMarker</styleUrl>
      <Point>
        <coordinates>126.700855,36.059908</coordinates> <!-- Longitude, Latitude -->
      </Point>
    </Placemark>

    <Placemark>
      <name>Boryeong-si</name>
      <styleUrl>#redMarker</styleUrl>
      <Point>
        <coordinates>126.830890,36.333925</coordinates> <!-- Longitude, Latitude -->
      </Point>
    </Placemark>

    <!-- Placemarks for cities with blue markers -->
    <Placemark>
      <name>Gyeryong-si</name>
      <styleUrl>#blueMarker</styleUrl>
      <Point>
        <coordinates>127.323408,36.279457</coordinates> <!-- Longitude, Latitude -->
      </Point>
    </Placemark>

    <Placemark>
      <name>Daejeon-si</name>
      <styleUrl>#blueMarker</styleUrl>
      <Point>
        <coordinates>127.386329,36.350412</coordinates> <!-- Longitude, Latitude -->
      </Point>
    </Placemark>

    <Placemark>
      <name>Seosan-si</name>
      <styleUrl>#blueMarker</styleUrl>
      <Point>
        <coordinates>126.456047,36.780920</coordinates> <!-- Longitude, Latitude -->
      </Point>
    </Placemark>

    <Placemark>
      <name>Gangneung-si</name>
      <styleUrl>#blueMarker</styleUrl>
      <Point>
        <coordinates>128.875172,37.751853</coordinates> <!-- Longitude, Latitude -->
      </Point>
    </Placemark>

    <Placemark>
      <name>Gongju-si</name>
      <styleUrl>#blueMarker</styleUrl>
      <Point>
        <coordinates>127.119801,36.455040</coordinates> <!-- Longitude, Latitude -->
      </Point>
    </Placemark>

    <Placemark>
      <name>Gyeongju-si</name>
      <styleUrl>#blueMarker</styleUrl>
      <Point>
        <coordinates>129.211453,35.856171</coordinates> <!-- Longitude, Latitude -->
      </Point>
    </Placemark>

  </Document>
</kml>


 

구글 어스 화면



■ 관련 자료

도시__구글어스_마커.kml
0.00MB

 

 



■ 기준 날짜

 2024.4.17

반응형