External raster from PostGIS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

External raster from PostGIS

Lorenzo Bottaccioli
Hello,

I'm tryng to import a raster file sotred in PostGIS with r.external but i cannot select the db. If I try with r.in.gdal and i connect to the db I can't see the table.

Any suggestion?

Lorenzo

_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: External raster from PostGIS

Markus Neteler
On Thu, Oct 22, 2015 at 12:49 PM, Lorenzo Bottaccioli
<[hidden email]> wrote:
> Hello,
>
> I'm tryng to import a raster file sotred in PostGIS with r.external but i
> cannot select the db. If I try with r.in.gdal and i connect to the db I
> can't see the table.

Can you please post the full command? (omitting the password if given there)
Is it similar to what's given in
https://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html#a3.2-Readingrasterdatafromthedatabase
?

I would like to add an example to the manual page but do not have a PG
installation containing a raster map.

Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: External raster from PostGIS

Lorenzo Bottaccioli
Hi Markus,

How do I implement such command in GRASS GIS? I have tried with r.external because I have done the same thing with v.external. I'have tried as well with r.in.gdal but notthing. If i use v.in.ogr I can import vectors from PostGIS.

Lorenzo

2015-10-22 17:55 GMT+02:00 Markus Neteler <[hidden email]>:
On Thu, Oct 22, 2015 at 12:49 PM, Lorenzo Bottaccioli
<[hidden email]> wrote:
> Hello,
>
> I'm tryng to import a raster file sotred in PostGIS with r.external but i
> cannot select the db. If I try with r.in.gdal and i connect to the db I
> can't see the table.

Can you please post the full command? (omitting the password if given there)
Is it similar to what's given in
https://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html#a3.2-Readingrasterdatafromthedatabase
?

I would like to add an example to the manual page but do not have a PG
installation containing a raster map.

Markus


_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: External raster from PostGIS

Markus Neteler
Hi Lorenzo,

On Thu, Oct 22, 2015 at 6:03 PM, Lorenzo Bottaccioli
<[hidden email]> wrote:
> Hi Markus,
>
> How do I implement such command in GRASS GIS? I have tried with r.external
> because I have done the same thing with v.external. I'have tried as well
> with r.in.gdal but notthing. If i use v.in.ogr I can import vectors from
> PostGIS.

I would just like to the command to use. And the error message.
Perhaps we see why it fails.

Did you use "source=..." of r.external?

Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: External raster from PostGIS

Lorenzo Bottaccioli
Hi Markus,

I did not try with any command in the command line, I'have just tried with the GUI of r.in.gdal selecting database. Can you give a suggestion for the use of "source=" option in the command line of r.external in order to select data from a PostGIS db?

Tnx

Lorenzo

2015-10-22 18:34 GMT+02:00 Markus Neteler <[hidden email]>:
Hi Lorenzo,

On Thu, Oct 22, 2015 at 6:03 PM, Lorenzo Bottaccioli
<[hidden email]> wrote:
> Hi Markus,
>
> How do I implement such command in GRASS GIS? I have tried with r.external
> because I have done the same thing with v.external. I'have tried as well
> with r.in.gdal but notthing. If i use v.in.ogr I can import vectors from
> PostGIS.

I would just like to the command to use. And the error message.
Perhaps we see why it fails.

Did you use "source=..." of r.external?

Markus


_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: External raster from PostGIS

Markus Neteler

Hi Lorenzo

On Oct 23, 2015 2:43 PM, "Lorenzo Bottaccioli" <[hidden email]> wrote:
>
> Hi Markus,
>
> I did not try with any command in the command line, I'have just tried with the GUI of r.in.gdal selecting database. Can you give a suggestion for the use of "source=" option in the command line of r.external in order to select data from a PostGIS db?

I was referring to r.external.

Best
Markus


_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: External raster from PostGIS

Lorenzo Bottaccioli
Hi Markus,

I have tried to read the manual of r.external but is not clear how it works with DB, is very clear how it works with files. Using the GUI of r.external and connecting to the db i cannot see the raster map.
I've used v.external with DB and that one was easy.

Regards

lorenzo

2015-10-23 16:05 GMT+02:00 Markus Neteler <[hidden email]>:

Hi Lorenzo

On Oct 23, 2015 2:43 PM, "Lorenzo Bottaccioli" <[hidden email]> wrote:
>
> Hi Markus,
>
> I did not try with any command in the command line, I'have just tried with the GUI of r.in.gdal selecting database. Can you give a suggestion for the use of "source=" option in the command line of r.external in order to select data from a PostGIS db?

I was referring to r.external.

Best
Markus



_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: External raster from PostGIS

Markus Neteler


On Oct 23, 2015 4:40 PM, "Lorenzo Bottaccioli" <[hidden email][hidden email][hidden email]> wrote:
>
> Hi Markus,
>
> I have tried to read the manual of r.external but is not clear how it works with DB

as mentioned I would like to improve the manual. I am aware that your task is not explained yet.

> , is very clear how it works with files. Using the GUI of r.external and connecting to the db i cannot see the raster map.

And for this I asked you to tell us what you tried. There is a copy button in the GUI for that purpose.

Best
Markus


_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: External raster from PostGIS

Lorenzo Bottaccioli
Hi Markus,

I don't see any copy button in the GUI of r.external.

Tnx

2015-10-23 17:20 GMT+02:00 Markus Neteler <[hidden email]>:


On Oct 23, 2015 4:40 PM, "Lorenzo Bottaccioli" <[hidden email][hidden email][hidden email]> wrote:
>
> Hi Markus,
>
> I have tried to read the manual of r.external but is not clear how it works with DB

as mentioned I would like to improve the manual. I am aware that your task is not explained yet.

> , is very clear how it works with files. Using the GUI of r.external and connecting to the db i cannot see the raster map.

And for this I asked you to tell us what you tried. There is a copy button in the GUI for that purpose.

Best
Markus



_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: External raster from PostGIS

Markus Neteler
On Fri, Oct 23, 2015 at 5:43 PM, Lorenzo Bottaccioli
<[hidden email]> wrote:
> Hi Markus,
>
> I don't see any copy button in the GUI of r.external.

If you launch it from the command line, without parameters, you get
the "native" GUI of r.external which comes with the copy button.

best
Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: External raster from PostGIS

Helmut Kudrnovsky
Markus Neteler wrote
On Fri, Oct 23, 2015 at 5:43 PM, Lorenzo Bottaccioli
<[hidden email]> wrote:
> Hi Markus,
>
> I don't see any copy button in the GUI of r.external.

If you launch it from the command line, without parameters, you get
the "native" GUI of r.external which comes with the copy button.
here on my

GRASS version: 7.1.svn                                                          
GRASS SVN revision: 66569  

only r.external --ui starts the UI with the copy button; r.external without parameters starts here the wizzard and not the r.external own GUI
best regards
Helmut
Reply | Threaded
Open this post in threaded view
|

Re: External raster from PostGIS

Lorenzo Bottaccioli
In reply to this post by Markus Neteler
Hi Markus,

I have done what you have asked me. But the GUi that you obtain with r.external --ui, asu suggested by Helmut, does not have any possibility to select the DB so I have tried taking inspiration from v.external and I have wrtitetn this comand that obviuosly does not work "r.external source="PG:dbname=test_gis2 user=lorenzo" output=elev" where can I specify the layer that I have to select? can you give me an example of a wright use of the command?

best

Lorenzo

2015-10-23 18:40 GMT+02:00 Markus Neteler <[hidden email]>:
On Fri, Oct 23, 2015 at 5:43 PM, Lorenzo Bottaccioli
<[hidden email]> wrote:
> Hi Markus,
>
> I don't see any copy button in the GUI of r.external.

If you launch it from the command line, without parameters, you get
the "native" GUI of r.external which comes with the copy button.

best
Markus


_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user