Google Earth Engine layer download issues - gis

I am unable to download the piece of my google earth engine layer that I need from the explorer. When I try to select the piece I need with the rectangle tool and hit download, windows kicks back an error message saying
"Windows cannot open the folder. The Compressed (Zipped) folder (file path to folder) is invalid.
I tried downloading multiple times upon changing the rectangle selected, using the viewport selection instead, opening the zip folder in linux and OSX. But nothing worked. How do I solve this?

Related

Getting files from Google Drive "Computers" into Google Colab

I need to make use of Google Colab's GPUs, but also need to constantly upload new files and make slight adjustments to other files so I used Google's Backup/Sync tools to automatically stream a folder from my local machine into Google Drive so that new/updated/deleted files are automatically loaded. The problem is that I can't figure out how to get the data from the computer into Colab.
Most solutions I've seen on stack overflow use
from google.colab import drive
drive.mount("/content/gdrive",force_remount=True)
The problem with this is that upon doing this, inside of /content/gdrive there is only the folder "My Drive", whereas the files from my computer get saved in a different area "Computers/My Computer/". Thus these files aren't accessible using this method. Is there a way in Colab to be able to access the content in Computers/My Computer/ ?
The only other solutions I have seen have some code inside of Colab allowing you to directly upload files, which doesn't suit my purposes since I don't want to have to manually upload files every time.
In Colab, you might not be able to access any folder or files other than "/content/drive/My Drive". For example, you are not able to access files under '/content/drive/Computers/My Laptop/Project_R_Py/lib_py'.
You can simply go to google drive, right click that folder ("lib_py") and choose "Add Shortcut to Drive". After that you should be able to access that folder by specifying "/content/drive/My Drive/Project_R_Py/lib_py"
Hope this helps

Google Colaboratory and Google Drive integration fails

I am not able to save a new notebook in my Google Drive environment.
Google Colaboratory works with predefined notebooks such as Hello, Colaboratory, but I am not able to save any into my Drive folder.
I have the Colaboratory app allowed in the Google Drive settings and really dont know how to solve it. Colaboratory communicates with Drive - it even creates the notebook files in the Google Drives folder, but when loading any notebook file it always report following Notebook loading error
There was an error loading this notebook. Ensure that the file is accessible and try again.
Neither the details of the error help much:
Failed to fetch TypeError: Failed to fetch
I was playing with the access rights of both the file and the folder and could not find any solution.
Update: Chrome 64.0.3282.167 (64 bit); Windows 10 1709. I use two users on the Chrome. Creating Notebooks works normally on different computers with my username.
This is the output from console:
Chrome Console Output
On Google Chrome, I was seeing this issue randomly and it mentioned not being able to load the file /some/google/path/thats/gone/because/this/fixed/it/client.js. I tried clearing my cache and hard reloading, and sure enough, Colab starting working again.
As with standard cookies, third-party cookies are placed so that a site can remember something about you at a later time. Both are typically used to store surfing and personalization preferences and tracking information.
Google's colaboratory uses third party cookies and your browser most likely has them disabled.
Navigate to your browser settings, search for cookies and enable third party cookies. This should hopefully fix your problem.
I had the same problem, and I just disabled AdBlock on google Colab in everything works perfectly.
try to close/pause AdBlock and reload the page, it works for me.

Google Drive's "Download zip" adds .txt extension to plain text files

While experimenting with Google Drive SDK, I noticed a possibly unwanted behaviour of the Google Drive web interface.
When downloading an entire folder as a zip file, some files within that folder with MIME text/plain appear in the zip with added extension .txt, even if their extension is different on Drive.
For example, I had some .conf and .asc files, which ended being .conf.txt and .asc.txt in the resulting compressed archive, respectively.
The issue seems to exist only when using the "Download zip" feature: if the files are downloaded from the web interface one by one or using the SDK the extension is the original, as expected.
For Windows, you can download all your files from Google Drive, but instead of using the browser,
Go to https://www.google.com/drive/download/
Install Google Drive Sync executable
Log into whichever Google account that has your files
Open Windows Explorer and find where your Google Drive is mapped. You should see an icon like the following:
Double-click the Google Drive icon and navigate to the folder you wish to download. You should see links to your Google files, but non-Google files are downloaded and sync'ed with Google Drive Sync like the following:
Right-click to get the context menu and select the compression program. E.g., I have 7-zip installed, so I selected 7-Zip > Add to "your_file.zip"
This will compress the files without adding any weird file extensions. I haven't tried this on Mac or other compression programs. I believe this should work for any file extension since the files are downloaded to your hard drive.
Note, you can select which folders to sync, in case you have folders that were shared with you. This prevents huge downloads, large sync times and allows you to only download and sync only what you need.
Hope that helps.
The same situation with ZIP archives. I use the usual ZIP scheme to store files, but with a different extension *.tec. Before downloading the archive, Google rigidly renames the files to *.tec.zip!
I don't see any solution other than to programmatically check the files for the "zip" extension and rename them before opening. Of course, it's a problem that my product has to fix Google's bugs, but there it is...

Google Drive Offline Document File Location

Has anyone discovered where/how offline Google Documents are stored when using Google Drive in Chrome? They must be stored locally but where?
Have tried the browser cache etc but can't see it unless I'm missing something very obvious!
To clarify, the file that is stored within 'My Documents/Google Drive' is a text file with a URL, what I am looking for is where the file that the URL points to is held when in offline mode.
It turns out the offline documents are stored in the HTML5 FileSystem.
The Chrome FileSystem storage is located here on my Windows 7 machine:
C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default\File System
I added a number of large images to a document with the Chrome "Offline Docs" enabled and was able to see the FileSystem storage directory grow appropriately.
I then used the HTML5 FileSystem Explorer extension for Chrome to view the file structure of an offline document and was able to confirm that the images were, indeed being retrieved from the HTML5 FileSystem when Chrome was offline. See screenshot:
Further, it may interest you, the location where Google Drive stores offline docs in Android's file system.
sdcard/android/data/com.google.android.apps.docs/
Google Drive uses Chrome's IndexedDB for storing data about files. To see the contents, open developer console (Ctrl + Shift + I) and choose Resources tab.
This answer tells you about actual location of IndexedDB in the file system on Windows.
On Linux it's: ~/.config/google-chrome/Default/IndexedDB
On my computer (Windows 8.1 / Chrome version 41.0.2272.101 m) I found the filesystem at "C:\Users\my username\Appdata\Local\Google\Chrome\User Data\Profile 1\File System"
I needed to find it because I had some corrupted images in Google Slides (they worked on other computers or other browsers on my computer, just not in chrome on my computer). I deleted the File System directory and shazam, the images reloaded and were no longer corrupted.
Mine were all stored in
C:\users\%username%\Google Drive\
Have you downloaded Google Drive?
Offline access is available only when you’re using Chrome. See Setup Offline Access and Google Docs Offline. It seems like offline documents are encoded by Chrome and stored at some secret places, in order to force you to use Chrome.
Google drive stores the offline files in a folder called... android/data/com.google.android.apps.docs/files/pinned_docs_files_do_not_edit/
in that folder u will find the desired files.
Please be aware that...
The files that you will find can be of two formats..
1) encrypted
2) open type
If you have left unchecked the option to encrypt (by default in google drive) the files that u downloaded will be visible, but not accessible by the standard reader. every attempt to read it will be result in a failed operation.
But ... if you DISABLED the encryption in google drive, u will be able to open freely with any type of reader.

Chrome extension to launch on file open

I'm about to start a Chrome packaged app project which will include a NaCl component to parse CHM files. But before I start, I just want to check if it's possible to get the app to automatically launch when a CHM is opened (when the users clicks on a link to an chm file, or possibly if a chm file is dragged into a Chrome window).
I've come across some Google documentation here which describes associating NaCl modules with MIME types in the extension manifest, but A: I'm not sure if this is relevant to my problem and B: I've tried doing as it describes, but nothing seems to change.
If anyone can point me in the right direction, I'd appreciate it!
I was able to hack around with chrome.webRequest to filter URLs with .chm extensions, but of course that only works when a user clicks on a direct link to a CHM file, and there is no way I know of to access local files outside the sandbox (for good reason no doubt).
I have since decided to make the project a Drive app with the C++ portion squirreled away inside a DLL on an ASP.net server, which makes a lot more sense to me.