[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.10 Example of local geodetic network in SQL

Providing complete example would be reasonable because of its extent. However, you can obtain example by following these instructions:

Create a file with XML representation of network by copy and paste example from Example of local geodetic network to a new file. Note that file should start with <?xml version="1.0" ?> (no whitespace). Alternatively you can use existing XML file from collection of sample networks (see Download). Then you can convert your XML file (here example_network.xml) to SQL statements by program gama-local-xml2sql (the path depends on your Gama installation).

$ gama-local-xml2sql example_net example_network.xml example_network.sql

Now you have example network (configuration example_net) in the form of SQL INSERT statements in the file example_network.sql.

Another representations you can create and fill SQLite database (for details see Working with SQLite database):

$ sqlite3 examples.db < gama-local-schema.sql
$ sqlite3 examples.db < example_network.sql
$ sqlite3 examples.db

Once you have SQLite database, you can work with it from SQLite command line. You can get nice output by executing following commands.

sqlite> .mode column
sqlite> .nullvalue NULL
sqlite> SELECT * FROM gnu_gama_local_configurations;
sqlite> SELECT * FROM gnu_gama_local_points;
sqlite> SELECT * FROM gnu_gama_local_clusters;
sqlite> SELECT * FROM gnu_gama_local_covmat;
sqlite> SELECT * FROM gnu_gama_local_obs;

Or you can get database dump (CREATE and INSERT statements) by

sqlite> .dump

If it is not enough for you, you can try one of GUI tools for SQLite.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Ales Cepek on September 16, 2017 using texi2html 1.82.