Search code examples
google-cloud-platformgoogle-cloud-storagegoogle-earth-engine

How to use file from Google Cloud Storage bucket in Earth Engine? Don't see in Assets


head -n 5 routes.csv

,trip_count,prev_port,next_port,lat,lon,frequency 7641,1984063,4410,3658,45.764835,-87.05328753692308,1.0 7642,1984063,4410,3658,45.60853333,-87.03821667,1.0 7643,1984063,4410,3658,45.56013333,-87.03423333,1.0 7644,1984063,4410,3658,45.48103333,-87.01585,1.0

Goal: access this file through https://code.earthengine.google.com/

Present situation illustrated with two screenshots, one of Earth Engine and the other of Google Cloud Storage: the file that exists in the bucket is not visible under Assets after in Earth Engine (and I want it to be, I think, to interact with it?)

Cloud Storage bucket

Earth Engine Assets

I tried exploring and searching on https://console.cloud.google.com/ for instructions about interacting with Earth Engine. I found some examples and examined everything I found. If there is an example that solves my problem, I have at least seen it without understanding that it solved my problem if read carefully enough.


Solution

  • Google Earth Engine assets are their own sort of entity, and are not the same thing as the contents of Google Cloud Storage buckets. The Assets tab in the Code Editor will only show Earth Engine assets, which are owned by a Google Cloud project. (You seem to have both a Google Cloud project named ee-jordanbell and a Google Cloud Storage bucket named ee-jordanbell, but these are different entities.)

    The easiest way to get a single CSV file into Earth Engine is to upload it using the Code Editor. Click the “New” button and choose “CSV file” from the menu.

    Menu with New > Table Upload > CSV file

    If you specifically want to bring in data from Google Cloud Storage, then I believe you need to use the command-line tool, earthengine upload, or the API projects.table.import.