en to zh_Hans translation catalogue (69 entries)

note: Tag: title
en: PostGIS Administration
zh_Hans: PostGIS 管理

note: Tag: title
en: Configuring raster support
zh_Hans: 配置栅格支持

note: Tag: para
en: If you enabled raster support you may want to read below how to properly configure it.
zh_Hans: 如果启用了栅格的支持，则可能需要读一下下面的内容来正确配置它。

note: Tag: para
en: As of PostGIS 2.1.3, out-of-db rasters and all raster drivers are disabled by default. In order to re-enable these, you need to set the following environment variables <varname>POSTGIS_GDAL_ENABLED_DRIVERS</varname> and <varname>POSTGIS_ENABLE_OUTDB_RASTERS</varname> in the server environment. For PostGIS 2.2, you can use the more cross-platform approach of setting the corresponding <xref linkend="PostGIS_GUC"/>.
zh_Hans: 从 PostGIS 2.1.3 开始，默认情况下禁用数据库外栅格和所有栅格驱动程序要启用它们，请在服务器上设置环境变量 <varname>POSTGIS_GDAL_ENABLED_DRIVERS</varname> 和<varname>POSTGIS_ENABLE_OUTDB_RASTERS</varname>。PostGIS 2.2 提供了一种跨平台方法，用于根据第 <xref linkend="PostGIS_GUC"/> 进行设置。

note: Tag: para
en: If you want to enable offline raster:
zh_Hans: 如果要启用离线栅格：

note: Tag: para
en: Any other setting or no setting at all will disable out of db rasters.
zh_Hans: 如果包括任何其它值或不包含值，则会禁用离线栅格。

note: Tag: para
en: In order to enable all GDAL drivers available in your GDAL install, set this environment variable as follows
zh_Hans: 若想启用已经安装的 GDAL 驱动，请设置以下环境变量：

note: Tag: para
en: If you want to only enable specific drivers, set your environment variable as follows:
zh_Hans: 如果只想启用某些驱动，请按如下所示设置环境变量：

note: Tag: para
en: If you are on windows, do not quote the driver list
zh_Hans: 在 Windows 上，不要在驱动程序列表中加上引号

note: Tag: para
en: Setting environment variables varies depending on OS. For PostgreSQL installed on Ubuntu or Debian via apt-postgresql, the preferred way is to edit <filename>/etc/postgresql/<replaceable>10</replaceable>/<replaceable>main</replaceable>/environment</filename> where 10 refers to version of PostgreSQL and main refers to the cluster.
zh_Hans: 环境变量的设置因操作系统而异。对于在 Ubuntu 或 Debian 上通过 apt-postgresql 安装的 PostgreSQL，首选方法是编辑<filename>/etc/postgresql/<replaceable>10</replaceable>/<replaceable>main</replaceable>/environment</filename> ，其中数字 10 是 PostgreSQL 的版本，main 表示集群。

note: Tag: para
en: On windows, if you are running as a service, you can set via System variables which for Windows 7 you can get to by right-clicking on Computer-&gt;Properties Advanced System Settings or in explorer navigating to <varname>Control Panel\All Control Panel Items\System</varname>. Then clicking <emphasis>Advanced System Settings -&gt;Advanced->Environment Variables</emphasis> and adding new system variables.
zh_Hans: 在 Windows 上，如果您作为服务运行，则可以通过系统变量进行设置，对于 Windows 7，您可以通过右键单击「计算机」 → 「属性 」→ 「高级系统设置」，或在资源管理器中找到。随后，单击「高级系统设置」 → 「高级」 → 「环境变量」并添加新的系统变量。

note: Tag: para
en: After you set the environment variables, you'll need to restart your PostgreSQL service for the changes to take effect.
zh_Hans: 设置环境变量后，您需要重启 PostgreSQL 服务才能使更改生效。

note: Tag: title
en: Creating spatial databases
zh_Hans: 创建空间数据库

note: Tag: title
en: Spatially enable database using EXTENSION
zh_Hans: 使用「扩展（EXTENSION）」来在数据库上启用空间能力

note: Tag: para
en: If you are using PostgreSQL 9.1+ and have compiled and installed the extensions/postgis modules, you can turn a database into a spatial one using the EXTENSION mechanism.
zh_Hans: 如果您使用的是 PostgreSQL 9.1 以上的版本，并且已经编译并安装了 postgis 扩展模块，那么数据库将在 PG 的扩展机制下成为空间数据库。

note: Tag: para
en: Core postgis extension includes geometry, geography, spatial_ref_sys and all the functions and comments. Raster and topology are packaged as a separate extension.
zh_Hans: postgis 的核心扩展包括几何、地理、spatial_ref_sys 以及所有函数和注释。栅格（Raster）和拓扑（Topology）打包为单独的扩展模块。

note: Tag: para
en: Run the following SQL snippet in the database you want to enable spatially:
zh_Hans: 在要启用空间的数据库中运行以下SQL代码段：

note: Tag: title
en: Spatially enable database without using EXTENSION (discouraged)
zh_Hans: 不通过扩展（EXTENSION）的方式启用空间数据库（不建议）

note: Tag: para
en: This is generally only needed if you cannot or don't want to get PostGIS installed in the PostgreSQL extension directory (for example during testing, development or in a restricted environment).
zh_Hans: 通常，仅当你不能或不想在PostgreSQL扩展的目录中安装PostGIS时（例如，在测试或开发期间，或在受限环境中），才需要这样做。

note: Tag: para
en: Adding PostGIS objects and function definitions into your database is done by loading the various sql files located in <filename>[prefix]/share/contrib</filename> as specified during the build phase.
zh_Hans: 加载在构建过程中指定的各种SQL文件，并将PostGIS对象和函数定义添加到数据库中。[prefix]/share/contrib

note: Tag: para
en: The core PostGIS objects (geometry and geography types, and their support functions) are in the <filename>postgis.sql</filename> script. Raster objects are in the <filename>rtpostgis.sql</filename> script. Topology objects are in the <filename>topology.sql</filename> script.
zh_Hans: 核心PostGIS对象（几何和地理类型及其相应的功能）位于脚本中。栅格对象位于脚本中。拓扑对象位于脚本中。 postgis.sqlrtpostgis.sqltopology.sql

note: Tag: para
en: For a complete set of EPSG coordinate system definition identifiers, you can also load the <filename>spatial_ref_sys.sql</filename> definitions file and populate the <varname>spatial_ref_sys</varname> table. This will permit you to perform ST_Transform() operations on geometries.
zh_Hans: 对于完整的EPSG坐标系定义ID集，请加载定义文件并生成表。这允许执行几何函数ST_Transform()。spatial_ref_sys.sqlspatial_ref_sys

note: Tag: para
en: If you wish to add comments to the PostGIS functions, you can find them in the <filename>postgis_comments.sql</filename> script. Comments can be viewed by simply typing <command>\dd [function_name]</command> from a <command>psql</command> terminal window.
zh_Hans: 如果要向 PostGIS 函数添加注释，可以在脚本中找到注释。 只需键入 \dd [函数名称]，即可从 psql 终端窗口查看注释。 postgis_comments.sql

note: Tag: para
en: Run the following Shell commands in your terminal:
zh_Hans: 在终端中运行以下 shell 命令：

note: Tag: title
en: Upgrading spatial databases
zh_Hans: 升级空间数据库

note: Tag: para
en: Upgrading existing spatial databases can be tricky as it requires replacement or introduction of new PostGIS object definitions.
zh_Hans: 当您需要替换或部署新的 PostGIS 对象定义时，升级现有空间数据库可能会很棘手。

note: Tag: para
en: Unfortunately not all definitions can be easily replaced in a live database, so sometimes your best bet is a dump/reload process.
zh_Hans: 遗憾的是，并非所有定义都可以在正在运行的数据库中轻松替换，因此转储/重装可能是最好的选择

note: Tag: para
en: PostGIS provides a SOFT UPGRADE procedure for minor or bugfix releases, and a HARD UPGRADE procedure for major releases.
zh_Hans: PostGIS 为次要版本升级和错误修复提供软升级，为主要升级提供硬升级。

note: Tag: para
en: Before attempting to upgrade PostGIS, it is always worth to backup your data. If you use the -Fc flag to pg_dump you will always be able to restore the dump with a HARD UPGRADE.
zh_Hans: 在尝试升级PostGIS之前备份数据始终是值得的。 可以将 -fc 标志与 pg_dump 一起使用，以始终通过硬升级还原转储。

note: Tag: title
en: Soft upgrade
zh_Hans: 软升级

note: Tag: para
en: If you installed your database using extensions, you'll need to upgrade using the extension model as well. If you installed using the old sql script way, you are advised to switch your install to extensions because the script way is no longer supported.
zh_Hans: 如果使用扩展安装数据库，则必须使用扩展模型对其进行升级。 如果使用较旧的 SQL 脚本进行安装，则应切换到扩展，因为不再支持 SQL 脚本。

note: Tag: title
en: Soft Upgrade 9.1+ using extensions
zh_Hans: 使用 9.1 或更高版本的扩展进行软升级

note: Tag: para
en: If you originally installed PostGIS with extensions, then you need to upgrade using extensions as well. Doing a minor upgrade with extensions, is fairly painless.
zh_Hans: 如果使用扩展程序安装了PostGIS，则需要使用该扩展程序进行升级。使用扩展程序进行小升级非常轻松。

note: Tag: para
en: If you are running PostGIS 3 or above, then you should use the <xref linkend="PostGIS_Extensions_Upgrade"/> function to upgrade to the latest version you have installed.
zh_Hans: 如果您运行的是 PostGIS 3 或更高版本，则应升级到已安装的具有<xref linkend="PostGIS_Extensions_Upgrade"/>功能的最新版本。

note: Tag: para
en: If you are running PostGIS 2.5 or lower, then do the following:
zh_Hans: 如果您运行的是 PostGIS 2.5 或更早版本，执行以下操作：

note: Tag: para
en: If you have multiple versions of PostGIS installed, and you don't want to upgrade to the latest, you can explicitly specify the version as follows:
zh_Hans: 如果安装了多个版本的 PostGIS，并且不想升级到最新版本，则可以指定显式版本。 执行以下操作：

note: Tag: para
en: If you get an error notice something like:
zh_Hans: 您可能会看到类似于以下内容的错误通知：

note: Tag: para
en: Then you'll need to backup your database, create a fresh one as described in <xref linkend="create_new_db_extensions"/> and then restore your backup on top of this new database.
zh_Hans: 在这种情况下，必须备份数据库，按照第 <xref linkend="create_new_db_extensions"/>节 “使用扩展启用空间数据库”中所述生成新数据库，然后将备份还原到新数据库

note: Tag: para
en: If you get a notice message like:
zh_Hans: 您可能会收到类似于以下内容的消息：

note: Tag: para
en: Then everything is already up to date and you can safely ignore it. <emphasis role="bold">UNLESS</emphasis> you're attempting to upgrade from an development version to the next (which doesn't get a new version number); in that case you can append "next" to the version string, and next time you'll need to drop the "next" suffix again:
zh_Hans: 在这种情况下，所有内容都会更新，可以安全地忽略。 除非您尝试从SVN升级到下一个版本（没有新版本号），否则您可以在版本字符串中添加“next”。 但是，下次您需要删除“下一个”。

note: Tag: para
en: If you installed PostGIS originally without a version specified, you can often skip the reinstallation of postgis extension before restoring since the backup just has <code>CREATE EXTENSION postgis</code> and thus picks up the newest latest version during restore.
zh_Hans: 如果在未指定版本的情况下安装 PostGIS，则在恢复之前通常可以跳过重新安装 PostGIS 扩展模块。 备份将仅是两次还原之间的最新备份。CREATE EXTENSION postgis

note: Tag: para
en: If you are upgrading PostGIS extension from a version prior to 3.0.0, you will have a new extension <emphasis>postgis_raster</emphasis> which you can safely drop, if you don't need raster support. You can drop as follows:
zh_Hans: 如果要从 3.0.0 之前升级 PostGIS 扩展模块，则将具有一个新的postgis_raster扩展模块，如果不需要栅格功能，则可以安全地将其移除。 执行以下操作：

note: Tag: title
en: Soft Upgrade Pre 9.1+ or without extensions
zh_Hans: 之前或非扩展软升级

note: Tag: para
en: This section applies only to those who installed PostGIS not using extensions. If you have extensions and try to upgrade with this approach you'll get messages like:
zh_Hans: 它适用于在不使用扩展名的情况下安装了PostGIS的人。如果您使用的是扩展并使用此方法，您将看到类似于以下内容的消息：

note: Tag: para
en: NOTE: if you are moving from PostGIS 1.* to PostGIS 2.* or from PostGIS 2.* prior to r7409, you cannot use this procedure but would rather need to do a <link linkend="hard_upgrade">HARD UPGRADE</link>.
zh_Hans: 注： 如果要迁移到 r1 之前的 PostGIS 7429.* 或 PostGIS 2.*，则此过程不可用，但需要执行<link linkend="hard_upgrade">硬升级</link>。

note: Tag: para
en: After compiling and installing (make install) you should find a set of <filename>*_upgrade.sql</filename> files in the installation folders. You can list them all with:
zh_Hans: 编译并安装（进行安装）后，您应该在目标文件夹中找到文件集。 您可以使用以下命令获取列表： *_upgrade.sql

note: Tag: para
en: Load them all in turn, starting from <filename>postgis_upgrade.sql</filename>.
zh_Hans: 从postgis_upgrade.sql按顺序加载所有内容

note: Tag: para
en: The same procedure applies to raster, topology and sfcgal extensions, with upgrade files named <filename>rtpostgis_upgrade.sql</filename>, <filename>topology_upgrade.sql</filename> and <filename>sfcgal_upgrade.sql</filename> respectively. If you need them:
zh_Hans: 相同的过程适用于栅格、拓扑和 sfcgal 扩展，升级文件分别名为 rtpostgis_upgrade.sql、topology_upgrade.sql 和 sfcgal_upgrade.sql。 如果您需要它们：

note: Tag: para
en: You are advised to switch to an extension based install by running
zh_Hans: 建议您通过运行切换到基于扩展的安装

note: Tag: para
en: If you can't find the <filename>postgis_upgrade.sql</filename> specific for upgrading your version you are using a version too early for a soft upgrade and need to do a <link linkend="hard_upgrade">HARD UPGRADE</link>.
zh_Hans: 如果您找不到专门用于升级您的版本的 postgis_upgrade.sql，那么您使用的版本对于软升级来说太早了，需要进行<link linkend="hard_upgrade">硬升级</link>。

note: Tag: para
en: The <xref linkend="PostGIS_Full_Version"/> function should inform you about the need to run this kind of upgrade using a "procs need upgrade" message.
zh_Hans: <xref linkend="PostGIS_Full_Version"/>函数的“进程需要升级”消息提供了有关需要执行此类升级的信息。

note: Tag: title
en: Hard upgrade
zh_Hans: 硬升级

note: Tag: para
en: By HARD UPGRADE we mean full dump/reload of postgis-enabled databases. You need a HARD UPGRADE when PostGIS objects' internal storage changes or when SOFT UPGRADE is not possible. The <link linkend="release_notes">Release Notes</link> appendix reports for each version whether you need a dump/reload (HARD UPGRADE) to upgrade.
zh_Hans: 硬升级意味着完全转储/重新加载 PostGIS 中可用的数据。如果 PostGIS 对象的内部存储状态发生更改或无法进行软升级，则需要硬升级。 附录中的<link linkend="release_notes">发行说明</link>指示每个版本是否需要转储/重新加载（硬升级）。

note: Tag: para
en: The dump/reload process is assisted by the postgis_restore script which takes care of skipping from the dump all definitions which belong to PostGIS (including old ones), allowing you to restore your schemas and data into a database with PostGIS installed without getting duplicate symbol errors or bringing forward deprecated objects.
zh_Hans: 转储/重新加载操作由脚本辅助postgis_restore。 此脚本跳过属于 PostGIS 的所有定义（包括旧定义）。 您还可以将方案和数据恢复到 PostGIS 安装的数据库，而不会传递重复的符号错误或已弃用的对象。

note: Tag: para
en: Supplementary instructions for windows users are available at <ulink url="http://trac.osgeo.org/postgis/wiki/UsersWikiWinUpgrade">Windows Hard upgrade</ulink>.
zh_Hans: 有关 Windows 的其他信息，请参阅 Windows <ulink url="http://trac.osgeo.org/postgis/wiki/UsersWikiWinUpgrade">Windows 硬升级</ulink>。

note: Tag: para
en: The Procedure is as follows:
zh_Hans: 程序如下：

note: Tag: para
en: Create a "custom-format" dump of the database you want to upgrade (let's call it <varname>olddb</varname>) include binary blobs (-b) and verbose (-v) output. The user can be the owner of the db, need not be postgres super account.
zh_Hans: 以详细模式 （-v） 生成已升级数据库的“自定义格式”转储（我们这样称呼它），其中包含二进制 BLOB 数据 （-b） 的转储。 用户可以是数据库所有者，不需要是PostgreSQL超级用户。 olddb

note: Tag: para
en: Do a fresh install of PostGIS in a new database -- we'll refer to this database as <varname>newdb</varname>. Please refer to <xref linkend="create_new_db"/> and <xref linkend="create_new_db_extensions"/> for instructions on how to do this.
zh_Hans: 在新数据库中全新安装 PostGIS——我们将此数据库称为 newdb。 有关如何执行此操作的说明，请参阅第 <xref linkend="create_new_db"/>节“不使用扩展在空间上启用数据库（不鼓励）”和第<xref linkend="create_new_db_extensions"/>节“使用扩展在空间上启用数据库”

note: Tag: para
en: The spatial_ref_sys entries found in your dump will be restored, but they will not override existing ones in spatial_ref_sys. This is to ensure that fixes in the official set will be properly propagated to restored databases. If for any reason you really want your own overrides of standard entries just don't load the spatial_ref_sys.sql file when creating the new db.
zh_Hans: 转储中的spatial_ref_sys将还原，但不会覆盖现有spatial_ref_sys。 这是为了确保对正式数据集的更正被传送到要恢复的数据库。 如果要覆盖标准条目，只需在生成 newdb 时不要加载spaltial_ref_sys.sql文件。

note: Tag: para
en: If your database is really old or you know you've been using long deprecated functions in your views and functions, you might need to load <filename>legacy.sql</filename> for all your functions and views etc. to properly come back. Only do this if _really_ needed. Consider upgrading your views and functions before dumping instead, if possible. The deprecated functions can be later removed by loading <filename>uninstall_legacy.sql</filename>.
zh_Hans: 如果您的数据库确实很旧，或者您知道您在视图和函数中使用了长期不推荐使用的函数，则可能需要为所有函数和视图等加载legacy.sql才能正确返回。 仅在确实需要时才执行此操作。 如果可能的话，请考虑在转储之前升级您的视图和函数。 稍后可以通过加载 uninstall_legacy.sql 来删除已弃用的函数。

note: Tag: para
en: Restore your backup into your fresh <varname>newdb</varname> database using postgis_restore. Unexpected errors, if any, will be printed to the standard error stream by psql. Keep a log of those.
zh_Hans: 使用 postgis_restore 将备份恢复到新的 newdb 数据库中。 意外错误（如果有）将由 psql 打印到标准错误流。 记录这些内容。

note: Tag: para
en: Errors may arise in the following cases:
zh_Hans: 在以下情况下可能会发生错误：

note: Tag: para
en: Some of your views or functions make use of deprecated PostGIS objects. In order to fix this you may try loading <filename>legacy.sql</filename> script prior to restore or you'll have to restore to a version of PostGIS which still contains those objects and try a migration again after porting your code. If the <filename>legacy.sql</filename> way works for you, don't forget to fix your code to stop using deprecated functions and drop them loading <filename>uninstall_legacy.sql</filename>.
zh_Hans: 某些视图或函数使用已弃用的 PostGIS 对象。 要更正此问题，您可以尝试在还原之前加载脚本。 您还可以将已弃用的对象还原到仍具有它们的 PostGIS 版本，重写代码，然后再次移动它们。 如果使用 ，请不要忘记更正停止使用已弃用函数的代码并加载 。 legacy.sqllegacy.sqluninstall_legacy.sql

note: Tag: para
en: Some custom records of spatial_ref_sys in dump file have an invalid SRID value. Valid SRID values are bigger than 0 and smaller than 999000. Values in the 999000.999999 range are reserved for internal use while values > 999999 can't be used at all. All your custom records with invalid SRIDs will be retained, with those > 999999 moved into the reserved range, but the spatial_ref_sys table would lose a check constraint guarding for that invariant to hold and possibly also its primary key ( when multiple invalid SRIDS get converted to the same reserved SRID value ).
zh_Hans: 转储文件中spatial_ref_sys的一些自定义记录具有 无效的 SRID 值。有效 SRID 值大于 0 并且小于 999000。999000.999999 范围内的值 保留供内部使用，而值> 999999不能 完全使用。 所有具有无效 SRID 的自定义记录都将被保留， 随着这些> 999999移动到保留范围内，但是 spatial_ref_sys表将失去检查约束保护 对于该不变性，也可能保持其主键 （当多个无效的 SRID 转换为相同的保留时 SRID 值 ）。

note: Tag: para
en: In order to fix this you should copy your custom SRS to a SRID with a valid value (maybe in the 910000..910999 range), convert all your tables to the new srid (see <xref linkend="UpdateGeometrySRID"/>), delete the invalid entry from spatial_ref_sys and re-construct the check(s) with:
zh_Hans: 为了解决此问题，您应该将自定义SRS复制到 具有有效值的 SRID（可能在 910000..910999 范围），将所有表转换为新的 srid （请参阅<xref linkend="UpdateGeometrySRID"/>），删除无效的 从spatial_ref_sys输入并重建检查：

note: Tag: para
en: If you are upgrading an old database containing french <ulink url="https://en.wikipedia.org/wiki/Institut_g%C3%A9ographique_national"> IGN </ulink> cartography, you will have probably SRIDs out of range and you will see, when importing your database, issues like this :
zh_Hans: 如果要升级包含法国 <ulink url="https://en.wikipedia.org/wiki/Institut_g%C3%A9ographique_national"> IGN </ulink> 映射的旧数据库，则可能会超出 SRID 的范围，并在导入数据库时遇到以下问题：

note: Tag: para
en: In this case, you can try following steps : first throw out completely the IGN from the sql which is resulting from postgis_restore. So, after having run :
zh_Hans: 在这种情况下，您可以尝试以下步骤： 完全丢弃最初从 SQL postgis_restore中产生的 IGN。 为此，请运行以下命令：

note: Tag: para
en: run this command :
zh_Hans: 运行以下命令：

note: Tag: para
en: Create then your newdb, activate the required Postgis extensions, and insert properly the french system IGN with : <ulink url="https://raw.githubusercontent.com/Remi-C/IGN_spatial_ref_for_PostGIS/master/Put_IGN_SRS_into_Postgis.sql"> this script </ulink> After these operations, import your data :
zh_Hans: 之后，生成一个新数据库，启用必要的 PostGIS 扩展，并确保使用此 <ulink url="https://raw.githubusercontent.com/Remi-C/IGN_spatial_ref_for_PostGIS/master/Put_IGN_SRS_into_Postgis.sql"> 脚本</ulink>插入法语 IGN 系统。 完成这些过程后，按如下方式导入数据：
