{"title":"地理空間ライブラリのインストール","version":"6.0","locale":"ja","docname":"ref/contrib/gis/install/geolibs","url":"/ja/6.0/ref/contrib/gis/install/geolibs/","canonical":"https://djangodocs.dev/ja/6.0/ref/contrib/gis/install/geolibs/","summary":"地理空間ライブラリ (Geospatial library) Link to this heading # GeoDjangoは、以下のオープンソースの地理空間ライブラリを使用し、またはそのインターフェースを提供します: プログラム 説明 必須 サポートされるバージョン GEOS Geometry Engine Open…","html":"<h1>地理空間ライブラリのインストール<a class=\"heading-anchor\" href=\"#installing-geospatial-libraries\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<section id=\"geospatial-libraries\">\n<span id=\"geolibs-list\"></span><h2>地理空間ライブラリ (Geospatial library)<a class=\"heading-anchor\" href=\"#geospatial-libraries\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>GeoDjangoは、以下のオープンソースの地理空間ライブラリを使用し、またはそのインターフェースを提供します:</p>\n<div class=\"table-scroll\" role=\"region\" tabindex=\"0\" aria-label=\"Table\"><table class=\"docutils align-default\">\n<thead>\n<tr class=\"row-odd\"><th class=\"head\"><p>プログラム</p></th>\n<th class=\"head\"><p>説明</p></th>\n<th class=\"head\"><p>必須</p></th>\n<th class=\"head\"><p>サポートされるバージョン</p></th>\n</tr>\n</thead>\n<tbody>\n<tr class=\"row-even\"><td><p><a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/geos/#geos-overview\"><span class=\"std std-ref\">GEOS</span></a></p></td>\n<td><p>Geometry Engine Open Source</p></td>\n<td><p>Yes</p></td>\n<td><p>3.14, 3.13, 3.12, 3.11, 3.10, 3.9, 3.8</p></td>\n</tr>\n<tr class=\"row-odd\"><td><p><a class=\"reference external\" href=\"https://proj.org/\">PROJ</a></p></td>\n<td><p>Cartographic Projections library</p></td>\n<td><p>Yes (PostgreSQL and SQLite のみ)</p></td>\n<td><p>9.x, 8.x, 7.x, 6.x</p></td>\n</tr>\n<tr class=\"row-even\"><td><p><a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/gdal/#gdal-overview\"><span class=\"std std-ref\">GDAL</span></a></p></td>\n<td><p>Geospatial Data Abstraction Library</p></td>\n<td><p>Yes</p></td>\n<td><p>3.11, 3.10, 3.9, 3.8, 3.7, 3.6, 3.5, 3.4, 3.3, 3.2, 3.1</p></td>\n</tr>\n<tr class=\"row-odd\"><td><p><a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/geoip2/#geoip2-overview\"><span class=\"std std-ref\">GeoIP</span></a></p></td>\n<td><p>IPベースのジオロケーション ライブラリ</p></td>\n<td><p>No</p></td>\n<td><p>2</p></td>\n</tr>\n<tr class=\"row-even\"><td><p><a class=\"reference external\" href=\"https://postgis.net/\">PostGIS</a></p></td>\n<td><p>PostgreSQL の空間拡張機能</p></td>\n<td><p>Yes (PostgreSQL のみ)</p></td>\n<td><p>3.5, 3.4, 3.3, 3.2, 3.1</p></td>\n</tr>\n<tr class=\"row-odd\"><td><p><a class=\"reference external\" href=\"https://www.gaia-gis.it/gaia-sins/\">SpatiaLite</a></p></td>\n<td><p>SQLite の空間拡張機能</p></td>\n<td><p>Yes (SQLite のみ)</p></td>\n<td><p>5.1, 5.0, 4.3</p></td>\n</tr>\n</tbody>\n</table>\n</div>\n<p>これらのライブラリの古いバージョンや新しいバージョンは GeoDjango でも全く問題なく動くかもしれません。あなたの感覚によって異なるかもしれません。</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>The GeoDjango interfaces to GEOS, GDAL, and GeoIP may be used\nindependently of Django. In other words, no database or settings file\nrequired -- import them as normal from <a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/#module-django.contrib.gis\" title=\"django.contrib.gis: Geographic Information System (GIS) extensions for Django\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">django.contrib.gis</span></code></a>.</p>\n</aside>\n<p>Debian/Ubuntuでは、必要な地理空間ライブラリを直接または依存関係によってインストールする以下のパッケージをインストールすることをお勧めします:</p>\n<div class=\"code-block\" data-language=\"console\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"gp\">$ </span>sudo<span class=\"w\"> </span>apt-get<span class=\"w\"> </span>install<span class=\"w\"> </span>binutils<span class=\"w\"> </span>libproj-dev<span class=\"w\"> </span>gdal-bin\n</code></pre></div>\n<p>また、 <a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/install/#macos\"><span class=\"std std-ref\">macOS</span></a> や <a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/install/#windows\"><span class=\"std std-ref\">Windows</span></a> を使用している場合は、プラットフォーム別の説明も参照してください。</p>\n</section>\n<section id=\"building-from-source\">\n<span id=\"build-from-source\"></span><h2>ソースコードからビルドする<a class=\"heading-anchor\" href=\"#building-from-source\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>When installing from source on UNIX and GNU/Linux systems, please follow\nthe installation instructions carefully, and install the libraries in the\ngiven order. If using MySQL or Oracle as the spatial database, only GEOS\nis required.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>Linuxプラットフォームでは、各ライブラリをインストールした後に <code class=\"docutils literal notranslate\"><span class=\"pre\">ldconfig</span></code> コマンドを実行する必要があるかもしれません。例えば:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>sudo<span class=\"w\"> </span>make<span class=\"w\"> </span>install\n$<span class=\"w\"> </span>sudo<span class=\"w\"> </span>ldconfig\n</code></pre></div>\n</aside>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>macOSユーザーは、ソフトウェアをソースからコンパイルするために <a class=\"reference external\" href=\"https://developer.apple.com/xcode/\">Xcode</a> をインストールする必要があります。</p>\n</aside>\n<section id=\"geos\">\n<span id=\"geosbuild\"></span><h3>GEOS<a class=\"heading-anchor\" href=\"#geos\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>GEOS is a C++ library for performing geometric operations, and is the default\ninternal geometry representation used by GeoDjango (it's behind the &quot;lazy&quot;\ngeometries). Specifically, the C API library is called (e.g., <code class=\"docutils literal notranslate\"><span class=\"pre\">libgeos_c.so</span></code>)\ndirectly from Python using ctypes.</p>\n<p>まず、GEOSのウェブサイトからGEOSをダウンロードし、ソースアーカイブを解凍します:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>wget<span class=\"w\"> </span>https://download.osgeo.org/geos/geos-X.Y.Z.tar.bz2\n$<span class=\"w\"> </span>tar<span class=\"w\"> </span>xjf<span class=\"w\"> </span>geos-X.Y.Z.tar.bz2\n</code></pre></div>\n<p>次に、GEOSディレクトリに移動し、 <code class=\"docutils literal notranslate\"><span class=\"pre\">build</span></code> フォルダを作成して、その中に移動してください:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span><span class=\"nb\">cd</span><span class=\"w\"> </span>geos-X.Y.Z\n$<span class=\"w\"> </span>mkdir<span class=\"w\"> </span>build\n$<span class=\"w\"> </span><span class=\"nb\">cd</span><span class=\"w\"> </span>build\n</code></pre></div>\n<p>次に、パッケージをビルドしてインストールします:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>cmake<span class=\"w\"> </span>-DCMAKE_BUILD_TYPE<span class=\"o\">=</span>Release<span class=\"w\"> </span>..\n$<span class=\"w\"> </span>cmake<span class=\"w\"> </span>--build<span class=\"w\"> </span>.\n$<span class=\"w\"> </span>sudo<span class=\"w\"> </span>cmake<span class=\"w\"> </span>--build<span class=\"w\"> </span>.<span class=\"w\"> </span>--target<span class=\"w\"> </span>install\n</code></pre></div>\n<section id=\"troubleshooting\">\n<h4>トラブルシューティング<a class=\"heading-anchor\" href=\"#troubleshooting\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<section id=\"can-t-find-geos-library\">\n<h5>GEOSライブラリが見つかりません<a class=\"heading-anchor\" href=\"#can-t-find-geos-library\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>GeoDjango が GEOS を見つけられない場合、次のエラーが発生します:</p>\n<div class=\"code-block\" data-language=\"text\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Text</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Text code\"><code>ImportError: Could not find the GEOS library (tried &quot;geos_c&quot;). Try setting GEOS_LIBRARY_PATH in your settings.\n</code></pre></div>\n<p>最も一般的な解決策は、<a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/install/#libsettings\"><span class=\"std std-ref\">ライブラリの環境設定</span></a> を適切に設定するか、 <em>または</em> 設定で <a class=\"reference internal\" href=\"#geoslibrarypath\"><span class=\"std std-ref\">GEOS_LIBRARY_PATH</span></a> を設定することです。</p>\n<p>GEOSのバイナリパッケージを使用する場合 (たとえばUbuntu上で) 、 <a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/install/#binutils\"><span class=\"std std-ref\">binutils をインストールする</span></a> が必要になる可能性があります。</p>\n</section>\n<section id=\"geos-library-path\">\n<span id=\"geoslibrarypath\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">GEOS_LIBRARY_PATH</span></code><a class=\"heading-anchor\" href=\"#geos-library-path\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>If your GEOS library is in a non-standard location, or you don't want to\nmodify the system's library path then the <a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/geos/#std-setting-GEOS_LIBRARY_PATH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">GEOS_LIBRARY_PATH</span></code></a>\nsetting may be added to your Django settings file with the full path to the\nGEOS C library. For example:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"nv\">GEOS_LIBRARY_PATH</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"s1\">&#39;/home/bob/local/lib/libgeos_c.so&#39;</span>\n</code></pre></div>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">注釈</p>\n<p>設定は <strong>C</strong> 共有ライブラリの <em>フル</em> パスである必要があります。つまり、 <code class=\"docutils literal notranslate\"><span class=\"pre\">libgeos.so</span></code> ではなく <code class=\"docutils literal notranslate\"><span class=\"pre\">libgeos_c.so</span></code> を使用することが望まれます。</p>\n</aside>\n<p>次も参照してください <a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/geos/#geos-exceptions-in-logfile\"><span class=\"std std-ref\">ログがGEOS関連のエラーでいっぱいです</span></a> 。</p>\n</section>\n</section>\n</section>\n<section id=\"proj4\">\n<span id=\"id3\"></span><h3>PROJ<a class=\"heading-anchor\" href=\"#proj4\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p><a class=\"reference external\" href=\"https://proj.org/\">PROJ</a> は、地理空間データを異なる座標参照系に変換するためのライブラリです。</p>\n<p>まず、PROJのソースコードをダウンロードします:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>wget<span class=\"w\"> </span>https://download.osgeo.org/proj/proj-X.Y.Z.tar.gz\n</code></pre></div>\n<p>... と座標変換 (datum shifting) ファイル (PROJ &lt; 7.x の場合は <code class=\"docutils literal notranslate\"><span class=\"pre\">proj-datumgrid-X.Y.tar.gz</span></code> をダウンロード) <a class=\"footnote-reference brackets\" href=\"#id8\" id=\"id4\" role=\"doc-noteref\"><span class=\"fn-bracket\">[</span>1<span class=\"fn-bracket\">]</span></a>:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>wget<span class=\"w\"> </span>https://download.osgeo.org/proj/proj-data-X.Y.tar.gz\n</code></pre></div>\n<p>次に、ソースコードアーカイブを解凍し、<code class=\"docutils literal notranslate\"><span class=\"pre\">data</span></code> サブディレクトリ内にある座標変換ファイルを抽出します。これは設定を行う <em>前</em> に実行する必要があります。</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>tar<span class=\"w\"> </span>xzf<span class=\"w\"> </span>proj-X.Y.Z.tar.gz\n$<span class=\"w\"> </span><span class=\"nb\">cd</span><span class=\"w\"> </span>proj-X.Y.Z/data\n$<span class=\"w\"> </span>tar<span class=\"w\"> </span>xzf<span class=\"w\"> </span>../../proj-data-X.Y.tar.gz\n$<span class=\"w\"> </span><span class=\"nb\">cd</span><span class=\"w\"> </span>../..\n</code></pre></div>\n<p>PROJ 9.x以降のリリースでは、<code class=\"docutils literal notranslate\"><span class=\"pre\">CMake</span></code> を使用したビルドのみがサポートされます (<a class=\"reference external\" href=\"https://proj.org/community/rfc/rfc-7.html#rfc7\">PROJ RFC-7</a> 参照) 。</p>\n<p><code class=\"docutils literal notranslate\"><span class=\"pre\">CMake</span></code> を使用してビルドするには、システムが <a class=\"reference external\" href=\"https://proj.org/install.html#build-requirements\">build requirements</a> を満たしていることを確認してください。その後、PROJディレクトリ内に <code class=\"docutils literal notranslate\"><span class=\"pre\">build</span></code> フォルダを作成し、そのフォルダに移動します。</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span><span class=\"nb\">cd</span><span class=\"w\"> </span>proj-X.Y.Z\n$<span class=\"w\"> </span>mkdir<span class=\"w\"> </span>build\n$<span class=\"w\"> </span><span class=\"nb\">cd</span><span class=\"w\"> </span>build\n</code></pre></div>\n<p>最後に、PROJの設定、作成、およびインストールを行います:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>cmake<span class=\"w\"> </span>..\n$<span class=\"w\"> </span>cmake<span class=\"w\"> </span>--build<span class=\"w\"> </span>.\n$<span class=\"w\"> </span>sudo<span class=\"w\"> </span>cmake<span class=\"w\"> </span>--build<span class=\"w\"> </span>.<span class=\"w\"> </span>--target<span class=\"w\"> </span>install\n</code></pre></div>\n</section>\n<section id=\"gdal\">\n<span id=\"gdalbuild\"></span><h3>GDAL<a class=\"heading-anchor\" href=\"#gdal\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p><a class=\"reference external\" href=\"https://gdal.org/\">GDAL</a> is an excellent open source geospatial library that has support for\nreading most vector and raster spatial data formats. Currently, GeoDjango only\nsupports <a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/gdal/#gdal-vector-data\"><span class=\"std std-ref\">GDAL's vector data</span></a> capabilities <a class=\"footnote-reference brackets\" href=\"#id9\" id=\"id5\" role=\"doc-noteref\"><span class=\"fn-bracket\">[</span>2<span class=\"fn-bracket\">]</span></a>.\n<a class=\"reference internal\" href=\"#geosbuild\"><span class=\"std std-ref\">GEOS</span></a> and <a class=\"reference internal\" href=\"#proj4\"><span class=\"std std-ref\">PROJ</span></a> should be installed prior to building GDAL.</p>\n<p>まず、最新のGDALリリースバージョンをダウンロードし、アーカイブを解凍します:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>wget<span class=\"w\"> </span>https://download.osgeo.org/gdal/X.Y.Z/gdal-X.Y.Z.tar.gz\n$<span class=\"w\"> </span>tar<span class=\"w\"> </span>xzf<span class=\"w\"> </span>gdal-X.Y.Z.tar.gz\n</code></pre></div>\n<p>GDAL 3.6.x 以降では、リリースは <code class=\"docutils literal notranslate\"><span class=\"pre\">CMake</span></code> を使用したビルドのみをサポートしています。 <code class=\"docutils literal notranslate\"><span class=\"pre\">CMake</span></code> を使ってビルドするには、GDAL ディレクトリに <code class=\"docutils literal notranslate\"><span class=\"pre\">build</span></code> フォルダを作成し、その中に移動してください:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span><span class=\"nb\">cd</span><span class=\"w\"> </span>gdal-X.Y.Z\n$<span class=\"w\"> </span>mkdir<span class=\"w\"> </span>build\n$<span class=\"w\"> </span><span class=\"nb\">cd</span><span class=\"w\"> </span>build\n</code></pre></div>\n<p>最後に、GDAL の設定、ビルド、インストールを行います:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>cmake<span class=\"w\"> </span>..\n$<span class=\"w\"> </span>cmake<span class=\"w\"> </span>--build<span class=\"w\"> </span>.\n$<span class=\"w\"> </span>sudo<span class=\"w\"> </span>cmake<span class=\"w\"> </span>--build<span class=\"w\"> </span>.<span class=\"w\"> </span>--target<span class=\"w\"> </span>install\n</code></pre></div>\n<p>問題が発生した場合は、以下のトラブルシューティングのセクションを参照してください。</p>\n<section id=\"gdaltrouble\">\n<span id=\"id7\"></span><h4>トラブルシューティング<a class=\"heading-anchor\" href=\"#gdaltrouble\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<section id=\"can-t-find-gdal-library\">\n<h5>GDAL ライブラリが見つかりません<a class=\"heading-anchor\" href=\"#can-t-find-gdal-library\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>GeoDjango が GDAL ライブラリを見つけられない場合は、 <a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/install/#libsettings\"><span class=\"std std-ref\">ライブラリの環境設定</span></a> を設定するか、<em>もしくは</em> 設定で <a class=\"reference internal\" href=\"#gdallibrarypath\"><span class=\"std std-ref\">GDAL_LIBRARY_PATH</span></a> を設定してください。</p>\n</section>\n<section id=\"gdal-library-path\">\n<span id=\"gdallibrarypath\"></span><h5><code class=\"docutils literal notranslate\"><span class=\"pre\">GDAL_LIBRARY_PATH</span></code><a class=\"heading-anchor\" href=\"#gdal-library-path\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>If your GDAL library is in a non-standard location, or you don't want to\nmodify the system's library path then the <a class=\"reference internal\" href=\"/ja/6.0/ref/contrib/gis/gdal/#std-setting-GDAL_LIBRARY_PATH\"><code class=\"xref std std-setting docutils literal notranslate\"><span class=\"pre\">GDAL_LIBRARY_PATH</span></code></a>\nsetting may be added to your Django settings file with the full path to\nthe GDAL library. For example:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"nv\">GDAL_LIBRARY_PATH</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"s1\">&#39;/home/sue/local/lib/libgdal.so&#39;</span>\n</code></pre></div>\n<p class=\"rubric\">脚注</p>\n<aside class=\"footnote-list brackets\">\n<aside class=\"footnote brackets\" id=\"id8\" role=\"doc-footnote\">\n<span class=\"label\"><span class=\"fn-bracket\">[</span><a role=\"doc-backlink\" href=\"#id4\">1</a><span class=\"fn-bracket\">]</span></span>\n<p>The datum shifting files are needed for converting data to and from\ncertain projections.\nFor example, the PROJ string for the <a class=\"reference external\" href=\"https://spatialreference.org/ref/epsg/3857/\">Google projection (900913 or 3857)</a> requires the <code class=\"docutils literal notranslate\"><span class=\"pre\">null</span></code>\ngrid file only included in the extra datum shifting files. It is easier\nto install the shifting files now, than to debug a problem caused\nby their absence later.</p>\n</aside>\n<aside class=\"footnote brackets\" id=\"id9\" role=\"doc-footnote\">\n<span class=\"label\"><span class=\"fn-bracket\">[</span><a role=\"doc-backlink\" href=\"#id5\">2</a><span class=\"fn-bracket\">]</span></span>\n<p>具体的には、GeoDjango は GDAL のコンポーネントである <a class=\"reference external\" href=\"https://gdal.org/user/vector_data_model.html\">OGR</a> ライブラリをサポートしています。</p>\n</aside>\n</aside>\n</section>\n</section>\n</section>\n</section>","rootId":"installing-geospatial-libraries","toc":[{"title":"地理空間ライブラリ (Geospatial library)","anchor":"geospatial-libraries","children":[]},{"title":"ソースコードからビルドする","anchor":"building-from-source","children":[{"title":"GEOS","anchor":"geos","children":[{"title":"トラブルシューティング","anchor":"troubleshooting","children":[{"title":"GEOSライブラリが見つかりません","anchor":"can-t-find-geos-library","children":[]},{"title":"GEOS_LIBRARY_PATH","anchor":"geos-library-path","children":[]}]}]},{"title":"PROJ","anchor":"proj4","children":[]},{"title":"GDAL","anchor":"gdal","children":[{"title":"トラブルシューティング","anchor":"gdaltrouble","children":[{"title":"GDAL ライブラリが見つかりません","anchor":"can-t-find-gdal-library","children":[]},{"title":"GDAL_LIBRARY_PATH","anchor":"gdal-library-path","children":[]}]}]}]}],"breadcrumbs":[{"docname":"ref/index","title":"API リファレンス","url":"/ja/6.0/ref/"},{"docname":"ref/contrib/index","title":"contrib パッケージ","url":"/ja/6.0/ref/contrib/"},{"docname":"ref/contrib/gis/index","title":"GeoDjango","url":"/ja/6.0/ref/contrib/gis/"},{"docname":"ref/contrib/gis/install/index","title":"GeoDjango のインストール","url":"/ja/6.0/ref/contrib/gis/install/"}],"prev":{"docname":"ref/contrib/gis/install/index","title":"GeoDjango のインストール","url":"/ja/6.0/ref/contrib/gis/install/"},"next":{"docname":"ref/contrib/gis/install/postgis","title":"PostGIS のインストール","url":"/ja/6.0/ref/contrib/gis/install/postgis/"},"formats":{"html":"/ja/6.0/ref/contrib/gis/install/geolibs/","markdown":"/ja/6.0/ref/contrib/gis/install/geolibs.md","json":"/ja/6.0/ref/contrib/gis/install/geolibs.json"},"source":"https://github.com/django/django/blob/stable/6.0.x/docs/ref/contrib/gis/install/geolibs.txt","official":"https://docs.djangoproject.com/ja/6.0/ref/contrib/gis/install/geolibs/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11","1.10","1.9"],"inLocales":["en","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}