Страница 1 из 2

Руководство пользователя PostGIS

Добавлено: 14 авг 2008, 16:19
updates-bot
Обсуждение документации "Руководство пользователя PostGIS"

http://gis-lab.info/docs/postgis/manual

Re: Руководство пользователя PostGIS

Добавлено: 30 окт 2008, 22:41
arzobispo
Доброго времени суток!
Статья познавательная (особенно раздел: Руководство по PostGIS
4.7. Использование Mapserver
), но только есть определенные моменты с SQL, последний пример, где выборка улиц и связь с другой таблицей, делал также, но вот не работает, потом копировал запрос в pgAdmin III и он мне кучу ошибок выдавал, оказывается кавычек не хватает почему то, потом вставил Где надо их, начало работать, а вот вставленный запрос в слое не хочет работать, т.е не закрашивает мне клетки выбранные в результате запроса в черный цвет, не могу понять почему, приведу его код, может кто подскажет в чем дело.

LAYER
CONNECTIONTYPE postgis
NAME "Animals"
CONNECTION "user=postgres password=9562876qwerty dbname=postgis host=localhost"
DATA "the_geom from (SELECT prostokarta_region.id as ID, prosto_karta.the_geom as the_geom FROM 'Animals' INNER JOIN prostokarta_region ON 'Animals'.id =

prostokarta_region.id WHERE 'Animals'.'Color' = 'Белый') as prostokarta_region USING UNIQUE oid USING SRID=4326"
STATUS ON
TYPE POLYGON
CLASS
COLOR 0 0 0
END
END

Re: Руководство пользователя PostGIS

Добавлено: 31 окт 2008, 09:36
Denis Rykov
Решено

Пожалуйста, не дублируйте больше сообщения в разных ветках.

Re: Руководство пользователя PostGIS

Добавлено: 18 фев 2009, 16:18
Denis Rykov
На главной странице руководства ссылка "<<< предыдущая глава" ведёт вникуда.

Re: Руководство пользователя PostGIS

Добавлено: 19 фев 2009, 03:37
Максим Дубинин
точно, исправлено

Re: Руководство пользователя PostGIS

Добавлено: 12 май 2009, 14:45
Vavik
Чего-то я так и не понял, как установаить geos и proj. Кто-нибудь объясните пожалуйста, если несложно)

Re: Руководство пользователя PostGIS

Добавлено: 07 мар 2016, 01:15
Geobotanic
Аналогичный вопрос (спустя семь лет).
Запускаю как написано:

Код: Выделить всё

./configure --with-geosconfig=/usr/share/postgis-1.5.4/geos-3.5.0/
Терминал выдает:

Код: Выделить всё

 error: the user-specified geos-config file /usr/share/postgis-1.5.4/geos-3.5.0/ does not exist
Пробовал изменять директорию geos - тот же результат.

Re: Руководство пользователя PostGIS

Добавлено: 07 мар 2016, 01:53
Geobotanic
Ларчик просто открывался

Код: Выделить всё

sudo apt-get install g++
Проблема с geos решена

Re: Руководство пользователя PostGIS

Добавлено: 07 мар 2016, 02:42
Geobotanic
После

Код: Выделить всё

sudo make install
выводится ошибка

Код: Выделить всё

...
make[1]: *** [lwgeom_estimate.o] Error 1
make[1]: Leaving directory `/usr/share/postgis-1.5.4/postgis'
make: *** [postgis] Error 2
Нашел несколько аналогичных случаев в интернете, но без ответа. Сталкивался ли кто-нибудь с этим? В чем причина как ее обойти?

Re: Руководство пользователя PostGIS

Добавлено: 07 мар 2016, 05:51
Denis Rykov
Покажите вывод configure. Чем не подошёл PostGIS из репозитория?

Re: Руководство пользователя PostGIS

Добавлено: 07 мар 2016, 08:58
Geobotanic
Denis Rykov писал(а):Покажите вывод configure. Чем не подошёл PostGIS из репозитория?
Устанавливаю на удаленный сервер по инструкции

Код: Выделить всё

root@map2:/usr/share/postgis-1.5.4# sudo ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... no
checking for mawk... mawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking if g++ supports -Wall... yes
checking if g++ supports -Wmissing-prototypes... yes
checking if g++ supports -ffloat-store... yes
checking for flex... no
checking for lex... no
checking for bison... no
checking for byacc... no
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking for convert... no
configure: WARNING: ImageMagick does not seem to be installed. Documentation cannot be built
checking for xsltproc... no
configure: WARNING: xsltproc is not installed so documentation cannot be built
checking for dblatex... no
configure: WARNING: dblatex is not installed so PDF documentation cannot be built
configure: WARNING: could not locate Docbook stylesheets required to build the documentation
checking CUnit/CUnit.h usability... no
checking CUnit/CUnit.h presence... no
checking for CUnit/CUnit.h... no
configure: WARNING: could not locate CUnit required for liblwgeom unit tests
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for libiconv_open in -liconv... no
checking for iconv_open in -lc... yes
checking for iconvctl... no
checking for libiconvctl... no
checking for pg_config... /usr/bin/pg_config
checking PostgreSQL version... PostgreSQL 9.3.11
checking libpq-fe.h usability... yes
checking libpq-fe.h presence... yes
checking for libpq-fe.h... yes
checking for PQserverVersion in -lpq... yes
checking for xml2-config... /usr/bin/xml2-config
checking libxml/tree.h usability... yes
checking libxml/tree.h presence... yes
checking for libxml/tree.h... yes
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
checking libxml/xpath.h usability... yes
checking libxml/xpath.h presence... yes
checking for libxml/xpath.h... yes
checking libxml/xpathInternals.h usability... yes
checking libxml/xpathInternals.h presence... yes
checking for libxml/xpathInternals.h... yes
checking for xmlInitParser in -lxml2... yes
checking for geos-config... /usr/local/bin/geos-config
checking GEOS version... 3.5.0
checking geos_c.h usability... yes
checking geos_c.h presence... yes
checking for geos_c.h... yes
checking for initGEOS in -lgeos_c... yes
checking proj_api.h usability... yes
checking proj_api.h presence... yes
checking for proj_api.h... yes
checking for pj_get_release in -lproj... yes
configure: creating ./config.status
config.status: creating liblwgeom/Makefile
config.status: creating liblwgeom/cunit/Makefile
config.status: creating postgis/Makefile
config.status: creating postgis/sqldefines.h
config.status: creating loader/Makefile
config.status: creating topology/Makefile
config.status: creating regress/Makefile
config.status: creating doc/Makefile
config.status: creating doc/Makefile.comments
config.status: creating doc/html/image_src/Makefile
config.status: creating postgis_config.h
config.status: executing libtool commands

  PostGIS is now configured for x86_64-unknown-linux-gnu

 -------------- Compiler Info -------------
  C compiler:           gcc -g -O2
  C++ compiler:         g++ -g -O2

 -------------- Dependencies --------------
  GEOS config:          /usr/local/bin/geos-config
  GEOS version:         3.5.0
  PostgreSQL config:    /usr/bin/pg_config
  PostgreSQL version:   PostgreSQL 9.3.11
  PROJ4 version:        48
  Libxml2 config:       /usr/bin/xml2-config
  Libxml2 version:      2.9.1
  PostGIS debug level:  0

 -------- Documentation Generation --------
  xsltproc:
  xsl style sheets:
  dblatex:
  convert:

Re: Руководство пользователя PostGIS

Добавлено: 07 мар 2016, 10:07
Denis Rykov
Нет, ну можно, конечно, и собрать, но зачем, когда в официальном репозитории есть готовый пакет.

Re: Руководство пользователя PostGIS

Добавлено: 07 мар 2016, 10:10
Geobotanic
Denis Rykov писал(а):Нет, ну можно, конечно, и собрать, но зачем, когда в официальном репозитории есть готовый пакет.
Это реально сделать через SSH? Просто через apt-get install...?

Re: Руководство пользователя PostGIS

Добавлено: 07 мар 2016, 11:08
Denis Rykov
Конечно реально, так оно и делается. А в чём сложности возникли?

Re: Руководство пользователя PostGIS

Добавлено: 07 мар 2016, 11:33
Geobotanic
на этапе

Код: Выделить всё

sudo apt-get install Postgresql-9.3-postgis postgresql-contrib
возник ответ

Код: Выделить всё

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package postgresql-9.3-postgis is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'postgresql-9.3-postgis' has no installation candidate