Leabharlanna Geospásúla aLink to this heading
Leabharlanna geospásúlaLink to this heading
Úsáideann GeodJango agus/nó soláthraíonn sé comhéadain do na leabharlanna geospásúla foinse oscailte
Clár |
Cur síos |
Riachtanach |
Leaganacha Tacaithe |
|---|---|---|---|
Foinse Oscailte Inneall Ge |
Tá |
3.14, 3.13, 3.12, 3.11, 3.10, 3.9, 3.8 |
|
Leabharlann Réamh-mheastach |
Sea (PostgreSQL agus SQLite amháin) |
9.x, 8.x, 7.x, 6.x |
|
Leabharlann Aistí Sonraí Geospásúla |
Tá |
3.11, 3.10, 3.9, 3.8, 3.7, 3.6, 3.5, 3.4, 3.3, 3.2, 3.1 |
|
Leabharlann geolocation bunaithe ar IP |
Níl |
2 |
|
Síntí spásúla do PostgreSQL |
Sea (PostgreSQL amháin) |
3.5, 3.4, 3.3, 3.2, 3.1 |
|
Síntí spásúla le haghaidh SQLite |
Sea (SQLite amháin) |
5.1, 5.0, 4.3 |
Tabhair faoi deara go bhféadfadh leaganacha níos sine nó níos déanaí de na leabharlanna seo oibriú go hiomlán breá le GeodJango freisin. Féadfaidh do mhíleáiste a athrú.
Ar Debian/Ubuntu, moltar duit na pacáistí seo a leanas a shuiteáil a shuiteálfaidh, go díreach nó trí spleáchas, na leabharlanna geospásúla riachtanacha:
$ sudo apt-get install binutils libproj-dev gdal-bin
Téigh i gcomhairle le treoracha ardáin a shonraíonn freisin má tá tú ar:ref: macos nó:ref: windows.
Tógáil ó fhoinseLink to this heading
When installing from source on UNIX and GNU/Linux systems, please follow the installation instructions carefully, and install the libraries in the given order. If using MySQL or Oracle as the spatial database, only GEOS is required.
GEOSLink to this heading
GEOS is a C++ library for performing geometric operations, and is the default
internal geometry representation used by GeoDjango (it's behind the "lazy"
geometries). Specifically, the C API library is called (e.g., libgeos_c.so)
directly from Python using ctypes.
Ar dtús, íoslódáil GEOS ó shuíomh Gréasáin GEOS agus déan an cartlann foinse a dhíoslódáil:
$ wget https://download.osgeo.org/geos/geos-X.Y.Z.tar.bz2
$ tar xjf geos-X.Y.Z.tar.bz2
Ansin téigh isteach san eolaire GEOS, cruthaigh fillteán ``tógáil ``, agus déan isteach ann:
$ cd geos-X.Y.Z
$ mkdir build
$ cd build
Ansin tógáil agus suiteáil an pacáiste:
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ cmake --build .
$ sudo cmake --build . --target install
FabhtcheartúLink to this heading
Ní féidir leabharlann GEOS a fháilLink to this heading
Nuair nach féidir le GeodJango GEOS a fháil, ardaítear an earráid seo:
ImportError: Could not find the GEOS library (tried "geos_c"). Try setting GEOS_LIBRARY_PATH in your settings.
Is é an réiteach is coitianta ná do: ref: libsettings nó set:ref: geoslibrarypath a chumrú i gceart i do shocruithe.
Má tá pacáiste dénártha de GEOS á úsáid agat (m.sh., ar Ubuntu), b'fhéidir go mbeidh ort: ref: binutils.
CONAIR_LEABHARLANNA_GEOSLink to this heading
If your GEOS library is in a non-standard location, or you don't want to
modify the system's library path then the GEOS_LIBRARY_PATH
setting may be added to your Django settings file with the full path to the
GEOS C library. For example:
GEOS_LIBRARY_PATH = '/home/bob/local/lib/libgeos_c.so'
<geos-exceptions-in-logfile>Féach freis:ref: `Líontar mo logaí le earráidí a bhaineann le Geos `.
PROJLink to this heading
Is leabharlann é PROJ chun sonraí geospásúla a thiontú go córais tagartha comhordaithe éagsúla.
Ar dtús, íoslódáil cód foinse PROJ:
$ wget https://download.osgeo.org/proj/proj-X.Y.Z.tar.gz
... agus comhaid athraithe dáta (íoslódáil proj-datumgrid-x.y.tar.gz do PROJ <7.x) [#] _:
$ wget https://download.osgeo.org/proj/proj-data-X.Y.tar.gz
Ansin, déan an cartlann cód foinse a bhaint, agus bain na comhaid athraithe dáta san fho-eolaire sonra. Caithfear é seo a dhéanamh roimh chun cumraíocht:
$ tar xzf proj-X.Y.Z.tar.gz
$ cd proj-X.Y.Z/data
$ tar xzf ../../proj-data-X.Y.tar.gz
$ cd ../..
Maidir le PROJ 9.x agus níos mó, ní scaoiltear ach tógáil tacaíochta ag baint úsáide as Cmake (féach PROJ RFC-7).
Chun tógáil le Cmake cinntigh go gcomhlíonann do chóras na riachtanais tógála. Ansin cruthaigh fillteán ``tógáil ``san eolaire PROJ, agus déan isteach ann:
$ cd proj-X.Y.Z
$ mkdir build
$ cd build
Faoi dheireadh, cumraigh, déan agus suiteáil PROJ:
$ cmake ..
$ cmake --build .
$ sudo cmake --build . --target install
GDALLink to this heading
GDAL is an excellent open source geospatial library that has support for reading most vector and raster spatial data formats. Currently, GeoDjango only supports GDAL's vector data capabilities [2]. GEOS and PROJ should be installed prior to building GDAL.
Déan an leagan scaoilte GDAL is déanaí a íoslódáil ar dtús agus déan an cartlann
$ wget https://download.osgeo.org/gdal/X.Y.Z/gdal-X.Y.Z.tar.gz
$ tar xzf gdal-X.Y.Z.tar.gz
Maidir le GDAL 3.6.x agus níos mó, ní scaoiltear ach tógáil tacaíochta ag baint úsáide as Cmake. Chun tógáil le Cmake` cruthaigh fillteán ``tógáil ``san eolaire GDAL, agus déan isteach ann:
$ cd gdal-X.Y.Z
$ mkdir build
$ cd build
Faoi dheireadh, cumraigh, déan agus suiteáil GDAL:
$ cmake ..
$ cmake --build .
$ sudo cmake --build . --target install
Má tá aon fhadhbanna agat, féach an chuid fabhtcheartaithe thíos le haghaidh moltaí agus réitigh.
FabhtcheartúLink to this heading
Ní féidir leabharlann GDAL a fháilLink to this heading
Nuair nach féidir le GeodJango leabharlann GDAL a fháil, cumraigh do: ref: libsettings nó set:ref: gdallibrarypath i do shocruithe.
BÓTHAIR_LEABHARLANNA_GDALLink to this heading
If your GDAL library is in a non-standard location, or you don't want to
modify the system's library path then the GDAL_LIBRARY_PATH
setting may be added to your Django settings file with the full path to
the GDAL library. For example:
GDAL_LIBRARY_PATH = '/home/sue/local/lib/libgdal.so'
Fonótaí