Skip to content

Commit

Permalink
doc: another round of location to project renaming (#3665)
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasovaa committed Apr 29, 2024
1 parent f13a492 commit b2992f7
Show file tree
Hide file tree
Showing 35 changed files with 65 additions and 64 deletions.
2 changes: 1 addition & 1 deletion general/g.mapset/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int main(int argc, char *argv[])
G_add_keyword(_("settings"));
module->label = _("Changes/reports current mapset.");
module->description = _("Optionally create new mapset or list available "
"mapsets in given location.");
"mapsets in given project (location).");

opt.mapset = G_define_standard_option(G_OPT_M_MAPSET);
opt.mapset->required = YES;
Expand Down
2 changes: 1 addition & 1 deletion general/g.mapsets/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ int main(int argc, char *argv[])
G_add_keyword(_("search path"));
module->label = _("Modifies/prints the user's current mapset search path.");
module->description = _("Affects the user's access to data existing "
"under the other mapsets in the current location.");
"under the other mapsets in the current project.");

opt.mapset = G_define_standard_option(G_OPT_M_MAPSET);
opt.mapset->required = YES;
Expand Down
11 changes: 6 additions & 5 deletions general/g.proj/create.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ void create_location(const char *location)
ret = G_make_location_crs(location, &cellhd, projinfo, projunits, projsrid,
projwkt);
if (ret == 0)
G_message(_("Location <%s> created"), location);
G_message(_("Project <%s> created"), location);
else if (ret == -1)
G_fatal_error(_("Unable to create location <%s>: %s"), location,
G_fatal_error(_("Unable to create project <%s>: %s"), location,
strerror(errno));
else if (ret == -2)
G_fatal_error(_("Unable to create projection files: %s"),
strerror(errno));
else
/* Shouldn't happen */
G_fatal_error(_("Unable to create location <%s>"), location);
G_fatal_error(_("Unable to create project <%s>"), location);

G_message(_("You can switch to the new location by\n`%s=%s`"),
G_message(_("You can switch to the new project by\n`%s=%s`"),
"g.mapset mapset=PERMANENT project", location);
}

Expand All @@ -36,7 +36,8 @@ void modify_projinfo(void)
if (strcmp(mapset, "PERMANENT") != 0)
G_fatal_error(
_("You must select the PERMANENT mapset before updating the "
"current location's projection (current mapset is <%s>)"),
"current project's coordinate reference system"
" (current mapset is <%s>)"),
mapset);

/* Read projection information from current location first */
Expand Down
22 changes: 11 additions & 11 deletions general/g.region/printwindow.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,15 @@ void print_window(struct Cell_head *window, int print_flag, int flat_flag)
/* read current projection info */
if ((in_proj_info = G_get_projinfo()) == NULL)
G_fatal_error(
_("Can't get projection info of current location"));
_("Can't get projection info of current project"));

if ((in_unit_info = G_get_projunits()) == NULL)
G_fatal_error(
_("Can't get projection units of current location"));
_("Can't get projection units of current project"));

if (pj_get_kv(&iproj, in_proj_info, in_unit_info) < 0)
G_fatal_error(
_("Can't get projection key values of current location"));
_("Can't get projection key values of current project"));

G_free_key_value(in_proj_info);
G_free_key_value(in_unit_info);
Expand Down Expand Up @@ -399,7 +399,7 @@ void print_window(struct Cell_head *window, int print_flag, int flat_flag)
_("You are already in Lat/Long. Use the -p flag instead."));
else
G_message(
_("You are in a simple XY location, projection to Lat/Lon "
_("You are in a simple XY project, projection to Lat/Lon "
"is not possible. Use the -p flag instead."));
}
}
Expand Down Expand Up @@ -493,15 +493,15 @@ void print_window(struct Cell_head *window, int print_flag, int flat_flag)
/* read current projection info */
if ((in_proj_info = G_get_projinfo()) == NULL)
G_fatal_error(
_("Can't get projection info of current location"));
_("Can't get projection info of current project"));

if ((in_unit_info = G_get_projunits()) == NULL)
G_fatal_error(
_("Can't get projection units of current location"));
_("Can't get projection units of current project"));

if (pj_get_kv(&iproj, in_proj_info, in_unit_info) < 0)
G_fatal_error(
_("Can't get projection key values of current location"));
_("Can't get projection key values of current project"));

G_free_key_value(in_proj_info);
G_free_key_value(in_unit_info);
Expand Down Expand Up @@ -567,7 +567,7 @@ void print_window(struct Cell_head *window, int print_flag, int flat_flag)
/* read current projection info */
if ((in_proj_info = G_get_projinfo()) == NULL)
G_fatal_error(
_("Can't get projection info of current location"));
_("Can't get projection info of current project"));
/* do not wrap to -180, 180, otherwise east can be < west */
/* TODO: for PROJ 6+, the +over switch must be added to the
* transformation pipeline if authority:name or WKt are used
Expand All @@ -576,11 +576,11 @@ void print_window(struct Cell_head *window, int print_flag, int flat_flag)

if ((in_unit_info = G_get_projunits()) == NULL)
G_fatal_error(
_("Can't get projection units of current location"));
_("Can't get projection units of current project"));

if (pj_get_kv(&iproj, in_proj_info, in_unit_info) < 0)
G_fatal_error(
_("Can't get projection key values of current location"));
_("Can't get projection key values of current project"));

/* output projection to lat/long and wgs84 ellipsoid */
out_proj_info = G_create_key_value();
Expand All @@ -594,7 +594,7 @@ void print_window(struct Cell_head *window, int print_flag, int flat_flag)
/* PROJ6+ has its own datum transformation parameters */
if (G_get_datumparams_from_projinfo(in_proj_info, buff, dum) < 0)
G_fatal_error(_(
"WGS84 output not possible as this location does not "
"WGS84 output not possible as this project does not "
"contain "
"datum transformation parameters. Try running g.setproj."));
else
Expand Down
2 changes: 1 addition & 1 deletion misc/m.measure/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int main(int argc, char **argv)

units = G_define_standard_option(G_OPT_M_UNITS);
units->label = _("Units");
units->description = _("Default: location map units");
units->description = _("Default: project map units");

shell = G_define_flag();
shell->key = 'g';
Expand Down
2 changes: 1 addition & 1 deletion raster/r.carve/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static int init_projection(struct Cell_head *window, int *wrap_ncols)
*wrap_ncols =
(360.0 - (window->east - window->west)) / window->ew_res + 1.1;
#else
G_fatal_error(_("Lat/Long location is not supported by %s. Please "
G_fatal_error(_("Lat/Long project is not supported by %s. Please "
"reproject map first."),
G_program_name());
#endif
Expand Down
2 changes: 1 addition & 1 deletion raster/r.external/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void update_default_window(struct Cell_head *cellhd)

if (strcmp(G_mapset(), "PERMANENT") == 0) {
G_put_element_window(&cur_wind, "", "DEFAULT_WIND");
G_message(_("Default region for this location updated"));
G_message(_("Default region for this project updated"));
}
G_put_window(&cur_wind);
G_message(_("Region for the current mapset updated"));
Expand Down
2 changes: 1 addition & 1 deletion raster/r.gwflow/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ int main(int argc, char *argv[])

/* Make sure that the current projection is not lat/long */
if ((G_projection() == PROJECTION_LL))
G_fatal_error(_("Lat/Long location is not supported by %s. Please "
G_fatal_error(_("Lat/Long project is not supported by %s. Please "
"reproject map first."),
G_program_name());

Expand Down
2 changes: 1 addition & 1 deletion raster/r.in.lidar/projection.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void projection_mismatch_report(struct Cell_head cellhd,
/* TODO: output this info sorted by key: */
if (loc_wind.proj != cellhd.proj || err != -2) {
if (loc_proj_info != NULL) {
strcat(error_msg, _("GRASS LOCATION PROJ_INFO is:\n"));
strcat(error_msg, _("GRASS project PROJ_INFO is:\n"));
for (i_value = 0; i_value < loc_proj_info->nitems; i_value++)
sprintf(error_msg + strlen(error_msg), "%s: %s\n",
loc_proj_info->key[i_value],
Expand Down
4 changes: 2 additions & 2 deletions raster/r.in.pdal/projection.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void projection_mismatch_report(struct Cell_head cellhd,
/* TODO: output this info sorted by key: */
if (loc_wind.proj != cellhd.proj || err != -2) {
if (loc_proj_info != NULL) {
strcat(error_msg, _("GRASS LOCATION PROJ_INFO is:\n"));
strcat(error_msg, _("GRASS project PROJ_INFO is:\n"));
for (i_value = 0; i_value < loc_proj_info->nitems; i_value++)
sprintf(error_msg + strlen(error_msg), "%s: %s\n",
loc_proj_info->key[i_value],
Expand Down Expand Up @@ -68,7 +68,7 @@ void projection_mismatch_report(struct Cell_head cellhd,
}
else {
if (loc_proj_units != NULL) {
strcat(error_msg, "GRASS LOCATION PROJ_UNITS is:\n");
strcat(error_msg, "GRASS project PROJ_UNITS is:\n");
for (i_value = 0; i_value < loc_proj_units->nitems; i_value++)
sprintf(error_msg + strlen(error_msg), "%s: %s\n",
loc_proj_units->key[i_value],
Expand Down
2 changes: 1 addition & 1 deletion raster/r.param.scale/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main(int argc, char **argv)

/* Make sure that the current projection is not lat/long */
if ((G_projection() == PROJECTION_LL))
G_fatal_error(_("Lat/Long locations are not supported by this module"));
G_fatal_error(_("Lat/Long projects are not supported by this module"));

open_files();

Expand Down
4 changes: 2 additions & 2 deletions raster/r.profile/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ int main(int argc, char *argv[])
parm.units->options = "meters,kilometers,feet,miles";
parm.units->label = parm.units->description;
parm.units->description =
_("If units are not specified, current location units are used. "
"Meters are used by default in geographic (latlon) locations.");
_("If units are not specified, current project units are used. "
"Meters are used by default in geographic (latlon) projects.");

if (G_parser(argc, argv))
exit(EXIT_FAILURE);
Expand Down
2 changes: 1 addition & 1 deletion raster/r.report/header.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int header(int unit1, int unit2)
if (page == 1 && with_headers) {
lcr("", "RASTER MAP CATEGORY REPORT", "", buf, page_width - 2);
pbuf(buf);
sprintf(tbuf1, "LOCATION: %s", G_location());
sprintf(tbuf1, "PROJECT: %s", G_location());
if (with_headers && (page_length > 0))
sprintf(tbuf2, "Page %d", page);
else
Expand Down
4 changes: 2 additions & 2 deletions raster/r.report/r.report.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h2>EXAMPLE</h2>
<div class="code"><pre>
+-----------------------------------------------------------------------------+
| RASTER MAP CATEGORY REPORT |
|LOCATION: nc_spm_08_grass7 Fri Dec 6 17:00:21 2013|
|PROJECT: nc_spm_08_grass7 Fri Dec 6 17:00:21 2013|
|-----------------------------------------------------------------------------|
| north: 279073.97546639 east: 798143.31179672 |
|REGION south: 113673.97546639 west: 595143.31179672 |
Expand Down Expand Up @@ -96,7 +96,7 @@ <h2>EXAMPLE</h2>
<div class="code"><pre>
+-----------------------------------------------------------------------------+
| RASTER MAP CATEGORY REPORT |
|LOCATION: nc_spm_08_latest Tue Feb 11 10:10:46 2014|
|PROJECT: nc_spm_08_latest Tue Feb 11 10:10:46 2014|
|-----------------------------------------------------------------------------|
| north: 228527.25 east: 644971 |
|REGION south: 215018.25 west: 629980 |
Expand Down
2 changes: 1 addition & 1 deletion raster/r.solute.transport/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ int main(int argc, char *argv[])

/* Make sure that the current projection is not lat/long */
if ((G_projection() == PROJECTION_LL))
G_fatal_error(_("Lat/Long location is not supported by %s. Please "
G_fatal_error(_("Lat/Long project is not supported by %s. Please "
"reproject map first."),
G_program_name());

Expand Down
8 changes: 4 additions & 4 deletions raster/r.sun/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,14 +801,14 @@ int main(int argc, char *argv[])
struct Key_Value *in_proj_info, *in_unit_info;

if ((in_proj_info = G_get_projinfo()) == NULL)
G_fatal_error(_("Can't get projection info of current location"));
G_fatal_error(_("Can't get projection info of current project"));

if ((in_unit_info = G_get_projunits()) == NULL)
G_fatal_error(_("Can't get projection units of current location"));
G_fatal_error(_("Can't get projection units of current project"));

if (pj_get_kv(&iproj, in_proj_info, in_unit_info) < 0)
G_fatal_error(
_("Can't get projection key values of current location"));
_("Can't get projection key values of current project"));

G_free_key_value(in_proj_info);
G_free_key_value(in_unit_info);
Expand All @@ -822,7 +822,7 @@ int main(int argc, char *argv[])

if ((latin != NULL || longin != NULL) && (G_projection() == PROJECTION_LL))
G_warning(_("latin and longin raster maps have no effect when in a "
"Lat/Lon location"));
"Lat/Lon project"));
/* true about longin= when civiltime is used? */
/* civiltime needs longin= but not latin= for non-LL projections -
better would be it just use pj_proj() if it needs those?? */
Expand Down
6 changes: 3 additions & 3 deletions raster/r.sunhours/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@ int main(int argc, char *argv[])

/* read current projection info */
if ((in_proj_info = G_get_projinfo()) == NULL)
G_fatal_error(_("Cannot get projection info of current location"));
G_fatal_error(_("Cannot get projection info of current project"));

if ((in_unit_info = G_get_projunits()) == NULL)
G_fatal_error(_("Cannot get projection units of current location"));
G_fatal_error(_("Cannot get projection units of current project"));

if (pj_get_kv(&iproj, in_proj_info, in_unit_info) < 0)
G_fatal_error(
_("Cannot get projection key values of current location"));
_("Cannot get projection key values of current project"));

G_free_key_value(in_proj_info);
G_free_key_value(in_unit_info);
Expand Down
10 changes: 5 additions & 5 deletions raster/r.sunmask/g_solposition.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ long calc_solar_position(double longitude, double latitude, double timezone,
/* we don't like to run G_calc_solar_position in xy locations */
if (window.proj == 0)
G_fatal_error(
_("Unable to calculate sun position in un-projected locations. "
_("Unable to calculate sun position in projects without CRS. "
"Specify sunposition directly."));

pdat = &pd; /* point to the structure for convenience */
Expand Down Expand Up @@ -98,21 +98,21 @@ long calc_solar_position(double longitude, double latitude, double timezone,
/* read current projection info */
if ((in_proj_info = G_get_projinfo()) == NULL)
G_fatal_error(
_("Unable to get projection info of current location"));
_("Unable to get projection info of current project"));

if ((in_unit_info = G_get_projunits()) == NULL)
G_fatal_error(
_("Unable to get projection units of current location"));
_("Unable to get projection units of current project"));

if (pj_get_kv(&iproj, in_proj_info, in_unit_info) < 0)
G_fatal_error(
_("Unable to get projection key values of current location"));
_("Unable to get projection key values of current project"));

G_free_key_value(in_proj_info);
G_free_key_value(in_unit_info);

/* Try using pj_print_proj_params() instead of all this */
G_debug(1, "Projection found in location:");
G_debug(1, "Projection found in project:");
G_debug(1, "IN: meter: %f zone: %i proj: %s (iproj struct)",
iproj.meters, iproj.zone, iproj.proj);
G_debug(1, "IN coord: longitude: %f, latitude: %f", longitude,
Expand Down
2 changes: 1 addition & 1 deletion raster/r.topidx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int main(int argc, char **argv)

/* Make sure that the current projection is not lat/long */
if (G_projection() == PROJECTION_LL)
G_fatal_error(_("Lat/Long location is not supported by %s. Please "
G_fatal_error(_("Lat/Long project is not supported by %s. Please "
"reproject map first."),
G_program_name());

Expand Down
4 changes: 2 additions & 2 deletions vector/v.in.lidar/projection.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void projection_mismatch_report(struct Cell_head cellhd,
/* TODO: output this info sorted by key: */
if (loc_wind.proj != cellhd.proj || err != -2) {
if (loc_proj_info != NULL) {
strcat(error_msg, _("GRASS LOCATION PROJ_INFO is:\n"));
strcat(error_msg, _("GRASS project PROJ_INFO is:\n"));
for (i_value = 0; i_value < loc_proj_info->nitems; i_value++)
sprintf(error_msg + strlen(error_msg), "%s: %s\n",
loc_proj_info->key[i_value],
Expand Down Expand Up @@ -68,7 +68,7 @@ void projection_mismatch_report(struct Cell_head cellhd,
}
else {
if (loc_proj_units != NULL) {
strcat(error_msg, "GRASS LOCATION PROJ_UNITS is:\n");
strcat(error_msg, "GRASS project PROJ_UNITS is:\n");
for (i_value = 0; i_value < loc_proj_units->nitems; i_value++)
sprintf(error_msg + strlen(error_msg), "%s: %s\n",
loc_proj_units->key[i_value],
Expand Down
2 changes: 1 addition & 1 deletion vector/v.in.ogr/v.in.ogr.html
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ <h3>Projection errors</h3>
</pre></div>

Here you need to create or use a project whose CRS matches that
of the vector data you wish to import. Try using <b>location</b> parameter to
of the vector data you wish to import. Try using <b>project</b> parameter to
create a new project based upon the CRS information in the file. If
desired, you can then reproject it to another project
with <em><a href="v.proj.html">v.proj</a></em>.
Expand Down
4 changes: 2 additions & 2 deletions vector/v.in.pdal/projection.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void projection_mismatch_report(struct Cell_head cellhd,
/* TODO: output this info sorted by key: */
if (loc_wind.proj != cellhd.proj || err != -2) {
if (loc_proj_info != NULL) {
strcat(error_msg, _("GRASS LOCATION PROJ_INFO is:\n"));
strcat(error_msg, _("GRASS project PROJ_INFO is:\n"));
for (i_value = 0; i_value < loc_proj_info->nitems; i_value++)
sprintf(error_msg + strlen(error_msg), "%s: %s\n",
loc_proj_info->key[i_value],
Expand Down Expand Up @@ -68,7 +68,7 @@ void projection_mismatch_report(struct Cell_head cellhd,
}
else {
if (loc_proj_units != NULL) {
strcat(error_msg, "GRASS LOCATION PROJ_UNITS is:\n");
strcat(error_msg, "GRASS project PROJ_UNITS is:\n");
for (i_value = 0; i_value < loc_proj_units->nitems; i_value++)
sprintf(error_msg + strlen(error_msg), "%s: %s\n",
loc_proj_units->key[i_value],
Expand Down
2 changes: 1 addition & 1 deletion vector/v.net.alloc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ int main(int argc, char **argv)
geo_f = G_define_flag();
geo_f->key = 'g';
geo_f->description =
_("Use geodesic calculation for longitude-latitude locations");
_("Use geodesic calculation for longitude-latitude projects");

ucat_f = G_define_flag();
ucat_f->key = 'u';
Expand Down

0 comments on commit b2992f7

Please sign in to comment.