Skip to content

Commit

Permalink
r.info: Rename location to project in outputs (#3134)
Browse files Browse the repository at this point in the history
- Translatable plain text output now generates "Project" instead of "Location".
- Extended shell-style output now generates "project=" in addtion to "location=".
- Shell example in documentation now shows project only.
- Words "data base location and mapset" in documentation are now replaces by slightly experimental "project, mapset, project parent directory (database directory)". The order is what works best for the sentence. The print order is mapset, project, directory.
  • Loading branch information
wenzeslaus committed Mar 22, 2024
1 parent 553f861 commit 0f047e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion raster/r.info/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ int main(int argc, char **argv)
hist_ok ? Rast_get_history(&hist, HIST_MAPID) : "??");
compose_line(out, "Mapset: %-29.29s Login of Creator: %s", mapset,
hist_ok ? Rast_get_history(&hist, HIST_CREATOR) : "??");
compose_line(out, "Location: %s", G_location());
compose_line(out, "Project: %s", G_location());
compose_line(out, "DataBase: %s", G_gisdbase());
compose_line(out, "Title: %s", title);

Expand Down Expand Up @@ -565,6 +565,7 @@ int main(int argc, char **argv)
hist_ok ? Rast_get_history(&hist, HIST_MAPTYPE) : "??");
fprintf(out, "mapset=%s\n", mapset);
fprintf(out, "location=%s\n", G_location());
fprintf(out, "project=%s\n", G_location());
fprintf(out, "database=%s\n", G_gisdbase());
fprintf(out, "date=\"%s\"\n",
hist_ok ? Rast_get_history(&hist, HIST_MAPID) : "??");
Expand Down
7 changes: 4 additions & 3 deletions raster/r.info/r.info.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ <h2>DESCRIPTION</h2>
user-specified raster map layer. This map layer must exist
in the user's current mapset search path. Information
about the map's boundaries, resolution, projection, data
type, category number, data base location and mapset,
type, category number, project, mapset,
project parent directory (database directory),
the timestamp and history are put into a table and written to standard
output. The types of information listed can also be found
in the <i>cats</i>, <i>cellhd</i>, and <i>hist</i>
Expand Down Expand Up @@ -42,7 +43,7 @@ <h2>EXAMPLES</h2>
+----------------------------------------------------------------------------+
| Map: slope Date: Tue Nov 7 01:11:23 2006 |
| Mapset: PERMANENT Login of Creator: helena |
| Location: nc_spm_08_grass7 |
| Project: nc_spm_08_grass7 |
| DataBase: /grassdata |
| Title: South-West Wake county: slope in degrees ( slope_ned10m ) |
| Timestamp: none |
Expand Down Expand Up @@ -108,7 +109,7 @@ <h2>EXAMPLES</h2>
r.info -e slope
map=slope
mapset=PERMANENT
location=nc_spm_08_grass7
project=nc_spm_08_grass7
database=/grassdata
date="Tue Nov 7 01:11:23 2006"
creator="helena"
Expand Down

0 comments on commit 0f047e2

Please sign in to comment.