Download and save data in grass gis - download

I am very new to GRASS GIS and I am trying to download some data. As in this example ( https://grass.osgeo.org/grass80/manuals/r.import.html ) I am using wget to download bioclimatic data (bioclim variables). I need to change the path where the data are saved, but I cannot find any information regarding the functioning of wget and how to change the default location. I am using GRASS GISS 7.8.6.
Thanks.

Related

How to get a copy of all uploaded images from a Plone site

I am working on a plone site with version 4. I want to have a copy of all the uploaded images. What is the way to get it? I couldn't get appropriate documentation for it.
If you are comfortable with the Linux command line and want something quick and dirty to get ALL images locally, you can add a script (Python) via the zmi into the portal_skins/custom folder on the Plone site, with the following code:
from Products.CMFCore.utils import getToolByName
base = 'http://example.com/'
pc = getToolByName(context, 'portal_catalog')
query = {'portal_type': 'Image'}
brains = pc(query)
for brain in brains:
path = brain.getObject().absolute_url()[len(base):]
dire = '/'.join(path.split('/')[:-1])
print "mkdir -p '%s';wget %s%s -O '%s'" % (dire, base, path, path)
return printed
(Replace example.com with your site domain name)
Call the script 'image_links'.
Then go to to http://example.com/image_links
You should see a whole bunch of bash shell script commands on the web page. Copy and paste those into a terminal, and your machine should download the images.
Alternatively, put those commands into a shell script and download them all at once.
This produces a directory structure with all images on the site.
I used something similar a few weeks ago to download 3500 images from a client site. Took an hour or 2, but without involvement from me.
Keep in mind that this is quick and dirty: Images get the Plone object name, so might not have the correct extension, etc. YMMV.
A simple (but manual) way is to connect to your Plone site using a webdav client and authenticating using Plone credentials.
In this way you can move inside Plone folders and drag & drop images from remove site to your local machine.

Using PDI transformation in Pentaho BI server as data source for report parameters

Any advice on how to use PDI transformation as data source for report parameters in BI server's console?
I've uploaded the prpt reports to BI server but the I get a message "Error parsing parameter information". The .prpt and .ktr files are both in the same directory.
Actually, just realized that the issue could be solved by adding Transformation (KTR) as a resource. In this case, one can use the File-Resources menu selection. In the dialog select the transformation you wish to import and pick text/xml format. Give the resource a name and save it. You must save your PRPT file again (File-Save).
The caveat here is that transformation should be in the same folder as PRPT file. Then in the data sources, don't select transformation via folder path, but use the name of the resource that was assigned during the previous step (there is no drop down menu for looking thorough the files). You have to know exact name of the resource in order to do so.
Check the logs carefully. I suspect it's not finding the KTR. When you select the KTR in the prpt it usually (annoyingly) saves the whole path, so it's probably the full path to the ktr as defined on your dev box.
This does work, so do persevere!

Can you use a URL to embed an image inline in MVCMailer

In looking at the MVCMailer step by step, I see that you can embed images inline using cid in the HTML.
https://github.com/smsohan/MvcMailer/wiki/MvcMailer-Step-by-Step-Guide
I see the code that talks about embedding:
#Html.InlineImage("logo", "Company Logo")
var resources = new Dictionary<string, string>();
resources["logo"] = logoPath;
PopulateBody(mailMessage, "WelcomeMessage", resources);
My question is rather than use a path within the site like:
resources["logo"] = Server.MapPath("~/Content/images/logo.png");
Can I somehow get at images I have in the Azure Cloud or S3 Cloud where I have plenty of space?
Please let me know if there is a way to get the image from some other source than the server the MVC mailer is running on.
Thanks,
Victor
In Server.MapPath(my_path), my_path, specifies the relative or virtual path to map to a physical directory. Server.MapPath is related with local FileSystemObject so in that case it will look for the file (you pass as parameter) in a location within local web server. More info is described here:
http://msdn.microsoft.com/en-us/library/ms524632(v=VS.90).aspx
So if you image is located at http://azure_storage_name.blob.core.windows.net/your_public_container/image_name.jpg, the passing it to Server.MapPath() will not work as this is not a location in local file system. I tried and found that it will not accept and I also try to tweak a few way but no success. IF you can change the code behind and which can access the resources from a URL then it will work otherwise not.

Provide url and store image from the url in a file in file system in groovy

I am doing a project in grails using groovy to upload an image. I have been able to fetch a file from my-computer and store it in a location and display it from there. I wish to accept a url from the user during run time and store the image in the locaion and display from there. Help please
Please consider Gregg's comment, but if you stay with your idea, this is the way I would do it:
new File("path/to/local/image.jpg").bytes = new java.net.Url("http://url.from.user/image.jpg").bytes

Trying to use image from URL with Kohana Image class

I'm trying to use an image from a URL with Kohana image class. http://kohanaframework.org/3.0/guide/api/Image
Is this possible or does the image always have to be local to the project?
I'm accessing the image like this:
http://www.mysite.com/temp/myimage.jpg
from the same site.
However the temp folder in the above URL is actually an Alias in Apache so is outside of the document root.
Can anyone shed any light on a solution?
The kohana image library says its not an image because it either fails
realpath($file);
or
getimagesize($file);
Cheers.
The image does have to be local to the project.
What you can do is grab a copy off the remote and save it to your project and serve that.
$offsite_path = 'http://example.com/images/steve-buscemi.jpg';
$local_copy = Remote::get($offsite_path);
$local_path = 'images/steve-buscemi.jpg';
file_put_contents($local_path, $local_copy);
echo HTML::image($local_path);
There is a feature request to allow for remote image access using the Image module.

Resources