'Query status of imagery resource in Google Earth Entreprise Fusion on command line

I'm using Google Earth Entreprise Fusion to add new imagery resources to my imagery project. When I build the project most images build successfully, but some end up in 'Blocked' state. I'm trying to find a way to query the imagery resource status on the command line to find the 'Blocked' images which I then want to remove using the gedropfromimageryproject command. Is there a gequeryimageryresource command I can use on the command line?



Solution 1:[1]

Best solution I found was to check the image state in the khassetver.xml file in the image resource folder created during the build process. The khassetver.xml file contains a state XML tag with the image state:

<state>Succeeded</state>

or

<state>Blocked</state>

Solution 2:[2]

gequery --status <path_to_image_resource>

so for example

[root@mms USA_CIB05]# gequery --status gem/Resources/Imagery/USA_CIB05_CIB05CDS_111453_0_rpf_n28w109
InProgress

I did find this script which does something a little different but may also be of use.

https://tst-lsavoie.github.io/earthenterprise/geedocs/5.3.6/answer/fusionResAndProj/monitorBuildsWithTwitter.html

#!/bin/bash

twittername="YourServersTwitterAccount"
twitterpass="YourServersTwitterPassword"
assetroot="/gevol/assets/"

find $assetroot.state -iname "*.task" -ls >> /tmp/filelist

taskcount=0
inprogresscount=1
declare -a inprogressarray
declare -a queuedarray

while read line
do
asset=`echo $line | awk '{print $13}'`
status=`/opt/google/bin/gequery --status $asset`
   if [ "$status" = "InProgress" ]; then
      inprogressarray[$[${#inprogressarray[@]}+1]]=$asset
   fi
   if [ "$status" = "Queued" ]; then
      queuedarray[$[${#queuedarray[@]}+1]]=$asset
   fi
let taskcount=taskcount+1
done </tmp/filelist

for inprogress in ${inprogressarray[@]}
do
   logfile=`/opt/google/bin/gequery --logfile $inprogress`
      while read line
      do
      progress=$line
      done <$logfile

   curl --basic --user "$twittername:$twitterpass" --data-ascii
   "status=#GEEFusion Task$inprogresscount:
   $progress&source=Google+Earth+Enterprise"
   "http://twitter.com/statuses/update.json"

   curl --basic --user "$twittername:$twitterpass" --data-ascii
   "status=#GEEFusion Task$inprogresscount:
   $inprogress&source=Google+Earth+Enterprise"
   "http://twitter.com/statuses/update.json"

   let inprogresscount=inprogresscount+1
   done

   curl --basic --user "$twittername:$twitterpass" --data-ascii
   "status=#GEEFusion Working on ${#inprogressarray[@]} task(s),
   ${#queuedarray[@]} queued &source=Google+Earth+Enterprise"
   "http://twitter.com/statuses/update.json"

   rm /tmp/filelist

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Torsten
Solution 2