<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Within the same mapset, is it possible to specify SQLITE as the database for the output layer, whilst using a map as an input that has a PG driver?<div><br></div><div>I’ve read the manual and tried a few approaches, but I found the outputs still get written to PG.  May be I’ve missed a critical step?  See messages below. I also experimented with v.add.table and v.add.columns to the empty map, to no avail.</div><div><br></div><div>I want the outputs written to sqlite, because v.out.ogr and v.out.postgis when the attributes are stored in PostgreSQL seems unworkably slow (which may be a pg_conf issue but my DB is performing well at scale for non-GRASS parallelised workflows)?</div><div><br></div><div>I want to keep the input attributes still in PostgreSQL because its the road table, and the fwdcost and bwdcost columns get updated by data from non-GRASS schema.</div><div><br></div><div>I need the fastest pipeline performance possible for when I scale the solution out (which will be done using GNU Parallel).  </div><div><br></div><div>Right now I’m stuck between a rock and a hard place.</div><div><br></div><div>Really hoping someone can help me out…  :-)</div><div><br></div><div>Thanks</div><div>Mark</div><div><br><div>#CREATE EMPTY MAP TO HOLD THE OUTPUTS</div><div><div>g.remove -f type=vector pattern="temp**"</div><div>layername="temp_8</div><div>v.edit --overwrite tool=create map=$layername</div><div>v.db.connect map=$layername table=$layername driver=sqlite  database='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db’</div></div><div>v.info $layername</div><div><br></div><div>#RUN THE ANALYSIS, WHERE THE INPUT LAYER ATTRIBUTES RESIDE IN POSTGRESQL</div><div><span style="font-family: Menlo; font-size: 11px;">v.net.allpairs  </span><span style="font-family: Menlo; font-size: 11px;">--overwrite in=nsw_road_network_final_connected cats=1-100</span><span style="font-family: Menlo; font-size: 11px;">  </span><span style="font-family: Menlo; font-size: 11px;">out=$layername afcolumn=fwdcost abcolumn=bwdcost</span></div><div><br></div><div># NO GOOD - THE OUTPUT ATTRIBUTE TABLE STILL APPEARS IN PGL </div><div><br></div><div>##########################</div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">GRASS 7.0.0svn (nodeclean):~ > v.edit --overwrite tool=create map=$layername</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Building topology for vector map <temp_8@PERMANENT>...</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Registering primitives...</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0 primitives registered</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0 vertices registered</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Building areas...</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0 areas built</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">0 isles built</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Attaching islands...</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Attaching centroids...</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Number of nodes: 0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Number of primitives: 0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Number of points: 0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Number of lines: 0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Number of boundaries: 0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Number of centroids: 0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Number of areas: 0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Number of isles: 0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">v.edit complete.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">GRASS 7.0.0svn (nodeclean):~ > v.db.connect map=$layername table=$layername driver=sqlite  database='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db'</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">WARNING: Table <temp_8> does not exist in database</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">         <$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">The table <temp_8> is now part of vector map <temp_8> and may be deleted or</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">overwritten by GRASS modules</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">DBMI-SQLite driver error:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Unable to create index:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">create unique index  if not exists temp_8_cat on temp_8 ( cat )</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">no such table: main.temp_8</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">DBMI-SQLite driver error:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Unable to create index:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">create unique index  if not exists temp_8_cat on temp_8 ( cat )</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">no such table: main.temp_8</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">WARNING: Cannot create index</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Select privileges were granted on the table</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">GRASS 7.0.0svn (nodeclean):~ > v.db.connect -p map=$layername</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Vector map <temp_8> is connected by:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">layer <1/temp_8> table <temp_8> in database </var/tmp/nodeclean/PERMANENT/sqlite/sqlite.db> through driver <sqlite> with key <cat></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><div style="margin: 0px;">GRASS 7.0.0svn (nodeclean):~ > v.info $layername</div><div style="margin: 0px;"><br></div><div style="margin: 0px;"> +----------------------------------------------------------------------------+</div><div style="margin: 0px;"> | Name:            temp_8                                                    |</div><div style="margin: 0px;"> | Mapset:          PERMANENT                                                 |</div><div style="margin: 0px;"> | Location:        nodeclean                                                 |</div><div style="margin: 0px;"> | Database:        /var/tmp                                                  |</div><div style="margin: 0px;"> | Title:                                                                     |</div><div style="margin: 0px;"> | Map scale:       1:1                                                       |</div><div style="margin: 0px;"> | Name of creator: root                                                      |</div><div style="margin: 0px;"> | Organization:                                                              |</div><div style="margin: 0px;"> | Source date:     Wed Feb 11 22:49:13 2015                                  |</div><div style="margin: 0px;"> | Timestamp (first layer): none                                              |</div><div style="margin: 0px;"> |----------------------------------------------------------------------------|</div><div style="margin: 0px;"> | Map format:      native                                                    |</div><div style="margin: 0px;"> |----------------------------------------------------------------------------|</div><div style="margin: 0px;"> |   Type of map: vector (level: 2)                                           |</div><div style="margin: 0px;"> |                                                                            |</div><div style="margin: 0px;"> |   Number of points:       0               Number of centroids:  0          |</div><div style="margin: 0px;"> |   Number of lines:        0               Number of boundaries: 0          |</div><div style="margin: 0px;"> |   Number of areas:        0               Number of islands:    0          |</div><div style="margin: 0px;"> |                                                                            |</div><div style="margin: 0px;"> |   Map is 3D:              No                                               |</div><div style="margin: 0px;"> |   Number of dblinks:      1                                                |</div><div style="margin: 0px;"> |                                                                            |</div><div style="margin: 0px;"> |   Projection: Albers Equal Area                                            |</div><div style="margin: 0px;"> |                                                                            |</div><div style="margin: 0px;"> |               N:                 0    S:                 0                 |</div><div style="margin: 0px;"> |               E:                 0    W:                 0                 |</div><div style="margin: 0px;"> |                                                                            |</div><div style="margin: 0px;"> |   Digitization threshold: 0                                                |</div><div style="margin: 0px;"> |   Comment:                                                                 |</div><div style="margin: 0px;"> |                                                                            |</div><div style="margin: 0px;"> +----------------------------------------------------------------------------+</div><div style="margin: 0px; min-height: 13px;"><br></div></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">GRASS 7.0.0svn (nodeclean):~ > v.net.allpairs  --overwrite in=nsw_road_network_final_connected cats=1-100  out=$layername afcolumn=fwdcost abcolumn=bwdcost</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">WARNING: Vector map <temp_8> already exists and will be overwritten</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">WARNING: Table <temp_8> linked to vector map <temp_8> does not exist</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Building graph…</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">#### Outputs of temp_8 visible in PostgreSQL….#########</div></div><div><br></div></div></body></html>