def getThumbURL(self, params=None): """Get a thumbnail URL for this image. Args: params: Parameters identical to getMapId, plus, optionally: dimensions - (a number or pair of numbers in format WIDTHxHEIGHT) Max dimensions of the thumbnail to render, in pixels. If only one number is passed, it is used as the maximum, and the other dimension is computed by proportional scaling. region - (E,S,W,N or GeoJSON) Geospatial region of the image to render. By default, the whole image. format - (string) Either 'png' or 'jpg'. Returns: A URL to download a thumbnail the specified image. Raises: EEException: If the region parameter is not an array or GeoJSON object. """ request = params or {} request["image"] = self.serialize() if request.has_key("region"): if isinstance(request["region"], dict) or isinstance(request["region"], list): request["region"] = json.dumps(request["region"]) elif not isinstance(request["region"], str): raise ee_exception.EEException("The region parameter must be an array or a GeoJSON object.") return data.makeThumbUrl(data.getThumbId(request))
def getThumbURL(self, params=None): """Get a thumbnail URL for this image. Args: params: Parameters identical to getMapId, plus, optionally: size - (a number or pair of numbers in format WIDTHxHEIGHT) Maximum dimensions of the thumbnail to render, in pixels. If only one number is passed, it is used as the maximum, and the other dimension is computed by proportional scaling. region - (E,S,W,N or GeoJSON) Geospatial region of the image to render. By default, the whole image. format - (string) Either 'png' or 'jpg'. Returns: A URL to download a thumbnail the specified image. Raises: EEException: If the region parameter is not an array or GeoJSON object. """ request = params or {} request['image'] = self.serialize() if request.has_key('region'): if (isinstance(request['region'], dict) or isinstance(request['region'], list)): request['region'] = json.dumps(request['region']) elif not isinstance(request['region'], str): raise ee_exception.EEException( 'The region parameter must be an array or a GeoJSON object.' ) return data.makeThumbUrl(data.getThumbId(request))
def getThumbUrl(self, params=None): """Get a thumbnail URL for this image. Args: params: Parameters identical to getMapId, plus: size - (a number or pair of numbers in format WIDTHxHEIGHT) Maximum dimensions of the thumbnail to render, in pixels. If only one number is passed, it is used as the maximum, and the other dimension is computed by proportional scaling. region - (E,S,W,N or GeoJSON) Geospatial region of the image to render. By default, the whole image. format - (string) Either 'png' (default) or 'jpg'. Returns: A URL to download a thumbnail the specified image. """ request = params or {} request['image'] = self.serialize() return data.makeThumbUrl(data.getThumbId(request))