<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div>Thanks Moritz.  I am getting an SQLite error when trying to run v.net.allpairs.<div><br><div>This is my latest workflow, incl. my checks and output messages of each step.</div><div><div><br></div><div>#(1) CREATE A COPY OF MY ROAD NETWORK, AND DROP THE ATTRIBUTE TABLE (CURRENTLY SET WITH PG DRIVER)</div><div><div>db.connect driver=pg database="host=localhost,dbname=osm_au"</div><div>db.login user=postgres [pass=password]</div><div>db.connect -p</div><div>db.tables -p</div><div>g.copy --overwrite vect=nsw_road_network_final_connected,nsw_road_network_final_connected_copy</div><div>v.db.droptable nsw_road_network_final_connected_copy</div><div>v.db.droptable nsw_road_network_final_connected_copy -f</div><div><br></div><div># Outputs confirm my copied map no longer is connected to an attribute table</div><div>Dropping table <grass.nsw_road_network_final_connected_copy>...</div><div>Current attribute table link(s):</div><div>Map <nsw_road_network_final_connected_copy> is not connected to a database</div><div><br></div><div><br></div><div>#(2) RESET THE DATABASE DRIVER FOR THE CURRENT MAPSET TO SQLITE</div><div>db.connect driver=sqlite database='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db' schema=grass</div><div>db.connect -p</div><div><br></div><div>#Output</div><div>driver: sqlite</div><div>database: /var/tmp/nodeclean/PERMANENT/sqlite/sqlite.db</div><div>schema: grass</div><div>group: </div><div><br></div><div>#(3) COPY THE ATTRIBUTE TABLE OF THE ORIGINAL ROAD NETWORK IN POSTGRESQL TO THE NEW SQLITE DB</div><div>db.copy from_driver=pg  from_database="host=localhost,dbname=osm_au" from_table=grass.nsw_road_network_final_connected to_driver=sqlite to_database="/var/tmp/nodeclean/PERMANENT/sqlite/sqlite.db" to_table=nsw_road_network_final_connected_sqlite</div><div>db.copy from_driver=pg  from_database="host=localhost,dbname=osm_au" from_table=grass.nsw_tz_centroids_nodes to_driver=sqlite to_database="/var/tmp/nodeclean/PERMANENT/sqlite/sqlite.db" to_table=nsw_tz_centroids_nodes_sqlite</div><div><br></div><div>db.tables -p</div><div><br></div><div>#Output confirms table successfully copied</div><div>nsw_road_network_final_connected_sqlite</div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">nsw_tz_centroids_nodes_sqlite</div></div><div><br></div><div><br></div><div>#(4) CONNECT THE COPIED ATTRIBUTE TABLES TO THE COPIED MAP IN (1)</div><div>v.db.connect map=nsw_road_network_final_connected_copy table=nsw_road_network_final_connected_sqlite layer=1</div><div>v.db.connect map=nsw_road_network_final_connected_copy table=<span style="font-family: Menlo; font-size: 11px;">nsw_tz_centroids_nodes_sqlite layer=2</span></div><div>v.category nsw_road_network_final_connected_copy op=report</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">v.category nsw_road_network_final_connected_copy op=report</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Layer/table: 1/nsw_road_network_final_connected_sqlite</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">type       count        min        max</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">point          0          0          0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">line      467531          1     465943</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">boundary       0          0          0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">centroid       0          0          0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">area           0          0          0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">face           0          0          0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">kernel         0          0          0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">all       467531          1     465943</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Layer: 2</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">type       count        min        max</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">point       3514          1       3514</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">line           0          0          0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">boundary       0          0          0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">centroid       0          0          0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">area           0          0          0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">face           0          0          0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">kernel         0          0          0</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">all         3514          1       3514</div></div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">v.info -c nsw_road_network_final_connected_copy layer=1</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Displaying column types/names for database connection of layer <1>:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">INTEGER|cat</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">INTEGER|lid</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">INTEGER|osm_id</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">CHARACTER|name</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">INTEGER|bridge</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">INTEGER|tunnel</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">INTEGER|oneway</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">CHARACTER|type</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">INTEGER|tid</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">CHARACTER|poa_code</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">INTEGER|reversed</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">INTEGER|open</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">DOUBLE PRECISION|length</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">DOUBLE PRECISION|fwdcost</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">DOUBLE PRECISION|bwdcost</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><div style="margin: 0px;">v.info -c nsw_road_network_final_connected_copy layer=2</div><div style="margin: 0px;">Displaying column types/names for database connection of layer <2>:</div><div style="margin: 0px;">INTEGER|cat</div><div style="margin: 0px;">INTEGER|tz_code11</div><div style="margin: 0px;">CHARACTER|tz_name11</div><div style="margin: 0px;">INTEGER|sa2_main11</div><div style="margin: 0px;">INTEGER|sa3_code11</div><div><br></div></div><div>#(5) Run v.net.allpairs….</div><div>g.remove -f type=vector pattern="temp**"</div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">v.net.allpairs  --overwrite in=nsw_road_network_final_connected_copy cats=1-10  out=temp_8 afcolumn=fwdcost abcolumn=bwdcost</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;">Error in sqlite3_prepare():</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">unknown database grass</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;">Error in sqlite3_prepare():</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">unknown database grass</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;">ERROR: Unable to create table: 'create table grass.temp_8_1 ( cat integer,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">       from_cat integer, to_cat integer, cost double precision)'</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Segmentation fault</div></div><div><br></div><div><br></div></div><div><br></div><div><div><div><br></div><div>On 12/02/15 00:12, Mark Wynter wrote:<br><blockquote type="cite">Within the same mapset, is it possible to specify SQLITE as the database<br>for the output layer, whilst using a map as an input that has a PG driver?<br><br>I?ve read the manual and tried a few approaches, but I found the outputs<br>still get written to PG.  May be I?ve missed a critical step?  See<br>messages below. I also experimented with v.add.table and v.add.columns<br>to the empty map, to no avail.<br></blockquote><br>You should use db.connect to set your default settings to SQLite, then <br>run your command. By overwriting your map in the v.net.allpairs call you <br>overwrite everything, including any db connections set before and you <br>use the default mapset connection settings which seem to be set to PG.<br><br>Moritz<br><br></div></div><br></div></div></div></body></html>