en to zh_Hans translation catalogue (181 entries)

note: Tag: title
en: PostGIS Installation
zh_Hans: PostGIS 安装

note: Tag: para
en: This chapter details the steps required to install PostGIS.
zh_Hans: 本章介绍安装 PostGIS 所需的步骤。

note: Tag: title
en: Short Version
zh_Hans: 简短版本

note: Tag: para
en: To compile assuming you have all the dependencies in your search path:
zh_Hans: 如果所有依赖项都在路径中，请按如下方式编译：

note: Tag: para
en: Once PostGIS is installed, it needs to be enabled (<xref linkend="create_spatial_db"/>) or upgraded (<xref linkend="upgrading"/>) in each individual database you want to use it in.
zh_Hans: 安装 PostGIS 后，您需要使每个数据库可用（<xref linkend="create_spatial_db"/>）或升级它（<xref linkend="upgrading"/>）

note: Tag: title
en: Compiling and Install from Source
zh_Hans: 从源代码编译和安装

note: Tag: para
en: Many OS systems now include pre-built packages for PostgreSQL/PostGIS. In many cases compilation is only necessary if you want the most bleeding edge versions or you are a package maintainer.
zh_Hans: 现在许多操作系统都包含 PostgreSQL/PostGIS 的预构建包。 在许多情况下，只有当您想要最前沿的版本或者您是软件包维护者时才需要编译。

note: Tag: para
en: This section includes general compilation instructions, if you are compiling for Windows etc or another OS, you may find additional more detailed help at <ulink url="https://trac.osgeo.org/postgis/wiki/UsersWikiInstall">PostGIS User contributed compile guides</ulink> and <ulink url="http://trac.osgeo.org/postgis/wiki/DevWikiMain">PostGIS Dev Wiki</ulink>.
zh_Hans: 本节提供一般编译过程。 如果您正在针对Windows或其他操作系统进行编译，则可以在<ulink url="https://trac.osgeo.org/postgis/wiki/UsersWikiInstall">PostGIS 用户编译指南</ulink>或<ulink url="http://trac.osgeo.org/postgis/wiki/DevWikiMain">PostGIS开发Wiki</ulink>中找到更详细的帮助。

note: Tag: para
en: Pre-Built Packages for various OS are listed in <ulink url="https://trac.osgeo.org/postgis/wiki/UsersWikiPackages">PostGIS Pre-built Packages</ulink>
zh_Hans: 可以在 PostGIS 预构建包中找到许多操作系统的<ulink url="https://trac.osgeo.org/postgis/wiki/UsersWikiPackages">PostGIS 预构建包</ulink>列表。

note: Tag: para
en: If you are a windows user, you can get stable builds via Stackbuilder or <ulink url="https://postgis.net/windows_downloads">PostGIS Windows download site</ulink> We also have <ulink url="https://postgis.net/windows_downloads">very bleeding-edge windows experimental builds</ulink> that are built usually once or twice a week or whenever anything exciting happens. You can use these to experiment with the in progress releases of PostGIS
zh_Hans: 如果您是 Windows 用户，您可以通过 Stackbuilder 或 <ulink url="https://postgis.net/windows_downloads">PostGIS Windows下载站点</ulink>获得稳定的版本。我们还有非常前沿的<ulink url="https://postgis.net/windows_downloads">Windows实验性版本</ulink>，通常每周构建一次或两次，或者每当发生任何令人兴奋的事情时构建。 您可以使用这些来试验正在进行的 PostGIS 版本

note: Tag: para
en: The PostGIS module is an extension to the PostgreSQL backend server. As such, PostGIS &last_release_version; <emphasis>requires</emphasis> full PostgreSQL server headers access in order to compile. It can be built against PostgreSQL versions &min_postgres_version; - &max_postgres_version;. Earlier versions of PostgreSQL are <emphasis>not</emphasis> supported.
zh_Hans: PostGIS 模块是PostgreSQL后端服务器的扩展。 PostGIS &last_release_version;<emphasis>需要</emphasis>完整的 PostgreSQL 服务器标头进行编译。你可以在PostgreSQL &min_postgres_version; - &max_postgres_version;之间构建。 <emphasis>不</emphasis>支持旧版本的PostgreSQL。

note: Tag: para
en: Refer to the PostgreSQL installation guides if you haven't already installed PostgreSQL. <ulink url="https://www.postgresql.org"> https://www.postgresql.org </ulink> .
zh_Hans: 如果您没有安装 PostgreSQL，请参阅PostgreSQL安装指南。它位于 <ulink url="https://www.postgresql.org"> https://www.postgresql.org </ulink>。

note: Tag: para
en: For GEOS functionality, when you install PostgresSQL you may need to explicitly link PostgreSQL against the standard C++ library:
zh_Hans: 对于GEOS功能，当您安装PostgresQL时，您可能需要将PostgreSQL显式链接到标准C++库：

note: Tag: para
en: This is a workaround for bogus C++ exceptions interaction with older development tools. If you experience weird problems (backend unexpectedly closed or similar things) try this trick. This will require recompiling your PostgreSQL from scratch, of course.
zh_Hans: 这是针对与旧开发工具的虚假C++异常交互的解决方法。如果您遇到奇怪的问题（后端意外关闭或类似的事情），请尝试此技巧。当然，这需要从头开始重新编译 PostgreSQL。

note: Tag: para
en: The following steps outline the configuration and compilation of the PostGIS source. They are written for Linux users and will not work on Windows or Mac.
zh_Hans: 下一步是概述 PostGIS 源配置和编译。 这些是为Linux用户编写的，不适用于Windows或Mac。

note: Tag: title
en: Getting the Source
zh_Hans: 获取源代码

note: Tag: para
en: Retrieve the PostGIS source archive from the downloads website <ulink url="&postgis_download_url;"> &postgis_download_url; </ulink>
zh_Hans: 从下载站点 <ulink url="&postgis_download_url;"> &postgis_download_url; </ulink> 获取源代码的存档。

note: Tag: para
en: This will create a directory called <varname>postgis-&last_release_version;</varname> in the current working directory.
zh_Hans: 这将在当前目录下创建一个位置。<varname>postgis-&last_release_version;</varname>

note: Tag: para
en: Alternatively, checkout the source from the <ulink url="https://git-scm.com/"> git </ulink> repository <ulink url="https://git.osgeo.org/gitea/postgis/postgis/"> https://git.osgeo.org/gitea/postgis/postgis/ </ulink> .
zh_Hans: 或者从<ulink url="https://git-scm.com/"> git </ulink> 存储库  <ulink url="https://git.osgeo.org/gitea/postgis/postgis/"> https://git.osgeo.org/gitea/postgis/postgis/ </ulink> 中查看它

note: Tag: para
en: Change into the newly created <varname>postgis</varname> directory to continue the installation.
zh_Hans: 转到新创建的目录并继续安装。<varname>postgis</varname>

note: Tag: title
en: Install Requirements
zh_Hans: 安装要求

note: Tag: para
en: PostGIS has the following requirements for building and usage:
zh_Hans: 要构建和使用 PostGIS，您需要：

note: Tag: emphasis
en: Required
zh_Hans: 不可缺少

note: Tag: para
en: PostgreSQL &min_postgres_version; - &max_postgres_version;. A complete installation of PostgreSQL (including server headers) is required. PostgreSQL is available from <ulink url="https://www.postgresql.org"> https://www.postgresql.org </ulink> .
zh_Hans: PostgreSQL12 - 16。需要完整安装 PostgreSQL（包括服务器标头）。PostgreSQL可从<ulink url="https://www.postgresql.org">https://www.postgresql.org </ulink> 获取。

note: Tag: para
en: For a full PostgreSQL / PostGIS support matrix and PostGIS/GEOS support matrix refer to <ulink url="https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS">https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS</ulink>
zh_Hans: 请参阅 <ulink url="https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS">https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS</ulink> 中完整的 PosgreSQL/PostGIS 和 PostGIS/GEOS 支持表

note: Tag: para
en: GNU C compiler (<filename>gcc</filename>). Some other ANSI C compilers can be used to compile PostGIS, but we find far fewer problems when compiling with <filename>gcc</filename>.
zh_Hans: GNU C 编译器 (<filename>gcc</filename>)。其他一些 ANSI C 编译器也可以用来编译PostGIS，但使用<filename>gcc</filename>编译时我们发现问题要少得多。

note: Tag: para
en: GNU Make (<filename>gmake</filename> or <filename>make</filename>). For many systems, GNU <filename>make</filename> is the default version of make. Check the version by invoking <filename>make -v</filename>. Other versions of <filename>make</filename> may not process the PostGIS <filename>Makefile</filename> properly.
zh_Hans: GNU Make（<filename>gmake</filename> or <filename>make</filename>）。对于许多系统，GNU <filename>make</filename>是 make 的默认版本。通过调用<filename>make -v</filename>检查版本。 其他版本的<filename>make</filename>可能无法正确处理 PostGIS <filename>Makefile</filename>。

note: Tag: para
en: Proj reprojection library. Proj 6.1 or above is required. The Proj library is used to provide coordinate reprojection support within PostGIS. Proj is available for download from <ulink url="https://proj.org/"> https://proj.org/ </ulink> .
zh_Hans: 项目重投影库。需要项目 6.1 或更高版本。Proj 库用于在 PostGIS 中提供坐标重投影支持。Proj 可以从<ulink url="https://proj.org/"> https://proj.org/ </ulink> 下载

note: Tag: para
en: GEOS geometry library, version 3.6 or greater, but GEOS 3.12+ is required to take full advantage of all the new functions and features. GEOS is available for download from <ulink url="https://libgeos.org/"> https://libgeos.org </ulink>.
zh_Hans: 几何库 GEOS 3.6 或更高版本是必需的，但需要 GEOS 3.12 或更高版本才能充分利用所有功能和特性。 您可以从 <ulink url="https://libgeos.org/"> https://libgeos.org </ulink>下载 GEOS。

note: Tag: para
en: LibXML2, version 2.5.x or higher. LibXML2 is currently used in some imports functions (ST_GeomFromGML and ST_GeomFromKML). LibXML2 is available for download from <ulink url="https://gitlab.gnome.org/GNOME/libxml2/-/releases">https://gitlab.gnome.org/GNOME/libxml2/-/releases</ulink>.
zh_Hans: LibXML2、2.5.x 或更高版本。 目前，导入函数（ST_GeomFromGML和ST_GeomFromKML）使用 LibXML2。 您可以从 <ulink url="https://gitlab.gnome.org/GNOME/libxml2/-/releases">https://gitlab.gnome.org/GNOME/libxml2/-/releases</ulink> 下载 LibXML2。

note: Tag: para
en: JSON-C, version 0.9 or higher. JSON-C is currently used to import GeoJSON via the function ST_GeomFromGeoJson. JSON-C is available for download from <ulink url="https://github.com/json-c/json-c/releases">https://github.com/json-c/json-c/releases/</ulink>.
zh_Hans: JSON-C 0.9或更高版本。JSON-C 目前用于按 ST_GeomFromGeoJson 导入 GeoJSON。 JSON-C 可从 <ulink url="https://github.com/json-c/json-c/releases">https://github.com/json-c/json-c/releases/</ulink> 下载。

note: Tag: para
en: GDAL, version 2+ is required 3+ is preferred. This is required for raster support. <ulink url="https://gdal.org/download.html">https://gdal.org/download.html</ulink>.
zh_Hans: GDAL，版本 2+ 是必需的，版本 3+ 是首选。 这是光栅支持所必需的。<ulink url="https://gdal.org/download.html">https://gdal.org/download.html</ulink>。

note: Tag: para
en: If compiling with PostgreSQL+JIT, LLVM version &gt;=6 is required <ulink url="https://trac.osgeo.org/postgis/ticket/4125">https://trac.osgeo.org/postgis/ticket/4125</ulink>.
zh_Hans: 要使用PostgreSQL+JIT进行编译，需要LLVM版本6或更高版本。请参阅 <ulink url="https://trac.osgeo.org/postgis/ticket/4125">https://trac.osgeo.org/postgis/ticket/4125</ulink>。

note: Tag: emphasis
en: Optional
zh_Hans: 可选择的

note: Tag: para
en: GDAL (pseudo optional) only if you don't want raster you can leave it out. Also make sure to enable the drivers you want to use as described in <xref linkend="raster_configuration"/>.
zh_Hans: GDAL（伪可选）仅当您不需要光栅时才可以将其省略。另请确保启用您要使用的驱动程序，如<xref linkend="raster_configuration"/>中所述。

note: Tag: para
en: GTK (requires GTK+2.0, 2.8+) to compile the shp2pgsql-gui shape file loader. <ulink url="http://www.gtk.org/"> http://www.gtk.org/ </ulink> .
zh_Hans: GTK（需要 GTK+2.0， 2.8+）。用于编译shp2pgsql-gui，一个shapefile loader。它位于 <ulink url="http://www.gtk.org/"> http://www.gtk.org/ </ulink>。

note: Tag: para
en: SFCGAL, version 1.3.1 (or higher), 1.4.1 or higher is recommended and required to be able to use all functionality. SFCGAL can be used to provide additional 2D and 3D advanced analysis functions to PostGIS cf <xref linkend="reference_sfcgal"/>. And also allow to use SFCGAL rather than GEOS for some 2D functions provided by both backends (like ST_Intersection or ST_Area, for instance). A PostgreSQL configuration variable <code>postgis.backend</code> allow end user to control which backend he want to use if SFCGAL is installed (GEOS by default). Nota: SFCGAL 1.2 require at least CGAL 4.3 and Boost 1.54 (cf: <ulink url="https://oslandia.gitlab.io/SFCGAL/dev.html">https://oslandia.gitlab.io/SFCGAL/dev.html</ulink>) <ulink url="https://gitlab.com/Oslandia/SFCGAL/">https://gitlab.com/Oslandia/SFCGAL/</ulink>.
zh_Hans: 建议使用 SFCGAL 版本 1.3.1（或更高版本）、1.4.1 或更高版本，以便能够使用所有功能。SFCGAL 可用于为 PostGIS 提供额外的 2D 和 3D 高级分析功能，参见<xref linkend="reference_sfcgal"/>。并且还允许对两个后端提供的某些 2D 函数（例如 ST_Intersection 或 ST_Area）使用 SFCGAL 而不是 GEOS。如果安装了 SFCGAL（默认为 GEOS），PostgreSQL 配置变量 <code>postgis.backend</code>允许最终用户控制他想要使用哪个后端。注：SFCGAL 1.2 至少需要 CGAL 4.3 和 Boost 1.54（参见：<ulink url="https://oslandia.gitlab.io/SFCGAL/dev.html">https://oslandia.gitlab.io/SFCGAL/dev.html</ulink>）<ulink url="https://gitlab.com/Oslandia/SFCGAL/">https://gitlab.com/Oslandia/SFCGAL/</ulink>。

note: Tag: para
en: In order to build the <xref linkend="Address_Standardizer"/> you will also need PCRE <ulink url="http://www.pcre.org">http://www.pcre.org</ulink> (which generally is already installed on nix systems). <xref linkend="Address_Standardizer"/> will automatically be built if it detects a PCRE library, or you pass in a valid <varname>--with-pcre-dir=/path/to/pcre</varname> during configure.
zh_Hans: 要构建<xref linkend="Address_Standardizer"/>，您还需要PCRE<ulink url="http://www.pcre.org">http://www.pcre.org</ulink>（通常安装在 nix 系统上）。检测到 PCRE 库后，将自动构建<xref linkend="Address_Standardizer"/> 。 或者，指定它在配置期间有效。<varname>--with-pcre-dir=/path/to/pcre</varname>

note: Tag: para
en: To enable ST_AsMVT protobuf-c library 1.1.0 or higher (for usage) and the protoc-c compiler (for building) are required. Also, pkg-config is required to verify the correct minimum version of protobuf-c. See <ulink url="https://github.com/protobuf-c/protobuf-c">protobuf-c</ulink>. By default, Postgis will use Wagyu to validate MVT polygons faster which requires a c++11 compiler. It will use CXXFLAGS and the same compiler as the PostgreSQL installation. To disable this and use GEOS instead use the <varname>--without-wagyu</varname> during the configure step.
zh_Hans: 要启用ST_AsMVT，您需要ProtoBuf-C库（运行时）和ProtoC-C编译器（构建时）。要检查 protobuf-c 的正确最低版本，需要 pkg-config。 参见<ulink url="https://github.com/protobuf-c/protobuf-c">protobuf-c</ulink>。默认情况下，PostGIS 使用 Wagyu 快速评估 MVT 多边形，但需要 C++11 编译器。 使用 CXXFLAGS 使用您用于 PostgreSQL 安装的相同编译器。如果要禁用此功能并改用 GEOS，请在配置期间指定它。 <varname>--without-wagyu</varname>

note: Tag: para
en: CUnit (<filename>CUnit</filename>). This is needed for regression testing. <ulink url="http://cunit.sourceforge.net/">http://cunit.sourceforge.net/</ulink>
zh_Hans: CUnit (<filename>CUnit</filename>)。回归测试是必需的。它位于<ulink url="http://cunit.sourceforge.net/">http://cunit.sourceforge.net/</ulink>。<filename>CUnit</filename>

note: Tag: para
en: DocBook (<filename>xsltproc</filename>) is required for building the documentation. Docbook is available from <ulink url="http://www.docbook.org/"> http://www.docbook.org/ </ulink> .
zh_Hans: DocBook (<filename>xsltproc</filename>)构建文档需要。Docbook可从<ulink url="http://www.docbook.org/"> http://www.docbook.org/ </ulink>  获取。<filename>xsltproc</filename>

note: Tag: para
en: DBLatex (<filename>dblatex</filename>) is required for building the documentation in PDF format. DBLatex is available from <ulink url="http://dblatex.sourceforge.net/"> http://dblatex.sourceforge.net/ </ulink> .
zh_Hans: DBLatex (<filename>dblatex</filename>)需要以 PDF 格式构建文档。它位于 <ulink url="http://dblatex.sourceforge.net/"> http://dblatex.sourceforge.net/ </ulink>。<filename>dblatex</filename>

note: Tag: para
en: ImageMagick (<filename>convert</filename>) is required to generate the images used in the documentation. ImageMagick is available from <ulink url="http://www.imagemagick.org/"> http://www.imagemagick.org/ </ulink> .
zh_Hans: ImageMagick (<filename>convert</filename>)生成文档中使用的图像。它位于<ulink url="http://www.imagemagick.org/"> http://www.imagemagick.org/ </ulink>。

note: Tag: title
en: Build configuration
zh_Hans: 构建配置

note: Tag: para
en: As with most linux installations, the first step is to generate the Makefile that will be used to build the source code. This is done by running the shell script
zh_Hans: 与大多数 Linux 安装一样，第一步是生成一个将用于构建源代码的 Makefile。 这是通过 shell 脚本完成的。

note: Tag: para
en: With no additional parameters, this command will attempt to automatically locate the required components and libraries needed to build the PostGIS source code on your system. Although this is the most common usage of <command>./configure</command>, the script accepts several parameters for those who have the required libraries and programs in non-standard locations.
zh_Hans: 如果未提供任何参数，此命令将自动查找在系统上构建 PostGIS 源代码所需的组件和库。<command>./configure</command> 是一种常见的用法，但它接受一些参数，以防您在非标准位置拥有必要的库或程序。

note: Tag: para
en: The following list shows only the most commonly used parameters. For a complete list, use the <command>--help</command> or <command>--help=short</command> parameters.
zh_Hans: 以下列表显示了常用参数：有关完整列表，请使用 <command>--help</command> 或 <command>--help=short</command>参数。

note: Tag: para
en: Starting with PostGIS 3.0, the library files generated by default will no longer have the minor version as part of the file name. This means all PostGIS 3 libs will end in <code>postgis-3</code>. This was done to make pg_upgrade easier, with downside that you can only install one version PostGIS 3 series in your server. To get the old behavior of file including the minor version: e.g. <code>postgis-3.0</code> add this switch to your configure statement.
zh_Hans: 从 PostGIS 3.0 开始，默认生成的库文件将不再具有次要版本 作为文件名的一部分。这意味着所有 PostGIS 3 库都将以 <code>postgis-3</code> 结尾。这样做是为了pg_upgrade更容易，缺点是你只能安装 服务器中的一个版本 PostGIS 3 系列。获取文件的旧行为，包括次要版本：例如 将此开关添加到配置语句中。<code>postgis-3.0</code>

note: Tag: para
en: This is the location the PostGIS loader executables and shared libs will be installed. By default, this location is the same as the detected PostgreSQL installation.
zh_Hans: 指定要安装 PostGIS 库和 SQL 脚本的位置。 默认情况下，它将与检测到的 PostgreSQL 安装位置相同。

note: Tag: para
en: This parameter is currently broken, as the package will only install into the PostgreSQL installation directory. Visit <ulink url="http://trac.osgeo.org/postgis/ticket/635"> http://trac.osgeo.org/postgis/ticket/635 </ulink> to track this bug.
zh_Hans: 此参数当前已损坏，只会安装在PostgreSQL的位置。有关此错误的跟踪，请参阅 <ulink url="http://trac.osgeo.org/postgis/ticket/635"> http://trac.osgeo.org/postgis/ticket/635 </ulink>。

note: Tag: para
en: PostgreSQL provides a utility called <command>pg_config</command> to enable extensions like PostGIS to locate the PostgreSQL installation directory. Use this parameter (<command>--with-pgconfig=/path/to/pg_config</command>) to manually specify a particular PostgreSQL installation that PostGIS will build against.
zh_Hans: PostgreSQL有一个名为<command>pg_config</command>的实用程序，使PostGIS等扩展能够定位PostgreSQL安装目录。使用此参数 （<command>--with-pgconfig=/path/to/pg_config</command>）可以手动指定 PostGIS 的特定 PostgreSQL 的安装目录

note: Tag: para
en: GDAL, a required library, provides functionality needed for raster support <command>gdal-config</command> to enable software installations to locate the GDAL installation directory. Use this parameter (<command>--with-gdalconfig=/path/to/gdal-config</command>) to manually specify a particular GDAL installation that PostGIS will build against.
zh_Hans: GDAL是必需的库，提供栅格支持 <command>gdal-config</command>所需的功能，以使软件安装能够找到 GDAL装目录。使用此参数 （<command>--with-gdalconfig=/path/to/gdal-config</command>）手动指定 PostGIS 将针对其构建的特定 GDAL的安装目录。

note: Tag: para
en: GEOS, a required geometry library, provides a utility called <command>geos-config</command> to enable software installations to locate the GEOS installation directory. Use this parameter (<command>--with-geosconfig=/path/to/geos-config</command>) to manually specify a particular GEOS installation that PostGIS will build against.
zh_Hans: 作为一个基本的几何库，GEOS 有一个名为 <command>geos-config</command>的实用程序，它会告诉您在安装软件时在哪里安装 GEOS。使用此参数 （<command>--with-geosconfig=/path/to/geos-config</command>） 手动指定要用于 PostGIS 构建的特定 GEOS的安装目录

note: Tag: para
en: LibXML is the library required for doing GeomFromKML/GML processes. It normally is found if you have libxml installed, but if not or you want a specific version used, you'll need to point PostGIS at a specific <filename>xml2-config</filename> confi file to enable software installations to locate the LibXML installation directory. Use this parameter (<command>>--with-xml2config=/path/to/xml2-config</command>) to manually specify a particular LibXML installation that PostGIS will build against.
zh_Hans: LibXML是GeomFromKML/GML处理的基本库。通常，如果你安装了libxml，它就会被发现，但是如果你找不到它，或者如果你想使用特定版本，你可以告诉安装脚本你想在哪里安装LibXML。使用此参数 （ <command>>--with-xml2config=/path/to/xml2-config</command>） 手动指定用于 PostGIS 构建的特定 LibXML的安装目录。<filename>xml2-config</filename>

note: Tag: para
en: Proj is a reprojection library required by PostGIS. Use this parameter (<command>--with-projdir=/path/to/projdir</command>) to manually specify a particular Proj installation directory that PostGIS will build against.
zh_Hans: Proj是PostGIS必不可少的投影库。使用此参数 （<command>--with-projdir=/path/to/projdir</command>）手动指定要用于 PostGIS 构建的特定 Proj 的安装目录。

note: Tag: para
en: Directory where iconv is installed.
zh_Hans: iconv的安装目录

note: Tag: para
en: <ulink url="http://oss.metaparadigm.com/json-c/">JSON-C</ulink> is an MIT-licensed JSON library required by PostGIS ST_GeomFromJSON support. Use this parameter (<command>--with-jsondir=/path/to/jsondir</command>) to manually specify a particular JSON-C installation directory that PostGIS will build against.
zh_Hans: <ulink url="http://oss.metaparadigm.com/json-c/">JSON-C</ulink> 是 MIT 许可的 JSON 库，是 PostGIS ST_GeomFromJSON 所必需的。使用此参数 （<command>--with-jsondir=/path/to/jsondir</command>） 手动指定要用于 PostGIS 构建的特定 JSON-C的安装目录。

note: Tag: para
en: <ulink url="http://www.pcre.org/">PCRE</ulink> is an BSD-licensed Perl Compatible Regular Expression library required by address_standardizer extension. Use this parameter (<command>--with-pcredir=/path/to/pcredir</command>) to manually specify a particular PCRE installation directory that PostGIS will build against.
zh_Hans: PCRE 是 address_standardizer 扩展所需的 BSD 许可的 Perl 兼容正则表达式库。使用此参数 (<command>--with-pcredir=/path/to/pcredir</command>) 手动指定 PostGIS 将构建的特定 PCRE 的安装目录。

note: Tag: para
en: Compile the data import GUI (requires GTK+2.0). This will create shp2pgsql-gui graphical interface to shp2pgsql.
zh_Hans: 编译数据导入GUI（需要 GTK+2.0）。此参数为 shp2pgsql 创建一个名为 shp2pgsql-gui 的图形用户界面。

note: Tag: para
en: Compile without raster support.
zh_Hans: 在没有栅格功能的情况下进行编译。

note: Tag: para
en: Disable topology support. There is no corresponding library as all logic needed for topology is in postgis-&last_release_version; library.
zh_Hans: 在没有拓扑支持的情况下进行编译。 拓扑所需的所有逻辑都是在postgis-&last_release_version; 库中创建的，因此没有关联的库。

note: Tag: para
en: By default PostGIS will try to detect gettext support and compile with it, however if you run into incompatibility issues that cause breakage of loader, you can disable it entirely with this command. Refer to ticket <ulink url="http://trac.osgeo.org/postgis/ticket/748">http://trac.osgeo.org/postgis/ticket/748</ulink> for an example issue solved by configuring with this. NOTE: that you aren't missing much by turning this off. This is used for international help/label support for the GUI loader which is not yet documented and still experimental.
zh_Hans: 默认情况下，会检测 gettext 并使用它进行编译，但如果在导致加载程序损坏的不兼容问题下运行，则此命令可以禁用它。使用此功能的配置可以解决的问题示例，请参见<ulink url="http://trac.osgeo.org/postgis/ticket/748">http://trac.osgeo.org/postgis/ticket/748</ulink>。 注意：关闭此功能不会消除许多功能。 它用于 GUI 加载器中的内部帮助/标签功能，这些功能尚未记录，处于实验阶段。

note: Tag: para
en: By default PostGIS will not install with sfcgal support without this switch. <varname>PATH</varname> is an optional argument that allows to specify an alternate PATH to sfcgal-config.
zh_Hans: 默认情况下，如果没有此开关，则不会安装启用 SFCGAL 的安装。是一个附加参数，允许您指定 sfcgal 配置的路径。<varname>PATH</varname>

note: Tag: para
en: Disable updating postgis_revision.h to match current HEAD of the git repository.
zh_Hans: 禁用 postgis_revision.h 更新以匹配 Git 存储库中的当前 HEAD。

note: Tag: para
en: If you obtained PostGIS from the <ulink url="https://trac.osgeo.org/postgis/wiki/CodeRepository"> code repository </ulink> , the first step is really to run the script
zh_Hans: 如果要从<ulink url="https://trac.osgeo.org/postgis/wiki/CodeRepository">代码存储库</ulink> 获取PostGIS，请先运行以下脚本：

note: Tag: para
en: This script will generate the <command>configure</command> script that in turn is used to customize the installation of PostGIS.
zh_Hans: 此脚本生成<command>配置</command>脚本。这用于自定义 PostGIS 安装。

note: Tag: para
en: If you instead obtained PostGIS as a tarball, running <command>./autogen.sh</command> is not necessary as <command>configure</command> has already been generated.
zh_Hans: 如果要获取 PostGIS 作为存档文件，则无需<command>./autogen.sh</command>，因为 <command>配置</command>已经生成。

note: Tag: title
en: Building
zh_Hans: 构建

note: Tag: para
en: Once the Makefile has been generated, building PostGIS is as simple as running
zh_Hans: 生成Makefile后，构建PostGIS就像运行命令一样简单。

note: Tag: para
en: The last line of the output should be "<code>PostGIS was built successfully. Ready to install.</code>"
zh_Hans: 如果在输出的最后一行看到“<code>PostGIS was built successfully. Ready to install.</code>”，则表示您已完成。

note: Tag: para
en: As of PostGIS v1.4.0, all the functions have comments generated from the documentation. If you wish to install these comments into your spatial databases later, run the command which requires docbook. The postgis_comments.sql and other package comments files raster_comments.sql, topology_comments.sql are also packaged in the tar.gz distribution in the doc folder so no need to make comments if installing from the tar ball. Comments are also included as part of the CREATE EXTENSION install.
zh_Hans: 从 PostGIS v1.4.0 开始，所有函数都有从文档生成的注释。如果您希望稍后将这些注释安装到空间数据库中，请运行需要的 docbook 命令。postgis_comments.sql 和其他包注释文件 raster_comments.sql、topology_comments.sql 也打包在 doc 文件夹中的 tar.gz 中，因此如果从 tar 包中安装，则无需进行注释。 注释包含在 CREATE EXTENSION 安装中。

note: Tag: command
en: make comments
zh_Hans: 发表评论

note: Tag: para
en: Introduced in PostGIS 2.0. This generates html cheat sheets suitable for quick reference or for student handouts. This requires xsltproc to build and will generate 4 files in doc folder <filename>topology_cheatsheet.html</filename>, <filename>tiger_geocoder_cheatsheet.html</filename>, <filename>raster_cheatsheet.html</filename>, <filename>postgis_cheatsheet.html</filename>
zh_Hans: 它是在PostGIS 2.0中引入的。 生成适合快速参考和讲义的HTML备忘单，供正在学习的人使用。 xsltproc 是必需的，生成 4 个文件。<filename>topology_cheatsheet.html</filename>,<filename>tiger_geocoder_cheatsheet.html</filename>,<filename>raster_cheatsheet.html</filename>, <filename>postgis_cheatsheet.html</filename>

note: Tag: para
en: You can download some pre-built ones available in html and pdf from <ulink url="http://www.postgis.us/study_guides">PostGIS / PostgreSQL Study Guides</ulink>
zh_Hans: 预构建的HTML和PDF版本可以在<ulink url="http://www.postgis.us/study_guides">PostGIS / PostgreSQL学习指南</ulink>中找到。

note: Tag: command
en: make cheatsheets
zh_Hans: 制作备忘单

note: Tag: title
en: Building PostGIS Extensions and Deploying them
zh_Hans: 构建和部署PostGIS扩展

note: Tag: para
en: The PostGIS extensions are built and installed automatically if you are using PostgreSQL 9.1+.
zh_Hans: 如果您使用的是 PostgreSQL 9.1 或更高版本，则会自动构建并安装PostGIS 扩展。

note: Tag: para
en: If you are building from source repository, you need to build the function descriptions first. These get built if you have docbook installed. You can also manually build with the statement:
zh_Hans: 如果要从源存储库构建，则必须先构建函数描述。这些是在安装文档手册时构建的。 您也可以手动安装：

note: Tag: para
en: Building the comments is not necessary if you are building from a release tar ball since these are packaged pre-built with the tar ball already.
zh_Hans: 如果从存档文件构建，则其中一些注释文件已经构建，因此无需构建注释。

note: Tag: para
en: The extensions should automatically build as part of the make install process. You can if needed build from the extensions folders or copy files if you need them on a different server.
zh_Hans: 如果您针对 PostgreSQL 9.1 进行构建，则应在 make 安装过程中自动构建扩展。如果需要，可以从扩展文件夹生成，或者根据需要在另一台服务器上复制该文件。

note: Tag: para
en: <code>make check</code> uses psql to run tests and as such can use psql environment variables. Common ones useful to override are <varname>PGUSER</varname>,<varname>PGPORT</varname>, and <varname>PGHOST</varname>. Refer to <ulink url="https://www.postgresql.org/docs/current/libpq-envars.html">psql environment variables</ulink>
zh_Hans: make check 使用 psql 来运行测试，并使用 psql 环境变量。常用的可用于覆盖的有 <varname>PGUSER</varname> 、<varname>PGPORT</varname> 和 <varname>PGHOST</varname>。参考<ulink url="https://www.postgresql.org/docs/current/libpq-envars.html">psql环境变量</ulink>

note: Tag: para
en: The extension files will always be the same for the same version of PostGIS and PostgreSQL regardless of OS, so it is fine to copy over the extension files from one OS to another as long as you have the PostGIS binaries already installed on your servers.
zh_Hans: 无论操作系统如何，扩展文件在同一版本的 PostGIS 中始终相同。只要已安装 PostGIS 二进制文件，就可以将扩展文件从一个操作系统复制到另一个操作系统。

note: Tag: para
en: If you want to install the extensions manually on a separate server different from your development, You need to copy the following files from the extensions folder into the <filename>PostgreSQL / share / extension</filename> folder of your PostgreSQL install as well as the needed binaries for regular PostGIS if you don't have them already on the server.
zh_Hans: 如果要在与正在开发的服务器不同的服务器上手动安装扩展，请将以下文件从扩展文件夹复制到要安装 PostgreSQL 的文件夹，以及当它们不在服务器上时所需的常规 PostGIS 二进制文件。<filename>PostgreSQL / share / extension</filename>

note: Tag: para
en: These are the control files that denote information such as the version of the extension to install if not specified. <filename>postgis.control, postgis_topology.control</filename>.
zh_Hans: 这些是显示要安装的扩展的版本（如果未指定）等信息的控制文件。<filename>postgis.control, postgis_topology.control</filename>

note: Tag: para
en: All the files in the /sql folder of each extension. Note that these need to be copied to the root of the PostgreSQL share/extension folder <filename>extensions/postgis/sql/*.sql</filename>, <filename>extensions/postgis_topology/sql/*.sql</filename>
zh_Hans: 每个扩展名的 /sql 文件夹中的所有文件。请注意，必须复制到 PostgreSQL 共享/扩展文件夹的顶层。<filename>extensions/postgis/sql/*.sql</filename>, <filename>extensions/postgis_topology/sql/*.sql</filename>

note: Tag: para
en: Once you do that, you should see <varname>postgis</varname>, <varname>postgis_topology</varname> as available extensions in PgAdmin -> extensions.
zh_Hans: 完成此操作后，您应该看到，作为 PgAdmin -> 扩展中的可用扩展。<varname>postgis</varname>, <varname>postgis_topology</varname>

note: Tag: para
en: If you are using psql, you can verify that the extensions are installed by running this query:
zh_Hans: 如果使用 psql，则可以运行以下查询来验证是否已安装扩展：

note: Tag: para
en: If you have the extension installed in the database you are querying, you'll see mention in the <varname>installed_version</varname> column. If you get no records back, it means you don't have postgis extensions installed on the server at all. PgAdmin III 1.14+ will also provide this information in the <varname>extensions</varname> section of the database browser tree and will even allow upgrade or uninstall by right-clicking.
zh_Hans: 如果在要查询的数据库中安装了扩展，则会在列中看到提及。如果您没有返回任何记录，则意味着您根本没有在服务器上安装 postgis 扩展。PgAdmin III 1.14+ 也将在数据库浏览器树的部分中提供此信息，甚至允许通过右键单击进行升级或卸载。<varname>installed_version</varname>

note: Tag: para
en: If you have the extensions available, you can install postgis extension in your database of choice by either using pgAdmin extension interface or running these sql commands:
zh_Hans: 如果您有有效的扩展，则可以使用 pgAdmin 扩展接口或通过运行以下 SQL 将 PostGIS 扩展安装到所选数据库：

note: Tag: para
en: In psql you can use to see what versions you have installed and also what schema they are installed.
zh_Hans: 在 psql 中，您可以查看哪些版本安装在哪些架构上。

note: Tag: para
en: Extension tables <varname>spatial_ref_sys</varname>, <varname>layer</varname>, <varname>topology</varname> can not be explicitly backed up. They can only be backed up when the respective <varname>postgis</varname> or <varname>postgis_topology</varname> extension is backed up, which only seems to happen when you backup the whole database. As of PostGIS 2.0.1, only srid records not packaged with PostGIS are backed up when the database is backed up so don't go around changing srids we package and expect your changes to be there. Put in a ticket if you find an issue. The structures of extension tables are never backed up since they are created with <code>CREATE EXTENSION</code> and assumed to be the same for a given version of an extension. These behaviors are built into the current PostgreSQL extension model, so nothing we can do about it.
zh_Hans: 无法直接备份扩展表 <varname>spatial_ref_sys</varname>、<varname>layer</varname>、<varname>topology</varname>。只有在备份相应的 <varname>postgis</varname> 或 <varname>postgis_topology</varname> 扩展时，它们才会被备份，而这似乎只会在备份整个数据库时发生。从 PostGIS 2.0.1 开始，仅在备份数据库时会备份未与 PostGIS 打包的 srid 记录，因此请不要随意更改我们打包的 srid，并期望您的更改会存在。如果您发现问题，请提交工单。由于扩展表的结构是使用 <code>CREATE EXTENSION</code> 创建的，并且假定在给定版本的扩展中是相同的，因此它们永远不会被备份。这些行为内置在当前的 PostgreSQL 扩展模型中，所以我们无法改变这一点。

note: Tag: para
en: If you installed &last_release_version;, without using our wonderful extension system, you can change it to be extension based by running the below commands to package the functions in their respective extension. Installing using `unpackaged` was removed in PostgreSQL 13, so you are advised to switch to an extension build before upgrading to PostgreSQL 13.
zh_Hans: 如果你在不使用我们出色的扩展机制的情况下安装了&last_release_version;，你可以运行命令来打包每个扩展的功能，并修改它以基于扩展。 在 PostgreSQL 13 中，未打包的安装已被删除，因此您应该在升级到 PostgreSQL 13 之前更改它以构建扩展。

note: Tag: title
en: Testing
zh_Hans: 测试

note: Tag: para
en: If you wish to test the PostGIS build, run
zh_Hans: 要测试 PostGIS，请运行以下命令：

note: Tag: command
en: make check
zh_Hans: 进行检查

note: Tag: para
en: The above command will run through various checks and regression tests using the generated library against an actual PostgreSQL database.
zh_Hans: 此命令使用针对实际 PostgreSQL 数据库生成的库执行各种检查和回归测试。

note: Tag: para
en: If you configured PostGIS using non-standard PostgreSQL, GEOS, or Proj locations, you may need to add their library locations to the <varname>LD_LIBRARY_PATH</varname> environment variable.
zh_Hans: 如果您尚未将 PostgreSQL、GEOS 或 Proj 安装到标准位置，则可能需要将库位置添加到环境变量中。<varname>LD_LIBRARY_PATH</varname>

note: Tag: para
en: Currently, the <command>make check</command> relies on the <code>PATH</code> and <code>PGPORT</code> environment variables when performing the checks - it does <emphasis>not</emphasis> use the PostgreSQL version that may have been specified using the configuration parameter <command>--with-pgconfig</command>. So make sure to modify your PATH to match the detected PostgreSQL installation during configuration or be prepared to deal with the impending headaches.
zh_Hans: 目前，<command>make check</command> 依赖于<code>PATH</code> and <code>PGPORT</code>环境变量来执行检查。它不是使用 <command>--with-pgconfig</command>.配置参数指定的 PostgreSQL。编辑路径以匹配在配置期间检测到的 PostgreSQL。 或者为不可避免的麻烦做好准备。

note: Tag: para
en: If successful, make check will produce the output of almost 500 tests. The results will look similar to the following (numerous lines omitted below):
zh_Hans: 如果成功，make check 将产生近 500 个测试的输出。结果将类似于 以下（下面省略了许多行）：

note: Tag: para
en: The <varname>postgis_tiger_geocoder</varname> and <varname>address_standardizer</varname> extensions, currently only support the standard PostgreSQL installcheck. To test these use the below. Note: the make install is not necessary if you already did make install at root of PostGIS code folder.
zh_Hans: <varname>postgis_tiger_geocoder</varname> and <varname>address_standardizer</varname> 扩展目前仅支持标准的 PostgreSQL 安装检查。要测试这些，请使用以下命令。注意：如果您已经在 PostGIS 代码文件夹的根目录中进行了安装，则不需要进行安装。

note: Tag: para
en: For address_standardizer:
zh_Hans: 对于address_standardizer:

note: Tag: para
en: Output should look like:
zh_Hans: 输出应类似于以下内容：

note: Tag: para
en: For tiger geocoder, make sure you have postgis and fuzzystrmatch extensions available in your PostgreSQL instance. The address_standardizer tests will also kick in if you built postgis with address_standardizer support:
zh_Hans: 对于 tiger geocoder，请确保您的 PostgreSQL 实例中具有可用的 postgis 和 fuzzystrmatch 扩展。如果您在address_standardizer支持下构建了postgis，address_standardizer测试也将启动：

note: Tag: para
en: output should look like:
zh_Hans: 输出应类似于以下内容:

note: Tag: title
en: Installation
zh_Hans: 安装

note: Tag: para
en: To install PostGIS, type
zh_Hans: 要安装 PostGIS，请运行以下命令：

note: Tag: command
en: make install
zh_Hans: 进行安装

note: Tag: para
en: This will copy the PostGIS installation files into their appropriate subdirectory specified by the <command>--prefix</command> configuration parameter. In particular:
zh_Hans: 这会将 PostGIS 安装文件复制到由<command>--prefix</command>参数指定的相应子目录。以下是值得注意的子目录：

note: Tag: para
en: The loader and dumper binaries are installed in <filename>[prefix]/bin</filename>.
zh_Hans: 加载程序和转储程序二进制文件安装在 <filename>[prefix]/bin</filename>

note: Tag: para
en: The SQL files, such as <filename>postgis.sql</filename>, are installed in <filename>[prefix]/share/contrib</filename>.
zh_Hans: <filename>postgis.sql</filename>此类 SQL 文件的安装位置是。<filename>[prefix]/share/contrib</filename>

note: Tag: para
en: The PostGIS libraries are installed in <filename>[prefix]/lib</filename>.
zh_Hans: PostGIS 库安装在<filename>[prefix]/lib</filename>。

note: Tag: para
en: If you previously ran the <command>make comments</command> command to generate the <filename>postgis_comments.sql</filename>, <filename>raster_comments.sql</filename> file, install the sql file by running
zh_Hans: 如果之前生成了<command>make 注释</command>，请运行以下命令来安装这些 SQL 文件：<filename>postgis_comments.sql</filename>,<filename>raster_comments.sql</filename>

note: Tag: command
en: make comments-install
zh_Hans: 评论脚本-安装

note: Tag: para
en: <filename>postgis_comments.sql</filename>, <filename>raster_comments.sql</filename>, <filename>topology_comments.sql</filename> was separated from the typical build and installation targets since with it comes the extra dependency of <command>xsltproc</command>.
zh_Hans: <filename>postgis_comments.sql</filename>, <filename>raster_comments.sql</filename>, <filename>topology_comments.sql</filename>成为 <command>xsltproc</command> 的外部依赖关系，因此它与正常的构建和安装分离。

note: Tag: title
en: Installing and Using the address standardizer
zh_Hans: 安装和使用地址标准化工具

note: Tag: para
en: The <code>address_standardizer</code> extension used to be a separate package that required separate download. From PostGIS 2.2 on, it is now bundled in. For more information about the address_standardize, what it does, and how to configure it for your needs, refer to <xref linkend="Address_Standardizer"/>.
zh_Hans: <code>address_standardizer</code>扩展是一个单独的包，需要单独下载。它包含在 PostGIS 2.2 中。有关address_standardize可以执行的操作以及如何配置它的其他信息，请参见<xref linkend="Address_Standardizer"/>。

note: Tag: para
en: This standardizer can be used in conjunction with the PostGIS packaged tiger geocoder extension as a replacement for the <xref linkend="Normalize_Address"/> discussed. To use as replacement refer to <xref linkend="tiger_pagc_address_standardizing"/>. You can also use it as a building block for your own geocoder or use it to standardize your addresses for easier compare of addresses.
zh_Hans: 该标准化器可以与 PostGIS 打包的 Tiger 地理编码器扩展结合使用，作为所讨论的 <xref linkend="Normalize_Address"/> 的替代品。 要用作替代品，请参阅<xref linkend="tiger_pagc_address_standardizing"/>。 您还可以将其用作您自己的地理编码器的构建块，或使用它来标准化您的地址，以便更轻松地比较地址。

note: Tag: para
en: The address standardizer relies on PCRE which is usually already installed on many Nix systems, but you can download the latest at: <ulink url="http://www.pcre.org">http://www.pcre.org</ulink>. If during <xref linkend="installation_configuration"/>, PCRE is found, then the address standardizer extension will automatically be built. If you have a custom pcre install you want to use instead, pass to configure <code>--with-pcredir=/path/to/pcre</code> where <filename>/path/to/pcre</filename> is the root folder for your pcre include and lib directories.
zh_Hans: 地址标准化器依赖于 PCRE，它通常已安装在许多 Nix 系统上，但您可以在以下位置下载最新版本：<ulink url="http://www.pcre.org">http://www.pcre.org</ulink>。如果在<xref linkend="installation_configuration"/>期间找到 PCRE，则将自动构建地址标准化器扩展。如果您想使用自定义 pcre 安装，请传递到 <code>--with-pcredir=/path/to/pcre</code>，其中<filename>/path/to/pcre</filename>是 pcre include 和 lib 目录的根文件夹。

note: Tag: para
en: For Windows users, the PostGIS 2.1+ bundle is packaged with the address_standardizer already so no need to compile and can move straight to <code>CREATE EXTENSION</code> step.
zh_Hans: 在 Windows 上，PostGIS 2.1 及更高版本附带了地址标准化扩展，因此您无需编译即可立即使用。直接进入<code>CREATE EXTENSION</code>步骤

note: Tag: para
en: Once you have installed, you can connect to your database and run the SQL:
zh_Hans: 安装后，可以连接到目标数据库并执行以下 SQL。

note: Tag: para
en: The following test requires no rules, gaz, or lex tables
zh_Hans: 对于下面的测试，我们不需要rules、gaz、lex 表。

note: Tag: para
en: Output should be
zh_Hans: 输出应类似于以下内容：

note: Tag: title
en: Installing, Upgrading Tiger Geocoder, and loading data
zh_Hans: 安装、升级 Tiger Geocoder 并加载数据

note: Tag: para
en: Extras like Tiger geocoder may not be packaged in your PostGIS distribution. If you are missing the tiger geocoder extension or want a newer version than what your install comes with, then use the <filename>share/extension/postgis_tiger_geocoder.*</filename> files from the packages in <ulink url="http://postgis.net/windows_downloads/">Windows Unreleased Versions</ulink> section for your version of PostgreSQL. Although these packages are for windows, the postgis_tiger_geocoder extension files will work on any OS since the extension is an SQL/plpgsql only extension.
zh_Hans: Tiger 地理编码器等附加功能可能不会打包在您的 PostGIS 发行版中。如果您缺少 Tiger 地理编码器扩展或想要比安装附带的版本更新的版本，请使用适用于您的 PostgreSQL 版本的 <ulink url="http://postgis.net/windows_downloads/">Windows未发布版本</ulink>部分中的包中的<filename>share/extension/postgis_tiger_geocoder.*</filename> 文件。尽管这些包适用于 Windows，但 postgis_tiger_geocoder 扩展文件将在任何操作系统上运行，因为该扩展仅是 SQL/plpgsql 扩展。

note: Tag: title
en: Tiger Geocoder Enabling your PostGIS database
zh_Hans: 在 PostGIS 数据库中启用Tiger Geocoder

note: Tag: para
en: These directions assume your PostgreSQL installation already has the postgis_tiger_geocoder extension installed.
zh_Hans: 出于本主题的目的，我们假设您已经为 PostgreSQL 安装了postgis_tiger_geocoder扩展。

note: Tag: para
en: Connect to your database via psql or pgAdmin or some other tool and run the following SQL commands. Note that if you are installing in a database that already has postgis, you don't need to do the first step. If you have <varname>fuzzystrmatch</varname> extension already installed, you don't need to do the second step either.
zh_Hans: 使用 psql、pgAdmin 或其他工具连接到数据库，然后运行以下 SQL 命令： 如果要在已有 PostGIS 的数据库上进行安装，则无需执行第一步。 如果已安装扩展，则不需要执行第二步<varname>fuzzystrmatch</varname>。

note: Tag: para
en: If you already have postgis_tiger_geocoder extension installed, and just want to update to the latest run:
zh_Hans: 如果已安装postgis_tiger_geocoder扩展，并且只想更新到最新版本，请运行：

note: Tag: para
en: If you made custom entries or changes to <varname>tiger.loader_platform</varname> and <varname>tiger.loader_variables</varname> you may need to update these.
zh_Hans: 如果生成自己的条目或对<varname>tiger.loader_platform</varname>和<varname>tiger.loader_variables</varname>进行更改，则可能需要更新它们。

note: Tag: para
en: To confirm your install is working correctly, run this sql in your database:
zh_Hans: 若要验证安装是否成功，请在目标数据库中运行以下 SQL：

note: Tag: para
en: Which should output
zh_Hans: 输出应类似于以下内容：

note: Tag: para
en: Create a new record in <varname>tiger.loader_platform</varname> table with the paths of your executables and server.
zh_Hans: <varname>tiger.loader_platform</varname>生成表的新记录，其中包含可执行文件或服务器的路径。

note: Tag: para
en: So for example to create a profile called debbie that follows <code>sh</code> convention. You would do:
zh_Hans: <code>sh</code>作为在约定后生成名为 debbie 的配置文件的示例，请运行以下命令：

note: Tag: para
en: And then edit the paths in the <emphasis>declare_sect</emphasis> column to those that fit Debbie's pg, unzip,shp2pgsql, psql, etc path locations.
zh_Hans: 然后将<emphasis>declare_sect</emphasis>列中的路径编辑为适合Debbie 的pg、unzip、shp2pgsql、psql 等路径位置。

note: Tag: para
en: If you don't edit this <varname>loader_platform</varname> table, it will just contain common case locations of items and you'll have to edit the generated script after the script is generated.
zh_Hans: 如果您不编辑此 <varname>loader_platform</varname> 表，它将仅包含项目的常见位置，并且您必须在生成脚本后编辑生成的脚本。

note: Tag: para
en: As of PostGIS 2.4.1 the Zip code-5 digit tabulation area <varname>zcta5</varname> load step was revised to load current zcta5 data and is part of the <xref linkend="Loader_Generate_Nation_Script"/> when enabled. It is turned off by default because it takes quite a bit of time to load (20 to 60 minutes), takes up quite a bit of disk space, and is not used that often.
zh_Hans: 从 PostGIS 2.4.1 开始，邮政编码 5 位制表区域 <varname>zcta5</varname>加载步骤已修改为加载当前 zcta5 数据，并且在启用时是<xref linkend="Loader_Generate_Nation_Script"/> 的一部分。默认情况下它是关闭的，因为它需要相当长的时间来加载（20 到 60 分钟），占用相当多的磁盘空间，并且不经常使用。

note: Tag: para
en: To enable it, do the following:
zh_Hans: 要启用它，请执行以下操作：

note: Tag: para
en: If present the <xref linkend="Geocode"/> function can use it if a boundary filter is added to limit to just zips in that boundary. The <xref linkend="Reverse_Geocode"/> function uses it if the returned address is missing a zip, which often happens with highway reverse geocoding.
zh_Hans: 如果添加了边界过滤器并将其限制为边界内的 ZIP，则在存在 ZCTA5 的情况下将使用<xref linkend="Geocode"/> 函数。当返回的地址没有邮政编码时，将使用<xref linkend="Reverse_Geocode"/>函数，这通常发生在高速公路上的反向地理编码中。

note: Tag: para
en: Create a folder called <filename>gisdata</filename> on root of server or your local pc if you have a fast network connection to the server. This folder is where the tiger files will be downloaded to and processed. If you are not happy with having the folder on the root of the server, or simply want to change to a different folder for staging, then edit the field <varname>staging_fold</varname> in the <varname>tiger.loader_variables</varname> table.
zh_Hans: 如果您有到服务器的快速网络连接，请在服务器根目录或本地电脑上创建一个名为 <filename>gisdata</filename>的文件夹。该文件夹是 Tiger 文件下载和处理的位置。 如果您对该文件夹位于服务器根目录不满意，或者只是想更改为不同的文件夹进行暂存，请编辑 <varname>tiger.loader_variables</varname>表中的字段 <varname>staging_fold</varname>。

note: Tag: para
en: Create a folder called temp in the <filename>gisdata</filename> folder or wherever you designated the <varname>staging_fold</varname> to be. This will be the folder where the loader extracts the downloaded tiger data.
zh_Hans: <filename>gisdata</filename>在该文件夹中创建一个名为 temp 的文件夹。或者，创建由<varname>staging_fold</varname>指示的文件夹。 这是加载程序提取下载的 Tiger 数据的地方。

note: Tag: para
en: Then run the <xref linkend="Loader_Generate_Nation_Script"/> SQL function make sure to use the name of your custom profile and copy the script to a .sh or .bat file. So for example to build the nation load:
zh_Hans: 然后运行<xref linkend="Loader_Generate_Nation_Script"/>SQL 函数，确保使用自定义配置文件的名称并将脚本复制到 .sh 或 .bat 文件。例如，如果要使用新的配置文件加载国家/地区：

note: Tag: para
en: Run the generated nation load commandline scripts.
zh_Hans: 运行命令行脚本以加载生成的国家/地区数据。

note: Tag: para
en: After you are done running the nation script, you should have three tables in your <code>tiger_data</code> schema and they should be filled with data. Confirm you do by doing the following queries from psql or pgAdmin
zh_Hans: 运行国家/地区脚本后，将在架构中创建三个表来存储数据。 从 psql 或 pgAdmin 运行以下查询进行验证： <code>tiger_data</code>

note: Tag: para
en: By default the tables corresponding to <varname>bg</varname>, <varname>tract</varname>, <varname>tabblock20</varname> are not loaded. These tables are not used by the geocoder but are used by folks for population statistics. If you wish to load them as part of your state loads, run the following statement to enable them.
zh_Hans: 默认情况下，不加载<varname>bg</varname>, <varname>tract</varname>, <varname>tabblock20</varname>对应的表。这些表不被地理编码器使用，但被人们用来进行人口统计。如果您希望将它们作为状态加载的一部分进行加载，请运行以下语句来启用它们。

note: Tag: para
en: Alternatively you can load just these tables after loading state data using the <xref linkend="Loader_Generate_Census_Script"/>
zh_Hans: 或者,可以使用<xref linkend="Loader_Generate_Census_Script"/>加载状态数据，然后仅加载这些表。

note: Tag: para
en: For each state you want to load data for, generate a state script <xref linkend="Loader_Generate_Script"/>.
zh_Hans: 对于要加载数据的每个状态，请使用<xref linkend="Loader_Generate_Script"/>创建状态脚本。

note: Tag: para
en: DO NOT Generate the state script until you have already loaded the nation data, because the state script utilizes county list loaded by nation script.
zh_Hans: 在完成加载国家/地区数据之前，请勿创建状态脚本。这是因为状态脚本使用国家/地区脚本中加载的国家/地区列表。

note: Tag: para
en: Run the generated commandline scripts.
zh_Hans: 运行生成的命令行脚本。

note: Tag: para
en: After you are done loading all data or at a stopping point, it's a good idea to analyze all the tiger tables to update the stats (include inherited stats)
zh_Hans: 在所有数据完成加载或到达断点后，最好对所有tiger表运行分析以更新其状态（包括继承的表）。

note: Tag: title
en: Using Address Standardizer Extension with Tiger geocoder
zh_Hans: 在 PostGIS 数据库中启用 Tiger 地理编码器：使用扩展名

note: Tag: para
en: One of the many complaints of folks is the address normalizer function <xref linkend="Normalize_Address"/> function that normalizes an address for prepping before geocoding. The normalizer is far from perfect and trying to patch its imperfectness takes a vast amount of resources. As such we have integrated with another project that has a much better address standardizer engine. To use this new address_standardizer, you compile the extension as described in <xref linkend="installing_pagc_address_standardizer"/> and install as an extension in your database.
zh_Hans: 您可能认为有问题的众多事情之一是在地理编码之前进行格式化地址的<xref linkend="Normalize_Address"/> 函数。地址规范化远非完美，修补它可能会占用大量资源。 因此，我们将其集成到其他项目中，具有更好的地址标准化引擎。要使用此新的地址标准化，请按照<xref linkend="installing_pagc_address_standardizer"/>中所述编译扩展并将其安装在数据库中。

note: Tag: para
en: Once you install this extension in the same database as you have installed <code>postgis_tiger_geocoder</code>, then the <xref linkend="Pagc_Normalize_Address"/> can be used instead of <xref linkend="Normalize_Address"/>. This extension is tiger agnostic, so can be used with other data sources such as international addresses. The tiger geocoder extension does come packaged with its own custom versions of <xref linkend="rulestab"/> ( <code>tiger.pagc_rules</code>) , <xref linkend="gaztab"/> (<code>tiger.pagc_gaz</code>), and <xref linkend="lextab"/> (<code>tiger.pagc_lex</code>). These you can add and update to improve your standardizing experience for your own needs.
zh_Hans: 如果将此扩展安装到已安装的数据库中，则可以使用<xref linkend="Pagc_Normalize_Address"/>而不是<xref linkend="Normalize_Address"/>。此扩展模块对 Tiger 地理编码器不可见，因此可以与其他数据源（例如国际地址）一起使用。Tiger 地理编码器扩展附带了其 <xref linkend="rulestab"/> ( <code>tiger.pagc_rules</code>) , <xref linkend="gaztab"/> (<code>tiger.pagc_gaz</code>),和<xref linkend="lextab"/> (<code>tiger.pagc_lex</code>) 的版本。可以根据需要添加或更新这些内容以提高标准化。

note: Tag: title
en: Required tools for tiger data loading
zh_Hans: 加载tiger所需的工具

note: Tag: para
en: The load process downloads data from the census website for the respective nation files, states requested, extracts the files, and then loads each state into its own separate set of state tables. Each state table inherits from the tables defined in <varname>tiger</varname> schema so that its sufficient to just query those tables to access all the data and drop a set of state tables at any time using the <xref linkend="Drop_State_Tables_Generate_Script"/> if you need to reload a state or just don't need a state anymore.
zh_Hans: 加载过程从人口普查网站下载各个国家文件、所请求的州的数据，提取文件，然后将每个州加载到其自己单独的一组州表中。每个状态表都继承自 <varname>tiger</varname>模式中定义的表，因此，如果您需要重新加载状态或不需要重新加载状态，则只需查询这些表即可访问所有数据并随时使用 <xref linkend="Drop_State_Tables_Generate_Script"/> 删除一组状态表不再需要一个国家了。

note: Tag: para
en: In order to be able to load data you'll need the following tools:
zh_Hans: 启用数据加载需要以下工具：

note: Tag: para
en: A tool to unzip the zip files from census website.
zh_Hans: 提取从人口普查网站获得的ZIP文件的工具。

note: Tag: para
en: For Unix like systems: <varname>unzip</varname> executable which is usually already installed on most Unix like platforms.
zh_Hans: 在类Unix系统上，它是一个可执行文件。<varname>unzip</varname>通常已经安装在大多数类Unix平台上。

note: Tag: para
en: For Windows, 7-zip which is a free compress/uncompress tool you can download from <ulink url="http://www.7-zip.org/">http://www.7-zip.org/</ulink>
zh_Hans: 在Windows上，它是7-zip。它是一个免费的压缩解压缩工具，可以从<ulink url="http://www.7-zip.org/">http://www.7-zip.org/</ulink>下载。

note: Tag: para
en: <filename>shp2pgsql</filename> commandline which is installed by default when you install PostGIS.
zh_Hans: <filename>shp2pgsql</filename> 命令。默认情况下，它在安装PostGIS时安装。

note: Tag: para
en: <filename>wget</filename> which is a web grabber tool usually installed on most Unix/Linux systems.
zh_Hans: <filename>wget</filename> 命令。它是一个Web检索工具，通常安装在大多数Unix / Linux系统上

note: Tag: para
en: If you are on windows, you can get pre-compiled binaries from <ulink url="http://gnuwin32.sourceforge.net/packages/wget.htm">http://gnuwin32.sourceforge.net/packages/wget.htm</ulink>
zh_Hans: 对于 Windows，您可以从<ulink url="http://gnuwin32.sourceforge.net/packages/wget.htm">http://gnuwin32.sourceforge.net/packages/wget.htm</ulink> 获取编译的二进制文件。

note: Tag: para
en: If you are upgrading from tiger_2010, you'll need to first generate and run <xref linkend="Drop_Nation_Tables_Generate_Script"/>. Before you load any state data, you need to load the nation wide data which you do with <xref linkend="Loader_Generate_Nation_Script"/>. Which will generate a loader script for you. <xref linkend="Loader_Generate_Nation_Script"/> is a one-time step that should be done for upgrading (from a prior year tiger census data) and for new installs.
zh_Hans: 如果您要从 Tiger_2010 升级，则需要首先生成并运行 <xref linkend="Drop_Nation_Tables_Generate_Script"/>。在加载任何州数据之前，您需要加载使用 <xref linkend="Loader_Generate_Nation_Script"/> 执行的全国范围数据。这将为您生成一个加载器脚本。<xref linkend="Loader_Generate_Nation_Script"/> 是一个一次性步骤，应该在升级（从上一年的tiger普查数据）和新安装时完成。

note: Tag: para
en: To load state data refer to <xref linkend="Loader_Generate_Script"/> to generate a data load script for your platform for the states you desire. Note that you can install these piecemeal. You don't have to load all the states you want all at once. You can load them as you need them.
zh_Hans: 要加载状态数据，请参阅<xref linkend="Loader_Generate_Script"/>为您的平台生成所需状态的数据加载脚本。 请注意，您可以零碎地安装这些。 您不必一次加载您想要的所有状态。 您可以根据需要加载它们

note: Tag: para
en: After the states you desire have been loaded, make sure to run the: <programlisting>SELECT install_missing_indexes();</programlisting> as described in <xref linkend="Install_Missing_Indexes"/>.
zh_Hans: 加载所需的状态后，如<programlisting>SELECT install_missing_indexes();</programlisting>所示：尝试运行 <xref linkend="Install_Missing_Indexes"/>。

note: Tag: para
en: To test that things are working as they should, try to run a geocode on an address in your state using <xref linkend="Geocode"/>
zh_Hans: 要测试您是否能够执行应执行的操作，您将在使用 <xref linkend="Geocode"/>的州的地址上运行地理编码器。

note: Tag: title
en: Upgrading your Tiger Geocoder Install and Data
zh_Hans: 升级 Tiger 地理编码器和数据

note: Tag: para
en: First upgrade your postgis_tiger_geocoder extension as follows:
zh_Hans: 首先postgis_tiger_geocoder按如下所示升级扩展：

note: Tag: para
en: Next drop all nation tables and load up the new ones. Generate a drop script with this SQL statement as detailed in <xref linkend="Drop_Nation_Tables_Generate_Script"/>
zh_Hans: 然后删除所有国家/地区表并加载新的国家/地区表。 如<xref linkend="Drop_Nation_Tables_Generate_Script"/>中所述，使用此 SQL 语句生成删除脚本。

note: Tag: para
en: Run the generated drop SQL statements.
zh_Hans: 执行生成的删除SQL语句。

note: Tag: para
en: Generate a nation load script with this SELECT statement as detailed in <xref linkend="Loader_Generate_Nation_Script"/>
zh_Hans: 如<xref linkend="Loader_Generate_Nation_Script"/>中所述，使用此 SELECT 语句生成删除脚本。

note: Tag: emphasis
en: For windows
zh_Hans: 对于Windows

note: Tag: emphasis
en: For unix/linux
zh_Hans: 对于unix/linux

note: Tag: para
en: Refer to <xref linkend="install_tiger_geocoder_extension"/> for instructions on how to run the generate script. This only needs to be done once.
zh_Hans: 有关如何运行生成脚本的说明，请参见 <xref linkend="install_tiger_geocoder_extension"/>。 您只需要执行此操作一次。

note: Tag: para
en: You can have a mix of different year state tables and can upgrade each state separately. Before you upgrade a state you first need to drop the prior year state tables for that state using <xref linkend="Drop_State_Tables_Generate_Script"/>.
zh_Hans: 您可以混合使用不同年份的状态表，并且可以单独升级每个状态。 在升级某个州之前，您首先需要使用  <xref linkend="Drop_State_Tables_Generate_Script"/> 删除该州前一年的州表。

note: Tag: title
en: Common Problems during installation
zh_Hans: 常见问题

note: Tag: para
en: There are several things to check when your installation or upgrade doesn't go as you expected.
zh_Hans: 当安装或升级未按预期进行时，需要检查一些事项。

note: Tag: para
en: Check that you have installed PostgreSQL &min_postgres_version; or newer, and that you are compiling against the same version of the PostgreSQL source as the version of PostgreSQL that is running. Mix-ups can occur when your (Linux) distribution has already installed PostgreSQL, or you have otherwise installed PostgreSQL before and forgotten about it. PostGIS will only work with PostgreSQL &min_postgres_version; or newer, and strange, unexpected error messages will result if you use an older version. To check the version of PostgreSQL which is running, connect to the database using psql and run this query:
zh_Hans: 检查您是否安装了PostgreSQL &min_postgres_version; 或更高版本，以及您是否使用与您正在运行的PostgreSQL相同版本的源代码进行编译。当PostgreSQL已经由（Linux）发行版安装时，或者如果PostgreSQL之前已安装并被遗忘时，可能会发生混淆。 PostGIS 在 PostgreSQL&min_postgres_version; 及更高版本上运行。如果您使用旧版本，您将收到一条奇怪且意外的错误消息。 要检查您运行的是哪个版本的 PostgreSQL，请使用 psql 连接到数据库并运行以下查询：

note: Tag: para
en: If you are running an RPM based distribution, you can check for the existence of pre-installed packages using the <command>rpm</command> command as follows: <command>rpm -qa | grep postgresql</command>
zh_Hans: 如果您运行的是基于 RPM 的发行版，则可以使用<command>rpm</command>命令检查是否存在带有 <command>rpm -qa | grep postgresql</command>的预安装软件包。

note: Tag: para
en: If your upgrade fails, make sure you are restoring into a database that already has PostGIS installed.
zh_Hans: 如果升级失败，请确保还原到已安装PostGIS的数据库。

note: Tag: para
en: Also check that configure has correctly detected the location and version of PostgreSQL, the Proj library and the GEOS library.
zh_Hans: 此外，请检查配置是否正确检测到 PostgreSQL、Proj4 库和 GEOS 库的安装位置。

note: Tag: para
en: The output from configure is used to generate the <filename>postgis_config.h</filename> file. Check that the <varname>POSTGIS_PGSQL_VERSION</varname>, <varname>POSTGIS_PROJ_VERSION</varname> and <varname>POSTGIS_GEOS_VERSION</varname> variables have been set correctly.
zh_Hans: 配置的输出用于生成 <filename>postgis_config.h</filename> 文件。检查<varname>POSTGIS_PGSQL_VERSION</varname>, <varname>POSTGIS_PROJ_VERSION</varname>和<varname>POSTGIS_GEOS_VERSION</varname>变量是否已正确设置。
