Skip to content

Commit a82a39f

Browse files
authored
doc: Convert HTML to Markdown (#5064)
This converts HTML markup in .md files to Markdown using the ./utils/grass_html2md.sh script. The conversion was done using the #5054 version of the script with additional (reviewed) fixes by markdownlint-fix from pre-commit. Remove .md files which should have stayed .html. This breaks history but not terribly and the history is not that important for these two (one is a recently added mkdocs template and the other may be even unused).
1 parent bd2ebf3 commit a82a39f

606 files changed

Lines changed: 45748 additions & 53314 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.markdownlint.yml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,13 @@ fix: true
88
MD041: false # first-line-h1
99

1010
# Errors from .html to .md rename (first step in HTML to Markdown conversion)
11-
MD001: false # heading-increment
12-
MD003: false # heading-style
13-
MD004: false # ul-style
14-
MD007: false # ul-indent
15-
MD009: false # no-trailing-spaces
16-
MD010: false # no-hard-tabs
17-
MD011: false # no-reversed-links
18-
MD012: false # no-multiple-blanks
19-
MD013: false # line-length
20-
MD018: false # no-missing-space-atx
21-
MD019: false # no-multiple-space-atx
22-
MD020: false # no-missing-space-closed-atx
23-
MD022: false # blanks-around-headings
24-
MD023: false # heading-start-left
25-
MD024: false # no-duplicate-heading
26-
MD026: false # no-trailing-punctuation
27-
MD029: false # ol-prefix
28-
MD032: false # blanks-around-lists
29-
MD033: false # no-inline-html
30-
MD034: false # no-bare-urls
31-
MD037: false # no-space-in-emphasis
32-
MD045: false # no-alt-text
33-
MD049: false # emphasis-style
34-
MD052: false # reference-links-images
35-
MD055: false # table-pipe-style
36-
MD058: false # blanks-around-tables
11+
no-duplicate-heading: false
12+
heading-increment: false
13+
no-inline-html: false
14+
no-alt-text: false
15+
line-length: false
3716
# The block above this is to be eventually removed.
17+
18+
no-emphasis-as-heading: false
19+
link-fragments: false
20+
no-space-in-links: false

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ repos:
99
exclude: |
1010
(?x)^(
1111
configure$|
12+
.*\.md$|
1213
.*\.ascii$|
1314
.*\.asc$|
1415
.*\.ref$|

db/databaseintro.md

Lines changed: 83 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,107 @@
1-
<!-- meta page description: Database management in GRASS GIS -->
2-
<!-- meta page index: database -->
3-
<h3>Attribute management in general</h3>
1+
### Attribute management in general
42

53
GRASS can be linked to one or many database management systems (DBMS).
6-
The <em>db.*</em> set of commands provides basic SQL support for
7-
attribute management, while the <em>v.db.*</em> set of commands operates
8-
on the vector map (see <a href="vectorintro.html">Vector introduction</a>).
4+
The *db.\** set of commands provides basic SQL support for attribute
5+
management, while the *v.db.\** set of commands operates on the vector
6+
map (see [Vector introduction](vectorintro.md)).
97

10-
<h3>Available drivers</h3>
8+
### Available drivers
119

12-
Available drivers are listed in <a href="sql.html">SQL support in GRASS GIS</a>.
13-
<p>
14-
<b>Notes</b>:<br>
15-
The DBF driver provides only very limited SQL
16-
support (as DBF is not an SQL DB) while the other DBMS backends (such
17-
as SQLite, PostgreSQL, MySQL etc) provide full SQL support since the SQL
18-
commands are sent directly to the DBMS. For this reason, the SQLite driver
19-
is the default DBMI backend.
10+
Available drivers are listed in [SQL support in GRASS GIS](sql.md).
2011

21-
<h3>DB connection management</h3>
12+
**Notes**:
13+
The DBF driver provides only very limited SQL support (as DBF is not an
14+
SQL DB) while the other DBMS backends (such as SQLite, PostgreSQL, MySQL
15+
etc) provide full SQL support since the SQL commands are sent directly
16+
to the DBMS. For this reason, the SQLite driver is the default DBMI
17+
backend.
18+
19+
### DB connection management
2220

2321
The current database management settings are shown or modified with
24-
<a href="db.connect.html">db.connect</a> for current mapset. Available DBMI drivers
25-
are listed with <a href="db.drivers.html">db.drivers</a>. Some DBMI backends
26-
require a user/password for driver/database to be set with <a href="db.login.html">db.login</a>.
27-
In order to test a driver, run <a href="db.test.html">db.test</a>.
22+
[db.connect](db.connect.md) for current mapset. Available DBMI drivers
23+
are listed with [db.drivers](db.drivers.md). Some DBMI backends require
24+
a user/password for driver/database to be set with
25+
[db.login](db.login.md). In order to test a driver, run
26+
[db.test](db.test.md).
2827

29-
<h3>Attribute data import and export</h3>
28+
### Attribute data import and export
3029

31-
Attribute data can be imported with <a href="db.in.ogr.html">db.in.ogr</a> from
32-
various formats and exported with <a href="db.out.ogr.html">db.out.ogr</a>. To internally
33-
copy a a full table or selectively parts of it, use <a href="db.copy.html">db.copy</a>.
34-
<p>
30+
Attribute data can be imported with [db.in.ogr](db.in.ogr.md) from
31+
various formats and exported with [db.out.ogr](db.out.ogr.md). To
32+
internally copy a a full table or selectively parts of it, use
33+
[db.copy](db.copy.md).
3534

3635
Further conversion tools:
37-
<ul>
38-
<li><a href="https://github.com/mdbtools/mdbtools">MDB Tools</a>: Convert MS-Access data to SQL, DBF, etc.</li>
39-
<li><a href="https://grasswiki.osgeo.org/wiki/Openoffice.org_with_SQL_Databases">Using OpenOffice.org with SQL Databases</a></li>
40-
</ul>
4136

37+
- [MDB Tools](https://github.com/mdbtools/mdbtools): Convert MS-Access
38+
data to SQL, DBF, etc.
39+
- [Using OpenOffice.org with SQL
40+
Databases](https://grasswiki.osgeo.org/wiki/Openoffice.org_with_SQL_Databases)
4241

43-
<h3>SQL commands</h3>
42+
### SQL commands
4443

4544
GRASS supports two main SQL operations, execution of an SQL statement
46-
(<a href="db.execute.html">db.execute</a>) and selection
47-
of data from a table (<a href="db.select.html">db.select</a>).
48-
See the <a href="sql.html">SQL help page</a> for examples.
45+
([db.execute](db.execute.md)) and selection of data from a table
46+
([db.select](db.select.md)). See the [SQL help page](sql.md) for
47+
examples.
4948

50-
<h3>Managing the default DBMI settings</h3>
49+
### Managing the default DBMI settings
5150

52-
Per default vector map attributes are stored in SQLite tables. This default
53-
definition can be modified with <a href="db.connect.html">db.connect</a>. If an
54-
external DBMS is used, <a href="db.login.html">db.login</a> may be required.
51+
Per default vector map attributes are stored in SQLite tables. This
52+
default definition can be modified with [db.connect](db.connect.md). If
53+
an external DBMS is used, [db.login](db.login.md) may be required.
5554

56-
<h3>Creating a database</h3>
55+
### Creating a database
5756

5857
Specific commands are explained on the individual driver pages (these
5958
pages are only available if driver was compiled in this installation):
6059

61-
<ul>
62-
<li>DBF: see <a href="grass-dbf.html">DBF</a> page</li>
63-
<li>SQLite: <a href="grass-sqlite.html">SQLite</a> page</li>
64-
<li>mySQL: <a href="grass-mysql.html">mySQL</a> and <a href="grass-mesql.html">meSQL</a> pages</li>
65-
<li>ODBC: <a href="grass-odbc.html">ODBC</a> page (connect to Oracle, etc.)</li>
66-
<li>PostgreSQL: <a href="grass-pg.html">PostgreSQL</a> and PostGIS page</li>
67-
</ul>
68-
69-
<h3>Metadata</h3>
70-
All columns for a given table are listed with <a href="db.columns.html">db.columns</a>.
71-
The command <a href="db.describe.html">db.describe</a> describes a table in detail. To
72-
list all available tables for a given database, run <a href="db.tables.html">db.tables</a>.
73-
74-
<h3>Table maintenance</h3>
75-
To drop a column from a selected attribute table, use <a href="db.dropcolumn.html">db.dropcolumn</a>.
76-
With <a href="db.droptable.html">db.droptable</a> an attribute table can be deleted.
77-
78-
<h3>Database Schema</h3>
79-
Currently schema support only works for PostgreSQL connections. Default schema
80-
can be set with <a href="db.connect.html">db.connect</a>. Note that the default
81-
schema will be used by all db.* modules.
82-
<p>
83-
<a href="db.tables.html">db.tables</a> returns 'schema.table' if schemas are
60+
- DBF: see [DBF](grass-dbf.md) page
61+
- SQLite: [SQLite](grass-sqlite.md) page
62+
- mySQL: [mySQL](grass-mysql.md) and [meSQL](grass-mesql.md) pages
63+
- ODBC: [ODBC](grass-odbc.md) page (connect to Oracle, etc.)
64+
- PostgreSQL: [PostgreSQL](grass-pg.md) and PostGIS page
65+
66+
### Metadata
67+
68+
All columns for a given table are listed with
69+
[db.columns](db.columns.md). The command [db.describe](db.describe.md)
70+
describes a table in detail. To list all available tables for a given
71+
database, run [db.tables](db.tables.md).
72+
73+
### Table maintenance
74+
75+
To drop a column from a selected attribute table, use
76+
[db.dropcolumn](db.dropcolumn.md). With [db.droptable](db.droptable.md)
77+
an attribute table can be deleted.
78+
79+
### Database Schema
80+
81+
Currently schema support only works for PostgreSQL connections. Default
82+
schema can be set with [db.connect](db.connect.md). Note that the
83+
default schema will be used by all db.\* modules.
84+
85+
[db.tables](db.tables.md) returns 'schema.table' if schemas are
8486
available in the database.
8587

86-
<h3>Migrating to a different database engine</h3>
87-
88-
To migrate a GRASS database table (or a GRASS vector map) to a different DBMI engine,
89-
the best solution is to create a new MAPSET, define the DBMI settings accordingly
90-
with <a href="db.connect.html">db.connect</a> and if needed, <a href="db.login.html">db.login</a>.
91-
Then the table of interest can be copied over with <a href="db.copy.html">db.copy</a> from
92-
the original MAPSET. Likewise, a vector map including its table(s) are copied from
93-
the original MAPSET to the current MAPSET with <a href="g.copy.html">g.copy</a>.
94-
95-
<h3>See also</h3>
96-
97-
<ul>
98-
<li><a href="rasterintro.html">Introduction into raster data processing</a></li>
99-
<li><a href="raster3dintro.html">Introduction into 3D raster data (voxel) processing</a></li>
100-
<li><a href="vectorintro.html">Introduction into vector data processing</a></li>
101-
<li><a href="imageryintro.html">Introduction into image processing</a></li>
102-
<li><a href="temporalintro.html">Introduction into temporal data processing</a></li>
103-
<li><a href="projectionintro.html">Projections and spatial transformations</a></li>
104-
<li><a href="wxguiintro.html">Graphical User Interface</a></li>
105-
</ul>
88+
### Migrating to a different database engine
89+
90+
To migrate a GRASS database table (or a GRASS vector map) to a different
91+
DBMI engine, the best solution is to create a new MAPSET, define the
92+
DBMI settings accordingly with [db.connect](db.connect.md) and if
93+
needed, [db.login](db.login.md). Then the table of interest can be
94+
copied over with [db.copy](db.copy.md) from the original MAPSET.
95+
Likewise, a vector map including its table(s) are copied from the
96+
original MAPSET to the current MAPSET with [g.copy](g.copy.md).
97+
98+
### See also
99+
100+
- [Introduction into raster data processing](rasterintro.md)
101+
- [Introduction into 3D raster data (voxel)
102+
processing](raster3dintro.md)
103+
- [Introduction into vector data processing](vectorintro.md)
104+
- [Introduction into image processing](imageryintro.md)
105+
- [Introduction into temporal data processing](temporalintro.md)
106+
- [Projections and spatial transformations](projectionintro.md)
107+
- [Graphical User Interface](wxguiintro.md)

db/db.columns/db.columns.md

Lines changed: 31 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,52 @@
1-
<h2>DESCRIPTION</h2>
1+
## DESCRIPTION
22

3-
<em>db.columns</em> lists all columns for a give table. Connection to
4-
databases are supported through dbf, shp, odbc and pg drivers.
3+
*db.columns* lists all columns for a give table. Connection to databases
4+
are supported through dbf, shp, odbc and pg drivers.
55

6-
<h2>NOTE</h2>
6+
## NOTE
77

88
If parameters for database connection are already set with
9-
<a href="db.connect.html">db.connect</a>, they are taken as default values
10-
and do not need to be spcified each time.
9+
[db.connect](db.connect.md), they are taken as default values and do not
10+
need to be spcified each time.
1111

12-
<h2>EXAMPLES</h2>
12+
## EXAMPLES
1313

14-
<h3>List columns of a PostgreSQL attribute table</h3>
14+
### List columns of a PostgreSQL attribute table
1515

16-
<div class="code"><pre>
16+
```sh
1717
db.columns table=zipcodes_wake driver=pg database=grassdb
18-
</pre></div>
18+
```
1919

20-
<p>
21-
<em>If the database parameters are already set, the columns can be listed
22-
directly</em><br>
20+
*If the database parameters are already set, the columns can be listed
21+
directly*
2322

24-
<div class="code"><pre>
23+
```sh
2524
db.columns table=zipcodes_wake
26-
</pre></div>
25+
```
2726

28-
<h3>List columns from Shape file with DBF attribute table</h3>
27+
### List columns from Shape file with DBF attribute table
2928

30-
<div class="code"><pre>
29+
```sh
3130
db.columns table=zipcodes_wake driver=dbf database=/grassdata/nc_spm_08/PERMANENT/dbf/
32-
</pre></div>
31+
```
3332

34-
<h3>List columns of table in SQLite database</h3>
33+
### List columns of table in SQLite database
3534

3635
Note that the SQLite backend is the default setting.
3736

38-
<div class="code"><pre>
37+
```sh
3938
db.columns driver=sqlite table=archsites database='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db'
40-
</pre></div>
41-
42-
<h2>SEE ALSO</h2>
43-
44-
<em>
45-
<a href="db.connect.html">db.connect</a>,
46-
<a href="db.describe.html">db.describe</a>,
47-
<a href="db.drivers.html">db.drivers</a>,
48-
<a href="db.droptable.html">db.droptable</a>,
49-
<a href="db.execute.html">db.execute</a>,
50-
<a href="db.login.html">db.login</a>,
51-
<a href="db.tables.html">db.tables</a>,
52-
<a href="sql.html">GRASS SQL interface</a>
53-
</em>
54-
<p>
55-
<a href="sql.html">GRASS SQL interface</a>
56-
57-
<h2>AUTHOR</h2>
39+
```
40+
41+
## SEE ALSO
42+
43+
*[db.connect](db.connect.md), [db.describe](db.describe.md),
44+
[db.drivers](db.drivers.md), [db.droptable](db.droptable.md),
45+
[db.execute](db.execute.md), [db.login](db.login.md),
46+
[db.tables](db.tables.md), [GRASS SQL interface](sql.md)*
47+
48+
[GRASS SQL interface](sql.md)
49+
50+
## AUTHOR
5851

5952
Radim Blazek, ITC-Irst, Trento, Italy

0 commit comments

Comments
 (0)