[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grass-user
Subject:    Re: [GRASS-user] RasterLite output
From:       Vincent Bain <bain () toraval ! fr>
Date:       2016-10-17 7:08:51
Message-ID: 1476688131.1898.22.camel () toraval ! fr
[Download RAW message or body]

Hi Moritz,

this is a good clue! I manage to write data to distinct tables passing
the table name as an argument:

        r.out.gdal --overwrite input=my_3_band_raster_imggroup
        output=RASTERLITE:test.sqlite,table=my_raster format=Rasterlite
        type=Byte


I fear the next issue is due to my gdal configuration : when I load a
new rasterlite table in an existing spatialite database, I have to
manually fill the srid value attached to the new table.
In other words, following the previous example, this statement:

        select srid from geometry_columns where f_table_name="my_raster"
        
returns -1 instead of the expected srid entry. So I have to fix it with
a manual update.

On the other hand if I try to load a rasterlite table with the dedicated
rasterlite_load command, I need to specify the epsg registry code
eventhough the input Gtiff is completely defined; otherwise "srid" is
set to 0:

        rasterlite_load -d test.sqlite -T my_raster -e 2154 -i png -f
        my_raster.tif



Thanks for your advice,
Vincent


Le lundi 17 octobre 2016 à 08:06 +0200, Moritz Lennert a écrit :
> 
> Le 16 octobre 2016 17:27:48 GMT+02:00, Vincent Bain <bain@toraval.fr> a écrit :
> > Hi,
> > could anyone help me with exporting a raster map to an existing
> > spatialite database ?
> > 
> > Running r.out.gdal with Rasterlite on a newly created spatialite db
> > works fine, but I would like to export multiple rasters to a single
> > database. I see there are no creation options allowing to specify an
> > output table name for the raster to export.
> > 
> > I guess I could do it by (i)export my data to GTiff, then (ii)load it
> > to
> > my db with rasterlite_load command line tool. But I'd like to have it
> > done in one go from GRASS GIS.
> 
> 
> In the gdal doc I see:
> 
> Syntax: 'rasterlitedb_name' or \
> 'RASTERLITE:rasterlitedb_name[,table=raster_table_prefix][,minx=minx_val,miny=miny_val,maxx=maxx_val,maxy=maxy_val][,level=level_number]
>  
> 
> Have you tried with the second version of the syntax ?
> 
> Moritz
> 
> 
> > 
> > Any advice ?
> > 
> > Thanks,
> > Vincent.
> > 
> > _______________________________________________
> > grass-user mailing list
> > grass-user@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/grass-user
> 


_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic