Select to view content in your preferred language

Using generative AI to create geographic data

2927
2
08-23-2023 10:36 AM
TomBaker
Esri Regular Contributor
4 2 2,927

Punchline: Generative AI tools offer interesting possibilities, although be careful.  You won’t know what data are fictional and what data are real.

In the blog that follows, I used generative AI commands to generate the following data.  You can send the AI a prompt (user input) and the AI will return "data".  Remember that generative AI can and will hallucinate from time to time.  Depending on your teaching needs, carefully review all output.

Note: In some returned data below, I added the bulleted list to help with formatting of this blog.  The AI did not add the bullets.

CSV 

Can ChatGPT create a list of cities with a geographical query attached?

Prompt to ChatGPT: can you provide a comma-delimited table of latitude, longitude, and city name for 10 cities in the northern hemisphere?

ChatGPT returned:

  • City,Latitude,Longitude
  • Moscow,55.7558,37.6173
  • Toronto,43.651070,-79.347015
  • Reykjavik,64.1466,-21.9426
  • Tokyo,35.682839,139.759455
  • Stockholm,59.3293,18.0686
  • Seattle,47.6062,-122.3321
  • Oslo,59.9139,10.7522
  • Helsinki,60.1699,24.9384
  • Anchorage,61.2181,-149.9003
  • Edinburgh,55.9533,-3.1883

 

GeoJSON

Can ChatGPT draw a polygon centered over a real area?

Prompt to ChatGPT: create a geojson square polygon centered over New York City, New York.

ChatGPT returned:

{

    "type": "FeatureCollection",

    "features": [

        {

            "type": "Feature",

            "properties": {},

            "geometry": {

                "type": "Polygon",

                "coordinates": [

                    [

                        [-74.0110, 40.7178],

                        [-74.0110, 40.7078],

                        [-74.0010, 40.7078],

                        [-74.0010, 40.7178],

                        [-74.0110, 40.7178]

                    ]

                ]

            }

        }

    ]

}

CSV

Can ChatGPT create a list of points in a bounded region?

Prompt to ChatGPT: generate a comma-delimited table of 15 places within the geojson square above.  Include the latitude, longitude, and place name.

ChatGPT returned

  • latitude,longitude,place_name
  • 40.7168,-74.0100,"Place 1"
  • 40.7165,-74.0095,"Place 2"
  • 40.7162,-74.0090,"Place 3"
  • 40.7159,-74.0085,"Place 4"
  • 40.7156,-74.0080,"Place 5"
  • 40.7153,-74.0075,"Place 6"
  • 40.7150,-74.0070,"Place 7"
  • 40.7147,-74.0065,"Place 8"
  • 40.7144,-74.0060,"Place 9"
  • 40.7141,-74.0055,"Place 10"
  • 40.7138,-74.0050,"Place 11"
  • 40.7135,-74.0045,"Place 12"
  • 40.7132,-74.0040,"Place 13"
  • 40.7129,-74.0035,"Place 14"
  • 40.7126,-74.0030,"Place 15"

 

KML

Can Bard return near realtime data from the Internet?

Prompt to ChatGPT: Use KML to create an approximate outline of the state of Kansas.

ChatGPT returned:

<?xml version="1.0" encoding="UTF-8"?>

<kml xmlns="http://www.opengis.net/kml/2.2">

  <Document>

    <name>Kansas Outline</name>

    <Placemark>

      <name>Outline</name>

      <LinearRing>

        <coordinates>

          -101.906620,36.993076

          -101.906620,39.993019

          -94.616221,39.993019

          -94.616221,36.993076

          -101.906620,36.993076

        </coordinates>

      </LinearRing>

    </Placemark>

  </Document>

</kml>

 CSV

Can much data can be returned by ChatGPT?

Prompt to ChatGPT: create a comma-delimited table of all country capitals in the world. Include in the table the capital name, country name, latitude of the capital, longitude of the capital.

ChatGPT 3.5 give a “sample” data structure with less than 10 results. ChatGPT 4 also returns a sample with 30 records (I only included the first three below).

  • Capital Name, Country Name, Latitude, Longitude
  • -----------------------------------------------
  • Kabul, Afghanistan, 34.6, 69.2
  • Tirana, Albania, 41.3, 19.8
  • Algiers, Algeria, 36.8, 3.2

Furthermore, ChatGPT 4 stated, “Unfortunately, due to the restrictions of this medium, I can only provide a sample list”.

 

AND THEN THINGS GOT WEIRD.

I headed to Google Bard - to access “live” data from the Internet. 

Prompted with: create a comma-delimited list of earthquakes from the last 24 hours that have a  magnitude 5 or greater.  Include latitude, longitude, magnitude, date, and nearest location.

Bard returned:

  • 19.42,-169.87,5.8,2023-07-28 11:07 PM,Kermadec Islands
  • 34.36,-118.24,5.5,2023-07-28 10:32 PM,Los Angeles
  • 14.54,-90.64,5.7,2023-07-28 10:18 PM,Guatemala
  • -34.64,-70.68,5.6,2023-07-28 9:55 PM,Chile
  • -17.20,-172.44,5.6,2023-07-28 9:39 PM,Tonga
  • -17.31,-170.35,5.5,2023-07-28 9:24 PM,Samoa
  • -57.00,-26.00,5.8,2023-07-28 9:12 PM,South Sandwich Islands
  • 15.36,-95.33,5.6,2023-07-28 8:58 PM,Mexico
  • -36.91,-73.11,5.6,2023-07-28 8:47 PM,Chile
  • 19.35,-166.83,5.7,2023-07-28 8:33 PM,Kermadec Islands
  • 17.77,-172.51,5.7,2023-07-28 8:19 PM,Tonga
  • -35.67,-72.40,5.6,2023-07-28 8:05 PM,Chile
  • -38.80,-72.90,5.6,2023-07-28 7:51 PM,Chile
  • -34.36,-70.70,5.6,2023-07-28 7:37 PM,Chile
  • -19.41,-169.94,5.7,2023-07-28 7:23 PM,Kermadec Islands
  • -17.18,-172.46,5.6,2023-07-28 7:09 PM,Tonga
  • -37.37,-72.53,5.6,2023-07-28 6:55 PM,Chile
  • -54.77,-26.42,5.7,2023-07-28 6:41 PM,South Sandwich Islands
  • -38.80,-72.90,5.6,2023-07-28 6:27 PM,Chile
  • -35.70,-72.37,5.6,2023-07-28 6:13 PM,Chile
  • -57.00,-26.00,5.7,2023-07-28 5:59 PM,South Sandwich Islands

How many things in the above data make you pause?  My first thought was that maybe this is a subset of the data, so I headed over to the USGS site.  It gave a very different story.

Admittedly, these are very small prompts. Perhaps more detailed prompts would return more accurate results.  Maybe include in the prompt a "do not make up data" statement - to improve work.  So many questions remain unanswered.....

2 Comments