From davidtecher at yahoo.fr Fri Jul 1 02:06:21 2005 From: davidtecher at yahoo.fr (Jean David TECHER) Date: Fri, 1 Jul 2005 11:06:21 +0200 Subject: [postgis-users] Patch for PostGIS CVS on Windows Message-ID: <001a01c57e1c$26eabff0$117fa8c0@jenna> Hi Sandro Even if I can't use 1.0.?rc? I've just tried PostGIS CVS I needed to do few changes in postgis/Makefile.config.in postgis/lwgeom/Makefile postgis/lwgeom/Makefile.shlib I was not able to use iconv on MinGW for supoort utf-8 for shp2pgsql. For using the patch, copy it in the same directory of your postgis' directory then patch -p0 < patch.diff It's better to have (binairies of) Geos, Proj and PostgreSQL in a same directory...example c:\PostgreSQL\8.0.3 or something else...) Then for your environment variable path, just add at the beginning of your path PATH = C:\PostgreSQL\8.0.3\bin;C:\PostgeSQL\lib;.... or do from MinGW export PATH=/c/PostgreSQL/8.0.3/bin:/c/PostgreSQL/8.0.9/lib:$PATH before compiling postgis from cvs Have fun!!! ---------------------[patch.diff]---------------------------------------------------------------------- diff -cr postgis/Makefile.config.in postgis/Makefile.config.in *** postgis/Makefile.config.in Tue Jun 28 11:33:47 2005 --- postgis/Makefile.config.in Fri Jul 1 07:48:32 2005 *************** *** 64,70 **** # Set USE_ICONV to 1 if you want the loader (shp2pgsql) # to support UTF-8 output. # ! USE_ICONV=@USE_ICONV@ # # PGSQL --- 64,70 ---- # Set USE_ICONV to 1 if you want the loader (shp2pgsql) # to support UTF-8 output. # ! USE_ICONV=0 # # PGSQL diff -cr postgis/lwgeom/Makefile postgis/lwgeom/Makefile *** postgis/lwgeom/Makefile Tue Jun 28 14:51:18 2005 --- postgis/lwgeom/Makefile Fri Jul 1 06:59:28 2005 *************** *** 139,146 **** @mkdir -p $(DESTDIR)$(MODULE_INSTALLDIR) $(INSTALL_LIB) $(SHLIB) $(DESTDIR)$(MODULE_INSTALLDIR)/$(SHLIB) ! ifneq ($(PORTNAME), cygwin) ! ifneq ($(PORTNAME), win32) ifneq ($(PORTNAME), win) ifneq ($(SHLIB), $(SHLIB_MAJOR)) cd $(DESTDIR)$(MODULE_INSTALLDIR) && \ --- 139,146 ---- @mkdir -p $(DESTDIR)$(MODULE_INSTALLDIR) $(INSTALL_LIB) $(SHLIB) $(DESTDIR)$(MODULE_INSTALLDIR)/$(SHLIB) ! #ifneq ($(PORTNAME), cygwin) ! #ifneq ($(PORTNAME), win32) ifneq ($(PORTNAME), win) ifneq ($(SHLIB), $(SHLIB_MAJOR)) cd $(DESTDIR)$(MODULE_INSTALLDIR) && \ *************** *** 153,160 **** ln -sf $(SHLIB) $(SHLIB_BARE) endif endif # not win ! endif # not win32 ! endif # not cygwin uninstall-lwgeom-lib: rm -f $(DESTDIR)$(MODULE_INSTALLDIR)/$(SHLIB) --- 153,160 ---- ln -sf $(SHLIB) $(SHLIB_BARE) endif endif # not win ! #endif # not win32 ! #endif # not cygwin uninstall-lwgeom-lib: rm -f $(DESTDIR)$(MODULE_INSTALLDIR)/$(SHLIB) diff -cr postgis/lwgeom/Makefile.shlib postgis/lwgeom/Makefile.shlib *** postgis/lwgeom/Makefile.shlib Tue Jun 7 07:51:08 2005 --- postgis/lwgeom/Makefile.shlib Fri Jul 1 06:52:43 2005 *************** *** 230,236 **** endif ifeq ($(PORTNAME), win32) ! shlib = lib$(NAME)$(DLSUFFIX) haslibarule = yes endif --- 230,238 ---- endif ifeq ($(PORTNAME), win32) ! DLLTOOL = dlltool ! DLLWRAP = dllwrap ! shlib = lib$(NAME).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)$(DLSUFFIX) haslibarule = yes endif *************** *** 335,341 **** $(shlib) lib$(NAME).a: $(OBJS) ifndef DLL_DEFFILE $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS) ! $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK) $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a else $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(DLL_DEFFILE) $(OBJS) $(SHLIB_LINK) --- 337,343 ---- $(shlib) lib$(NAME).a: $(OBJS) ifndef DLL_DEFFILE $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS) ! $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK) $(PGBELIBS) $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a else $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(DLL_DEFFILE) $(OBJS) $(SHLIB_LINK) --------------------------------------------------------------- TECHER Jean David 01MAP e-mail: david at 01map.net T?l: 04 67 45 60 27 Entreprise: http://www.01map.net Perso: http://techer.pascal.free.fr/postgis/ --------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: application/octet-stream Size: 3199 bytes Desc: not available URL: From strk at refractions.net Fri Jul 1 02:29:52 2005 From: strk at refractions.net (strk at refractions.net) Date: Fri, 1 Jul 2005 11:29:52 +0200 Subject: [postgis-users] Patch for PostGIS CVS on Windows In-Reply-To: <001a01c57e1c$26eabff0$117fa8c0@jenna> References: <001a01c57e1c$26eabff0$117fa8c0@jenna> Message-ID: <20050701092952.GF84000@keybit.net> On Fri, Jul 01, 2005 at 11:06:21AM +0200, Jean David TECHER wrote: ... > I was not able to use iconv on MinGW for supoort utf-8 for shp2pgsql. Can you report the problem ? The configure script should be made able to cope with this. --strk; From davidtecher at yahoo.fr Fri Jul 1 04:35:46 2005 From: davidtecher at yahoo.fr (Jean David TECHER) Date: Fri, 1 Jul 2005 13:35:46 +0200 Subject: [postgis-users] Patch for PostGIS CVS on Windows References: <001a01c57e1c$26eabff0$117fa8c0@jenna> <20050701092952.GF84000@keybit.net> Message-ID: <004201c57e31$06bbdec0$117fa8c0@jenna> In postgis/Makefile.config.in if I let USE_ICONV=@USE_ICONV@ when I did rm -f postgis.log; make clean && make distclean; configure 2>&1 >> postgis.log; make 2>&1 | tee -a postgis.log here is the problem I got reported from postgis.log checking for gcc... gcc checking for C compiler default output... a.exe checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... .exe 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 ANSI C... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking whether ln -s works... yes checking how to run the C preprocessor... gcc -E checking for egrep... grep -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 iconv.h usability... yes checking iconv.h presence... yes checking for iconv.h... yes checking build system type... i686-pc-mingw32 checking host system type... i686-pc-mingw32 checking for pg_config... /c/PostgreSQL/8.0.3/bin/pg_config checking which template to use... win32 checking for geos-config... /c/PostgreSQL/8.0.3/bin/geos-config checking for proj... /c/PostgreSQL/8.0.3/bin/proj checking for flex... /mingw/bin/flex checking for yacc... /mingw/bin/yacc checking for install... /bin/install configure: creating ./config.status config.status: creating Makefile.config SUMMARY ------------------------------------------------------- HOST_OS: mingw32 PGSQL: /c/PostgreSQL/8.0.3/bin/pg_config GEOS: /c/PostgreSQL/8.0.3/bin/geos-config PROJ: dir=/c/PostgreSQL/8.0.3/bin/.. PORTNAME: win32 PREFIX: /usr/local EPREFIX: ${prefix} DOC: ${prefix}/share/doc DATA: ${prefix}/share/postgresql/contrib MAN: ${prefix}/man BIN: c:/PostgreSQL/8.0.3/bin EXT: c:/PostgreSQL/8.0.3/lib (\$$libdir) ------------------------------------------------------- make -C lwgeom make[1]: Entering directory `/home/david/sources/PostGIS/cvs/postgis/lwgeom' sh ../geos_version.sh /c/PostgreSQL/8.0.3 > postgis_geos_version.h cpp -P -traditional-cpp -DUSE_VERSION=80 lwpostgis.sql.in | sed -e 's:@MODULE_FILENAME@:\$libdir/liblwgeom.1.1.dll:g;s:@POSTGIS_VERSION@:1.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1:g;s:@POSTGIS_SCRIPTS_VERSION@:0.3.1:g;s/@POSTGIS_BUILD_DATE@/2005-07-01 11:32:40/g' | grep -v '^#' > lwpostgis.sql cp lwpostgis.sql .. gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o measures.o measures.c measures.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o box2d.o box2d.c box2d.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o ptarray.o ptarray.c ptarray.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_api.o lwgeom_api.c lwgeom_api.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom.o lwgeom.c lwgeom.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwpoint.o lwpoint.c lwpoint.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwline.o lwline.c lwline.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwpoly.o lwpoly.c lwpoly.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwmpoint.o lwmpoint.c lwmpoint.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwmline.o lwmline.c lwmline.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwmpoly.o lwmpoly.c lwmpoly.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwcollection.o lwcollection.c lwcollection.c:1: warning: -fPIC ignored for target (all code is position independent) g++ -I/c/PostgreSQL/8.0.3/include -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_geos_wrapper.o lwgeom_geos_wrapper.cpp lwgeom_geos_wrapper.cpp:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o wktunparse.o wktunparse.c wktunparse.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgparse.o lwgparse.c lwgparse.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o wktparse.tab.o wktparse.tab.c wktparse.tab.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lex.yy.o lex.yy.c lex.yy.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o vsprintf.o vsprintf.c vsprintf.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o liblwgeom.o liblwgeom.c liblwgeom.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_pg.o lwgeom_pg.c lwgeom_pg.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_debug.o lwgeom_debug.c lwgeom_debug.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_spheroid.o lwgeom_spheroid.c lwgeom_spheroid.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_ogc.o lwgeom_ogc.c lwgeom_ogc.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_functions_analytic.o lwgeom_functions_analytic.c lwgeom_functions_analytic.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_geos.o lwgeom_geos.c lwgeom_geos.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_inout.o lwgeom_inout.c lwgeom_inout.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_estimate.o lwgeom_estimate.c lwgeom_estimate.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_functions_basic.o lwgeom_functions_basic.c lwgeom_functions_basic.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_gist.o lwgeom_gist.c lwgeom_gist.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_btree.o lwgeom_btree.c lwgeom_btree.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_transform.o lwgeom_transform.c lwgeom_transform.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o stringBuffer.o stringBuffer.c stringBuffer.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_box.o lwgeom_box.c lwgeom_box.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_box3d.o lwgeom_box3d.c lwgeom_box3d.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_box2dfloat4.o lwgeom_box2dfloat4.c lwgeom_box2dfloat4.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_chip.o lwgeom_chip.c lwgeom_chip.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_svg.o lwgeom_svg.c lwgeom_svg.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_gml.o lwgeom_gml.c lwgeom_gml.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_triggers.o lwgeom_triggers.c lwgeom_triggers.c:1: warning: -fPIC ignored for target (all code is position independent) gcc -DUSE_VERSION=80 -DPOSTGIS_LIB_VERSION='"1.1.0CVS"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.1"' -DPOSTGIS_BUILD_DATE='"2005-07-01 11:32:40"' -I/c/PostgreSQL/8.0.3/bin/../include -DUSE_PROJ -Ic:/PostgreSQL/8.0.3/include/server -Ic:/PostgreSQL/8.0.3/include/server/port/win32 -DAUTOCACHE_BBOX=1 -DUSE_STATS -g -O2 -fPIC -fexceptions -DUSE_GEOS -c -o lwgeom_dump.o lwgeom_dump.c lwgeom_dump.c:1: warning: -fPIC ignored for target (all code is position independent) dlltool --export-all --output-def lwgeom.def measures.o box2d.o ptarray.o lwgeom_api.o lwgeom.o lwpoint.o lwline.o lwpoly.o lwmpoint.o lwmline.o lwmpoly.o lwcollection.o lwgeom_geos_wrapper.o wktunparse.o lwgparse.o wktparse.tab.o lex.yy.o vsprintf.o liblwgeom.o lwgeom_pg.o lwgeom_debug.o lwgeom_spheroid.o lwgeom_ogc.o lwgeom_functions_analytic.o lwgeom_geos.o lwgeom_inout.o lwgeom_estimate.o lwgeom_functions_basic.o lwgeom_gist.o lwgeom_btree.o lwgeom_transform.o stringBuffer.o lwgeom_box.o lwgeom_box3d.o lwgeom_box2dfloat4.o lwgeom_chip.o lwgeom_svg.o lwgeom_gml.o lwgeom_triggers.o lwgeom_dump.o dllwrap -o liblwgeom.1.1.dll --dllname liblwgeom.1.1.dll --def lwgeom.def measures.o box2d.o ptarray.o lwgeom_api.o lwgeom.o lwpoint.o lwline.o lwpoly.o lwmpoint.o lwmline.o lwmpoly.o lwcollection.o lwgeom_geos_wrapper.o wktunparse.o lwgparse.o wktparse.tab.o lex.yy.o vsprintf.o liblwgeom.o lwgeom_pg.o lwgeom_debug.o lwgeom_spheroid.o lwgeom_ogc.o lwgeom_functions_analytic.o lwgeom_geos.o lwgeom_inout.o lwgeom_estimate.o lwgeom_functions_basic.o lwgeom_gist.o lwgeom_btree.o lwgeom_transform.o stringBuffer.o lwgeom_box.o lwgeom_box3d.o lwgeom_box2dfloat4.o lwgeom_chip.o lwgeom_svg.o lwgeom_gml.o lwgeom_triggers.o lwgeom_dump.o -lstdc++ -L/c/PostgreSQL/8.0.3/lib -lgeos -L/c/PostgreSQL/8.0.3/bin/../lib -lproj -Lc:/PostgreSQL/8.0.3/lib -lpostgres Info: resolving _pj_errno by linking to __imp__pj_errno (auto-import) Info: resolving _pj_release by linking to __imp__pj_release (auto-import) Info: resolving _pj_errno by linking to __imp__pj_errno (auto-import) Info: resolving _pj_release by linking to __imp__pj_release (auto-import) Info: resolving _pj_errno by linking to __imp__pj_errno (auto-import) Info: resolving _pj_release by linking to __imp__pj_release (auto-import) dlltool --dllname liblwgeom.1.1.dll --def lwgeom.def --output-lib liblwgeom.a make[1]: Leaving directory `/home/david/sources/PostGIS/cvs/postgis/lwgeom' make -C loader make[1]: Entering directory `/home/david/sources/PostGIS/cvs/postgis/loader' gcc -g -Wall -I.. -DUSE_ICONV -DUSE_VERSION=80 -c -o shpopen.o shpopen.c shpopen.c:176: warning: 'rcsid' defined but not used gcc -g -Wall -I.. -DUSE_ICONV -DUSE_VERSION=80 -c -o dbfopen.o dbfopen.c dbfopen.c:200: warning: 'rcsid' defined but not used gcc -g -Wall -I.. -DUSE_ICONV -DUSE_VERSION=80 -c -o getopt.o getopt.c gcc -g -Wall -I.. -DUSE_ICONV -DUSE_VERSION=80 -c -o shp2pgsql.o shp2pgsql.c shp2pgsql.c: In function `utf8': shp2pgsql.c:1628: warning: implicit declaration of function `bzero' shp2pgsql.c:1631: warning: passing arg 2 of `libiconv' from incompatible pointer type gcc -g -Wall -I.. -DUSE_ICONV -DUSE_VERSION=80 shpopen.o dbfopen.o getopt.o shp2pgsql.o -o shp2pgsql.exe shp2pgsql.o(.text+0x2d7f): In function `utf8': C:/msys/1.0/home/david/sources/PostGIS/cvs/postgis/loader/shp2pgsql.c:1613: undefined reference to `libiconv_open' shp2pgsql.o(.text+0x2e29):C:/msys/1.0/home/david/sources/PostGIS/cvs/postgis/loader/shp2pgsql.c:1628: undefined reference to `bzero' shp2pgsql.o(.text+0x2e56):C:/msys/1.0/home/david/sources/PostGIS/cvs/postgis/loader/shp2pgsql.c:1631: undefined reference to `libiconv' shp2pgsql.o(.text+0x2e9a):C:/msys/1.0/home/david/sources/PostGIS/cvs/postgis/loader/shp2pgsql.c:1637: undefined reference to `libiconv_close' collect2: ld returned 1 exit status make[1]: *** [shp2pgsql.exe] Error 1 make[1]: Leaving directory `/home/david/sources/PostGIS/cvs/postgis/loader' make: *** [loaderdumper] Error 2 --------------------------------------------------------------- TECHER Jean David 01MAP e-mail: david at 01map.net T?l: 04 67 45 60 27 Entreprise: http://www.01map.net Perso: http://techer.pascal.free.fr/postgis/ --------------------------------------------------------------- ----- Original Message ----- From: strk at refractions.net To: PostGIS Users Discussion Sent: Friday, July 01, 2005 11:29 AM Subject: Re: [postgis-users] Patch for PostGIS CVS on Windows On Fri, Jul 01, 2005 at 11:06:21AM +0200, Jean David TECHER wrote: ... > I was not able to use iconv on MinGW for supoort utf-8 for shp2pgsql. Can you report the problem ? The configure script should be made able to cope with this. --strk; _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From strk at refractions.net Fri Jul 1 05:54:13 2005 From: strk at refractions.net (strk at refractions.net) Date: Fri, 1 Jul 2005 14:54:13 +0200 Subject: [postgis-users] Patch for PostGIS CVS on Windows In-Reply-To: <004201c57e31$06bbdec0$117fa8c0@jenna> References: <001a01c57e1c$26eabff0$117fa8c0@jenna> <20050701092952.GF84000@keybit.net> <004201c57e31$06bbdec0$117fa8c0@jenna> Message-ID: <20050701125413.GA90146@keybit.net> On Fri, Jul 01, 2005 at 01:35:46PM +0200, Jean David TECHER wrote: > In postgis/Makefile.config.in > > USE_ICONV=@USE_ICONV@ ... > checking iconv.h usability... yes > checking iconv.h presence... yes > checking for iconv.h... yes ... > shp2pgsql.c:1631: warning: passing arg 2 of `libiconv' from incompatible pointer type > gcc -g -Wall -I.. -DUSE_ICONV -DUSE_VERSION=80 shpopen.o dbfopen.o getopt.o shp2pgsql.o -o shp2pgsql.exe > shp2pgsql.o(.text+0x2d7f): In function `utf8': > C:/msys/1.0/home/david/sources/PostGIS/cvs/postgis/loader/shp2pgsql.c:1613: undefined reference to `libiconv_open' > shp2pgsql.o(.text+0x2e29):C:/msys/1.0/home/david/sources/PostGIS/cvs/postgis/loader/shp2pgsql.c:1628: undefined reference to `bzero' > shp2pgsql.o(.text+0x2e56):C:/msys/1.0/home/david/sources/PostGIS/cvs/postgis/loader/shp2pgsql.c:1631: undefined reference to `libiconv' > shp2pgsql.o(.text+0x2e9a):C:/msys/1.0/home/david/sources/PostGIS/cvs/postgis/loader/shp2pgsql.c:1637: undefined reference to `libiconv_close' Does adding -liconv to CFLAGS in loader/Makefile fix this ? --strk; From davidtecher at yahoo.fr Fri Jul 1 06:25:10 2005 From: davidtecher at yahoo.fr (Jean David TECHER) Date: Fri, 1 Jul 2005 15:25:10 +0200 Subject: [postgis-users] Patch for PostGIS CVS on Windows References: <001a01c57e1c$26eabff0$117fa8c0@jenna><20050701092952.GF84000@keybit.net><004201c57e31$06bbdec0$117fa8c0@jenna> <20050701125413.GA90146@keybit.net> Message-ID: <006d01c57e40$4ea21920$117fa8c0@jenna> I tried but always the same error By the way I always compil PostGIS without iconv... --------------------------------------------------------------- TECHER Jean David 01MAP e-mail: david at 01map.net T?l: 04 67 45 60 27 Entreprise: http://www.01map.net Perso: http://techer.pascal.free.fr/postgis/ --------------------------------------------------------------- ----- Original Message ----- From: strk at refractions.net To: PostGIS Users Discussion Sent: Friday, July 01, 2005 2:54 PM Subject: Re: [postgis-users] Patch for PostGIS CVS on Windows On Fri, Jul 01, 2005 at 01:35:46PM +0200, Jean David TECHER wrote: > In postgis/Makefile.config.in > > USE_ICONV=@USE_ICONV@ ... > checking iconv.h usability... yes > checking iconv.h presence... yes > checking for iconv.h... yes ... > shp2pgsql.c:1631: warning: passing arg 2 of `libiconv' from incompatible pointer type > gcc -g -Wall -I.. -DUSE_ICONV -DUSE_VERSION=80 shpopen.o dbfopen.o getopt.o shp2pgsql.o -o shp2pgsql.exe > shp2pgsql.o(.text+0x2d7f): In function `utf8': > C:/msys/1.0/home/david/sources/PostGIS/cvs/postgis/loader/shp2pgsql.c:1613: undefined reference to `libiconv_open' > shp2pgsql.o(.text+0x2e29):C:/msys/1.0/home/david/sources/PostGIS/cvs/postgis/loader/shp2pgsql.c:1628: undefined reference to `bzero' > shp2pgsql.o(.text+0x2e56):C:/msys/1.0/home/david/sources/PostGIS/cvs/postgis/loader/shp2pgsql.c:1631: undefined reference to `libiconv' > shp2pgsql.o(.text+0x2e9a):C:/msys/1.0/home/david/sources/PostGIS/cvs/postgis/loader/shp2pgsql.c:1637: undefined reference to `libiconv_close' Does adding -liconv to CFLAGS in loader/Makefile fix this ? --strk; _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From woodbri at swoodbridge.com Fri Jul 1 19:58:36 2005 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Fri, 01 Jul 2005 22:58:36 -0400 Subject: [postgis-users] project a point onto a line and get x, y, offset of the point of projection Message-ID: <42C602DC.4090604@swoodbridge.com> Hi all, Someone on the list asked if they could get the point location of where on a line object the shortest distance to that line was from a point. The distance(line, point) will tell you the shortest distance, but it does not project the point onto the line at the point where the shortest distance is located. Then I needed the same thing for a project at Where2GetIt.com and it seemed like this functionality should be a part of PostGIS. So attached is the code I wrote for our needs. There are some examples of its use. It has an assumption that you are working in decimal degrees, but it could be modified easily to work in any space. I will leave that up to others. The algorithm is very straight forward. Given a linestring and a point, project the point onto each segment of the linestring and save the projection of the closest point. Then compute the distance from the start of the linestring to the projection point and return an array of pointx, pointy, distance. Paul, please feel free to add this or something like it to PostGIS. Enjoy, I would be open to any feedback or improvements any might suggest. -Steve -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: x_y_offset_from_line_pnt.sql URL: From hsutanti at umich.edu Sun Jul 3 07:27:31 2005 From: hsutanti at umich.edu (Herman Teo) Date: Sun, 03 Jul 2005 10:27:31 -0400 Subject: [postgis-users] load mapinfo to postgres Message-ID: <20050703102731.p9w1rq88748k8wcw@engin.mail.umich.edu> Hi. I'm new to this mapserver model. I have a lot of mapinfo .tab files that I want to load into the postgis database. Is there a well documented tutorial on how to perform ogr2ogr from mapinfo .tab to postgis dbase? Thanks a lot. Herman From woodbri at swoodbridge.com Sun Jul 3 08:12:45 2005 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Sun, 03 Jul 2005 11:12:45 -0400 Subject: [postgis-users] load mapinfo to postgres In-Reply-To: <20050703102731.p9w1rq88748k8wcw@engin.mail.umich.edu> References: <20050703102731.p9w1rq88748k8wcw@engin.mail.umich.edu> Message-ID: <42C8006D.9020502@swoodbridge.com> Herman, You might also want to post this query to the gdal list as both mapinfo and postGIS are ogr data sources. -Steve W. Herman Teo wrote: > Hi. > I'm new to this mapserver model. I have a lot of mapinfo .tab files that I want > to load into the postgis database. Is there a well documented tutorial on how > to perform ogr2ogr from mapinfo .tab to postgis dbase? > Thanks a lot. > > Herman > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From msestudiente2 at yahoo.com Sun Jul 3 09:23:25 2005 From: msestudiente2 at yahoo.com (Alex Smith) Date: Sun, 3 Jul 2005 09:23:25 -0700 (PDT) Subject: [postgis-users] project a point onto a line and get x, y, offset of the point of projection In-Reply-To: <42C602DC.4090604@swoodbridge.com> Message-ID: <20050703162325.86505.qmail@web61021.mail.yahoo.com> Thanks for posting this. Let me make sure that I have this correct - as we may need something similar to this in an upcoming project. It sounds like this function essentially "snaps" a point to the nearest line. Correct? If so, does it snap the point to the nearest VERTEX on the line? Or will it place the point at the appropriate location between two vertex's on the line? I just ask because an Avenue script ArcView 3.2 would place the point at the nearest vertex and therefore not do what we need. Thanks again for sharing! AS Stephen Woodbridge wrote: Hi all, Someone on the list asked if they could get the point location of where on a line object the shortest distance to that line was from a point. The distance(line, point) will tell you the shortest distance, but it does not project the point onto the line at the point where the shortest distance is located. Then I needed the same thing for a project at Where2GetIt.com and it seemed like this functionality should be a part of PostGIS. So attached is the code I wrote for our needs. There are some examples of its use. It has an assumption that you are working in decimal degrees, but it could be modified easily to work in any space. I will leave that up to others. The algorithm is very straight forward. Given a linestring and a point, project the point onto each segment of the linestring and save the projection of the closest point. Then compute the distance from the start of the linestring to the projection point and return an array of pointx, pointy, distance. Paul, please feel free to add this or something like it to PostGIS. Enjoy, I would be open to any feedback or improvements any might suggest. -Steve CREATE OR REPLACE FUNCTION x_y_offset_from_line_pnt (geometry, geometry) RETURNS float[] AS ' /* * {x, y, offset} = x_y_offset_from_line_pnt(LINESTRING, POINT($lon $lat)) */ DECLARE line ALIAS FOR $1; pnt ALIAS FOR $2; nline geometry; ipnt geometry; bestp geometry; pa geometry; pb geometry; npts integer; besti integer; seglen float; dist float; best float; offset float; U float; -- BEGIN IF NOT (GeometryType(line) = ''LINESTRING'' || GeometryType(line) = ''MULTILINESTRING'' ) AND GeometryType(pnt) != ''POINT'' THEN RETURN NULL; END IF; /* * iterate over the linestring segments and find the segment and * point on the linestring that are closest to the pnt */ npts := npoints(line); best := 360.0; FOR i IN 1 .. npts-1 LOOP pa := PointN(line,i); pb := PointN(line,i+1); seglen := distance(pa, pb); IF (seglen > 0.0) THEN U := ( (X(pnt)-X(pa)) * (X(pb)-X(pa)) + (Y(pnt)-Y(pa)) * (Y(pb)-Y(pb)) ) / (seglen*seglen); IF U < 0.0 THEN ipnt := pa; ELSIF U > 1.0 THEN ipnt := pb; ELSE ipnt := MakePoint( X(pa) + U*(X(pb) - X(pa)), Y(pa) + U*(Y(pb) - Y(pa)) ); END IF; dist := distance(pnt, ipnt); IF dist < best THEN best := dist; besti := i; bestp := ipnt; END IF; END IF; END LOOP; /* * we should now have the best point so calcuate the offset * and return the results. */ IF besti = 1 THEN nline = MakeLine(PointN(line,1), bestp); ELSE nline = MakeLine(PointN(line,1), PointN(line,2)); IF besti > 2 THEN FOR i IN 3 .. besti LOOP pa := PointN(line,i); nline := AddPoint(nline, pa, -1); END LOOP; END IF; nline := AddPoint(nline, bestp, -1); END IF; offset := length_spheroid(nline,''SPHEROID["GRS_1980", 6378137, 298.257222101]''); RETURN ARRAY[X(bestp), Y(bestp), offset]; END; ' LANGUAGE plpgsql; -- here are some test calls to the function select x_y_offset_from_line_pnt(GeomFromText('LINESTRING(0 0,1 0)',-1), GeomFromText('POINT(0.5 0.1)', -1)); select x_y_offset_from_line_pnt(GeomFromText('LINESTRING(0 0,0.1 0,0.3 .1,.4 .15,.6 .2)',-1), GeomFromText('POINT(0.5 0.1)', -1)); select link_id, the_geom, min(distance(the_geom, GeomFromText('POINT(-71.38900904888 42.619402684661)', -1))) as dist from rgeo where expand(GeomFromText('POINT(-71.38900904888 42.619402684661)', -1), 0.0013) && the_geom group by the_geom order by dist limit 1; select (x_y_offset_from_line_pnt( (select the_geom from rgeo where link_id=$segment_id), GeomFromText('POINT(-71.38900904888 42.619402684661)', -1)) )[3] as offset; _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users --------------------------------- Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football -------------- next part -------------- An HTML attachment was scrubbed... URL: From woodbri at swoodbridge.com Sun Jul 3 09:40:51 2005 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Sun, 03 Jul 2005 12:40:51 -0400 Subject: [postgis-users] project a point onto a line and get x, y, offset of the point of projection In-Reply-To: <20050703162325.86505.qmail@web61021.mail.yahoo.com> References: <20050703162325.86505.qmail@web61021.mail.yahoo.com> Message-ID: <42C81513.6020401@swoodbridge.com> Alex Smith wrote: > Thanks for posting this. Let me make sure that I have this correct - as > we may need something similar to this in an upcoming project. It sounds > like this function essentially "snaps" a point to the nearest > line. Correct? given a point(P) and a line(S-E) it projects the point onto the line where the snapped point(X) is at the shortest distance from the point to the line. The shortest distance it always the one closest to the beginning of the line if there are multiple points all with the same shortest distance. The point may be a vertex, but it may be along the segment if that is the shortest distance. The offset is the distance along the line from the start to the snap point. *----X----* / \ / P \ / E S If S-E is the linestring, P is the point, then X is the snap point and the function returns ARRAY[Xx, Xy, offset] where POINT(Xx, Xy) is the snap point and offset = length of the segment S-X HTH, -Steve > If so, does it snap the point to the nearest VERTEX on > the line? Or will it place the point at the appropriate location > between two vertex's on the line? I just ask because an Avenue script > ArcView 3.2 would place the point at the nearest vertex and therefore > not do what we need. > > Thanks again for sharing! > > AS > > */Stephen Woodbridge /* wrote: > > Hi all, > > Someone on the list asked if they could get the point location of where > on a line object the shortest distance to that line was from a point. > The distance(line, point) will tell you the shortest distance, but it > does not project the point onto the line at the point where the > shortest > distance is located. > > Then I needed the same thing for a project at Where2GetIt.com and it > seemed like this functionality should be a part of PostGIS. So attached > is the code I wrote for our needs. There are some examples of its use. > It has an assumption that you are working in decimal degrees, but it > could be modified easily to work in any space. I will leave that up to > others. > > The algorithm is very straight forward. Given a linestring and a point, > project the point onto each segment of the linestring and save the > projection of the closest point. Then compute the distance from the > start of the linestring to the projection point and return an array of > pointx, pointy, distance. > > Paul, please feel free to add this or something like it to PostGIS. > > Enjoy, I would be open to any feedback or improvements any might > suggest. > > -Steve > CREATE OR REPLACE FUNCTION x_y_offset_from_line_pnt (geometry, > geometry) RETURNS float[] AS ' > /* > * {x, y, offset} = x_y_offset_from_line_pnt(LINESTRING, POINT($lon > $lat)) > */ > DECLARE > line ALIAS FOR $1; > pnt ALIAS FOR $2; > nline geometry; > ipnt geometry; > bestp geometry; > pa geometry; > pb geometry; > npts integer; > besti integer; > seglen float; > dist float; > best float; > offset float; > U float; > -- > BEGIN > IF NOT (GeometryType(line) = ''LINESTRING'' || > GeometryType(line) = ''MULTILINESTRING'' ) AND > GeometryType(pnt) != ''POINT'' THEN > RETURN NULL; > END IF; > /* > * iterate over the linestring segments and find the segment and > * point on the linestring that are closest to the pnt > */ > npts := npoints(line); > best := 360.0; > FOR i IN 1 .. npts-1 LOOP > pa := PointN(line,i); > pb := PointN(line,i+1); > seglen := distance(pa, pb); > IF (seglen > 0.0) THEN > U := ( (X(pnt)-X(pa)) * (X(pb)-X(pa)) + > (Y(pnt)-Y(pa)) * (Y(pb)-Y(pb)) ) / > (seglen*seglen); > IF U < 0.0 THEN > ipnt := pa; > ELSIF U > 1.0 THEN > ipnt := pb; > ELSE > ipnt := MakePoint( > X(pa) + U*(X(pb) - X(pa)), > Y(pa) + U*(Y(pb) - Y(pa)) ); > END IF; > dist := distance(pnt, ipnt); > IF dist < best THEN > best := dist; > besti := i; > bestp := ipnt; > END IF; > END IF; > END LOOP; > /* > * we should now have the best point so calcuate the offset > * and return the results. > */ > IF besti = 1 THEN > nline = MakeLine(PointN(line,1), bestp); > ELSE > nline = MakeLine(PointN(line,1), PointN(line,2)); > IF besti > 2 THEN > FOR i IN 3 .. besti LOOP > pa := PointN(line,i); > nline := AddPoint(nline, pa, -1); > END LOOP; > END IF; > nline := AddPoint(nline, bestp, -1); > END IF; > offset := length_spheroid(nline,''SPHEROID["GRS_1980", 6378137, > 298.257222101]''); > RETURN ARRAY[X(bestp), Y(bestp), offset]; > END; > ' LANGUAGE plpgsql; > > -- here are some test calls to the function > > select x_y_offset_from_line_pnt(GeomFromText('LINESTRING(0 0,1 > 0)',-1), GeomFromText('POINT(0.5 0.1)', -1)); > > select x_y_offset_from_line_pnt(GeomFromText('LINESTRING(0 0,0.1 > 0,0.3 .1,.4 .15,.6 .2)',-1), GeomFromText('POINT(0.5 0.1)', -1)); > > select link_id, the_geom, min(distance(the_geom, > GeomFromText('POINT(-71.38900904888 42.619402684661)', -1))) as dist > from > rgeo > where > expand(GeomFromText('POINT(-71.38900904888 42.619402684661)', -1), > 0.0013) && > the_geom > group by the_geom order by dist limit 1; > > select (x_y_offset_from_line_pnt( > (select the_geom from rgeo where link_id=$segment_id), > GeomFromText('POINT(-71.38900904888 42.619402684661)', -1)) > )[3] as offset; From dev at samizdatdigital.org Sun Jul 3 09:49:30 2005 From: dev at samizdatdigital.org (gold) Date: Sun, 03 Jul 2005 09:49:30 -0700 Subject: [postgis-users] number format weirdness from dbfopen.c? Message-ID: <42C8171A.1020700@samizdatdigital.org> are there any open issues or common experience with some number values being read incorrectly from a .dbf file? i noticed this in using shp2pgsql, and i'm still trying to track it down. basically, shp2pgsql was generating insert statements inserting values like '1234.' (notice the trailing '.'). i've put extra debugging in my local copy of dbfopen and shp2pgsql, and indeed this is the ascii data coming from the .dbf file itself (after the whitespace trimming). the fields in question are marked as type 'N', as returned by DBFGetNativeFieldType. i'm gonna write a separate low level version (bypassing dbfopen) to just extract this field and at least get some degree of confirmation as to whether this is really how the data is, or whether there's something amiss in dbfopen (unlikely, but i should check). i'm also going to get in touch with the data providers to see if this is something they're aware of. is it possible that in the .dbf world '1234.' is valid numeric syntax? jon From woodbri at swoodbridge.com Sun Jul 3 09:54:33 2005 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Sun, 03 Jul 2005 12:54:33 -0400 Subject: [postgis-users] number format weirdness from dbfopen.c? In-Reply-To: <42C8171A.1020700@samizdatdigital.org> References: <42C8171A.1020700@samizdatdigital.org> Message-ID: <42C81849.2030008@swoodbridge.com> gold wrote: > are there any open issues or common experience with some number values > being read incorrectly from a .dbf file? i noticed this in using > shp2pgsql, and i'm still trying to track it down. > > basically, shp2pgsql was generating insert statements inserting values > like '1234.' (notice the trailing '.'). i've put extra debugging in my > local copy of dbfopen and shp2pgsql, and indeed this is the ascii data > coming from the .dbf file itself (after the whitespace trimming). the > fields in question are marked as type 'N', as returned by > DBFGetNativeFieldType. > > i'm gonna write a separate low level version (bypassing dbfopen) to just > extract this field and at least get some degree of confirmation as to > whether this is really how the data is, or whether there's something > amiss in dbfopen (unlikely, but i should check). > > i'm also going to get in touch with the data providers to see if this is > something they're aware of. is it possible that in the .dbf world > '1234.' is valid numeric syntax? Jon, The shapelib API document says DBF type code 'N' (Numeric, with or without decimal). -Steve W. From dev at samizdatdigital.org Sun Jul 3 09:59:50 2005 From: dev at samizdatdigital.org (gold) Date: Sun, 03 Jul 2005 09:59:50 -0700 Subject: [postgis-users] architectural status of shp2pgsql? Message-ID: <42C81986.30508@samizdatdigital.org> shp2pgsql is nice, but i'm either going to radically modify my local version, or cut something new, and i'm wondering if there is any planned or ongoing work to that effect? in particular, i'd like to see the functionality split a bit, as well as some things added: * split up the metadata sniffing/table creation part into a separate module * use this module in two places -- shp2pgsql and dbf2pgsql (to be created). i realize (from the discussion in march, i think) that there is a dbf2pg in the postgres contrib, but it's not much to my liking. also, i'd like to have shp2pgsql and dbf2pgsql running off of a common io and metadata core. * add projection (.prj) capabilities to shp2pgsql. are there already efforts to do this stuff, or, if not, and i end up doing the work, are there people out there willing to do code reviews and provide some other guidance? jon From dev at samizdatdigital.org Sun Jul 3 10:06:49 2005 From: dev at samizdatdigital.org (gold) Date: Sun, 03 Jul 2005 10:06:49 -0700 Subject: [postgis-users] number format weirdness from dbfopen.c? In-Reply-To: <42C81849.2030008@swoodbridge.com> References: <42C8171A.1020700@samizdatdigital.org> <42C81849.2030008@swoodbridge.com> Message-ID: <42C81B29.70407@samizdatdigital.org> indeed it does, i think i must have missed that. thanks. given that, is it a bug that shp2pgsql doesn't strip the trailing '.', given that it knows it's trying to insert it into an integer column? i don't want to "fix" something before i'm sure it's broken. jon Stephen Woodbridge wrote: > gold wrote: > >> are there any open issues or common experience with some number values >> being read incorrectly from a .dbf file? i noticed this in using >> shp2pgsql, and i'm still trying to track it down. >> >> basically, shp2pgsql was generating insert statements inserting values >> like '1234.' (notice the trailing '.'). i've put extra debugging in my >> local copy of dbfopen and shp2pgsql, and indeed this is the ascii data >> coming from the .dbf file itself (after the whitespace trimming). the >> fields in question are marked as type 'N', as returned by >> DBFGetNativeFieldType. >> >> i'm gonna write a separate low level version (bypassing dbfopen) to >> just extract this field and at least get some degree of confirmation >> as to whether this is really how the data is, or whether there's >> something amiss in dbfopen (unlikely, but i should check). >> >> i'm also going to get in touch with the data providers to see if this >> is something they're aware of. is it possible that in the .dbf world >> '1234.' is valid numeric syntax? > > > Jon, > > The shapelib API document says DBF type code 'N' (Numeric, with or > without decimal). > > -Steve W. > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > From woodbri at swoodbridge.com Sun Jul 3 10:26:59 2005 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Sun, 03 Jul 2005 13:26:59 -0400 Subject: [postgis-users] number format weirdness from dbfopen.c? In-Reply-To: <42C81B29.70407@samizdatdigital.org> References: <42C8171A.1020700@samizdatdigital.org> <42C81849.2030008@swoodbridge.com> <42C81B29.70407@samizdatdigital.org> Message-ID: <42C81FE3.2000900@swoodbridge.com> gold wrote: > indeed it does, i think i must have missed that. thanks. > > given that, is it a bug that shp2pgsql doesn't strip the trailing '.', > given that it knows it's trying to insert it into an integer column? i > don't want to "fix" something before i'm sure it's broken. Just my opinion, but if it is trying to stuff it into an integer column, then the very least it should for is cast it to integer. But given that type 'N' columns can be either INT or FLOAT it might be nice to have an option to force it to FLOAT maybe something like: -F4 cola,colb the would create "cola" and "colb" as FLOAT4 instead of the default INT() type column. -Steve > > Stephen Woodbridge wrote: > >> gold wrote: >> >>> are there any open issues or common experience with some number >>> values being read incorrectly from a .dbf file? i noticed this in >>> using shp2pgsql, and i'm still trying to track it down. >>> >>> basically, shp2pgsql was generating insert statements inserting >>> values like '1234.' (notice the trailing '.'). i've put extra >>> debugging in my local copy of dbfopen and shp2pgsql, and indeed this >>> is the ascii data coming from the .dbf file itself (after the >>> whitespace trimming). the fields in question are marked as type 'N', >>> as returned by DBFGetNativeFieldType. >>> >>> i'm gonna write a separate low level version (bypassing dbfopen) to >>> just extract this field and at least get some degree of confirmation >>> as to whether this is really how the data is, or whether there's >>> something amiss in dbfopen (unlikely, but i should check). >>> >>> i'm also going to get in touch with the data providers to see if this >>> is something they're aware of. is it possible that in the .dbf world >>> '1234.' is valid numeric syntax? >> >> >> >> Jon, >> >> The shapelib API document says DBF type code 'N' (Numeric, with or >> without decimal). >> >> -Steve W. >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From strk at refractions.net Sun Jul 3 10:27:16 2005 From: strk at refractions.net (strk at refractions.net) Date: Sun, 3 Jul 2005 19:27:16 +0200 Subject: [postgis-users] number format weirdness from dbfopen.c? In-Reply-To: <42C81B29.70407@samizdatdigital.org> References: <42C8171A.1020700@samizdatdigital.org> <42C81849.2030008@swoodbridge.com> <42C81B29.70407@samizdatdigital.org> Message-ID: <20050703172716.GA12621@keybit.net> On Sun, Jul 03, 2005 at 10:06:49AM -0700, gold wrote: > indeed it does, i think i must have missed that. thanks. > > given that, is it a bug that shp2pgsql doesn't strip the trailing '.', > given that it knows it's trying to insert it into an integer column? i > don't want to "fix" something before i'm sure it's broken. Does postgresql accept '1234.' as a number ? Ie. is it able to cast the string to a number ? That makes it or not a bug. --strk; From strk at refractions.net Sun Jul 3 10:38:21 2005 From: strk at refractions.net (strk at refractions.net) Date: Sun, 3 Jul 2005 19:38:21 +0200 Subject: [postgis-users] architectural status of shp2pgsql? In-Reply-To: <42C81986.30508@samizdatdigital.org> References: <42C81986.30508@samizdatdigital.org> Message-ID: <20050703173821.GB12621@keybit.net> On Sun, Jul 03, 2005 at 09:59:50AM -0700, gold wrote: > shp2pgsql is nice, but i'm either going to radically modify my local > version, or cut something new, and i'm wondering if there is any planned > or ongoing work to that effect? > > in particular, i'd like to see the functionality split a bit, as well as > some things added: What revision are you using ? I've put some efforts to split functionalities a bit in recent ones. > * split up the metadata sniffing/table creation part into a separate module > > * use this module in two places -- shp2pgsql and dbf2pgsql (to be > created). i realize (from the discussion in march, i think) that there > is a dbf2pg in the postgres contrib, but it's not much to my liking. > also, i'd like to have shp2pgsql and dbf2pgsql running off of a common > io and metadata core. My proposal was to let shp2pgsql read .dbf files w/out corresponding shp in case shp were missing. > * add projection (.prj) capabilities to shp2pgsql. > > are there already efforts to do this stuff, or, if not, and i end up > doing the work, are there people out there willing to do code reviews > and provide some other guidance? There are no efforts I'm aware of. I think main problem would be finding a match or create a new record in spatial_ref_sys. Maybe first step should be some utility functions to query spatial_ref_sys given a set of definitions. What does .prj files contain ? -strk; From strk at refractions.net Sun Jul 3 10:45:03 2005 From: strk at refractions.net (strk at refractions.net) Date: Sun, 3 Jul 2005 19:45:03 +0200 Subject: [postgis-users] project a point onto a line and get x, y, offset of the point of projection In-Reply-To: <42C602DC.4090604@swoodbridge.com> References: <42C602DC.4090604@swoodbridge.com> Message-ID: <20050703174503.GA12828@keybit.net> In the head branch of postgis we already have functions able to do this: -- position is a float between 0 and 1 line_interpolate_point(line, position) -- return a float between 0 and 1 representing -- position of closest point on line line_locate_point(line, point) So functionality of your function would be obtained with: SELECT line_interpolate_point(geom, line_locate_point(geom, 'POINT..')); --strk; On Fri, Jul 01, 2005 at 10:58:36PM -0400, Stephen Woodbridge wrote: > Hi all, > > Someone on the list asked if they could get the point location of where > on a line object the shortest distance to that line was from a point. > The distance(line, point) will tell you the shortest distance, but it > does not project the point onto the line at the point where the shortest > distance is located. > > Then I needed the same thing for a project at Where2GetIt.com and it > seemed like this functionality should be a part of PostGIS. So attached > is the code I wrote for our needs. There are some examples of its use. > It has an assumption that you are working in decimal degrees, but it > could be modified easily to work in any space. I will leave that up to > others. > > The algorithm is very straight forward. Given a linestring and a point, > project the point onto each segment of the linestring and save the > projection of the closest point. Then compute the distance from the > start of the linestring to the projection point and return an array of > pointx, pointy, distance. > > Paul, please feel free to add this or something like it to PostGIS. > > Enjoy, I would be open to any feedback or improvements any might suggest. > > -Steve > CREATE OR REPLACE FUNCTION x_y_offset_from_line_pnt (geometry, geometry) RETURNS float[] AS ' > /* > * {x, y, offset} = x_y_offset_from_line_pnt(LINESTRING, POINT($lon $lat)) > */ > DECLARE > line ALIAS FOR $1; > pnt ALIAS FOR $2; > nline geometry; > ipnt geometry; > bestp geometry; > pa geometry; > pb geometry; > npts integer; > besti integer; > seglen float; > dist float; > best float; > offset float; > U float; > -- > BEGIN > IF NOT (GeometryType(line) = ''LINESTRING'' || > GeometryType(line) = ''MULTILINESTRING'' ) AND > GeometryType(pnt) != ''POINT'' THEN > RETURN NULL; > END IF; > /* > * iterate over the linestring segments and find the segment and > * point on the linestring that are closest to the pnt > */ > npts := npoints(line); > best := 360.0; > FOR i IN 1 .. npts-1 LOOP > pa := PointN(line,i); > pb := PointN(line,i+1); > seglen := distance(pa, pb); > IF (seglen > 0.0) THEN > U := ( (X(pnt)-X(pa)) * (X(pb)-X(pa)) + > (Y(pnt)-Y(pa)) * (Y(pb)-Y(pb)) ) / > (seglen*seglen); > IF U < 0.0 THEN > ipnt := pa; > ELSIF U > 1.0 THEN > ipnt := pb; > ELSE > ipnt := MakePoint( > X(pa) + U*(X(pb) - X(pa)), > Y(pa) + U*(Y(pb) - Y(pa)) ); > END IF; > dist := distance(pnt, ipnt); > IF dist < best THEN > best := dist; > besti := i; > bestp := ipnt; > END IF; > END IF; > END LOOP; > /* > * we should now have the best point so calcuate the offset > * and return the results. > */ > IF besti = 1 THEN > nline = MakeLine(PointN(line,1), bestp); > ELSE > nline = MakeLine(PointN(line,1), PointN(line,2)); > IF besti > 2 THEN > FOR i IN 3 .. besti LOOP > pa := PointN(line,i); > nline := AddPoint(nline, pa, -1); > END LOOP; > END IF; > nline := AddPoint(nline, bestp, -1); > END IF; > offset := length_spheroid(nline,''SPHEROID["GRS_1980", 6378137, 298.257222101]''); > RETURN ARRAY[X(bestp), Y(bestp), offset]; > END; > ' LANGUAGE plpgsql; > > -- here are some test calls to the function > > select x_y_offset_from_line_pnt(GeomFromText('LINESTRING(0 0,1 0)',-1), GeomFromText('POINT(0.5 0.1)', -1)); > > select x_y_offset_from_line_pnt(GeomFromText('LINESTRING(0 0,0.1 0,0.3 .1,.4 .15,.6 .2)',-1), GeomFromText('POINT(0.5 0.1)', -1)); > > select link_id, the_geom, min(distance(the_geom, GeomFromText('POINT(-71.38900904888 42.619402684661)', -1))) as dist > from > rgeo > where > expand(GeomFromText('POINT(-71.38900904888 42.619402684661)', -1), 0.0013) && > the_geom > group by the_geom order by dist limit 1; > > select (x_y_offset_from_line_pnt( > (select the_geom from rgeo where link_id=$segment_id), > GeomFromText('POINT(-71.38900904888 42.619402684661)', -1)) > )[3] as offset; > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From msestudiente2 at yahoo.com Sun Jul 3 11:35:37 2005 From: msestudiente2 at yahoo.com (Alex Smith) Date: Sun, 3 Jul 2005 11:35:37 -0700 (PDT) Subject: [postgis-users] architectural status of shp2pgsql? In-Reply-To: <20050703173821.GB12621@keybit.net> Message-ID: <20050703183538.58594.qmail@web61017.mail.yahoo.com> You asked about the contents of a prj file..... prj files are essentially text files that list SR data. Here is a prj file for a GCS/lat-long NAD83 shapefile (EPSG SRID 4269): GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] Ironically, it looks very, very similar to the data contained in "SELECT spatial_ref_sys.srtext FROM spatial_ref_sys WHERE spatial_ref_sys.SRID = 4269;" which is below: GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]] Don't quote me on this, but it seems that ESRI needed a way to store SR data for shapefiles long after the shapefile had been invented. So it seems that they piggybacked on the EPSG system. Due to the extreme similarities, it seems that it may be possible to parse the data in the prj file and 'match' it to an entry in spatial_ref_sys. AS strk at refractions.net wrote: On Sun, Jul 03, 2005 at 09:59:50AM -0700, gold wrote: > shp2pgsql is nice, but i'm either going to radically modify my local > version, or cut something new, and i'm wondering if there is any planned > or ongoing work to that effect? > > in particular, i'd like to see the functionality split a bit, as well as > some things added: What revision are you using ? I've put some efforts to split functionalities a bit in recent ones. > * split up the metadata sniffing/table creation part into a separate module > > * use this module in two places -- shp2pgsql and dbf2pgsql (to be > created). i realize (from the discussion in march, i think) that there > is a dbf2pg in the postgres contrib, but it's not much to my liking. > also, i'd like to have shp2pgsql and dbf2pgsql running off of a common > io and metadata core. My proposal was to let shp2pgsql read .dbf files w/out corresponding shp in case shp were missing. > * add projection (.prj) capabilities to shp2pgsql. > > are there already efforts to do this stuff, or, if not, and i end up > doing the work, are there people out there willing to do code reviews > and provide some other guidance? There are no efforts I'm aware of. I think main problem would be finding a match or create a new record in spatial_ref_sys. Maybe first step should be some utility functions to query spatial_ref_sys given a set of definitions. What does .prj files contain ? -strk; _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users --------------------------------- Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football -------------- next part -------------- An HTML attachment was scrubbed... URL: From msestudiente2 at yahoo.com Sun Jul 3 11:50:02 2005 From: msestudiente2 at yahoo.com (Alex Smith) Date: Sun, 3 Jul 2005 11:50:02 -0700 (PDT) Subject: [postgis-users] Status of geocoding functions in PostGIS? Message-ID: <20050703185002.60822.qmail@web61017.mail.yahoo.com> Did some searching of the archives and found this article stating that a geocoder for PostGIS is in the works (see http://postgis.refractions.net/pipermail/postgis-users/2004-September/005762.html). Just wondering the status of this project and if there is a time line for the release dates. THANKS TO EVERYONE WHO IS WORKING ON THIS PROJECT! AS --------------------------------- Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football -------------- next part -------------- An HTML attachment was scrubbed... URL: From woodbri at swoodbridge.com Sun Jul 3 12:51:23 2005 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Sun, 03 Jul 2005 15:51:23 -0400 Subject: [postgis-users] project a point onto a line and get x, y, offset of the point of projection In-Reply-To: <20050703174503.GA12828@keybit.net> References: <42C602DC.4090604@swoodbridge.com> <20050703174503.GA12828@keybit.net> Message-ID: <42C841BB.8060605@swoodbridge.com> Hi Strk, This is great news, you guys really work fast :) Well I guess my function will help people that aren't yet on HEAD CVS. ;) -Steve strk at refractions.net wrote: > In the head branch of postgis we already have functions able to > do this: > > -- position is a float between 0 and 1 > line_interpolate_point(line, position) > > -- return a float between 0 and 1 representing > -- position of closest point on line > line_locate_point(line, point) > > So functionality of your function would be obtained with: > > SELECT line_interpolate_point(geom, line_locate_point(geom, 'POINT..')); > > --strk; > > On Fri, Jul 01, 2005 at 10:58:36PM -0400, Stephen Woodbridge wrote: > >>Hi all, >> >>Someone on the list asked if they could get the point location of where >>on a line object the shortest distance to that line was from a point. >>The distance(line, point) will tell you the shortest distance, but it >>does not project the point onto the line at the point where the shortest >>distance is located. >> >>Then I needed the same thing for a project at Where2GetIt.com and it >>seemed like this functionality should be a part of PostGIS. So attached >>is the code I wrote for our needs. There are some examples of its use. >>It has an assumption that you are working in decimal degrees, but it >>could be modified easily to work in any space. I will leave that up to >>others. >> >>The algorithm is very straight forward. Given a linestring and a point, >>project the point onto each segment of the linestring and save the >>projection of the closest point. Then compute the distance from the >>start of the linestring to the projection point and return an array of >>pointx, pointy, distance. >> >>Paul, please feel free to add this or something like it to PostGIS. >> >>Enjoy, I would be open to any feedback or improvements any might suggest. >> >>-Steve > > >>CREATE OR REPLACE FUNCTION x_y_offset_from_line_pnt (geometry, geometry) RETURNS float[] AS ' >>/* >> * {x, y, offset} = x_y_offset_from_line_pnt(LINESTRING, POINT($lon $lat)) >> */ >>DECLARE >> line ALIAS FOR $1; >> pnt ALIAS FOR $2; >> nline geometry; >> ipnt geometry; >> bestp geometry; >> pa geometry; >> pb geometry; >> npts integer; >> besti integer; >> seglen float; >> dist float; >> best float; >> offset float; >> U float; >>-- >>BEGIN >> IF NOT (GeometryType(line) = ''LINESTRING'' || >> GeometryType(line) = ''MULTILINESTRING'' ) AND >> GeometryType(pnt) != ''POINT'' THEN >> RETURN NULL; >> END IF; >> /* >> * iterate over the linestring segments and find the segment and >> * point on the linestring that are closest to the pnt >> */ >> npts := npoints(line); >> best := 360.0; >> FOR i IN 1 .. npts-1 LOOP >> pa := PointN(line,i); >> pb := PointN(line,i+1); >> seglen := distance(pa, pb); >> IF (seglen > 0.0) THEN >> U := ( (X(pnt)-X(pa)) * (X(pb)-X(pa)) + >> (Y(pnt)-Y(pa)) * (Y(pb)-Y(pb)) ) / >> (seglen*seglen); >> IF U < 0.0 THEN >> ipnt := pa; >> ELSIF U > 1.0 THEN >> ipnt := pb; >> ELSE >> ipnt := MakePoint( >> X(pa) + U*(X(pb) - X(pa)), >> Y(pa) + U*(Y(pb) - Y(pa)) ); >> END IF; >> dist := distance(pnt, ipnt); >> IF dist < best THEN >> best := dist; >> besti := i; >> bestp := ipnt; >> END IF; >> END IF; >> END LOOP; >> /* >> * we should now have the best point so calcuate the offset >> * and return the results. >> */ >> IF besti = 1 THEN >> nline = MakeLine(PointN(line,1), bestp); >> ELSE >> nline = MakeLine(PointN(line,1), PointN(line,2)); >> IF besti > 2 THEN >> FOR i IN 3 .. besti LOOP >> pa := PointN(line,i); >> nline := AddPoint(nline, pa, -1); >> END LOOP; >> END IF; >> nline := AddPoint(nline, bestp, -1); >> END IF; >> offset := length_spheroid(nline,''SPHEROID["GRS_1980", 6378137, 298.257222101]''); >> RETURN ARRAY[X(bestp), Y(bestp), offset]; >>END; >>' LANGUAGE plpgsql; >> >>-- here are some test calls to the function >> >>select x_y_offset_from_line_pnt(GeomFromText('LINESTRING(0 0,1 0)',-1), GeomFromText('POINT(0.5 0.1)', -1)); >> >>select x_y_offset_from_line_pnt(GeomFromText('LINESTRING(0 0,0.1 0,0.3 .1,.4 .15,.6 .2)',-1), GeomFromText('POINT(0.5 0.1)', -1)); >> >>select link_id, the_geom, min(distance(the_geom, GeomFromText('POINT(-71.38900904888 42.619402684661)', -1))) as dist >> from >> rgeo >> where >> expand(GeomFromText('POINT(-71.38900904888 42.619402684661)', -1), 0.0013) && >> the_geom >> group by the_geom order by dist limit 1; >> >>select (x_y_offset_from_line_pnt( >> (select the_geom from rgeo where link_id=$segment_id), >> GeomFromText('POINT(-71.38900904888 42.619402684661)', -1)) >> )[3] as offset; > > >>_______________________________________________ >>postgis-users mailing list >>postgis-users at postgis.refractions.net >>http://postgis.refractions.net/mailman/listinfo/postgis-users > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From jeff at propertykey.com Sun Jul 3 13:59:21 2005 From: jeff at propertykey.com (Jeff Hoffmann) Date: Sun, 03 Jul 2005 15:59:21 -0500 Subject: [postgis-users] Status of geocoding functions in PostGIS? In-Reply-To: <20050703185002.60822.qmail@web61017.mail.yahoo.com> References: <20050703185002.60822.qmail@web61017.mail.yahoo.com> Message-ID: <42C851A9.6040001@propertykey.com> Alex Smith wrote: > Did some searching of the archives and found this article stating that a > geocoder for PostGIS is in the works (see > http://postgis.refractions.net/pipermail/postgis-users/2004-September/005762.html). > Just wondering the status of this project and if there is a time line > for the release dates. I don't know the status of this project, but here's a quick and dirty alternative in the meantime: - install the perl module "Geo::Coder::US" (either through CPAN or at http://geocoder.us) & create a geocoder database from TIGER - create language plperlu in the database you want the geocoder function - create the following function, replacing "/path/to/geocoder.db" with the location of the geocoder database you created from TIGER CREATE OR REPLACE FUNCTION geocode(text) returns geometry as ' use Geo::Coder::US; Geo::Coder::US->set_db("/path/to/geocoder.db"); my @res = Geo::Coder::US->geocode($_[0]); return "SRID=4269;POINT(".$res[0]->{''long''}. " ".$res[0]->{''lat''}.")"; ' LANGUAGE plperlu IMMUTABLE; Error checking (and all the rest of the fun stuff) is left as an exercise for the reader. That should be enough to get you started, though. -- Jeff Hoffmann jeff at propertykey.com From nicky666 at gmail.com Sun Jul 3 14:39:31 2005 From: nicky666 at gmail.com (Nicolas Ribot) Date: Sun, 3 Jul 2005 23:39:31 +0200 Subject: [postgis-users] architectural status of shp2pgsql? In-Reply-To: <20050703183538.58594.qmail@web61017.mail.yahoo.com> References: <20050703173821.GB12621@keybit.net> <20050703183538.58594.qmail@web61017.mail.yahoo.com> Message-ID: <28de5e31050703143927b02591@mail.gmail.com> > Ironically, it looks very, very similar to the data contained in "SELECT > spatial_ref_sys.srtext FROM spatial_ref_sys WHERE spatial_ref_sys.SRID = > 4269;" which is below: > > ESRI projection file format (.prj) conforms to the OGC simple features specifications for SQL, Well Known Text Representation for Spatial Reference Systems. So a parser should be able to read prj data and to insert them into the spatial_ref_sys table Nicolas From strk at refractions.net Mon Jul 4 00:49:03 2005 From: strk at refractions.net (strk at refractions.net) Date: Mon, 4 Jul 2005 09:49:03 +0200 Subject: [postgis-users] architectural status of shp2pgsql? In-Reply-To: <28de5e31050703143927b02591@mail.gmail.com> References: <20050703173821.GB12621@keybit.net> <20050703183538.58594.qmail@web61017.mail.yahoo.com> <28de5e31050703143927b02591@mail.gmail.com> Message-ID: <20050704074903.GA12971@keybit.net> On Sun, Jul 03, 2005 at 11:39:31PM +0200, Nicolas Ribot wrote: > > Ironically, it looks very, very similar to the data contained in "SELECT > > spatial_ref_sys.srtext FROM spatial_ref_sys WHERE spatial_ref_sys.SRID = > > 4269;" which is below: > > > > > ESRI projection file format (.prj) conforms to the OGC simple features > specifications for SQL, Well Known Text Representation for Spatial > Reference Systems. So a parser should be able to read prj data and to > insert them into the spatial_ref_sys table Postgis won't use WKT for reprojections, but proj4 strings. So insert strategy will need to know how to make the latter from the former. --strk; From carlosfgo at gmail.com Mon Jul 4 11:49:18 2005 From: carlosfgo at gmail.com (=?ISO-8859-1?Q?Carlos_Gon=E7alves?=) Date: Mon, 4 Jul 2005 15:49:18 -0300 Subject: [postgis-users] UTM/Datum SAD 69 to UTM/Datum WGS84??? Message-ID: Hi all. As it is that I make in the POSTGIS, to change a projection UTM and Datum SAD 69. Zone 23 (south -), for the projection UTM and Datum WGS84? Help me. Thank you. -- ------------------------------------------------------------------------------- Carlos F. Gon?alves "E n?o h? salva??o em nenhum outro; porque abaixo do c?u n?o existe nenhum outro nome, dado entre os homens, pelo qual importa que sejamos salvos"(Atos 4:12) JESUS CRISTO Center for Metropolitan Studies (Centro de Estudos da Metropole). Know the Metropolitan Region of S?o Paulo (Conhe?a a Regi?o Metropolitana de S?o Paulo). http://www.mapas.centrodametropole.org.br/servidormapas/html/index.html For the good operation of this application, it is necessary to have installed in yours computer the plug-in Adobe SVG Viewer (Para o bom funcionamento deste aplicativo, ? necess?rio ter instalado em seu computador o plug-in Adobe SVG Viewer). Portugu?s: http://download.adobe.com/pub/adobe/magic/svgviewer/win/3.x/3.02/pt/SVGView.exe http://www.adobe.com/svg/viewer/install/main.html ------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From dev at samizdatdigital.org Mon Jul 4 12:00:21 2005 From: dev at samizdatdigital.org (gold) Date: Mon, 04 Jul 2005 12:00:21 -0700 Subject: [postgis-users] why are date fields returned as FTInteger? Message-ID: <42C98745.8070503@samizdatdigital.org> the docs for shapelib state that dates can't be handled. from DBFGetFieldInfo() : For instance the xBase field type for Date will just be returned as being FTInteger and DBFAddField() : Note that some valid xBase field types cannot be created such as date fields why is that? is it due to the fact that there's just no clear mapping, or is there some other reason that dates are not chosen to be handled. also, to make sure i understand, when shp2pgsql encounters a date column, it silently converts it to varchar(8) and writes the date string to that column. i'm working off the cvs head. jon From nicky666 at gmail.com Mon Jul 4 14:50:06 2005 From: nicky666 at gmail.com (Nicolas Ribot) Date: Mon, 4 Jul 2005 23:50:06 +0200 Subject: [postgis-users] UTM/Datum SAD 69 to UTM/Datum WGS84??? In-Reply-To: References: Message-ID: <28de5e3105070414501c4370bf@mail.gmail.com> > Hi all. > As it is that I make in the POSTGIS, to change a projection UTM and Datum > SAD 69. Zone 23 (south -), for the projection UTM and Datum WGS84? > > Help me. > Thank you. > Hello Carlos. First identify the SRID corresponding to the target projection (UTM 23 on Datum WGS84) (32723 for me for postgis 1.0, but check your SRID). Then, use the transform() function to reproject your data in the new Spatial Reference System: select transform(geometry, target_srid) from your_table; Nicolas From postgis at livniconsulting.com Mon Jul 4 17:04:47 2005 From: postgis at livniconsulting.com (Josh Livni) Date: Mon, 4 Jul 2005 17:04:47 -0700 Subject: [postgis-users] Error: different SRIDS Message-ID: <20050705000418.73A422C0087@netnation.refractions.net> Hi. I have a large set of parcels I want to query. They are in NAD83 UTM Zone 10, which I have in the db as EPSG 26910. Part of my query will include a knowing a rectangular extent that is a relatively small section of the overall extent of the parcels. If I add a clause as follows: where the_geom && 'POLYGON((561648 5288731, 561648 5289731, 571648 5289731, 571648 5288731, 561648 5288731))'; I get ERROR: Operation on two geometries with different SRIDs Interestingly, if I change the polygon to be something like (0 0 ,20 0, 20 20, 0 20, 0 0) I get no error (but no results since that's nowhere near me) If I select astext(the_geom) from parcels where lastname ilike 'josh%' I get a bunch of parcels, and it seems clear from their dimensions that some should align nicely within the above example rectangle. I tried to force the polygon with a setsrid(polygon, 26910) but I got: ERROR: function setsrid("unknown", integer) is not unique There's probably some simple syntactical thing I'm missing -- any help appreciated. -Josh From strk at refractions.net Mon Jul 4 17:09:12 2005 From: strk at refractions.net (strk at refractions.net) Date: Tue, 5 Jul 2005 02:09:12 +0200 Subject: [postgis-users] Error: different SRIDS In-Reply-To: <20050705000418.73A422C0087@netnation.refractions.net> References: <20050705000418.73A422C0087@netnation.refractions.net> Message-ID: <20050705000912.GA25274@keybit.net> Use the SRID=#; prefix to your POLYGON text. --strk; On Mon, Jul 04, 2005 at 05:04:47PM -0700, Josh Livni wrote: > > > > Hi. > > I have a large set of parcels I want to query. They are in NAD83 UTM Zone > 10, which I have in the db as EPSG 26910. > > Part of my query will include a knowing a rectangular extent that is a > relatively small section of the overall extent of the parcels. > > If I add a clause as follows: > where the_geom && 'POLYGON((561648 5288731, 561648 5289731, 571648 5289731, > 571648 5288731, 561648 5288731))'; I get ERROR: Operation on two geometries > with different SRIDs > > Interestingly, if I change the polygon to be something like (0 0 ,20 0, 20 > 20, 0 20, 0 0) I get no error (but no results since that's nowhere near me) > > If I select astext(the_geom) from parcels where lastname ilike 'josh%' I get > a bunch of parcels, and it seems clear from their dimensions that some > should align nicely within the above example rectangle. > > I tried to force the polygon with a setsrid(polygon, 26910) but I got: > ERROR: function setsrid("unknown", integer) is not unique > > There's probably some simple syntactical thing I'm missing -- any help > appreciated. > > -Josh > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From richard.greenwood at gmail.com Mon Jul 4 20:21:14 2005 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Tue, 5 Jul 2005 03:21:14 +0000 (UTC) Subject: [postgis-users] Re: load mapinfo to postgres References: <20050703102731.p9w1rq88748k8wcw@engin.mail.umich.edu> Message-ID: Herman Teo umich.edu> writes: > > Hi. > I'm new to this mapserver model. I have a lot of mapinfo .tab files that I want > to load into the postgis database. Is there a well documented tutorial on how > to perform ogr2ogr from mapinfo .tab to postgis dbase? > Thanks a lot. > > Herman > Try something like: ogr2ogr -f postgresql PG:dbname=your_db_name your_tab_file.TAB Rich Greenwood From r.mueller at unicomp-berlin.de Mon Jul 4 23:55:12 2005 From: r.mueller at unicomp-berlin.de (=?ISO-8859-1?Q?=22R=2E_M=FCller=22?=) Date: Tue, 05 Jul 2005 08:55:12 +0200 Subject: [postgis-users] Error: different SRIDS In-Reply-To: <20050705000418.73A422C0087@netnation.refractions.net> References: <20050705000418.73A422C0087@netnation.refractions.net> Message-ID: <42CA2ED0.40704@unicomp-berlin.de> Hallo Josh, you can also use the GEOMFROMTEXT-function to get a geometry from your polygon. There you have to explicitly pass a SRID as second argument. The other polygon you mentioned, is the geometry-implementation postgresql. But that won't work with postgis. ronald Josh Livni wrote: > > > > Hi. > > I have a large set of parcels I want to query. They are in NAD83 UTM Zone > 10, which I have in the db as EPSG 26910. > > Part of my query will include a knowing a rectangular extent that is a > relatively small section of the overall extent of the parcels. > > If I add a clause as follows: > where the_geom && 'POLYGON((561648 5288731, 561648 5289731, 571648 5289731, > 571648 5288731, 561648 5288731))'; I get ERROR: Operation on two geometries > with different SRIDs > > Interestingly, if I change the polygon to be something like (0 0 ,20 0, 20 > 20, 0 20, 0 0) I get no error (but no results since that's nowhere near me) > > If I select astext(the_geom) from parcels where lastname ilike 'josh%' I get > a bunch of parcels, and it seems clear from their dimensions that some > should align nicely within the above example rectangle. > > I tried to force the polygon with a setsrid(polygon, 26910) but I got: > ERROR: function setsrid("unknown", integer) is not unique > > There's probably some simple syntactical thing I'm missing -- any help > appreciated. > > -Josh > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- From e.d.lorimer at sms.ed.ac.uk Tue Jul 5 03:23:40 2005 From: e.d.lorimer at sms.ed.ac.uk (Eli Dylan Lorimer) Date: Tue, 5 Jul 2005 11:23:40 +0100 Subject: [postgis-users] Spatial Index questino Message-ID: <0535D7EA-751E-40DB-9F92-AE01A4CEB3B8@sms.ed.ac.uk> Hi PostGIS folks, I have a postGIS db that I am using to store waypoints. I haven't implemented any spatial indexes however I think by doing so I may speed up my queries. They types of queries that I am mostly making involve where clauses that specify a spatial bounding box (so where myPoint < maxPoint && myPoint>minPoint) and a date range (so where timestamp > minTimestamp and timeStamp < maxTimestamp). Firstly, would I benefit from a spatial index? And if so, can I make a multi-variate index so that my Point column in the db is indexed as well as my timestamp column? Cheers, ./dylan From strk at refractions.net Tue Jul 5 04:18:40 2005 From: strk at refractions.net (strk at refractions.net) Date: Tue, 5 Jul 2005 13:18:40 +0200 Subject: [postgis-users] Spatial Index questino In-Reply-To: <0535D7EA-751E-40DB-9F92-AE01A4CEB3B8@sms.ed.ac.uk> References: <0535D7EA-751E-40DB-9F92-AE01A4CEB3B8@sms.ed.ac.uk> Message-ID: <20050705111840.GB29734@keybit.net> On Tue, Jul 05, 2005 at 11:23:40AM +0100, Eli Dylan Lorimer wrote: > Hi PostGIS folks, > > I have a postGIS db that I am using to store waypoints. I haven't > implemented any spatial indexes however I think by doing so I may > speed up my queries. > They types of queries that I am mostly making involve where clauses > that specify a spatial bounding box (so where myPoint < maxPoint && > myPoint>minPoint) and a date range (so where timestamp > minTimestamp > and timeStamp < maxTimestamp). > > Firstly, would I benefit from a spatial index? And if so, can I make > a multi-variate index so that my Point column in the db is indexed as > well as my timestamp column? All depends on how selective is your time selection and how is your spatial bbox one. Create a spatial index and check it out with explain analyze select ... Note that the < and > operators will not use the GiST spatial index, but just a btree index which would be slow. You're probably looking for << and >> instead. --strk; From dono78fr at yahoo.fr Tue Jul 5 05:46:22 2005 From: dono78fr at yahoo.fr (Levert Donovan) Date: Tue, 5 Jul 2005 14:46:22 +0200 (CEST) Subject: [postgis-users] Conversion WGS84 to Lambert II Message-ID: <20050705124622.91417.qmail@web26008.mail.ukl.yahoo.com> Hello, I have GPS coordinates and I would like to INSERT this coordinates to Postgis Database, but I don't know how can I transform the coordinates wgs84 to Lambert II 27582. These are the coordinates in WGS84 LATITUDE LONGITUDE N4902.4761 E00201.7400 I would like to have coordinates in order to create an sql Insert INSERT INTO "popplace" ("id","the_geom") VALUES ('1',GeometryFromText('POINT (xxxx yyyy)',27582)); Best regards, LEVERT Donovan. ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger T?l?chargez cette version sur http://fr.messenger.yahoo.com From pramsey at refractions.net Tue Jul 5 07:18:23 2005 From: pramsey at refractions.net (Paul Ramsey) Date: Tue, 05 Jul 2005 07:18:23 -0700 Subject: [postgis-users] PostGIS 1.0.2 Message-ID: PostGIS 1.0.2 and sister GEOS 2.1.3 are on the streets. The PostGIS version includes some minor bug fixes and the addition of support for the upcoming PostgreSQL 8.1 (currently only available from CVS). The GEOS version includes a number of performance improvements and a couple of crushed segfault bugs. Paul From davidtecher at yahoo.fr Tue Jul 5 08:03:10 2005 From: davidtecher at yahoo.fr (Jean David TECHER) Date: Tue, 5 Jul 2005 17:03:10 +0200 Subject: [postgis-users] PostGIS 1.0.2 References: Message-ID: <004701c58172$a915a4f0$117fa8c0@jenna> Hi Paul PostGIS 1.0.2 and Geos 2.1.3 and proj 4.4.9 were built fines with pg 8.0.3 on windows :-) I think Marc could do his installer when he is ready :-) I will update my docs for French users when I haveenough times... I will wait for 1.1.0 :-) --------------------------------------------------------------- TECHER Jean David 01MAP e-mail: david at 01map.net T?l: 04 67 45 60 27 Entreprise: http://www.01map.net Perso: http://techer.pascal.free.fr/postgis/ --------------------------------------------------------------- ----- Original Message ----- From: Paul Ramsey To: PostGIS Users Discussion Sent: Tuesday, July 05, 2005 4:18 PM Subject: [postgis-users] PostGIS 1.0.2 PostGIS 1.0.2 and sister GEOS 2.1.3 are on the streets. The PostGIS version includes some minor bug fixes and the addition of support for the upcoming PostgreSQL 8.1 (currently only available from CVS). The GEOS version includes a number of performance improvements and a couple of crushed segfault bugs. Paul _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicky666 at gmail.com Tue Jul 5 09:32:16 2005 From: nicky666 at gmail.com (Nicolas Ribot) Date: Tue, 5 Jul 2005 18:32:16 +0200 Subject: [postgis-users] Conversion WGS84 to Lambert II In-Reply-To: <20050705124622.91417.qmail@web26008.mail.ukl.yahoo.com> References: <20050705124622.91417.qmail@web26008.mail.ukl.yahoo.com> Message-ID: <28de5e3105070509321705b609@mail.gmail.com> > Hello, > I have GPS coordinates and I would like to INSERT this > coordinates to Postgis Database, but I don't know how > can I transform the coordinates wgs84 to Lambert II > 27582. > > These are the coordinates in WGS84 > LATITUDE LONGITUDE > N4902.4761 E00201.7400 > > I would like to have coordinates in order to create an > sql Insert > INSERT INTO "popplace" ("id","the_geom") VALUES > ('1',GeometryFromText('POINT (xxxx yyyy)',27582)); > > Best regards, > LEVERT Donovan. > Hi donovan, you can use the transform() function to reproject your data on-the-fly when inserting them. Something like: INSERT INTO "popplace" ("id","the_geom") VALUES ( '1', transform(GeometryFromText('POINT (2.017400 49.024761)', 4326), 27582) ); Check the corresponding SRID for WGS84 (on my postgis version, its 4326). (I assumed that your given lat long coordinates should be read in decimal degrees) Nicolas From carlosfgo at gmail.com Tue Jul 5 12:40:26 2005 From: carlosfgo at gmail.com (=?ISO-8859-1?Q?Carlos_Gon=E7alves?=) Date: Tue, 5 Jul 2005 16:40:26 -0300 Subject: [postgis-users] UTM/Datum SAD 69 to UTM/Datum WGS84??? In-Reply-To: <28de5e3105070414501c4370bf@mail.gmail.com> References: <28de5e3105070414501c4370bf@mail.gmail.com> Message-ID: Hi Nicolas. Thank you. Very good. My problem now is that I am receiving the following message: SELECT Transform(the_geom,32723) FROM tb_my; ERROR: Input geometry has unknown (-1) SRID Observing the table geometry_columns, the field srid=-1 Help me. On 7/4/05, Nicolas Ribot wrote: > > > Hi all. > > As it is that I make in the POSTGIS, to change a projection UTM and > Datum > > SAD 69. Zone 23 (south -), for the projection UTM and Datum WGS84? > > > > Help me. > > Thank you. > > > > Hello Carlos. > First identify the SRID corresponding to the target projection (UTM 23 > on Datum WGS84) (32723 for me for postgis 1.0, but check your SRID). > Then, use the transform() function to reproject your data in the new > Spatial Reference System: > > select transform(geometry, target_srid) from your_table; > > Nicolas > -- ------------------------------------------------------------------------------- Carlos F. Gon?alves "E n?o h? salva??o em nenhum outro; porque abaixo do c?u n?o existe nenhum outro nome, dado entre os homens, pelo qual importa que sejamos salvos"(Atos 4:12) JESUS CRISTO Center for Metropolitan Studies (Centro de Estudos da Metropole). Know the Metropolitan Region of S?o Paulo (Conhe?a a Regi?o Metropolitana de S?o Paulo). http://www.mapas.centrodametropole.org.br/servidormapas/html/index.html For the good operation of this application, it is necessary to have installed in yours computer the plug-in Adobe SVG Viewer (Para o bom funcionamento deste aplicativo, ? necess?rio ter instalado em seu computador o plug-in Adobe SVG Viewer). Portugu?s: http://download.adobe.com/pub/adobe/magic/svgviewer/win/3.x/3.02/pt/SVGView.exe http://www.adobe.com/svg/viewer/install/main.html ------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From niccolo at rigacci.org Tue Jul 5 13:52:14 2005 From: niccolo at rigacci.org (Niccolo Rigacci) Date: Tue, 5 Jul 2005 22:52:14 +0200 Subject: [postgis-users] Using VIEW with MapServer is very slow Message-ID: <20050705205214.GA4586@rigacci.org> Hi to all. I'm at my first experiences with PostGIS, Mapserver and QGIS. I had some trouble using a VIEW as a data source for MapServer or QGIS; empirically I discovered that I had to include an OID field into the VIEW to have it working. I also added a record to geometry_columns by hand (with an INSERT) instead of AddGeometryColumn(): CREATE VIEW wpt_comuni AS SELECT istat_wpt.oid, istat_wpt.id, istat_wpt.toponimo, residenti, wpt FROM istat_comuni JOIN istat_comuni2wpt USING (idprovincia, idcomune) JOIN istat_wpt ON (idwpt = id); INSERT INTO geometry_columns VALUES('', 'public', 'wpt_comuni', 'wpt', 2, 4326, 'POINT'); Please, can someone confirm that this make sense? But the real problem is that the query on the VIEW is very slow! Using debug from Postgres I see that the query is: BEGIN; DECLARE mycursor BINARY CURSOR FOR SELECT toponimo::text, asbinary(force_collection(force_2d(wpt)),'NDR'), OID::text FROM wpt_comuni WHERE (residenti > 20000) AND ( wpt && setSRID('BOX3D(4.83 36,20.16 47.5)'::BOX3D, find_srid('','wpt_comuni','wpt')) ); FETCH ALL IN mycursor; The query is extremely slow from the command line too (2 min). But if I do only the SELECT (without using the CURSOR), the answer is near immediate. The CURSOR is executed immediately instead if I omit the AND clause (the overlap check between points and the BOX3D). Should I have to create some INDEXes? Are VIEWs not suitables for MapServer? Any hints will be apreciated! -- Niccolo Rigacci Firenze - Italy War against Iraq? Not in my name! From gsw at globexplorer.com Tue Jul 5 14:01:14 2005 From: gsw at globexplorer.com (Gregory S. Williamson) Date: Tue, 5 Jul 2005 14:01:14 -0700 Subject: [postgis-users] Using VIEW with MapServer is very slow Message-ID: <71E37EF6B7DCC1499CEA0316A256832801D4C570@loki.wc.globexplorer.net> Niccolo -- Try running postgres' EXPLAIN ANALYZE command on your sql (typically from the psql tool or some other interface) EXPLAIN ANALYZE SELECT toponimo::text, asbinary(force_collection(force_2d(wpt)),'NDR'), OID::text FROM wpt_comuni WHERE (residenti > 20000) AND ( wpt && setSRID('BOX3D(4.83 36,20.16 47.5)'::BOX3D, find_srid('','wpt_comuni','wpt')) ); And post the results, along with a description of the tables and indexes involved, and the postgres version. Details on RAM, disk, OS and some settings from the psql config file (sort memory, and the like) might be useful. Also, have you run VACUUM ANALYZE recently on the tables in question? (With recent releases of PostGIS I think this does the geometry stats as well; earlier releases you need to explicitly run the update_geometry_stats(table_name,column_name); to make decent statistics for the analyzer.) Greg Williamson DBA GlobeXplorer LLC -----Original Message----- From: postgis-users-bounces at postgis.refractions.net on behalf of Niccolo Rigacci Sent: Tue 7/5/2005 1:52 PM To: postgis-users at postgis.refractions.net Cc: Subject: [postgis-users] Using VIEW with MapServer is very slow Hi to all. I'm at my first experiences with PostGIS, Mapserver and QGIS. I had some trouble using a VIEW as a data source for MapServer or QGIS; empirically I discovered that I had to include an OID field into the VIEW to have it working. I also added a record to geometry_columns by hand (with an INSERT) instead of AddGeometryColumn(): CREATE VIEW wpt_comuni AS SELECT istat_wpt.oid, istat_wpt.id, istat_wpt.toponimo, residenti, wpt FROM istat_comuni JOIN istat_comuni2wpt USING (idprovincia, idcomune) JOIN istat_wpt ON (idwpt = id); INSERT INTO geometry_columns VALUES('', 'public', 'wpt_comuni', 'wpt', 2, 4326, 'POINT'); Please, can someone confirm that this make sense? But the real problem is that the query on the VIEW is very slow! Using debug from Postgres I see that the query is: BEGIN; DECLARE mycursor BINARY CURSOR FOR SELECT toponimo::text, asbinary(force_collection(force_2d(wpt)),'NDR'), OID::text FROM wpt_comuni WHERE (residenti > 20000) AND ( wpt && setSRID('BOX3D(4.83 36,20.16 47.5)'::BOX3D, find_srid('','wpt_comuni','wpt')) ); FETCH ALL IN mycursor; The query is extremely slow from the command line too (2 min). But if I do only the SELECT (without using the CURSOR), the answer is near immediate. The CURSOR is executed immediately instead if I omit the AND clause (the overlap check between points and the BOX3D). Should I have to create some INDEXes? Are VIEWs not suitables for MapServer? Any hints will be apreciated! -- Niccolo Rigacci Firenze - Italy War against Iraq? Not in my name! _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users !DSPAM:42caf312317241542719194! From nicky666 at gmail.com Tue Jul 5 16:40:46 2005 From: nicky666 at gmail.com (Nicolas Ribot) Date: Wed, 6 Jul 2005 01:40:46 +0200 Subject: [postgis-users] UTM/Datum SAD 69 to UTM/Datum WGS84??? In-Reply-To: References: <28de5e3105070414501c4370bf@mail.gmail.com> Message-ID: <28de5e3105070516407cda4803@mail.gmail.com> > Hi Nicolas. > Thank you. > Very good. > My problem now is that I am receiving the following message: > SELECT Transform(the_geom,32723) FROM tb_my; > ERROR: Input geometry has unknown (-1) SRID > Observing the table geometry_columns, the field srid=-1 > Help me. > > (hmm, my answer will look exactly like the one I sent to Mark on June, 29th...) So, geometries in your table tb_my have no SRID (-1). You have to explicity set an SRID for these data: First change the SRID in the postgis metadata (geometry_columns table): select updateGeometrySRID('tb_my', 'the_geom', ); Second, use setSRID() to change internal geometries' SRID in the geometric table: select setSRID(the_geom, ) from tb_my. Then you should be able to reproject data from tb_my to another spatial reference system using transform(...). Nicolas From strk at refractions.net Wed Jul 6 00:22:04 2005 From: strk at refractions.net (strk at refractions.net) Date: Wed, 6 Jul 2005 09:22:04 +0200 Subject: [postgis-users] UTM/Datum SAD 69 to UTM/Datum WGS84??? In-Reply-To: <28de5e3105070516407cda4803@mail.gmail.com> References: <28de5e3105070414501c4370bf@mail.gmail.com> <28de5e3105070516407cda4803@mail.gmail.com> Message-ID: <20050706072204.GA38786@keybit.net> On Wed, Jul 06, 2005 at 01:40:46AM +0200, Nicolas Ribot wrote: > > Hi Nicolas. > > Thank you. > > Very good. > > My problem now is that I am receiving the following message: > > SELECT Transform(the_geom,32723) FROM tb_my; > > ERROR: Input geometry has unknown (-1) SRID > > Observing the table geometry_columns, the field srid=-1 > > Help me. > > > > > > (hmm, my answer will look exactly like the one I sent to Mark on June, 29th...) > > So, geometries in your table tb_my have no SRID (-1). > You have to explicity set an SRID for these data: > > First change the SRID in the postgis metadata > (geometry_columns table): > > select updateGeometrySRID('tb_my', 'the_geom', ); This is enough, the setSRID() call below is not needed. --strk; > > Second, use setSRID() to change internal geometries' SRID in the > geometric table: > > select setSRID(the_geom, ) from tb_my. > > Then you should be able to reproject data from tb_my to another > spatial reference system using transform(...). > > Nicolas > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From m.cave-ayland at webbased.co.uk Wed Jul 6 03:23:56 2005 From: m.cave-ayland at webbased.co.uk (Mark Cave-Ayland) Date: Wed, 6 Jul 2005 11:23:56 +0100 Subject: [postgis-users] Win32 Installer for Postgis 1.0.2 now available Message-ID: <9EB50F1A91413F4FA63019487FCD251D113436@WEBBASEDDC.webbasedltd.local> Hi everyone, I've just updated the Win32 installer to PostGIS 1.0.2, complete with GEOS 2.1.3 and PROJ 4.4.9. Head over to the usual http://www.webbased.co.uk/mca/ to download both the installer and the source. Kind regards, Mark. ------------------------ WebBased Ltd 17 Research Way Tamar Science Park Plymouth PL6 8BT T: +44 (0)1752 797131 F: +44 (0)1752 791023 W: http://www.webbased.co.uk From davidtecher at yahoo.fr Wed Jul 6 06:53:02 2005 From: davidtecher at yahoo.fr (Jean David TECHER) Date: Wed, 6 Jul 2005 15:53:02 +0200 Subject: [postgis-users] Ebuild Gentoo For Geos 2.1.3 and PostGIS 1.0.2...coming soon Message-ID: <007201c58232$0766cb00$117fa8c0@jenna> Hi Sandro Gerald (Djay) is back ! He --if we have enough free times - will do the ebuilds (perhaps rpm !) fo Geos 2.1.3 and PostGIS 1.0.2 before the end of this week. We should go on testing for futures CVS version ...until 1.1.0 Thanks Marc for your win32 installer :-) --------------------------------------------------------------- TECHER Jean David 01MAP e-mail: david at 01map.net T?l: 04 67 45 60 27 Entreprise: http://www.01map.net Perso: http://techer.pascal.free.fr/postgis/ --------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From chip_masters at yahoo.com Wed Jul 6 12:31:21 2005 From: chip_masters at yahoo.com (Chip Masters) Date: Wed, 6 Jul 2005 12:31:21 -0700 (PDT) Subject: [geos-devel] Re: [postgis-users] Error compiling PostGIS + GEOS In-Reply-To: <20050621230440.GQ82130@keybit.net> Message-ID: <20050706193121.86222.qmail@web41128.mail.yahoo.com> GEOS and PostGIS users, Since I last posted on this thread about my installation problems, we upgraded our OS to SuSE 9.2 with the 2.6.8-24.16-default kernel. Also, for the record, we are using gcc version 3.3.4. Now after installing PostgreSQL 8.0.3, PostGIS 1.0.1 with the flags set in Makefile.config to include PROJ and GEOS: > USE_PROJ ?= 1 > PROJ_DIR ?= /usr/local > > USE_GEOS ?= 1 > GEOS_DIR ?= /usr/local I try to do > psql -f lwpostgis.sql -d test from within the postgis-1.0.1 install directory, and I get this error: > psql:lwpostgis.sql:36: ERROR: could not load library > "/scratch/pgsql/lib/liblwgeom.so.1.0": libgeos.so.2: > cannot open shared object file: No such file or > directory I notice that the liblwgeom.so.1.0 library doesn't link to the geos or proj libraries: > postgres at cyc11:~/lib> ldd liblwgeom.so.1.0 > linux-gate.so.1 => (0xffffe000) > libstdc++.so.5 => /usr/lib/libstdc++.so.5 > (0x40067000) > libgeos.so.2 => not found > libproj.so.0 => not found > libgcc_s.so.1 => /lib/libgcc_s.so.1 > (0x40125000) > libc.so.6 => /lib/tls/libc.so.6 (0x4012d000) > libm.so.6 => /lib/tls/libm.so.6 (0x40243000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 > (0x80000000) even though both libgeos.so.2 and libproj.so.0 are present in /usr/local/lib. Can anyone help here? Should the PROJ_DIR and GEOS_DIR variables in the Makefile.config point to /usr/local/lib instead of /usr/local? Thanks, Chip Masters --- strk at refractions.net wrote: > On Tue, Jun 21, 2005 at 03:45:51PM -0700, Chip > Masters wrote: > > We did compile GEOS (PostgreSQL and PostGIS as > well) > > with GCC 3.4.3. > > Are you sure you don't have old c++ headers around ? > Can you seek that __builtin_new symbol in system > headers ? > > --strk; > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From chip_masters at yahoo.com Wed Jul 6 12:47:29 2005 From: chip_masters at yahoo.com (Chip Masters) Date: Wed, 6 Jul 2005 12:47:29 -0700 (PDT) Subject: [geos-devel] Re: [postgis-users] Error compiling PostGIS + GEOS In-Reply-To: <20050706193121.86222.qmail@web41128.mail.yahoo.com> Message-ID: <20050706194729.81357.qmail@web41112.mail.yahoo.com> Here's a response from our sys admin who actually did the install: > Date: Wed, 06 Jul 2005 14:38:54 -0500 > From: "Charles Smith" > To: "Chip Masters" > Subject: Re: [geos-devel] Re: [postgis-users] Error > compiling PostGIS + GEOS > > Chip Masters wrote: > >GEOS and PostGIS users, > > > >...... > > Also, for the record, there were no errors or > warnings building any of those things, after solving > all the dependencies and going back to gcc 3.3.4 (the > default that ships with 9.2). When I tried to build > it with 3.4.3, I couldn't even begin the compile. But > after that it went without a hitch. > > -Charles Chip --- Chip Masters wrote: > GEOS and PostGIS users, > > Since I last posted on this thread about my > installation problems, we upgraded our OS to SuSE > 9.2 > with the 2.6.8-24.16-default kernel. Also, for the > record, we are using gcc version 3.3.4. > > Now after installing PostgreSQL 8.0.3, PostGIS 1.0.1 > with the flags set in Makefile.config to include > PROJ > and GEOS: > > > USE_PROJ ?= 1 > > PROJ_DIR ?= /usr/local > > > > USE_GEOS ?= 1 > > GEOS_DIR ?= /usr/local > > I try to do > > > psql -f lwpostgis.sql -d test > > from within the postgis-1.0.1 install directory, and > I > get this error: > > > psql:lwpostgis.sql:36: ERROR: could not load > library > "/scratch/pgsql/lib/liblwgeom.so.1.0": > libgeos.so.2: > cannot open shared object file: No > such file or > > directory > > I notice that the liblwgeom.so.1.0 library doesn't > link to the geos or proj libraries: > > > postgres at cyc11:~/lib> ldd liblwgeom.so.1.0 > > linux-gate.so.1 => (0xffffe000) > > libstdc++.so.5 => /usr/lib/libstdc++.so.5 > > (0x40067000) > > libgeos.so.2 => not found > > libproj.so.0 => not found > > libgcc_s.so.1 => /lib/libgcc_s.so.1 > > (0x40125000) > > libc.so.6 => /lib/tls/libc.so.6 > (0x4012d000) > > libm.so.6 => /lib/tls/libm.so.6 > (0x40243000) > > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 > > (0x80000000) > > even though both libgeos.so.2 and libproj.so.0 are > present in /usr/local/lib. > > Can anyone help here? Should the PROJ_DIR and > GEOS_DIR > variables in the Makefile.config point to > /usr/local/lib instead of /usr/local? > > Thanks, > > Chip Masters > > --- strk at refractions.net wrote: > > > On Tue, Jun 21, 2005 at 03:45:51PM -0700, Chip > > Masters wrote: > > > We did compile GEOS (PostgreSQL and PostGIS as > > well) > > > with GCC 3.4.3. > > > > Are you sure you don't have old c++ headers around > ? > > Can you seek that __builtin_new symbol in system > > headers ? > > > > --strk; > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > > > > > ____________________________________________________ > Sell on Yahoo! Auctions ? no fees. Bid on great > items. > http://auctions.yahoo.com/ > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From Doug_Newcomb at fws.gov Wed Jul 6 12:44:19 2005 From: Doug_Newcomb at fws.gov (Doug_Newcomb at fws.gov) Date: Wed, 6 Jul 2005 15:44:19 -0400 Subject: [geos-devel] Re: [postgis-users] Error compiling PostGIS + GEOS In-Reply-To: <20050706193121.86222.qmail@web41128.mail.yahoo.com> Message-ID: Chip, Is selinux enabled on your system? When compiling on a fedora core 3 box, I had to temporarily disable selinux before using the ldconfig command to add the geos libraries to the libary path, even though they were in /usr/local/lib . Doug Doug Newcomb USFWS Raleigh, NC 919-856-4520 ext. 14 doug_newcomb at fws.gov --------------------------------------------------------------------------------------------------------- The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of Interior. I left my signature file in /dev/null Chip Masters To Sent by: PostGIS Users Discussion postgis-users-bou , GEOS Development List actions.net cc chip at cyc.com, charon at cyc.com 07/06/2005 03:31 Subject PM Re: [geos-devel] Re: [postgis-users] Error compiling PostGIS + GEOS Please respond to PostGIS Users Discussion GEOS and PostGIS users, Since I last posted on this thread about my installation problems, we upgraded our OS to SuSE 9.2 with the 2.6.8-24.16-default kernel. Also, for the record, we are using gcc version 3.3.4. Now after installing PostgreSQL 8.0.3, PostGIS 1.0.1 with the flags set in Makefile.config to include PROJ and GEOS: > USE_PROJ ?= 1 > PROJ_DIR ?= /usr/local > > USE_GEOS ?= 1 > GEOS_DIR ?= /usr/local I try to do > psql -f lwpostgis.sql -d test from within the postgis-1.0.1 install directory, and I get this error: > psql:lwpostgis.sql:36: ERROR: could not load library > "/scratch/pgsql/lib/liblwgeom.so.1.0": libgeos.so.2: > cannot open shared object file: No such file or > directory I notice that the liblwgeom.so.1.0 library doesn't link to the geos or proj libraries: > postgres at cyc11:~/lib> ldd liblwgeom.so.1.0 > linux-gate.so.1 => (0xffffe000) > libstdc++.so.5 => /usr/lib/libstdc++.so.5 > (0x40067000) > libgeos.so.2 => not found > libproj.so.0 => not found > libgcc_s.so.1 => /lib/libgcc_s.so.1 > (0x40125000) > libc.so.6 => /lib/tls/libc.so.6 (0x4012d000) > libm.so.6 => /lib/tls/libm.so.6 (0x40243000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 > (0x80000000) even though both libgeos.so.2 and libproj.so.0 are present in /usr/local/lib. Can anyone help here? Should the PROJ_DIR and GEOS_DIR variables in the Makefile.config point to /usr/local/lib instead of /usr/local? Thanks, Chip Masters --- strk at refractions.net wrote: > On Tue, Jun 21, 2005 at 03:45:51PM -0700, Chip > Masters wrote: > > We did compile GEOS (PostgreSQL and PostGIS as > well) > > with GCC 3.4.3. > > Are you sure you don't have old c++ headers around ? > Can you seek that __builtin_new symbol in system > headers ? > > --strk; > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From strk at refractions.net Wed Jul 6 14:22:10 2005 From: strk at refractions.net (strk at refractions.net) Date: Wed, 6 Jul 2005 23:22:10 +0200 Subject: [geos-devel] Re: [postgis-users] Error compiling PostGIS + GEOS In-Reply-To: <20050706193121.86222.qmail@web41128.mail.yahoo.com> References: <20050621230440.GQ82130@keybit.net> <20050706193121.86222.qmail@web41128.mail.yahoo.com> Message-ID: <20050706212210.GA45078@keybit.net> Did you run 'ldconfig' after GEOS install ? --strk; On Wed, Jul 06, 2005 at 12:31:21PM -0700, Chip Masters wrote: > GEOS and PostGIS users, > > Since I last posted on this thread about my > installation problems, we upgraded our OS to SuSE 9.2 > with the 2.6.8-24.16-default kernel. Also, for the > record, we are using gcc version 3.3.4. > > Now after installing PostgreSQL 8.0.3, PostGIS 1.0.1 > with the flags set in Makefile.config to include PROJ > and GEOS: > > > USE_PROJ ?= 1 > > PROJ_DIR ?= /usr/local > > > > USE_GEOS ?= 1 > > GEOS_DIR ?= /usr/local > > I try to do > > > psql -f lwpostgis.sql -d test > > from within the postgis-1.0.1 install directory, and I > get this error: > > > psql:lwpostgis.sql:36: ERROR: could not load > library > "/scratch/pgsql/lib/liblwgeom.so.1.0": > libgeos.so.2: > cannot open shared object file: No > such file or > > directory > > I notice that the liblwgeom.so.1.0 library doesn't > link to the geos or proj libraries: > > > postgres at cyc11:~/lib> ldd liblwgeom.so.1.0 > > linux-gate.so.1 => (0xffffe000) > > libstdc++.so.5 => /usr/lib/libstdc++.so.5 > > (0x40067000) > > libgeos.so.2 => not found > > libproj.so.0 => not found > > libgcc_s.so.1 => /lib/libgcc_s.so.1 > > (0x40125000) > > libc.so.6 => /lib/tls/libc.so.6 (0x4012d000) > > libm.so.6 => /lib/tls/libm.so.6 (0x40243000) > > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 > > (0x80000000) > > even though both libgeos.so.2 and libproj.so.0 are > present in /usr/local/lib. > > Can anyone help here? Should the PROJ_DIR and GEOS_DIR > variables in the Makefile.config point to > /usr/local/lib instead of /usr/local? > > Thanks, > > Chip Masters > > --- strk at refractions.net wrote: > > > On Tue, Jun 21, 2005 at 03:45:51PM -0700, Chip > > Masters wrote: > > > We did compile GEOS (PostgreSQL and PostGIS as > > well) > > > with GCC 3.4.3. > > > > Are you sure you don't have old c++ headers around ? > > Can you seek that __builtin_new symbol in system > > headers ? > > > > --strk; > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > > > > > ____________________________________________________ > Sell on Yahoo! Auctions ? no fees. Bid on great items. > http://auctions.yahoo.com/ > _______________________________________________ > geos-devel mailing list > geos-devel at geos.refractions.net > http://geos.refractions.net/mailman/listinfo/geos-devel From r.mueller at unicomp-berlin.de Wed Jul 6 23:33:02 2005 From: r.mueller at unicomp-berlin.de (=?ISO-8859-1?Q?=22R=2E_M=FCller=22?=) Date: Thu, 07 Jul 2005 08:33:02 +0200 Subject: [postgis-users] Ebuild Gentoo For Geos 2.1.3 and PostGIS 1.0.2...coming soon In-Reply-To: <007201c58232$0766cb00$117fa8c0@jenna> References: <007201c58232$0766cb00$117fa8c0@jenna> Message-ID: <42CCCC9E.7080304@unicomp-berlin.de> would be great ... :-) Ronald Jean David TECHER wrote: > Hi Sandro > > Gerald (Djay) is back ! > > He --if we have enough free times - will do the ebuilds (perhaps rpm !) > fo Geos 2.1.3 and PostGIS 1.0.2 before the end of this week. > > > We should go on testing for futures CVS version ...until 1.1.0 > > Thanks Marc for your win32 installer :-) > > --------------------------------------------------------------- > TECHER Jean David > 01MAP > e-mail: david at 01map.net > T?l: 04 67 45 60 27 > Entreprise: http://www.01map.net > Perso: http://techer.pascal.free.fr/postgis/ > --------------------------------------------------------------- > > > ------------------------------------------------------------------------ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users -- From niccolo at rigacci.org Thu Jul 7 03:17:54 2005 From: niccolo at rigacci.org (Niccolo Rigacci) Date: Thu, 7 Jul 2005 12:17:54 +0200 Subject: [postgis-users] Using VIEW with MapServer is very slow In-Reply-To: <71E37EF6B7DCC1499CEA0316A256832801D4C570@loki.wc.globexplorer.net> References: <71E37EF6B7DCC1499CEA0316A256832801D4C570@loki.wc.globexplorer.net> Message-ID: <20050707101754.GA19643@rigacci.org> > But the real problem is that the query on the VIEW is very slow! > Using debug from Postgres I see that the query is: > > BEGIN; > DECLARE mycursor BINARY CURSOR FOR > SELECT > ... > ... > FETCH ALL IN mycursor; > > The query is extremely slow from the command line too (2 min). > But if I do only the SELECT (without using the CURSOR), the > answer is near immediate. I got a feasible explanation from Richard Huxton, from the Postgres performance list: > So - if you ask for a cursor, PG weights things to give you the > first few rows as soon as possible, at the expense of fetching > *all* rows quickly. If you're only going to fetch e.g. the > first 20 rows this is exactly what you want. In your case, > since you're immediately issuing FETCH ALL, you're not really > using the cursor at all, but PG doesn't know that. I found that a workaround is to include an "ORDER BY" caluse in the VIEW definition, so the Postgres planner uses the same algorythm for the SELECT and the CURSOR. By the way, thare are some explanation on how MapServer and QGIS build their queries? Why they use a CURSOR just to FETCH ALL? Is there a way to influence this? Thanks again for your help. -- Niccolo Rigacci Firenze - Italy War against Iraq? Not in my name! From klaus.foerster at uibk.ac.at Thu Jul 7 06:19:42 2005 From: klaus.foerster at uibk.ac.at (=?ISO-8859-1?Q?klaus_F=F6rster?=) Date: Thu, 07 Jul 2005 15:19:42 +0200 Subject: [postgis-users] bug in create_undef.sql Message-ID: <42CD2BEE.7040900@uibk.ac.at> there's a bug in create_undef.pl for postgis version 1.0.2 if you run it with the appropriate lwpostgis.sql and version 80, the resulting sql-code is invalid in the following line: DROP TYPE geometry_dump AS CASCADE; this is the result of a false regexp in create_undef.pl. using \w+ instead of [^(]+ should solve the problem klaus --- create_undef.pl 2005-07-07 14:49:02.000000000 +0200 +++ fixed.pl 2005-07-07 14:48:55.000000000 +0200 @@ -140,7 +140,7 @@ foreach my $type (@types) { - if ($type =~ /create type ([^(]+)/i ) + if ($type =~ /create type (\w+)/i ) { if ( $version ge "73" ) { -- O-. /_ ) | (U klaus* /| / / ~ ~ From tom12345miller at web.de Thu Jul 7 06:57:00 2005 From: tom12345miller at web.de (Tom Miller) Date: Thu, 07 Jul 2005 15:57:00 +0200 Subject: [postgis-users] Selecting a Bounding Box for a whole table Message-ID: <544849208@web.de> Hi , I was trying to select a bounding box for a whole theme, which then includes all features within a table. However I am not sure how to use the "SELECT (BOX(the_geom)) from myTheme; " - command for a whole table. Could somebody tell me a hint?! Thanks a lot! Tom _________________________________________________________________________ Mit der Gruppen-SMS von WEB.DE FreeMail k?nnen Sie eine SMS an alle Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179 From gribas at cpqd.com.br Thu Jul 7 07:34:12 2005 From: gribas at cpqd.com.br (Gustavo Henrique Sberze Ribas) Date: Thu, 7 Jul 2005 11:34:12 -0300 Subject: RES: [postgis-users] Selecting a Bounding Box for a whole table Message-ID: Hello, try using 'select extent(geom) from myTheme' -- Gustavo > -----Mensagem original----- > De: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net]Em nome de Tom > Miller > Enviada em: quinta-feira, 7 de julho de 2005 10:57 > Para: postgis-users at postgis.refractions.net > Assunto: [postgis-users] Selecting a Bounding Box for a whole table > > > > Hi , > I was trying to select a bounding box for a whole theme, > which then includes all features within a table. However I am > not sure how to use the "SELECT (BOX(the_geom)) from myTheme; > " - command for a whole table. > Could somebody tell me a hint?! > > Thanks a lot! > > Tom From nicky666 at gmail.com Thu Jul 7 07:35:12 2005 From: nicky666 at gmail.com (Nicolas Ribot) Date: Thu, 7 Jul 2005 16:35:12 +0200 Subject: [postgis-users] Selecting a Bounding Box for a whole table In-Reply-To: <544849208@web.de> References: <544849208@web.de> Message-ID: <28de5e3105070707356c7d853a@mail.gmail.com> > Hi , > I was trying to select a bounding box for a whole theme, which then includes all features within a table. However I am not sure how to use the "SELECT (BOX(the_geom)) from myTheme; " - command for a whole table. > Could somebody tell me a hint?! > > Thanks a lot! > > Tom Hi Tom, You can use the extent() table function for that: select extent(the_geom) from myTheme; It returns a box2d object: the spatial extension of the whole dataset for your table. Nicolas From chip_masters at yahoo.com Thu Jul 7 09:32:10 2005 From: chip_masters at yahoo.com (Chip Masters) Date: Thu, 7 Jul 2005 09:32:10 -0700 (PDT) Subject: [geos-devel] Re: [postgis-users] Error compiling PostGIS + GEOS In-Reply-To: <20050706212210.GA45078@keybit.net> Message-ID: <20050707163210.81154.qmail@web41127.mail.yahoo.com> I don't know if it was run at install, but rerunning it now did the trick. Now lwpostgis.sql loads fine. Thanks for everyone's help! I'm sure I will be posting back here regularly as I dig in. Chip --- strk at refractions.net wrote: > Did you run 'ldconfig' after GEOS install ? > --strk; > > On Wed, Jul 06, 2005 at 12:31:21PM -0700, Chip > Masters wrote: > > GEOS and PostGIS users, > > > > Since I last posted on this thread about my > > installation problems, we upgraded our OS to SuSE > 9.2 > > with the 2.6.8-24.16-default kernel. Also, for the > > record, we are using gcc version 3.3.4. > > > > Now after installing PostgreSQL 8.0.3, PostGIS > 1.0.1 > > with the flags set in Makefile.config to include > PROJ > > and GEOS: > > > > > USE_PROJ ?= 1 > > > PROJ_DIR ?= /usr/local > > > > > > USE_GEOS ?= 1 > > > GEOS_DIR ?= /usr/local > > > > I try to do > > > > > psql -f lwpostgis.sql -d test > > > > from within the postgis-1.0.1 install directory, > and I > > get this error: > > > > > psql:lwpostgis.sql:36: ERROR: could not load > > library > "/scratch/pgsql/lib/liblwgeom.so.1.0": > > libgeos.so.2: > cannot open shared object file: No > > such file or > > > directory > > > > I notice that the liblwgeom.so.1.0 library doesn't > > link to the geos or proj libraries: > > > > > postgres at cyc11:~/lib> ldd liblwgeom.so.1.0 > > > linux-gate.so.1 => (0xffffe000) > > > libstdc++.so.5 => > /usr/lib/libstdc++.so.5 > > > (0x40067000) > > > libgeos.so.2 => not found > > > libproj.so.0 => not found > > > libgcc_s.so.1 => /lib/libgcc_s.so.1 > > > (0x40125000) > > > libc.so.6 => /lib/tls/libc.so.6 > (0x4012d000) > > > libm.so.6 => /lib/tls/libm.so.6 > (0x40243000) > > > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 > > > > (0x80000000) > > > > even though both libgeos.so.2 and libproj.so.0 are > > present in /usr/local/lib. > > > > Can anyone help here? Should the PROJ_DIR and > GEOS_DIR > > variables in the Makefile.config point to > > /usr/local/lib instead of /usr/local? > > > > Thanks, > > > > Chip Masters > > > > --- strk at refractions.net wrote: > > > > > On Tue, Jun 21, 2005 at 03:45:51PM -0700, Chip > > > Masters wrote: > > > > We did compile GEOS (PostgreSQL and PostGIS as > > > well) > > > > with GCC 3.4.3. > > > > > > Are you sure you don't have old c++ headers > around ? > > > Can you seek that __builtin_new symbol in system > > > headers ? > > > > > > --strk; > > > _______________________________________________ > > > postgis-users mailing list > > > postgis-users at postgis.refractions.net > > > > > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > > > > > > > > > > > > > > ____________________________________________________ > > Sell on Yahoo! Auctions ? no fees. Bid on great > items. > > http://auctions.yahoo.com/ > > _______________________________________________ > > geos-devel mailing list > > geos-devel at geos.refractions.net > > > http://geos.refractions.net/mailman/listinfo/geos-devel > _______________________________________________ > geos-devel mailing list > geos-devel at geos.refractions.net > http://geos.refractions.net/mailman/listinfo/geos-devel > ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From pramsey at refractions.net Thu Jul 7 12:10:29 2005 From: pramsey at refractions.net (Paul Ramsey) Date: Thu, 07 Jul 2005 12:10:29 -0700 Subject: [postgis-users] Using VIEW with MapServer is very slow In-Reply-To: <20050707101754.GA19643@rigacci.org> References: <71E37EF6B7DCC1499CEA0316A256832801D4C570@loki.wc.globexplorer.net> <20050707101754.GA19643@rigacci.org> Message-ID: <46C19B6C-7851-4DE6-98AE-DADFAF5FE74A@refractions.net> Mapserver and QGIS both use binary cursors for performance, and you can only get a binary cursor by DECLARING it. So they DECLARE then they FETCH ALL (I thought Mapserver fetched in smaller blocks though, to keep it from getting too memory-large when running large maps). I am not sure what the correct compromise is to get optimal performance. P. On 7-Jul-05, at 3:17 AM, Niccolo Rigacci wrote: >> But the real problem is that the query on the VIEW is very slow! >> Using debug from Postgres I see that the query is: >> >> BEGIN; >> DECLARE mycursor BINARY CURSOR FOR >> SELECT >> ... >> ... >> FETCH ALL IN mycursor; >> >> The query is extremely slow from the command line too (2 min). >> But if I do only the SELECT (without using the CURSOR), the >> answer is near immediate. >> > > I got a feasible explanation from Richard Huxton, from the > Postgres performance list: > > >> So - if you ask for a cursor, PG weights things to give you the >> first few rows as soon as possible, at the expense of fetching >> *all* rows quickly. If you're only going to fetch e.g. the >> first 20 rows this is exactly what you want. In your case, >> since you're immediately issuing FETCH ALL, you're not really >> using the cursor at all, but PG doesn't know that. >> > > I found that a workaround is to include an "ORDER BY" caluse in > the VIEW definition, so the Postgres planner uses the same > algorythm for the SELECT and the CURSOR. > > By the way, thare are some explanation on how MapServer and QGIS > build their queries? Why they use a CURSOR just to FETCH ALL? Is > there a way to influence this? > > Thanks again for your help. > > -- > Niccolo Rigacci > Firenze - Italy > > War against Iraq? Not in my name! > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From davidtecher at yahoo.fr Fri Jul 8 05:11:10 2005 From: davidtecher at yahoo.fr (Jean David TECHER) Date: Fri, 8 Jul 2005 14:11:10 +0200 Subject: [postgis-users] French Doc updated for PostGIS 1.0.2/PG 8.0.3/Geos 2.1.3/Proj 4.4.9 Message-ID: <000801c583b6$211dba10$117fa8c0@jenna> Hi I've updated my doc for Windows Build Instructions today As usual thanks to see the following link link http://techer.pascal.free.fr/postgis/postgresql800beta1/compilpsqlwin32.htm Thanks Have a nice week-end :-) --------------------------------------------------------------- TECHER Jean David 01MAP e-mail: david at 01map.net T?l: 04 67 45 60 27 Entreprise: http://www.01map.net Perso: http://techer.pascal.free.fr/postgis/ --------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From rsalas at voxiva.net Fri Jul 8 16:22:34 2005 From: rsalas at voxiva.net (Renato Salas) Date: Fri, 08 Jul 2005 18:22:34 -0500 Subject: [postgis-users] Algorithm for Overlaying Areas and Features Message-ID: <42CF0ABA.3000600@voxiva.net> Hi group: I'm curious about what is the underlying algorithm used to find out if a geo-feature is within an area. For instance, I have a dataset with emergency calls and another with zip areas. Then I want to know how many calls are in each area. I know I need to tag each feature with the zip area code it belongs to and then sum the number of calls for each area. My question is, how do I determine in which area a particular call belong in an efficiente manner. Do I have to step in each area to find which features are inside its boundaries?. Do I first need to sort the features by Lat/Lon so that I know the boundaries of my features, thus reducing the number of candidates areas?. I'm pretty sure this issue is well know and solved on the GIS community so please illuminate me since I don't want to reinvent the wheel. Thanks all in advance for your comments, Regards, Renato From pramsey at refractions.net Fri Jul 8 16:58:23 2005 From: pramsey at refractions.net (Paul Ramsey) Date: Fri, 08 Jul 2005 16:58:23 -0700 Subject: [postgis-users] Algorithm for Overlaying Areas and Features In-Reply-To: <42CF0ABA.3000600@voxiva.net> References: <42CF0ABA.3000600@voxiva.net> Message-ID: <2595D183-3A78-46E5-BFAD-BABB091963F8@refractions.net> This is PostGIS land, so the answer looks like this (with variation for whatever your column names are): select count(*) as num_calls, zips.zipcode from zips, calls where zips.the_geom && calls.the_geom and contains(zips.the_geom,calls.the_geom) group by zipcode; The answer is formulated differently for other tools, but as you note, it is well understood and oft-repeated. Paul On 8-Jul-05, at 4:22 PM, Renato Salas wrote: > Hi group: > > I'm curious about what is the underlying algorithm used to find out > if a geo-feature is within an area. > > For instance, I have a dataset with emergency calls and another > with zip areas. Then I want to know how many calls are in each area. > > I know I need to tag each feature with the zip area code it belongs > to and then sum the number of calls for each area. > > My question is, how do I determine in which area a particular call > belong in an efficiente manner. Do I have to step in each area to > find which features are inside its boundaries?. Do I first need to > sort the features by Lat/Lon so that I know the boundaries of my > features, thus reducing the number of candidates areas?. > > I'm pretty sure this issue is well know and solved on the GIS > community so please illuminate me since I don't want to reinvent > the wheel. > > Thanks all in advance for your comments, > > Regards, > > Renato > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From rhelmer at customweather.com Fri Jul 8 17:33:06 2005 From: rhelmer at customweather.com (Robert Helmer) Date: Fri, 08 Jul 2005 17:33:06 -0700 Subject: [postgis-users] postgis + replication? Message-ID: <42CF1B42.4010202@customweather.com> Hello, Is anyone using using PostGIS with Slony-I (http://slony.info)?* *If not, any reason it should/shouldn't work? Thanks! Rob Helmer CustomWeather * * From rsalas at voxiva.net Fri Jul 8 17:39:39 2005 From: rsalas at voxiva.net (Renato F. Salas) Date: Fri, 08 Jul 2005 19:39:39 -0500 Subject: [postgis-users] Algorithm for Overlaying Areas and Features In-Reply-To: <2595D183-3A78-46E5-BFAD-BABB091963F8@refractions.net> References: <42CF0ABA.3000600@voxiva.net> <2595D183-3A78-46E5-BFAD-BABB091963F8@refractions.net> Message-ID: <42CF1CCB.1050107@voxiva.net> Hi Paul: Thank you very much for your comment. I'm very new to PostGIS and basically I don't have this information stored as postgis tables but as simple points and paths on svg files (xml structured), so I will need to manually do the algorithms to find what is inside. Could you please explain me what this do internally?. Why there is a need to do: zips.the_geom && calls.the_geom How the contains() function work? If you have reference such as books or articles about the theory behind this it would be excellent. Thank you very much for your reply. Renato Paul Ramsey wrote: > This is PostGIS land, so the answer looks like this (with variation > for whatever your column names are): > > select count(*) as num_calls, zips.zipcode > from zips, calls > where > zips.the_geom && calls.the_geom > and > contains(zips.the_geom,calls.the_geom) > group by zipcode; > > The answer is formulated differently for other tools, but as you > note, it is well understood and oft-repeated. > > Paul > > On 8-Jul-05, at 4:22 PM, Renato Salas wrote: > >> Hi group: >> >> I'm curious about what is the underlying algorithm used to find out >> if a geo-feature is within an area. >> >> For instance, I have a dataset with emergency calls and another with >> zip areas. Then I want to know how many calls are in each area. >> >> I know I need to tag each feature with the zip area code it belongs >> to and then sum the number of calls for each area. >> >> My question is, how do I determine in which area a particular call >> belong in an efficiente manner. Do I have to step in each area to >> find which features are inside its boundaries?. Do I first need to >> sort the features by Lat/Lon so that I know the boundaries of my >> features, thus reducing the number of candidates areas?. >> >> I'm pretty sure this issue is well know and solved on the GIS >> community so please illuminate me since I don't want to reinvent the >> wheel. >> >> Thanks all in advance for your comments, >> >> Regards, >> >> Renato >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> > > From pramsey at refractions.net Fri Jul 8 17:59:54 2005 From: pramsey at refractions.net (Paul Ramsey) Date: Fri, 08 Jul 2005 17:59:54 -0700 Subject: [postgis-users] postgis + replication? In-Reply-To: <42CF1B42.4010202@customweather.com> References: <42CF1B42.4010202@customweather.com> Message-ID: <2B79969F-C486-448B-89FC-4A1B9300826B@refractions.net> Should work fine. Your slaves will need postgis installed on them, etc. P On 8-Jul-05, at 5:33 PM, Robert Helmer wrote: > Hello, > > Is anyone using using PostGIS with Slony-I (http://slony.info)?* > *If not, any reason it should/shouldn't work? > > > Thanks! > Rob Helmer > CustomWeather > * > * > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From pramsey at refractions.net Fri Jul 8 18:02:38 2005 From: pramsey at refractions.net (Paul Ramsey) Date: Fri, 08 Jul 2005 18:02:38 -0700 Subject: [postgis-users] Algorithm for Overlaying Areas and Features In-Reply-To: <42CF1CCB.1050107@voxiva.net> References: <42CF0ABA.3000600@voxiva.net> <2595D183-3A78-46E5-BFAD-BABB091963F8@refractions.net> <42CF1CCB.1050107@voxiva.net> Message-ID: <4E4CA0EF-B549-4B46-9F1D-0F511A3CFBD7@refractions.net> I'm sorry Renato, computational geometry is beyond the scope of this list. You can probably find a good course on it at your local university, or if you are more practical minded, the PostGIS source code is also available. Or if you just want the answer, load your data into PostGIS and apply the recipe provided below! :) Paul On 8-Jul-05, at 5:39 PM, Renato F. Salas wrote: > Hi Paul: > > Thank you very much for your comment. > > I'm very new to PostGIS and basically I don't have this information > stored as postgis tables but as simple points and paths on svg > files (xml structured), so I will need to manually do the > algorithms to find what is inside. > > Could you please explain me what this do internally?. > > Why there is a need to do: zips.the_geom && calls.the_geom > How the contains() function work? > > If you have reference such as books or articles about the theory > behind this it would be excellent. > > Thank you very much for your reply. > > Renato > > > Paul Ramsey wrote: > > >> This is PostGIS land, so the answer looks like this (with >> variation for whatever your column names are): >> >> select count(*) as num_calls, zips.zipcode >> from zips, calls >> where >> zips.the_geom && calls.the_geom >> and >> contains(zips.the_geom,calls.the_geom) >> group by zipcode; >> >> The answer is formulated differently for other tools, but as you >> note, it is well understood and oft-repeated. >> >> Paul >> >> On 8-Jul-05, at 4:22 PM, Renato Salas wrote: >> >> >>> Hi group: >>> >>> I'm curious about what is the underlying algorithm used to find >>> out if a geo-feature is within an area. >>> >>> For instance, I have a dataset with emergency calls and another >>> with zip areas. Then I want to know how many calls are in each area. >>> >>> I know I need to tag each feature with the zip area code it >>> belongs to and then sum the number of calls for each area. >>> >>> My question is, how do I determine in which area a particular >>> call belong in an efficiente manner. Do I have to step in each >>> area to find which features are inside its boundaries?. Do I >>> first need to sort the features by Lat/Lon so that I know the >>> boundaries of my features, thus reducing the number of >>> candidates areas?. >>> >>> I'm pretty sure this issue is well know and solved on the GIS >>> community so please illuminate me since I don't want to reinvent >>> the wheel. >>> >>> Thanks all in advance for your comments, >>> >>> Regards, >>> >>> Renato >>> _______________________________________________ >>> postgis-users mailing list >>> postgis-users at postgis.refractions.net >>> http://postgis.refractions.net/mailman/listinfo/postgis-users >>> >>> >> >> >> > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From chris81 at minet.uni-jena.de Mon Jul 11 04:54:18 2005 From: chris81 at minet.uni-jena.de (Christian Schwartze) Date: Mon, 11 Jul 2005 13:54:18 +0200 Subject: [postgis-users] (no subject) Message-ID: <002601c5860f$44b71dd0$900c238d@mirzms.unijena.de> Hi to all PostGIS-users.... I have a table "earthquakes" with a GiSt-index on column "geo". I search for all earthquakes along a street using a buffer distance. Does somebody know, why the GiST-index is not in use (as per explain), when combining the &&-operator with the transform()-function like in: select quake_id, location, x(geo), y(geo) from earthquakes where geo && envelope(buffer(transform((select geo from roads where name = 'U.S. Hwy 85'),102009),5)) and within(geo,(select buffer(transform((select geo from roads where name = 'U.S. Hwy 85'),102009),5))); Without the transform-function the query is very quick because of the GiST-index, but i need the transform-function to calculate in unit "meter". Can somebody help me, thanks a lot! Christian. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris81 at minet.uni-jena.de Mon Jul 11 04:57:50 2005 From: chris81 at minet.uni-jena.de (Christian Schwartze) Date: Mon, 11 Jul 2005 13:57:50 +0200 Subject: [postgis-users] Problem with &&-operator and transform() Message-ID: <004601c5860f$c33f63b0$900c238d@mirzms.unijena.de> Hi to all PostGIS-users.... I have a table "earthquakes" with a GiSt-index on column "geo". I search for all earthquakes along a street using a buffer distance. Does somebody know, why the GiST-index is not in use (as per explain), when combining the &&-operator with the transform()-function like in: select quake_id, location, x(geo), y(geo) from earthquakes where geo && envelope(buffer(transform((select geo from roads where name = 'U.S. Hwy 85'),102009),5)) and within(geo,(select buffer(transform((select geo from roads where name = 'U.S. Hwy 85'),102009),5))); Without the transform-function the query is very quick because of the GiST-index, but i need the transform-function to calculate in unit "meter". Can somebody help me, thanks a lot! Christian. -------------- next part -------------- An HTML attachment was scrubbed... URL: From strk at refractions.net Mon Jul 11 06:16:21 2005 From: strk at refractions.net (strk at refractions.net) Date: Mon, 11 Jul 2005 15:16:21 +0200 Subject: [postgis-users] Problem with &&-operator and transform() In-Reply-To: <004601c5860f$c33f63b0$900c238d@mirzms.unijena.de> References: <004601c5860f$c33f63b0$900c238d@mirzms.unijena.de> Message-ID: <20050711131621.GA88295@keybit.net> On Mon, Jul 11, 2005 at 01:57:50PM +0200, Christian Schwartze wrote: > Hi to all PostGIS-users.... > > I have a table "earthquakes" with a GiSt-index on column "geo". I search for all earthquakes along a street using a buffer distance. > Does somebody know, why the GiST-index is not in use (as per explain), when combining the &&-operator with the transform()-function like in: > > select quake_id, location, x(geo), y(geo) > from earthquakes > where geo && envelope(buffer(transform((select geo from roads where name = 'U.S. Hwy 85'),102009),5)) and within(geo,(select buffer(transform((select geo from roads where name = 'U.S. Hwy 85'),102009),5))); > > Without the transform-function the query is very quick because of the GiST-index, but i need the transform-function to calculate in unit "meter". > > Can somebody help me, thanks a lot! You can use 'set enable_seqscan off' to force index usage. Use 'explain analyze' to see how good the estimator job is. Show us both explain analyze and postgis_full_version() outputs to go deeper. --strk; From guillaume.sueur at geosignal.fr Mon Jul 11 06:51:03 2005 From: guillaume.sueur at geosignal.fr (Guillaume Sueur) Date: Mon, 11 Jul 2005 15:51:03 +0200 Subject: [postgis-users] GeometryFromText and box3D Message-ID: <42D27947.2030702@geosignal.fr> Hi, I used to write GeometryFromText('BOX3D($aCoords[0] $aCoords[1],$aCoords[2] $aCoords[3])'::box3d,-1) to retreive a layer on a specific extent. Since I have upgraded PostGis to last windows binaries, it crashes. Is there a new way to specify that ? Thanks. -- --------------------------- Guillaume SUEUR GEOSIGNAL - Groupe BVA 25bis Avenue Marcel Dassault 31505 TOULOUSE CEDEX 5 ---------------------------- From gaby at ebucksmail.com Mon Jul 11 12:08:38 2005 From: gaby at ebucksmail.com (Gaby) Date: Mon, 11 Jul 2005 21:08:38 +0200 Subject: [postgis-users] PostGIS schemas Message-ID: <004d01c5864d$b76db030$0a8bcba3@GabyNotebook> Hi there I am investigating the use of PostGIS with both uDig and Quantum GIS. I should add that I come out of an Oracle Spatial background. I am a complete novice at PostGIS. I have converted 5 different data sets with a total of 65 SHP files. For practical reasons I want to keep the tables from each dataset in different schemas. Please note the following background: - I am doing all of the work on a standalone machine that I use as both client and server. - I am running Windows XP SP2 Now the problem; in both of the products I am trying (uDig and Quantum GIS), I can view all of the tables from all of the schemas when logged on as schema owner of any one schema. However, as expected, I can only view the data from the schema I logged on as. This leads me to the following questions: a. Why is it that after logging on as a particular user/schema owner, I can list ALL of the tables, regardless of the schema they belong to? (I suspect that since both products work the same that it is a PostGIS / PostGreSQL anomaly, not problems with uDig or Quantum GIS?) b. How I can create multiple PostGIS connections, each from a different schema? Yours Sincerely Gaby van Wyk -------------- next part -------------- An HTML attachment was scrubbed... URL: From chip_masters at yahoo.com Mon Jul 11 15:55:33 2005 From: chip_masters at yahoo.com (Chip Masters) Date: Mon, 11 Jul 2005 15:55:33 -0700 (PDT) Subject: [postgis-users] Request for open postgis datasets Message-ID: <20050711225534.37237.qmail@web41104.mail.yahoo.com> PostGIS Users, With help from several of you, I've gotten PostGIS 1.0.1 + PostgreSQL 8.0.3 + GEOS 2.1.2 + Proj 4.4.9 up and running, and I've ran the OGC compliance tests provided in the postgis distrubution. Now I need some data to continue my integration work, and I was hoping that some of you may know where I can find, or can even provide me with, some data that I can use. First, let me explain a little about what I'm trying to do w/ PostGIS: I work at Cycorp (http://www.cyc.com) which is the company Doug Lenat founded in 1997 to further the Cyc project, which he began at MCC back in c. 1985. I expect some of you have heard of Cyc before, but if not, our website has a nice overview of our main goals. I am the lead developer at Cycorp for our efforts to build a geospatial ontology in our knowledge base and to 'spatially enable' Cyc by connecting it to spatial databases which it can use as a backend for storing, querying, and manipulating spatial data. We decided to do our main research using PostGIS because of its OGC compliance and because we already have a lot of good experience working with PostgreSQL. Now that I've got PostGIS running and have read the SFS, I am ready to begin testing our translations of CycL queries into SQL92 With Geometry Types queries, but I need useful datasets. The OGC compliance dataset is a start, but what I'd really like is general data about real places. For instance, if anyone had a PostGIS database of polygons for all the countries of the world, or all the states in the Union, this would be ideal. Alternatively, I know where to find shapefile data for such things, but I don't know of a straightforward way to translate shapefiles into OGC SFS compliant data. Does anyone know of tools for converting shapefiles? Thanks in advance for any help you can offer. Chip Masters P.S. Just so this interaction isn't just one-way with you guys helping me out, if any PostGIS developers have an interest in, or need for geographic ontologies (in OWL-Full format), please let me know and I'll see if we can get a little informal collaboration going. My project is very small, and cannot fund any development outside our SOW, but I can certainly devote some of my own time to providing some examples of the types of ontologies we're producing under this project. ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From pramsey at refractions.net Mon Jul 11 16:03:23 2005 From: pramsey at refractions.net (Paul Ramsey) Date: Mon, 11 Jul 2005 16:03:23 -0700 Subject: [postgis-users] Request for open postgis datasets In-Reply-To: <20050711225534.37237.qmail@web41104.mail.yahoo.com> References: <20050711225534.37237.qmail@web41104.mail.yahoo.com> Message-ID: <04E7A08E-6CEA-41B9-9C59-8EFB77596718@refractions.net> Sorry Chip, I have no pre-existing data, only references to useful places to go for information. You can download shape files of all the countries, states, etc from obvious places on the web. PostGIS has a shp2pgsql tool to convert them. You can download some large tables of place names, do google searches on the term "GNIS" (stands for geographical names information system and is surprisingly common). The US versions of these are text, but it is a 10 line perl script to convert them to loadable spatial SQL. The USA TIGER data includes some good placenames information embedded in it, but it is a lot of work to process. Paul On 11-Jul-05, at 3:55 PM, Chip Masters wrote: > PostGIS Users, > > With help from several of you, I've gotten PostGIS > 1.0.1 + PostgreSQL 8.0.3 + GEOS 2.1.2 + Proj 4.4.9 up > and running, and I've ran the OGC compliance tests > provided in the postgis distrubution. Now I need some > data to continue my integration work, and I was hoping > that some of you may know where I can find, or can > even provide me with, some data that I can use. First, > let me explain a little about what I'm trying to do w/ > PostGIS: > > I work at Cycorp (http://www.cyc.com) which is the > company Doug Lenat founded in 1997 to further the Cyc > project, which he began at MCC back in c. 1985. I > expect some of you have heard of Cyc before, but if > not, our website has a nice overview of our main > goals. > > I am the lead developer at Cycorp for our efforts to > build a geospatial ontology in our knowledge base and > to 'spatially enable' Cyc by connecting it to spatial > databases which it can use as a backend for storing, > querying, and manipulating spatial data. We decided to > do our main research using PostGIS because of its OGC > compliance and because we already have a lot of good > experience working with PostgreSQL. > > Now that I've got PostGIS running and have read the > SFS, I am ready to begin testing our translations of > CycL queries into SQL92 With Geometry Types queries, > but I need useful datasets. The OGC compliance dataset > is a start, but what I'd really like is general data > about real places. For instance, if anyone had a > PostGIS database of polygons for all the countries of > the world, or all the states in the Union, this would > be ideal. Alternatively, I know where to find > shapefile data for such things, but I don't know of a > straightforward way to translate shapefiles into OGC > SFS compliant data. Does anyone know of tools for > converting shapefiles? > > Thanks in advance for any help you can offer. > > Chip Masters > > > P.S. Just so this interaction isn't just one-way with > you guys helping me out, if any PostGIS developers > have an interest in, or need for geographic ontologies > (in OWL-Full format), please let me know and I'll see > if we can get a little informal collaboration going. > My project is very small, and cannot fund any > development outside our SOW, but I can certainly > devote some of my own time to providing some examples > of the types of ontologies we're producing under this project. > > > > > > ____________________________________________________ > Sell on Yahoo! Auctions ? no fees. Bid on great items. > http://auctions.yahoo.com/ > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From woodbri at swoodbridge.com Mon Jul 11 16:12:53 2005 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Mon, 11 Jul 2005 19:12:53 -0400 Subject: [postgis-users] Request for open postgis datasets In-Reply-To: <20050711225534.37237.qmail@web41104.mail.yahoo.com> References: <20050711225534.37237.qmail@web41104.mail.yahoo.com> Message-ID: <42D2FCF5.1090104@swoodbridge.com> Here are some links: http://geonames.usgs.gov/stategaz/index.html US place names with lat/lon http://www.census.gov/geo/www/cob/index.html US, state, county, zipcode and more all in polygons download the ArcView Shapefile (.shp) format and use shp2pgsql to load the data. http://www.nationalatlas.gov/atlasftp.html lots of data layers for the US http://keck.library.unr.edu/data/esri_data&maps/esri.html The world and more On any of these, grab the shapefile format (shp) and us shp2pgsql to load it. -Steve Chip Masters wrote: > PostGIS Users, > > With help from several of you, I've gotten PostGIS > 1.0.1 + PostgreSQL 8.0.3 + GEOS 2.1.2 + Proj 4.4.9 up > and running, and I've ran the OGC compliance tests > provided in the postgis distrubution. Now I need some > data to continue my integration work, and I was hoping > that some of you may know where I can find, or can > even provide me with, some data that I can use. First, > let me explain a little about what I'm trying to do w/ > PostGIS: > > I work at Cycorp (http://www.cyc.com) which is the > company Doug Lenat founded in 1997 to further the Cyc > project, which he began at MCC back in c. 1985. I > expect some of you have heard of Cyc before, but if > not, our website has a nice overview of our main > goals. > > I am the lead developer at Cycorp for our efforts to > build a geospatial ontology in our knowledge base and > to 'spatially enable' Cyc by connecting it to spatial > databases which it can use as a backend for storing, > querying, and manipulating spatial data. We decided to > do our main research using PostGIS because of its OGC > compliance and because we already have a lot of good > experience working with PostgreSQL. > > Now that I've got PostGIS running and have read the > SFS, I am ready to begin testing our translations of > CycL queries into SQL92 With Geometry Types queries, > but I need useful datasets. The OGC compliance dataset > is a start, but what I'd really like is general data > about real places. For instance, if anyone had a > PostGIS database of polygons for all the countries of > the world, or all the states in the Union, this would > be ideal. Alternatively, I know where to find > shapefile data for such things, but I don't know of a > straightforward way to translate shapefiles into OGC > SFS compliant data. Does anyone know of tools for > converting shapefiles? > > Thanks in advance for any help you can offer. > > Chip Masters > > > P.S. Just so this interaction isn't just one-way with > you guys helping me out, if any PostGIS developers > have an interest in, or need for geographic ontologies > (in OWL-Full format), please let me know and I'll see > if we can get a little informal collaboration going. > My project is very small, and cannot fund any > development outside our SOW, but I can certainly > devote some of my own time to providing some examples > of the types of ontologies we're producing under this project. > > > > > > ____________________________________________________ > Sell on Yahoo! Auctions ? no fees. Bid on great items. > http://auctions.yahoo.com/ > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From j.l.h.hartmann at uva.nl Tue Jul 12 03:37:00 2005 From: j.l.h.hartmann at uva.nl (Jan Hartmann) Date: Tue, 12 Jul 2005 12:37:00 +0200 Subject: [postgis-users] PostGIS schemas In-Reply-To: <004d01c5864d$b76db030$0a8bcba3@GabyNotebook> References: <004d01c5864d$b76db030$0a8bcba3@GabyNotebook> Message-ID: <42D39D4C.4090206@uva.nl> Hi Gaby, I can only answer your second question: > b. How I can create multiple PostGIS connections, each from a > different schema/?/ You can set the search_path to whatever schema(s) you want in the connection string: CONNECTION "dbname=mydb options='-c search_path=myschema,public'" The "public" schema has to be in the search_path, else PostGIS won't find its geometry_columns and spatial_ref_sys tables. Jan Gaby wrote: > Hi there > > I am investigating the use of PostGIS with both uDig and Quantum GIS. I > should add that I come out of an Oracle Spatial background. I am a > complete novice at PostGIS. I have converted 5 different data sets with > a total of 65 SHP files. For practical reasons I want to keep the tables > from each dataset in different schemas. > Please note the following background: > - I am doing all of the work on a standalone machine that I use as both > client and server. > - I am running Windows XP SP2 > > Now the problem; in both of the products I am trying (uDig and Quantum > GIS), I can view all of the tables from all of the schemas when logged > on as schema owner of any one schema. However, as expected, I can only > view the data from the schema I logged on as. This leads me to the > following questions: > a. Why is it that after logging on as a particular user/schema owner, I > can list ALL of the tables, regardless of the schema they belong to? (I > suspect that since both products work the same that it is a PostGIS / > PostGreSQL anomaly, not problems with uDig or Quantum GIS?) > b. How I can create multiple PostGIS connections, each from a different > schema/?/ > // > Yours Sincerely > > Gaby van Wyk > > > ------------------------------------------------------------------------ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From gribas at cpqd.com.br Tue Jul 12 04:10:48 2005 From: gribas at cpqd.com.br (Gustavo Henrique Sberze Ribas) Date: Tue, 12 Jul 2005 08:10:48 -0300 Subject: [postgis-users] PostGIS schemas Message-ID: Hello, > a. Why is it that after logging on as a particular user/schema owner, I > can list ALL of the tables, regardless of the schema they belong to? (I > suspect that since both products work the same that it is a PostGIS / > PostGreSQL anomaly, not problems with uDig or Quantum GIS?) Because both programs list all the entries in the geometry_columns table. Since geometry_columns is in the Public schema, any user has access to it (usually). The geometry_columns table acts as a reference to all spatial tables in your database. An entry is automatically created when you invoke addGeometryColumn(...) on a table. -- Gustavo > I can only answer your second question: > > > b. How I can create multiple PostGIS connections, each from a > > different schema/?/ > > You can set the search_path to whatever schema(s) you want in the > connection string: > > CONNECTION "dbname=mydb options='-c search_path=myschema,public'" > > The "public" schema has to be in the search_path, else PostGIS won't > find its geometry_columns and spatial_ref_sys tables. > From gribas at cpqd.com.br Tue Jul 12 04:44:47 2005 From: gribas at cpqd.com.br (Gustavo Henrique Sberze Ribas) Date: Tue, 12 Jul 2005 08:44:47 -0300 Subject: [postgis-users] GeometryFromText and box3D Message-ID: Hello, > I used to write GeometryFromText('BOX3D($aCoords[0] $aCoords[1],$aCoords[2] > $aCoords[3])'::box3d,-1)to retreive a layer on a specific extent. Since I have > upgraded PostGis to last windows binaries, it crashes. > Is there a new way to specify that ? Try using just 'BOX3D($aCoords[0] $aCoords[1],$aCoords[2] $aCoords[3])'::box3d or box3d('BOX3D($aCoords[0] $aCoords[1],$aCoords[2] $aCoords[3])'); -- Gustavo From strk at refractions.net Tue Jul 12 05:15:16 2005 From: strk at refractions.net (strk at refractions.net) Date: Tue, 12 Jul 2005 14:15:16 +0200 Subject: [postgis-users] GeometryFromText and box3D In-Reply-To: <42D27947.2030702@geosignal.fr> References: <42D27947.2030702@geosignal.fr> Message-ID: <20050712121516.GA97926@keybit.net> On Mon, Jul 11, 2005 at 03:51:03PM +0200, Guillaume Sueur wrote: > Hi, > I used to write GeometryFromText('BOX3D($aCoords[0] > $aCoords[1],$aCoords[2] $aCoords[3])'::box3d,-1) > to retreive a layer on a specific extent. Since I have upgraded PostGis > to last windows binaries, it crashes. > Is there a new way to specify that ? This should work with all versions: SetSRID('BOX3D...'::box3d, -1) --strk; From andrew.seales at ed.ac.uk Tue Jul 12 09:13:36 2005 From: andrew.seales at ed.ac.uk (Andrew Seales) Date: Tue, 12 Jul 2005 17:13:36 +0100 Subject: [postgis-users] pgsql2shp bug Message-ID: <42D3EC30.60908@ed.ac.uk> Hi, I've been using pgsql2shp to export data directly from PostGIS using an SQL query. I encountered a problem when the size of my query became very long as the program would either give a bus error or seg fault. The error seems to be in the create_usrquerytable function which allocates memory for the command line parameter. Line 3106 currently reads query = malloc(sizeof(table)+sizeof(usrquery)+256); and I think it should be query = malloc(strlen(table)+strlen(usrquery)+25); (25 being the size of the string from the next line) as sizeof(char*) will just return the size of the pointer rather than the length of the string. I had a quick look at the rest of the file and I can't see sizeof being used in this way anywhere else. -- Andrew Seales EDINA tel: +44 (0) 131 651 1430 Edinburgh University fax: +44 (0) 131 650 3308 Main Library Building url: http://edina.ac.uk George Square email: andrew.seales at ed.ac.uk Edinburgh EH8 9LJ From strk at refractions.net Tue Jul 12 09:21:02 2005 From: strk at refractions.net (strk at refractions.net) Date: Tue, 12 Jul 2005 18:21:02 +0200 Subject: [postgis-users] pgsql2shp bug In-Reply-To: <42D3EC30.60908@ed.ac.uk> References: <42D3EC30.60908@ed.ac.uk> Message-ID: <20050712162102.GA570@keybit.net> On Tue, Jul 12, 2005 at 05:13:36PM +0100, Andrew Seales wrote: ... > Line 3106 currently reads > query = malloc(sizeof(table)+sizeof(usrquery)+256); > > and I think it should be > > query = malloc(strlen(table)+strlen(usrquery)+25); > > (25 being the size of the string from the next line) Fixed, thanks. --strk; From ezequias at recife.pe.gov.br Tue Jul 12 10:34:39 2005 From: ezequias at recife.pe.gov.br (Ezequias Rodrigues da Rocha) Date: Tue, 12 Jul 2005 14:34:39 -0300 (Hora oficial do Brasil) Subject: [postgis-users] Problem to update PG JUMP Message-ID: <42D3FF2F.00000C.03268@DC_EZEQUIAS> Hello, I am with a problem to update a shapefile via JUMPWorkbench, The application ask for a Unique Column that I suppouse was "the_geom" field of my pgShapefile. I send you both images to make myself more clear. Please, nobody told me until now what field is that or if my shp2pgsql was incorrect. Best regards Ezequias =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha * www.recife.pe.gov.br =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- A pior das democracias ainda ? melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships MSN Messenger: ezequias at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: msn.JPG Type: image/jpeg Size: 1111 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: errorResoult.JPG Type: image/jpeg Size: 191968 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: parameterJumpPG.JPG Type: image/jpeg Size: 37793 bytes Desc: not available URL: From ezequias at recife.pe.gov.br Tue Jul 12 10:52:48 2005 From: ezequias at recife.pe.gov.br (Ezequias Rodrigues da Rocha) Date: Tue, 12 Jul 2005 14:52:48 -0300 (Hora oficial do Brasil) Subject: [postgis-users] How to drop a PostGIS table ? Message-ID: <42D40370.000003.04068@DC_EZEQUIAS> Hello, I would like how to drop a PostGIS table on Postgresql. Does anyone knows how to drop it and all the relations on the tables spatial_ref_sys" and "geometry_columns" Best regards Ezeq =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha * www.recife.pe.gov.br =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- A pior das democracias ainda ? melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships MSN Messenger: ezequias at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: msn.JPG Type: image/jpeg Size: 1111 bytes Desc: not available URL: From nicky666 at gmail.com Tue Jul 12 10:56:05 2005 From: nicky666 at gmail.com (Nicolas Ribot) Date: Tue, 12 Jul 2005 19:56:05 +0200 Subject: [postgis-users] How to drop a PostGIS table ? In-Reply-To: <42D40370.000003.04068@DC_EZEQUIAS> References: <42D40370.000003.04068@DC_EZEQUIAS> Message-ID: <28de5e3105071210567e813fc3@mail.gmail.com> > > Hello, > > I would like how to drop a PostGIS table on Postgresql. > > Does anyone knows how to drop it and all the relations on the tables "spatial_ref_sys" and "geometry_columns" > > Hi Ezequias, There is a function that does the trick (as stated in the documentation) : "DropGeometryTable([], ) Drops a table and all its references in geometry_columns. Note: uses current_schema() on schema-aware pgsql installations if schema is not provided." Nicolas From hi_ono2001 at ybb.ne.jp Tue Jul 12 11:04:41 2005 From: hi_ono2001 at ybb.ne.jp (Hisaji ONO) Date: Wed, 13 Jul 2005 03:04:41 +0900 (JST) Subject: [postgis-users] Versioning system for PostGIS Message-ID: <20050712180441.89273.qmail@web1706.mail.yahoo.co.jp> Hello. I think currently implementing Spatio-Temporal function into GIS is important more and more increasingly. PostGIS has recently supported 4D format, however this format is very useful for versioning system of spatial data. PostGIS dev. team has any plan to implement these versioning system of spatial data into PostGIS. Regards. From ezequias at recife.pe.gov.br Tue Jul 12 11:39:29 2005 From: ezequias at recife.pe.gov.br (Ezequias Rodrigues da Rocha) Date: Tue, 12 Jul 2005 15:39:29 -0300 (Hora oficial do Brasil) Subject: Res: Re: [postgis-users] How to drop a PostGIS table ? References: <28de5e3105071210567e813fc3@mail.gmail.com> Message-ID: <42D40E61.000004.03212@DC_EZEQUIAS> Thank you Nicolas. -------Mensagem original------- De: Nicolas Ribot Data: 07/12/05 14:40:56 Para: PostGIS Users Discussion Assunto: Re: [postgis-users] How to drop a PostGIS table ? > > Hello, > > I would like how to drop a PostGIS table on Postgresql. > > Does anyone knows how to drop it and all the relations on the tables spatial_ref_sys" and "geometry_columns" > > Hi Ezequias, There is a function that does the trick (as stated in the documentation) : "DropGeometryTable([], ) Drops a table and all its references in geometry_columns. Note: uses current_schema() on schema-aware pgsql installations if schema is not provided." Nicolas _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ezequias at recife.pe.gov.br Tue Jul 12 11:47:42 2005 From: ezequias at recife.pe.gov.br (Ezequias Rodrigues da Rocha) Date: Tue, 12 Jul 2005 15:47:42 -0300 (Hora oficial do Brasil) Subject: [postgis-users] PrintLayoutAlpha0.1-i18n.zip Plugin Message-ID: <42D4104E.000003.01808@DC_EZEQUIAS> Hi list, I do want to know if anyone made the PrintLayout Plugin works on JumpWorkbench (Jump-project.org version) I got the error message attached on this e-mail. It looks that is looking for some locale file that does not exist. I don't know how this plugin understand that I am on pt_BR place. If does anyone knows how it works please tell me. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha * www.recife.pe.gov.br =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- A pior das democracias ainda ? melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships -------------- next part -------------- An HTML attachment was scrubbed... URL: From ezequias at recife.pe.gov.br Tue Jul 12 11:48:48 2005 From: ezequias at recife.pe.gov.br (Ezequias Rodrigues da Rocha) Date: Tue, 12 Jul 2005 15:48:48 -0300 (Hora oficial do Brasil) Subject: Res: [postgis-users] PrintLayoutAlpha0.1-i18n.zip Plugin References: <42D4104E.000003.01808@DC_EZEQUIAS> Message-ID: <42D41090.000005.01808@DC_EZEQUIAS> Sorry wrong list -------Mensagem original------- De: Ezequias Rodrigues da Rocha Data: 07/12/05 15:17:09 Para: PostGIS Users Discussion Assunto: [postgis-users] PrintLayoutAlpha0.1-i18n.zip Plugin Hi list, I do want to know if anyone made the PrintLayout Plugin works on JumpWorkbench (Jump-project.org version) I got the error message attached on this e-mail. It looks that is looking for some locale file that does not exist. I don't know how this plugin understand that I am on pt_BR place. If does anyone knows how it works please tell me. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha * www.recife.pe.gov.br =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- A pior das democracias ainda ? melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships -------------- next part -------------- An HTML attachment was scrubbed... URL: From antaborda at yahoo.com Tue Jul 12 12:24:34 2005 From: antaborda at yahoo.com (Andres Taborda) Date: Tue, 12 Jul 2005 14:24:34 -0500 (CDT) Subject: [postgis-users] cocoon, postgis and mapserver Message-ID: <20050712192434.84127.qmail@web40504.mail.yahoo.com> some users can help me with integration de apache cocoon, postgis and mapserver.. thanks very much __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ?gratis! Reg?strate ya - http://correo.espanol.yahoo.com/ From e.d.lorimer at sms.ed.ac.uk Tue Jul 12 14:16:50 2005 From: e.d.lorimer at sms.ed.ac.uk (Eli Dylan Lorimer) Date: Tue, 12 Jul 2005 22:16:50 +0100 Subject: [postgis-users] Help with finding multi-variate clusters Message-ID: <248FF8D8-3DF0-4100-820E-536219B49226@sms.ed.ac.uk> Hello PostGIS Folks, I'm trying to leverage the power of the spatial database to help me find 3-dimensional clusters in my data. Specifically, in one table I have a 2D point field and a timestamp attribute field. I want to treat the data from each of these 2 fields as a 3D point (x,y,z) and over and entire table, find clusters given a specific tolerance (perhaps a mean nearest neighbor). To be honest, I'm not too fussed with the clustering algorithm, anything simple will do for now. What I'd like is to make my query and get in return a result set consisting of points defining the center of each of the clusters. I want to then draw them client side using Java3D. In any event, I figure this is possible with PostGIS but I have no idea where to begin looking. Could anyone point me in the right direction (or perhaps this functionality already exists and I'm not seeing it in the documentation.) I'm very grateful for you help. This is a part of a big Uni project. Cheers. ./dylan From pramsey at refractions.net Tue Jul 12 15:49:03 2005 From: pramsey at refractions.net (Paul Ramsey) Date: Tue, 12 Jul 2005 15:49:03 -0700 Subject: [postgis-users] Versioning system for PostGIS In-Reply-To: <20050712180441.89273.qmail@web1706.mail.yahoo.co.jp> References: <20050712180441.89273.qmail@web1706.mail.yahoo.co.jp> Message-ID: <40777B0C-2140-49CD-BC4E-078A04810D52@refractions.net> How deep does this have to be? The simplest versioning system is just: create table foo; create table foo_history; Then add update/insert/delete triggers on foo that fill in the deltas in foo_history. There used to be code in contrib/ that did this, but I think it got removed. "Versioning" is a loaded and conflicted term, more definitions are required to know what you mean by it! Paul On 12-Jul-05, at 11:04 AM, Hisaji ONO wrote: > Hello. > > I think currently implementing Spatio-Temporal function > into GIS is important more and more increasingly. > > PostGIS has recently supported 4D format, however this > format is very useful for versioning system of spatial > data. > > PostGIS dev. team has any plan to implement these > versioning system of spatial data into PostGIS. > > Regards. > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From pramsey at refractions.net Tue Jul 12 15:51:17 2005 From: pramsey at refractions.net (Paul Ramsey) Date: Tue, 12 Jul 2005 15:51:17 -0700 Subject: [postgis-users] Help with finding multi-variate clusters In-Reply-To: <248FF8D8-3DF0-4100-820E-536219B49226@sms.ed.ac.uk> References: <248FF8D8-3DF0-4100-820E-536219B49226@sms.ed.ac.uk> Message-ID: <83BB4957-E297-45B4-B3C0-9A3A3062099F@refractions.net> Skip PostGIS and look into R. If you can find a function in R to do it, load PL/R into PostgreSQL and pipe the results of a PostGIS query into the R function. select rfunction(x(thepoint),y(thepoint),timestamp) from foo Or something like that. Or, write your own k-means clustering system. V. v. computationally expensive for large sets though. P On 12-Jul-05, at 2:16 PM, Eli Dylan Lorimer wrote: > Hello PostGIS Folks, > > I'm trying to leverage the power of the spatial database to help me > find 3-dimensional clusters in my data. Specifically, in one table > I have a 2D point field and a timestamp attribute field. I want to > treat the data from each of these 2 fields as a 3D point (x,y,z) > and over and entire table, find clusters given a specific tolerance > (perhaps a mean nearest neighbor). To be honest, I'm not too fussed > with the clustering algorithm, anything simple will do for now. > What I'd like is to make my query and get in return a result set > consisting of points defining the center of each of the clusters. I > want to then draw them client side using Java3D. In any event, I > figure this is possible with PostGIS but I have no idea where to > begin looking. Could anyone point me in the right direction (or > perhaps this functionality already exists and I'm not seeing it in > the documentation.) > > I'm very grateful for you help. This is a part of a big Uni project. > > Cheers. > ./dylan > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From denis at enterprisedb.com Tue Jul 12 20:16:38 2005 From: denis at enterprisedb.com (Denis Lussier) Date: Tue, 12 Jul 2005 23:16:38 -0400 Subject: [postgis-users] Mixing GPL with BSD Message-ID: Hi All, My company is EnterpriseDB Corp. We add some proprietary (usually all made BSD open source within one year) code to PostgreSQL that mostly focuses on Oracle compatibility. My problem is that PostGIS is GPL so I don't see a way I can bundle it into my product offering. I wouldn't have a problem if it were LGPL cuz any tweaks or improvements I'd be more than willing to offer to the community immediately. I guess I can always just have my commercial customers who want to use PostGIS separately go ahead and download/install it themselves (perhaps I'm showing my ignorance if PostGIS needs to be compiled in), but... a separate download/install is inconvenient and less than optimal. Since we don't presently have any true Spatial experts in our company at the moment, we'd also be looking to partner with various community members to provide professional services and advanced support to our customers. Any suggestions?? --Denis Lussier Chief Architect and Chairman EnterpriseDB Corporation PS This product must be darn good cuz I've had several potentially large accounts insist that EDB support it. It shouldn't be an issue for us because we certainly allow usage of PL/pgSQL and we strive to maintain 100% compatability with all features, and add-ons of PostgreSQL. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.d.lorimer at sms.ed.ac.uk Wed Jul 13 05:37:48 2005 From: e.d.lorimer at sms.ed.ac.uk (Eli Dylan Lorimer) Date: Wed, 13 Jul 2005 13:37:48 +0100 Subject: [postgis-users] Re: Help with finding multi-variate clusters In-Reply-To: <248FF8D8-3DF0-4100-820E-536219B49226@sms.ed.ac.uk> References: <248FF8D8-3DF0-4100-820E-536219B49226@sms.ed.ac.uk> Message-ID: <72F3E906-A8DF-4C6A-A375-CC5C195B66B5@sms.ed.ac.uk> Hello, So I've been trying quasi unsuccessfully to find clusters in my data using spatial sql. I think I"m pretty close but I need a tip or something to get me past this little hurdle I'm hitting. Basically, I've got a simple test table with a 2D Point field in it. For testing purposes, I've placed the following data in it: select AsText(point) from waypoints_test; -------------- POINT(0 0) POINT(4 4) POINT(5 5) POINT(6 6) POINT(9 9) POINT(10 10) I want to run whatever magical SQL command I'm seeking to get back the following clusters (based on a Euclidean distance of 2) MULTIPOINT(4 4,5 5,5 5,6 6) MULTIPOINT(9 9,10 10) (2 rows) What I've come up with is sort of close but not quite there. Here are my attempts: select distinct AsText(a.point) from waypoints_test a, waypoints_test b where intersects(buffer(a.point,2), buffer(b.point, 2)) and not equals(a.point,b.point) group by a.point; astext -------------- POINT(10 10) POINT(4 4) POINT(5 5) POINT(6 6) POINT(9 9) (5 rows) select distinct AsText(a.point) from waypoints_test a, waypoints_test b where distance(a.point,b.point)<2 and not equals (a.point,b.point); astext -------------- POINT(10 10) POINT(4 4) POINT(5 5) POINT(6 6) POINT(9 9) (5 rows) select AsText(collect(a.point)) from waypoints_test a, waypoints_test b where distance(a.point,b.point)<2 and not equals (a.point,b.point); --------------------------------------- MULTIPOINT(4 4,5 5,5 5,6 6,9 9,10 10) I cant' seem to figure out how to get the GeomUnion or Collect rows back with each row containing my cluster. The basic logistics behind finding them is really simple, I just want to pass some tolerance (perhaps a mean nearest neighbor value) and then: For each point in my table buffer it by the passed tolerance. Find all points in the table that exist in that buffer. Buffer them. Continue until no points exist within the buffer. Take Union (or collection) of all points and make that a cluster. I would really appreciate a tip on how to group the rows being returned based on the buffer they appeared in. Or, alternatively, I could use a distance function in stead of buffering and find all points that are within said distance(tolerance) of each other and union all these points together. Anything will do. Thank you in advance. Cheers, ./dylan From e.d.lorimer at sms.ed.ac.uk Wed Jul 13 06:22:32 2005 From: e.d.lorimer at sms.ed.ac.uk (Eli Dylan Lorimer) Date: Wed, 13 Jul 2005 14:22:32 +0100 Subject: [postgis-users] Re: Help with finding multi-variate clusters In-Reply-To: <248FF8D8-3DF0-4100-820E-536219B49226@sms.ed.ac.uk> References: <248FF8D8-3DF0-4100-820E-536219B49226@sms.ed.ac.uk> Message-ID: <64CBA3C1-5A78-4544-8DAA-7A7D4A840AD3@sms.ed.ac.uk> Oh, and regarding the use of R, I think that is a stellar idea but I need to stay within the GeoServer/GeoTools2 domain so that I can make my WFS request client-side using GeoTools2 and then have GerServer handle said request and do the magic dance with PostGIS to get back my data. If there is a way to do this with R, that might work. I'll look into it now, but ideally, I'd like to stick to a pure PostGIS solution and use GT filters to form the WFS request. Cheers. On Jul 12, 2005, at 10:16 PM, Eli Dylan Lorimer wrote: > Hello PostGIS Folks, > > I'm trying to leverage the power of the spatial database to help me > find 3-dimensional clusters in my data. Specifically, in one table > I have a 2D point field and a timestamp attribute field. I want to > treat the data from each of these 2 fields as a 3D point (x,y,z) > and over and entire table, find clusters given a specific tolerance > (perhaps a mean nearest neighbor). To be honest, I'm not too fussed > with the clustering algorithm, anything simple will do for now. > What I'd like is to make my query and get in return a result set > consisting of points defining the center of each of the clusters. I > want to then draw them client side using Java3D. In any event, I > figure this is possible with PostGIS but I have no idea where to > begin looking. Could anyone point me in the right direction (or > perhaps this functionality already exists and I'm not seeing it in > the documentation.) > > I'm very grateful for you help. This is a part of a big Uni project. > > Cheers. > ./dylan > From woodbri at swoodbridge.com Wed Jul 13 06:37:24 2005 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 13 Jul 2005 09:37:24 -0400 Subject: [postgis-users] Re: Help with finding multi-variate clusters In-Reply-To: <72F3E906-A8DF-4C6A-A375-CC5C195B66B5@sms.ed.ac.uk> References: <248FF8D8-3DF0-4100-820E-536219B49226@sms.ed.ac.uk> <72F3E906-A8DF-4C6A-A375-CC5C195B66B5@sms.ed.ac.uk> Message-ID: <42D51914.1080109@swoodbridge.com> Hi Eli, In general, the algorithm you presented is an iterative operation and SQL operations tend to be set operations. This means that it is likely that there is not a simple solution to this problem. That said, there is no reason you can write a pgsql function that does the iterative solution. I for one would love to see a function like this, as it is part and parcel of what needs to be done to generate thematic maps. -Steve W. Eli Dylan Lorimer wrote: > Hello, > > So I've been trying quasi unsuccessfully to find clusters in my data > using spatial sql. I think I"m pretty close but I need a tip or > something to get me past this little hurdle I'm hitting. Basically, > I've got a simple test table with a 2D Point field in it. > > For testing purposes, I've placed the following data in it: > > select AsText(point) from waypoints_test; > > -------------- > POINT(0 0) > POINT(4 4) > POINT(5 5) > POINT(6 6) > POINT(9 9) > POINT(10 10) > > I want to run whatever magical SQL command I'm seeking to get back the > following clusters (based on a Euclidean distance of 2) > > MULTIPOINT(4 4,5 5,5 5,6 6) > MULTIPOINT(9 9,10 10) > (2 rows) > > What I've come up with is sort of close but not quite there. Here are > my attempts: > > > select distinct AsText(a.point) from waypoints_test a, waypoints_test > b where intersects(buffer(a.point,2), buffer(b.point, 2)) and not > equals(a.point,b.point) group by a.point; > astext > -------------- > POINT(10 10) > POINT(4 4) > POINT(5 5) > POINT(6 6) > POINT(9 9) > (5 rows) > > select distinct AsText(a.point) from waypoints_test a, waypoints_test > b where distance(a.point,b.point)<2 and not equals (a.point,b.point); > astext > -------------- > POINT(10 10) > POINT(4 4) > POINT(5 5) > POINT(6 6) > POINT(9 9) > (5 rows) > > select AsText(collect(a.point)) from waypoints_test a, waypoints_test > b where distance(a.point,b.point)<2 and not equals (a.point,b.point); > --------------------------------------- > MULTIPOINT(4 4,5 5,5 5,6 6,9 9,10 10) > > I cant' seem to figure out how to get the GeomUnion or Collect rows > back with each row containing my cluster. The basic logistics behind > finding them is really simple, I just want to pass some tolerance > (perhaps a mean nearest neighbor value) and then: > > For each point in my table > buffer it by the passed tolerance. > Find all points in the table that exist in that buffer. > Buffer them. > Continue until no points exist within the buffer. > Take Union (or collection) of all points and make that a cluster. > > I would really appreciate a tip on how to group the rows being returned > based on the buffer they appeared in. Or, alternatively, I could use a > distance function in stead of buffering and find all points that are > within said distance(tolerance) of each other and union all these > points together. > > Anything will do. > Thank you in advance. > > Cheers, > ./dylan > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From e.d.lorimer at sms.ed.ac.uk Wed Jul 13 06:57:46 2005 From: e.d.lorimer at sms.ed.ac.uk (Eli Dylan Lorimer) Date: Wed, 13 Jul 2005 14:57:46 +0100 Subject: [postgis-users] Re: Help with finding multi-variate clusters In-Reply-To: <20050713133658.2C4C72C0FCF@netnation.refractions.net> References: <20050713133658.2C4C72C0FCF@netnation.refractions.net> Message-ID: Hi Stephen, Thanks for your reply. I might look into writing that function as you suggested, but I feel slightly limited in that I'm making the SQL requests in the form of a WFS request to GeoServer which in turn is speaking to PostGIS and so I'm not sure if I can add my own functions and then have my WFS requests trigger them. I'll have to look into this and figure it out. I see what you are saying, it being an iterative algorithm and not really suited for set operations as such. Hum, I still feel like with the spatial operators there must be a way to get what I'm looking for, even if I have to make multiple WFS requests or something. Maybe someone else on this list might know of a way to do this? Anyway, cheers. ./dylan From josh at oklieb.net Wed Jul 13 07:09:10 2005 From: josh at oklieb.net (Josh@oklieb) Date: Wed, 13 Jul 2005 10:09:10 -0400 Subject: [postgis-users] Re: Help with finding multi-variate clusters In-Reply-To: References: <20050713133658.2C4C72C0FCF@netnation.refractions.net> Message-ID: <809CD526-510A-4D97-A9D3-4AAFEC95CCB6@oklieb.net> You may not fuss about the algorithm, but this happens to be something that geostatistics handles rather well and sql hacks not well at all. In particular, it gives you no idea of the strength of the clustering. There has been work done on OGC web processing services (WPS) which can place algorithms from something like R or GRASS in front of or behind a WFS. A back-end approach might be to write a postgresql procedure. If all else fails, try desktop GIS... Josh Lieberman On Jul 13, 2005, at 9:57 AM, Eli Dylan Lorimer wrote: > Hi Stephen, > > Thanks for your reply. I might look into writing that function as > you suggested, but I feel slightly limited in that I'm making the > SQL requests in the form of a WFS request to GeoServer which in > turn is speaking to PostGIS and so I'm not sure if I can add my own > functions and then have my WFS requests trigger them. I'll have to > look into this and figure it out. > > I see what you are saying, it being an iterative algorithm and not > really suited for set operations as such. Hum, I still feel like > with the spatial operators there must be a way to get what I'm > looking for, even if I have to make multiple WFS requests or > something. > > Maybe someone else on this list might know of a way to do this? > > Anyway, cheers. > ./dylan > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From strk at refractions.net Wed Jul 13 07:27:35 2005 From: strk at refractions.net (strk at refractions.net) Date: Wed, 13 Jul 2005 16:27:35 +0200 Subject: [postgis-users] bug in create_undef.sql In-Reply-To: <42CD2BEE.7040900@uibk.ac.at> References: <42CD2BEE.7040900@uibk.ac.at> Message-ID: <20050713142735.GB9737@keybit.net> Fixed, thanks. --strk; On Thu, Jul 07, 2005 at 03:19:42PM +0200, klaus F?rster wrote: > there's a bug in create_undef.pl for postgis version 1.0.2 > if you run it with the appropriate lwpostgis.sql and version 80, > the resulting sql-code is invalid in the following line: > > DROP TYPE geometry_dump AS CASCADE; > > this is the result of a false regexp in create_undef.pl. > using \w+ instead of [^(]+ should solve the problem > > klaus > > --- create_undef.pl 2005-07-07 14:49:02.000000000 +0200 > +++ fixed.pl 2005-07-07 14:48:55.000000000 +0200 > @@ -140,7 +140,7 @@ > > foreach my $type (@types) > { > - if ($type =~ /create type ([^(]+)/i ) > + if ($type =~ /create type (\w+)/i ) > { > if ( $version ge "73" ) > { > > -- > O-. > /_ ) > | (U > klaus* /| > / / > ~ ~ > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From pramsey at refractions.net Wed Jul 13 07:58:28 2005 From: pramsey at refractions.net (Paul Ramsey) Date: Wed, 13 Jul 2005 07:58:28 -0700 Subject: [postgis-users] Re: Help with finding multi-variate clusters In-Reply-To: References: <20050713133658.2C4C72C0FCF@netnation.refractions.net> Message-ID: Dylan, Are you calculating clusters on the fly? Do you need to? How about having a clusters table, that is hooked to your base data table with a trigger? That will be just as up-to-date as your base data, and only have to do the calculations once per data update. Paul PS. A distance threshold "cluster" will return lots of unexpected and unwanted results, which is why more sophisticated tricks have been developed. On 13-Jul-05, at 6:57 AM, Eli Dylan Lorimer wrote: > Hi Stephen, > > Thanks for your reply. I might look into writing that function as > you suggested, but I feel slightly limited in that I'm making the > SQL requests in the form of a WFS request to GeoServer which in > turn is speaking to PostGIS and so I'm not sure if I can add my own > functions and then have my WFS requests trigger them. I'll have to > look into this and figure it out. > > I see what you are saying, it being an iterative algorithm and not > really suited for set operations as such. Hum, I still feel like > with the spatial operators there must be a way to get what I'm > looking for, even if I have to make multiple WFS requests or > something. > > Maybe someone else on this list might know of a way to do this? > > Anyway, cheers. > ./dylan > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From bpederse at nature.berkeley.edu Wed Jul 13 08:46:43 2005 From: bpederse at nature.berkeley.edu (Brent Pedersen) Date: Wed, 13 Jul 2005 08:46:43 -0700 Subject: [postgis-users] distance from one class to another Message-ID: <200507130846.43138.bpederse@nature.berkeley.edu> hi, searched the archives and read the manual but cant figure out how to do this. for a particular tableB.gid where site_name = 'APPLE' i want to find the distance to the closest tableB.gid where site_name = 'PEAR'. 'the_geom' is in tableA. 'comtrs' links the 2 tables. thanks for any pointers or references. i have tableA: Column | Type | Modifiers ----------+-------------------+----------- gid | integer | ddlat | numeric | ddlong | numeric | comtrs | character varying | the_geom | geometry | not null and tableB: comtrs | character varying(11) | site_name | character varying(70) | product_name | character varying(80) | pounds_product_applied | real | chemical_name | character varying(80) | pounds_chemical_applied | real | amount_treated | real | From woodbri at swoodbridge.com Wed Jul 13 09:03:06 2005 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 13 Jul 2005 12:03:06 -0400 Subject: [postgis-users] distance from one class to another In-Reply-To: <200507130846.43138.bpederse@nature.berkeley.edu> References: <200507130846.43138.bpederse@nature.berkeley.edu> Message-ID: <42D53B3A.8060404@swoodbridge.com> Try something like this: select distance((select the_geom from tableA a, tableB b where a.comtrs=b.comtrs and site_name='APPLE'), (select the_geom from tableA a, tableB b where a.comtrs=b.comtrs and site_name='PEAR')); -Steve W. http://imaptools.com/ Brent Pedersen wrote: > hi, searched the archives and read the manual but cant figure out how to do > this. > > for a particular tableB.gid where site_name = 'APPLE' i want to find the > distance to the closest tableB.gid where site_name = 'PEAR'. > > 'the_geom' is in tableA. 'comtrs' links the 2 tables. > > thanks for any pointers or references. > > > i have tableA: > Column | Type | Modifiers > ----------+-------------------+----------- > gid | integer | > ddlat | numeric | > ddlong | numeric | > comtrs | character varying | > the_geom | geometry | not null > > and tableB: > comtrs | character varying(11) | > site_name | character varying(70) | > product_name | character varying(80) | > pounds_product_applied | real | > chemical_name | character varying(80) | > pounds_chemical_applied | real | > amount_treated | real | > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From ezequias at recife.pe.gov.br Wed Jul 13 10:26:32 2005 From: ezequias at recife.pe.gov.br (Ezequias Rodrigues da Rocha) Date: Wed, 13 Jul 2005 14:26:32 -0300 (Hora oficial do Brasil) Subject: [postgis-users] SQL Update Message-ID: <42D54EC8.000003.01228@DC_EZEQUIAS> Hi List, I would like anyone take a look on this SQL and see what is wrong. Please, nobody knows why it occours yet. See attached image. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha * www.recife.pe.gov.br =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- A pior das democracias ainda ? melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships MSN Messenger: ezequias at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: msn.JPG Type: image/jpeg Size: 1111 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: JumpPostgisError.JPG Type: image/jpeg Size: 53860 bytes Desc: not available URL: From jeff at propertykey.com Wed Jul 13 10:23:48 2005 From: jeff at propertykey.com (Jeff Hoffmann) Date: Wed, 13 Jul 2005 12:23:48 -0500 Subject: [postgis-users] possible to pg_dump postgis 1.0 table, restore to postgis 0.9 database? Message-ID: <42D54E24.7080403@propertykey.com> What's the easiest way to copy a postgis version 1.0 table to a server that only has postgis 0.9 installed? If they were both 0.9, I could do a dump/restore with pg_dump, but the dump format for geometry columns is different in the new version of postgis so I can't do that. Is the only other option going through a shape file with pgsql2shp/shp2pgsql? Or is there a way to get pg_dump to dump geometry columns as WKT? -- Jeff Hoffmann jeff at propertykey.com From strk at refractions.net Wed Jul 13 10:45:37 2005 From: strk at refractions.net (strk at refractions.net) Date: Wed, 13 Jul 2005 19:45:37 +0200 Subject: [postgis-users] possible to pg_dump postgis 1.0 table, restore to postgis 0.9 database? In-Reply-To: <42D54E24.7080403@propertykey.com> References: <42D54E24.7080403@propertykey.com> Message-ID: <20050713174537.GA11683@keybit.net> pgsql2shp/shp2pgsql seems the easiest way to me. --strk; On Wed, Jul 13, 2005 at 12:23:48PM -0500, Jeff Hoffmann wrote: > What's the easiest way to copy a postgis version 1.0 table to a server > that only has postgis 0.9 installed? If they were both 0.9, I could do > a dump/restore with pg_dump, but the dump format for geometry columns is > different in the new version of postgis so I can't do that. Is the only > other option going through a shape file with pgsql2shp/shp2pgsql? Or is > there a way to get pg_dump to dump geometry columns as WKT? > > -- > Jeff Hoffmann > jeff at propertykey.com > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From info at poggensee.net Wed Jul 13 11:09:42 2005 From: info at poggensee.net (info at poggensee.net) Date: Wed, 13 Jul 2005 20:09:42 +0200 Subject: [postgis-users] msDrawMap(): Image handling error. Failed to draw layer named 'TEST' Message-ID: <23840408.1121278182850.JavaMail.servlet@kundenserver> what does this error message mean ? the mapfile seems to be correct. msDrawMap(): Image handling error. Failed to draw layer named 'TEST'. prepare_database(): Query error. Error executing POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text from test WHERE the_geom && setSRID('BOX3D(4494500 5258000,4680500 5444000)'::BOX3D, find_srid('','test','the_geom') )' Postgresql reports the error as 'ERROR: could not load library "C:/ms4w/apps/pgsql75win/lib/libpostgis.dll": error ' From woodbri at swoodbridge.com Wed Jul 13 11:23:42 2005 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 13 Jul 2005 14:23:42 -0400 Subject: [postgis-users] msDrawMap(): Image handling error. Failed to draw layer named 'TEST' In-Reply-To: <23840408.1121278182850.JavaMail.servlet@kundenserver> References: <23840408.1121278182850.JavaMail.servlet@kundenserver> Message-ID: <42D55C2E.4010406@swoodbridge.com> info at poggensee.net wrote: > what does this error message mean ? the mapfile seems to be correct. > > msDrawMap(): Image handling error. Failed to draw layer named 'TEST'. > prepare_database(): Query error. Error executing POSTGIS DECLARE > (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR > SELECT asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text > from test WHERE the_geom && setSRID('BOX3D(4494500 5258000,4680500 > 5444000)'::BOX3D, find_srid('','test','the_geom') )' > > Postgresql reports the error as 'ERROR: could not load library > "C:/ms4w/apps/pgsql75win/lib/libpostgis.dll": error ' What does the error say? Do you have "C:/ms4w/apps/pgsql75win/lib/libpostgis.dll" on your system? Are permission correct, such that the web server can load and execute the file? -Steve W. From nicky666 at gmail.com Wed Jul 13 12:37:52 2005 From: nicky666 at gmail.com (Nicolas Ribot) Date: Wed, 13 Jul 2005 21:37:52 +0200 Subject: [postgis-users] SQL Update In-Reply-To: <42D54EC8.000003.01228@DC_EZEQUIAS> References: <42D54EC8.000003.01228@DC_EZEQUIAS> Message-ID: <28de5e3105071312376daef1fc@mail.gmail.com> > Hi List, > > I would like anyone take a look on this SQL and see what is wrong. > > Please, nobody knows why it occours yet. > As the error message said: you are working on 2 geometries with different SRID: the_geom column on enveloppe table has an SRID != 0. The multipolygon you are building from text has an SRID set to 0. Change your polygon textual representation to set an SRID equal to the one in the_geom table, or change the_geom srid to be 0 Nicolas From chip_masters at yahoo.com Wed Jul 13 14:36:23 2005 From: chip_masters at yahoo.com (Chip Masters) Date: Wed, 13 Jul 2005 14:36:23 -0700 (PDT) Subject: [postgis-users] Request for open postgis datasets In-Reply-To: <42D2FCF5.1090104@swoodbridge.com> Message-ID: <20050713213623.19214.qmail@web41127.mail.yahoo.com> Thanks for the pointers, Stephen. The NationalAtlas site is a treasure trove of the kind of stuff I need. I've been using the GNIS for a few years, but now want to convert it to a SQL92 With Geometry Types compliant database, but the metadata at http://geonames.usgs.gov/GNIS.html doesn't specify completely what the SRS should be. It only says > Spatial_Reference_Information: > Horizontal_Coordinate_System_Definition: > Geographic: > Latitude_Resolution: 0.00028 > Longitude_Resolution: 0.00028 > Geographic_Coordinate_Units: decimal degrees but doesn't specify a datum to use. It seems that most of the datasets I found at the National Atlas ftp site use NAD83. Does anyone know for sure which one the GNIS uses? Chip --- Stephen Woodbridge wrote: > Here are some links: > > http://geonames.usgs.gov/stategaz/index.html US > place names with lat/lon > http://www.census.gov/geo/www/cob/index.html US, > state, county, zipcode > and more all in polygons download the ArcView > Shapefile (.shp) format > and use shp2pgsql to load the data. > http://www.nationalatlas.gov/atlasftp.html lots of > data layers for the US > http://keck.library.unr.edu/data/esri_data&maps/esri.html > The world and more > > On any of these, grab the shapefile format (shp) and > us shp2pgsql to > load it. > > -Steve > > > Chip Masters wrote: > > PostGIS Users, > > > > With help from several of you, I've gotten PostGIS > > 1.0.1 + PostgreSQL 8.0.3 + GEOS 2.1.2 + Proj 4.4.9 > up > > and running, and I've ran the OGC compliance tests > > provided in the postgis distrubution. Now I need > some > > data to continue my integration work, and I was > hoping > > that some of you may know where I can find, or can > > even provide me with, some data that I can use. > First, > > let me explain a little about what I'm trying to > do w/ > > PostGIS: > > > > I work at Cycorp (http://www.cyc.com) which is the > > company Doug Lenat founded in 1997 to further the > Cyc > > project, which he began at MCC back in c. 1985. I > > expect some of you have heard of Cyc before, but > if > > not, our website has a nice overview of our main > > goals. > > > > I am the lead developer at Cycorp for our efforts > to > > build a geospatial ontology in our knowledge base > and > > to 'spatially enable' Cyc by connecting it to > spatial > > databases which it can use as a backend for > storing, > > querying, and manipulating spatial data. We > decided to > > do our main research using PostGIS because of its > OGC > > compliance and because we already have a lot of > good > > experience working with PostgreSQL. > > > > Now that I've got PostGIS running and have read > the > > SFS, I am ready to begin testing our translations > of > > CycL queries into SQL92 With Geometry Types > queries, > > but I need useful datasets. The OGC compliance > dataset > > is a start, but what I'd really like is general > data > > about real places. For instance, if anyone had a > > PostGIS database of polygons for all the countries > of > > the world, or all the states in the Union, this > would > > be ideal. Alternatively, I know where to find > > shapefile data for such things, but I don't know > of a > > straightforward way to translate shapefiles into > OGC > > SFS compliant data. Does anyone know of tools for > > converting shapefiles? > > > > Thanks in advance for any help you can offer. > > > > Chip Masters > > > > > > P.S. Just so this interaction isn't just one-way > with > > you guys helping me out, if any PostGIS developers > > have an interest in, or need for geographic > ontologies > > (in OWL-Full format), please let me know and I'll > see > > if we can get a little informal collaboration > going. > > My project is very small, and cannot fund any > > development outside our SOW, but I can certainly > > devote some of my own time to providing some > examples > > of the types of ontologies we're producing under > this project. > > > > > > > > > > > > > ____________________________________________________ > > Sell on Yahoo! Auctions ? no fees. Bid on great > items. > > http://auctions.yahoo.com/ > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From abargnesi at gmail.com Wed Jul 13 16:32:10 2005 From: abargnesi at gmail.com (Anthony Bargnesi) Date: Wed, 13 Jul 2005 19:32:10 -0400 Subject: [postgis-users] Interested in PostGIS for a replacement to ArcSDE Message-ID: Hello, My company uses ArcSDE on an Oracle backend. However we would like to lower our third party costs as each customer requires an Oracle database and SDE license. Our company was interested in using PostGIS to replace our ArcSDE solution. What costs would be involved with deploying a PostGIS (using Postgres rdbms) solution to a customer? Thank you, Anthony Bargnesi Institute of Information Technology, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkgeorge at cadmaps.com Wed Jul 13 19:31:01 2005 From: rkgeorge at cadmaps.com (Randy George) Date: Wed, 13 Jul 2005 20:31:01 -0600 Subject: [postgis-users] Interested in PostGIS for a replacement to ArcSDE In-Reply-To: Message-ID: <20050714023821.DD2012C0E28@netnation.refractions.net> No cost for licensing, but of course redeploying the data and application using PostGIS would take some effort and presumably cost. _____ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Anthony Bargnesi Sent: Wednesday, July 13, 2005 5:32 PM To: postgis-users at postgis.refractions.net Subject: [postgis-users] Interested in PostGIS for a replacement to ArcSDE Hello, My company uses ArcSDE on an Oracle backend. However we would like to lower our third party costs as each customer requires an Oracle database and SDE license. Our company was interested in using PostGIS to replace our ArcSDE solution. What costs would be involved with deploying a PostGIS (using Postgres rdbms) solution to a customer? Thank you, Anthony Bargnesi Institute of Information Technology, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at poggensee.net Thu Jul 14 01:19:48 2005 From: info at poggensee.net (poggensee.net) Date: Thu, 14 Jul 2005 09:19:48 +0100 Subject: [postgis-users] msDrawMap(): Image handling error. Failed to Message-ID: <001501c5884c$d0f052f0$02b2a8c0@PC01> I do not have any experience with Apache. I simply installed it with ms4w. How can I change the permissions for file-access ??? -------------- next part -------------- An HTML attachment was scrubbed... URL: From uwe.seher at arteng.de Thu Jul 14 02:07:43 2005 From: uwe.seher at arteng.de (Uwe Seher) Date: Thu, 14 Jul 2005 11:07:43 +0200 Subject: AW: [postgis-users] Interested in PostGIS for a replacement to ArcSDE In-Reply-To: Message-ID: Hello! The thing is which functionality you need and which environment is available. If you can tell more it would be helpful. If you are interrested, i am working on a read/write-solution between ArcGIS and Postgis which will get a sourceforge-project in the near future. Greetings Uwe Seher -----Urspr?ngliche Nachricht----- Von: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net]Im Auftrag von Anthony Bargnesi Gesendet: Donnerstag, 14. Juli 2005 01:32 An: postgis-users at postgis.refractions.net Betreff: [postgis-users] Interested in PostGIS for a replacement to ArcSDE Hello, My company uses ArcSDE on an Oracle backend. However we would like to lower our third party costs as each customer requires an Oracle database and SDE license. Our company was interested in using PostGIS to replace our ArcSDE solution. What costs would be involved with deploying a PostGIS (using Postgres rdbms) solution to a customer? Thank you, Anthony Bargnesi Institute of Information Technology, Inc. ____________ Virus checked by G DATA AntiVirusKit Version: AVK 15.0.6038 from 13.07.2005 Virus news: www.antiviruslab.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From achim.wessling at gt-net.de Thu Jul 14 04:06:17 2005 From: achim.wessling at gt-net.de (Achim =?ISO-8859-1?Q?We=DFling?=) Date: Thu, 14 Jul 2005 13:06:17 +0200 Subject: AW: [postgis-users] Interested in PostGIS for a replacement to ArcSDE In-Reply-To: References: Message-ID: <1121339176.2626.80.camel@pci90094.infokom.gt-net.de> Sorry, but how near is it? We just in the state of buying a sulution, which is working, but if we can get a opensource-solution we would prefer it! -- Mit freundlichem Gru? Achim We?ling =========================================== INFOKOM G?tersloh A?R Fachbereich II - Technische Anwendungen Herzebrocker Str. 140 33334 G?tersloh Tel.: 05241/85-2926 Achim.Wessling at gt-net.de http://www.infokom-gt.de Am Do, den 14.07.2005 schrieb Uwe Seher um 11:07: > Hello! > The thing is which functionality you need and which environment is > available. If you can tell more it would be helpful. If you are > interrested, i am working on a read/write-solution between ArcGIS and > Postgis which will get a sourceforge-project in the near future. > > Greetings > Uwe Seher > -----Urspr?ngliche Nachricht----- > Von: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net]Im > Auftrag von Anthony Bargnesi > Gesendet: Donnerstag, 14. Juli 2005 01:32 > An: postgis-users at postgis.refractions.net > Betreff: [postgis-users] Interested in PostGIS for a > replacement to ArcSDE > > > Hello, > > My company uses ArcSDE on an Oracle backend. However we would > like to lower our third party costs as each customer requires > an Oracle database and SDE license. Our company was > interested in using PostGIS to replace our ArcSDE solution. > What costs would be involved with deploying a PostGIS (using > Postgres rdbms) solution to a customer? > > Thank you, > > Anthony Bargnesi > Institute of Information Technology, Inc. > > > ______________________________________________________________________ > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users -- Mit freundlichem Gru? Achim We?ling =========================================== INFOKOM G?tersloh A?R Fachbereich II - Technische Anwendungen Herzebrocker Str. 140 33334 G?tersloh Tel.: 05241/85-2926 Achim.Wessling at gt-net.de http://www.infokom-gt.de From uwe.seher at arteng.de Thu Jul 14 03:19:22 2005 From: uwe.seher at arteng.de (Uwe Seher) Date: Thu, 14 Jul 2005 12:19:22 +0200 Subject: AW: AW: [postgis-users] Interested in PostGIS for a replacement toArcSDE In-Reply-To: <1121339176.2626.80.camel@pci90094.infokom.gt-net.de> Message-ID: It is at the beginning, just a spinof of my own dataproblems. At the moment it can read Geometries over oledb well and i am reviewing and documenting the code at the moment. After this I will create a Sourceforge-project. So it is far away from a stable solution, but i have to do some payed work too ;) Grettings Uwe Seher ________________________________________ art & engineering kauppert und mach ingenieurpartnerschaft ________________________________________ nebeniusstr. 34 d-76137 karlsruhe fon +49 721 3548969-3 fax +49 721 3548969-5 email uwe.seher at arteng.de, www.arteng.de > -----Urspr?ngliche Nachricht----- > Von: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net]Im Auftrag von > Achim We?ling > Gesendet: Donnerstag, 14. Juli 2005 13:06 > An: PostGIS Users Discussion > Betreff: Re: AW: [postgis-users] Interested in PostGIS for a replacement > toArcSDE > > > Sorry, > > but how near is it? We just in the state of buying a sulution, which is > working, but if we can get a opensource-solution we would prefer it! > > -- > Mit freundlichem Gru? > > Achim We?ling > =========================================== > INFOKOM G?tersloh A?R > Fachbereich II - Technische Anwendungen > Herzebrocker Str. 140 > 33334 G?tersloh > Tel.: 05241/85-2926 > Achim.Wessling at gt-net.de > http://www.infokom-gt.de > > Am Do, den 14.07.2005 schrieb Uwe Seher um 11:07: > > Hello! > > The thing is which functionality you need and which environment is > > available. If you can tell more it would be helpful. If you are > > interrested, i am working on a read/write-solution between ArcGIS and > > Postgis which will get a sourceforge-project in the near future. > > > > Greetings > > Uwe Seher > > -----Urspr?ngliche Nachricht----- > > Von: postgis-users-bounces at postgis.refractions.net > > [mailto:postgis-users-bounces at postgis.refractions.net]Im > > Auftrag von Anthony Bargnesi > > Gesendet: Donnerstag, 14. Juli 2005 01:32 > > An: postgis-users at postgis.refractions.net > > Betreff: [postgis-users] Interested in PostGIS for a > > replacement to ArcSDE > > > > > > Hello, > > > > My company uses ArcSDE on an Oracle backend. However we would > > like to lower our third party costs as each customer requires > > an Oracle database and SDE license. Our company was > > interested in using PostGIS to replace our ArcSDE solution. > > What costs would be involved with deploying a PostGIS (using > > Postgres rdbms) solution to a customer? > > > > Thank you, > > > > Anthony Bargnesi > > Institute of Information Technology, Inc. > > > > > > ______________________________________________________________________ > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- > Mit freundlichem Gru? > > Achim We?ling > =========================================== > INFOKOM G?tersloh A?R > Fachbereich II - Technische Anwendungen > Herzebrocker Str. 140 > 33334 G?tersloh > Tel.: 05241/85-2926 > Achim.Wessling at gt-net.de > http://www.infokom-gt.de > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users ____________ Virus checked by G DATA AntiVirusKit Version: AVK 15.0.6038 from 13.07.2005 Virus news: www.antiviruslab.com From jburkhardt at usgs.gov Thu Jul 14 10:21:38 2005 From: jburkhardt at usgs.gov (Jason Burkhardt) Date: Thu, 14 Jul 2005 13:21:38 -0400 Subject: [postgis-users] Trouble getting PostGIS data to display in MapServer Message-ID: I'm really sure this must be something simple I'm missing, but I'm at my wits end and am not getting any further by staring at it. Hopefully a fresh set of eyes can help me out. I'm running MapServer & have a viewer up displaying data from a variety of sources (WMS, .tif's, shapefiles) and would like to include PostGIS data. I created a simple PostgreSQL db with a table called cities (this table was created with oids) that has a name, state_name and point field. I created the point field as such: select AddGeometryColumn('cities', 'point', 4326, 'POINT', 2); A sample of the data I'm inserting looks like this: insert into cities (name, state, point) values('Albany', 'NY', GeometryFromText('POINT(73 42)',4326)); I then created 2 indexes as so: CREATE INDEX cities_index ON cities USING GIST (point GIST_GEOMETRY_OPS) CREATE INDEX cities_index_oid ON cities (name) I've also done the second index with point as the unique column, I don't really care which it is at this point. Onto MapServer my layer definition looks like this: LAYER CONNECTIONTYPE postgis CONNECTION "user=postgres password=pgadmin dbname=test host=localhost" DATA "point from cities" NAME "PostGIS Cities Test" TYPE POINT STATUS ON CLASS COLOR 255 0 0 SIZE 50 END PROJECTION "init=epsg:4326" END END Every other layer I have is also 4326. It's connecting to the database & not throwing any errors that I can see from the PostgreSQL logs (I've run them with varying levels of verbosity). MapServer does not return a broken image when the layer is turned on, I just don't see the point displayed. I would appreciate any comments/insight. Thanks, Jason From nicky666 at gmail.com Thu Jul 14 10:45:58 2005 From: nicky666 at gmail.com (Nicolas Ribot) Date: Thu, 14 Jul 2005 19:45:58 +0200 Subject: [postgis-users] Trouble getting PostGIS data to display in MapServer In-Reply-To: References: Message-ID: <28de5e3105071410452557eb4a@mail.gmail.com> Hi Jason, Just some thoughts: try to explicitly add PG port in your connection string (5432 is the default) try to set the layer's status to DEFAULT in order to force its display. in your DATA clause, maybe try adding "using unique oid using SRID=4326". Are you sure your points' extent fall in your mapserver map extent ? Shouldn't Albany's longitude be -72 instead of 72 (West from greenwich ?) Nicolas On 7/14/05, Jason Burkhardt wrote: > I'm really sure this must be something simple I'm missing, but I'm at my > wits end and am not getting any further by staring at it. Hopefully a > fresh set of eyes can help me out. > I'm running MapServer & have a viewer up displaying data from a variety of > sources (WMS, .tif's, shapefiles) and would like to include PostGIS data. > I created a simple PostgreSQL db with a table called cities (this table was > created with oids) that has a name, state_name and point field. > I created the point field as such: > select AddGeometryColumn('cities', 'point', 4326, 'POINT', 2); > A sample of the data I'm inserting looks like this: > insert into cities (name, state, point) values('Albany', 'NY', > GeometryFromText('POINT(73 42)',4326)); > > I then created 2 indexes as so: > CREATE INDEX cities_index ON cities USING GIST (point > GIST_GEOMETRY_OPS) > CREATE INDEX cities_index_oid ON cities (name) > I've also done the second index with point as the unique column, I don't > really care which it is at this point. > > Onto MapServer my layer definition looks like this: > LAYER > CONNECTIONTYPE postgis > CONNECTION "user=postgres password=pgadmin dbname=test host=localhost" > DATA "point from cities" > NAME "PostGIS Cities Test" > TYPE POINT > STATUS ON > CLASS > COLOR 255 0 0 > SIZE 50 > END > PROJECTION > "init=epsg:4326" > END > END > > Every other layer I have is also 4326. It's connecting to the database & > not throwing any errors that I can see from the PostgreSQL logs (I've run > them with varying levels of verbosity). MapServer does not return a broken > image when the layer is turned on, I just don't see the point displayed. > I would appreciate any comments/insight. > > Thanks, > Jason > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From ezequias at recife.pe.gov.br Thu Jul 14 11:12:09 2005 From: ezequias at recife.pe.gov.br (Ezequias Rodrigues da Rocha) Date: Thu, 14 Jul 2005 15:12:09 -0300 (Hora oficial do Brasil) Subject: Res: Re: [postgis-users] SQL Update References: <28de5e3105071312376daef1fc@mail.gmail.com> Message-ID: <42D6AAF9.00000D.00196@DC_EZEQUIAS> Nicolas, What Multipolygon are you talking about ? I think that I was updating only one layer at time. Sincerely Ezequias -------Mensagem original------- De: Nicolas Ribot Data: 07/13/05 16:22:31 Para: PostGIS Users Discussion Assunto: Re: [postgis-users] SQL Update > Hi List, > > I would like anyone take a look on this SQL and see what is wrong. > > Please, nobody knows why it occours yet. > As the error message said: you are working on 2 geometries with different SRID: the_geom column on enveloppe table has an SRID != 0. The multipolygon you are building from text has an SRID set to 0. Change your polygon textual representation to set an SRID equal to the one in the_geom table, or change the_geom srid to be 0 Nicolas _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ezequias at recife.pe.gov.br Thu Jul 14 11:15:42 2005 From: ezequias at recife.pe.gov.br (Ezequias Rodrigues da Rocha) Date: Thu, 14 Jul 2005 15:15:42 -0300 (Hora oficial do Brasil) Subject: Res: [postgis-users] Trouble getting PostGIS data to display in MapServer References: Message-ID: <42D6ABCE.000001.02732@DC_EZEQUIAS> I use Status "On" to Jump and "Default" for Web (browser). Try it out. Best wishes Ezequias -------Mensagem original------- De: Jason Burkhardt Data: 07/14/05 14:06:15 Para: postgis-users at postgis.refractions.net Assunto: [postgis-users] Trouble getting PostGIS data to display in MapServer I'm really sure this must be something simple I'm missing, but I'm at my wits end and am not getting any further by staring at it. Hopefully a fresh set of eyes can help me out. I'm running MapServer & have a viewer up displaying data from a variety of sources (WMS, .tif's, shapefiles) and would like to include PostGIS data. I created a simple PostgreSQL db with a table called cities (this table was created with oids) that has a name, state_name and point field. I created the point field as such: select AddGeometryColumn('cities', 'point', 4326, 'POINT', 2); A sample of the data I'm inserting looks like this: insert into cities (name, state, point) values('Albany', 'NY', GeometryFromText('POINT(73 42)',4326)); I then created 2 indexes as so: CREATE INDEX cities_index ON cities USING GIST (point GIST_GEOMETRY_OPS) CREATE INDEX cities_index_oid ON cities (name) I've also done the second index with point as the unique column, I don't really care which it is at this point. Onto MapServer my layer definition looks like this: LAYER CONNECTIONTYPE postgis CONNECTION "user=postgres password=pgadmin dbname=test host=localhost" DATA "point from cities" NAME "PostGIS Cities Test" TYPE POINT STATUS ON CLASS COLOR 255 0 0 SIZE 50 END PROJECTION "init=epsg:4326" END END Every other layer I have is also 4326. It's connecting to the database & not throwing any errors that I can see from the PostgreSQL logs (I've run them with varying levels of verbosity). MapServer does not return a broken image when the layer is turned on, I just don't see the point displayed. I would appreciate any comments/insight. Thanks, Jason _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jburkhardt at usgs.gov Thu Jul 14 11:00:59 2005 From: jburkhardt at usgs.gov (Jason Burkhardt) Date: Thu, 14 Jul 2005 14:00:59 -0400 Subject: [postgis-users] Trouble getting PostGIS data to display in MapServer In-Reply-To: <28de5e3105071410452557eb4a@mail.gmail.com> Message-ID: Thanks for the quick response. I've tried with just about every combination of lat/long (including -72) with no results. I was just using the list here: http://www.realestate3d.com/gps/uslatlongdegmin.htm so I'm really not sure if they're all hosed or what. My current viewer's extents extend from central america up to the north pole so I figured I would have hit something in the area by now ;) I modified my .map file as per your suggestions to look like this: CONNECTION "user=postgres password=pgadmin dbname=test host=localhost port=5432" DATA "point from cities using unique oid using SRID=4326" I assume that's what you meant for the DATA clause. I know for sure that MapServer is connecting to the database & executing the queries, I can see as much in the PostgreSQL logs. If I set the layers status to default it's turned off when I load up my viewer & I'm still unable to display it when I turn it on and refresh the viewer. Jason |---------+---------------------------------------------> | | Nicolas Ribot | | | Sent by: | | | postgis-users-bounces at postgis.refr| | | actions.net | | | | | | | | | 07/14/2005 01:45 PM | | | Please respond to Nicolas Ribot; | | | Please respond to PostGIS Users | | | Discussion | |---------+---------------------------------------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| | | | To: PostGIS Users Discussion | | cc: | | Subject: Re: [postgis-users] Trouble getting PostGIS data to display in MapServer | >--------------------------------------------------------------------------------------------------------------------------------------------------| Hi Jason, Just some thoughts: try to explicitly add PG port in your connection string (5432 is the default) try to set the layer's status to DEFAULT in order to force its display. in your DATA clause, maybe try adding "using unique oid using SRID=4326". Are you sure your points' extent fall in your mapserver map extent ? Shouldn't Albany's longitude be -72 instead of 72 (West from greenwich ?) Nicolas On 7/14/05, Jason Burkhardt wrote: > I'm really sure this must be something simple I'm missing, but I'm at my > wits end and am not getting any further by staring at it. Hopefully a > fresh set of eyes can help me out. > I'm running MapServer & have a viewer up displaying data from a variety of > sources (WMS, .tif's, shapefiles) and would like to include PostGIS data. > I created a simple PostgreSQL db with a table called cities (this table was > created with oids) that has a name, state_name and point field. > I created the point field as such: > select AddGeometryColumn('cities', 'point', 4326, 'POINT', 2); > A sample of the data I'm inserting looks like this: > insert into cities (name, state, point) values('Albany', 'NY', > GeometryFromText('POINT(73 42)',4326)); > > I then created 2 indexes as so: > CREATE INDEX cities_index ON cities USING GIST (point > GIST_GEOMETRY_OPS) > CREATE INDEX cities_index_oid ON cities (name) > I've also done the second index with point as the unique column, I don't > really care which it is at this point. > > Onto MapServer my layer definition looks like this: > LAYER > CONNECTIONTYPE postgis > CONNECTION "user=postgres password=pgadmin dbname=test host=localhost" > DATA "point from cities" > NAME "PostGIS Cities Test" > TYPE POINT > STATUS ON > CLASS > COLOR 255 0 0 > SIZE 50 > END > PROJECTION > "init=epsg:4326" > END > END > > Every other layer I have is also 4326. It's connecting to the database & > not throwing any errors that I can see from the PostgreSQL logs (I've run > them with varying levels of verbosity). MapServer does not return a broken > image when the layer is turned on, I just don't see the point displayed. > I would appreciate any comments/insight. > > Thanks, > Jason > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From MChapman at sanz.com Thu Jul 14 11:10:03 2005 From: MChapman at sanz.com (Chapman, Martin) Date: Thu, 14 Jul 2005 12:10:03 -0600 Subject: AW: [postgis-users] Interested in PostGIS for a replacement toArcSDE Message-ID: Convert now. PostGIS/PostgreSQL is awesome. Martin -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Achim We?ling Sent: Thursday, July 14, 2005 5:06 AM To: PostGIS Users Discussion Subject: Re: AW: [postgis-users] Interested in PostGIS for a replacement toArcSDE Sorry, but how near is it? We just in the state of buying a sulution, which is working, but if we can get a opensource-solution we would prefer it! -- Mit freundlichem Gru? Achim We?ling =========================================== INFOKOM G?tersloh A?R Fachbereich II - Technische Anwendungen Herzebrocker Str. 140 33334 G?tersloh Tel.: 05241/85-2926 Achim.Wessling at gt-net.de http://www.infokom-gt.de Am Do, den 14.07.2005 schrieb Uwe Seher um 11:07: > Hello! > The thing is which functionality you need and which environment is > available. If you can tell more it would be helpful. If you are > interrested, i am working on a read/write-solution between ArcGIS and > Postgis which will get a sourceforge-project in the near future. > > Greetings > Uwe Seher > -----Urspr?ngliche Nachricht----- > Von: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net]Im > Auftrag von Anthony Bargnesi > Gesendet: Donnerstag, 14. Juli 2005 01:32 > An: postgis-users at postgis.refractions.net > Betreff: [postgis-users] Interested in PostGIS for a > replacement to ArcSDE > > > Hello, > > My company uses ArcSDE on an Oracle backend. However we would > like to lower our third party costs as each customer requires > an Oracle database and SDE license. Our company was > interested in using PostGIS to replace our ArcSDE solution. > What costs would be involved with deploying a PostGIS (using > Postgres rdbms) solution to a customer? > > Thank you, > > Anthony Bargnesi > Institute of Information Technology, Inc. > > > ______________________________________________________________________ > _______________________________________________ > postgis-users mailing list postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users -- Mit freundlichem Gru? Achim We?ling =========================================== INFOKOM G?tersloh A?R Fachbereich II - Technische Anwendungen Herzebrocker Str. 140 33334 G?tersloh Tel.: 05241/85-2926 Achim.Wessling at gt-net.de http://www.infokom-gt.de _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From nicky666 at gmail.com Thu Jul 14 11:20:11 2005 From: nicky666 at gmail.com (Nicolas Ribot) Date: Thu, 14 Jul 2005 20:20:11 +0200 Subject: Res: Re: [postgis-users] SQL Update In-Reply-To: <42D6AAF9.00000D.00196@DC_EZEQUIAS> References: <28de5e3105071312376daef1fc@mail.gmail.com> <42D6AAF9.00000D.00196@DC_EZEQUIAS> Message-ID: <28de5e3105071411202e5d45a6@mail.gmail.com> > Nicolas, > > What Multipolygon are you talking about ? > > I think that I was updating only one layer at time. > In your post, the attached image showed the query generating the error message. In it, when the envelope table is updated, the where clause references a multipolygon whose SRID is 0. According to the error message, the "envelope" table has another SRID. You should check it (in the geometry_columns table). Nicolas From pramsey at refractions.net Thu Jul 14 11:27:59 2005 From: pramsey at refractions.net (Paul Ramsey) Date: Thu, 14 Jul 2005 11:27:59 -0700 Subject: [postgis-users] Trouble getting PostGIS data to display in MapServer In-Reply-To: References: Message-ID: <3FA3B85E-49B4-453B-B2B6-D877659E4FD6@refractions.net> Try setting your SYMBOL to "circle" or really anything other than the default (which I think is dimensionless and therefor immune to SIZE). When you set your postgresql statement logging on, do you see mapserver making queries? If so, what do they look like? Does the apache hit in your apache logs include the cities layer name? (Ie, are you sure your client is asking for it?) P On 14-Jul-05, at 11:00 AM, Jason Burkhardt wrote: > Thanks for the quick response. > I've tried with just about every combination of lat/long (including > -72) > with no results. I was just using the list here: > http://www.realestate3d.com/gps/uslatlongdegmin.htm so I'm really > not sure > if they're all hosed or what. My current viewer's extents extend from > central america up to the north pole so I figured I would have hit > something in the area by now ;) > I modified my .map file as per your suggestions to look like this: > CONNECTION "user=postgres password=pgadmin dbname=test > host=localhost port=5432" > DATA "point from cities using unique oid using SRID=4326" > I assume that's what you meant for the DATA clause. I know for > sure that > MapServer is connecting to the database & executing the queries, I > can see > as much in the PostgreSQL logs. > If I set the layers status to default it's turned off when I load > up my > viewer & I'm still unable to display it when I turn it on and > refresh the > viewer. > > Jason > > > > > > |---------+---------------------------------------------> > | | Nicolas Ribot | > | | Sent by: | > | | postgis-users-bounces at postgis.refr| > | | actions.net | > | | | > | | | > | | 07/14/2005 01:45 PM | > | | Please respond to Nicolas Ribot; | > | | Please respond to PostGIS Users | > | | Discussion | > |---------+---------------------------------------------> > >> --------------------------------------------------------------------- >> --------------------------------------------------------------------- >> --------| >> > > | > > | > | To: PostGIS Users Discussion users at postgis.refractions.net> > | > | > cc: > | > | Subject: Re: [postgis-users] Trouble getting PostGIS > data to display in > MapServer | > >> --------------------------------------------------------------------- >> --------------------------------------------------------------------- >> --------| >> > > > > > Hi Jason, > > Just some thoughts: > > try to explicitly add PG port in your connection string (5432 is the > default) > try to set the layer's status to DEFAULT in order to force its > display. > in your DATA clause, maybe try adding "using unique oid using > SRID=4326". > > Are you sure your points' extent fall in your mapserver map extent ? > Shouldn't Albany's longitude be -72 instead of 72 (West from greenwich > ?) > > Nicolas > > > On 7/14/05, Jason Burkhardt wrote: > >> I'm really sure this must be something simple I'm missing, but I'm >> at my >> wits end and am not getting any further by staring at it. >> Hopefully a >> fresh set of eyes can help me out. >> I'm running MapServer & have a viewer up displaying data from a >> variety >> > of > >> sources (WMS, .tif's, shapefiles) and would like to include >> PostGIS data. >> I created a simple PostgreSQL db with a table called cities (this >> table >> > was > >> created with oids) that has a name, state_name and point field. >> I created the point field as such: >> select AddGeometryColumn('cities', 'point', 4326, 'POINT', 2); >> A sample of the data I'm inserting looks like this: >> insert into cities (name, state, point) values('Albany', 'NY', >> GeometryFromText('POINT(73 42)',4326)); >> >> I then created 2 indexes as so: >> CREATE INDEX cities_index ON cities USING GIST (point >> GIST_GEOMETRY_OPS) >> CREATE INDEX cities_index_oid ON cities (name) >> I've also done the second index with point as the unique column, I >> don't >> really care which it is at this point. >> >> Onto MapServer my layer definition looks like this: >> LAYER >> CONNECTIONTYPE postgis >> CONNECTION "user=postgres password=pgadmin dbname=test >> host=localhost" >> DATA "point from cities" >> NAME "PostGIS Cities Test" >> TYPE POINT >> STATUS ON >> CLASS >> COLOR 255 0 0 >> SIZE 50 >> END >> PROJECTION >> "init=epsg:4326" >> END >> END >> >> Every other layer I have is also 4326. It's connecting to the >> database & >> not throwing any errors that I can see from the PostgreSQL logs >> (I've run >> them with varying levels of verbosity). MapServer does not return a >> > broken > >> image when the layer is turned on, I just don't see the point >> displayed. >> I would appreciate any comments/insight. >> >> Thanks, >> Jason >> >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From nicky666 at gmail.com Thu Jul 14 11:29:25 2005 From: nicky666 at gmail.com (Nicolas Ribot) Date: Thu, 14 Jul 2005 20:29:25 +0200 Subject: [postgis-users] Trouble getting PostGIS data to display in MapServer In-Reply-To: References: <28de5e3105071410452557eb4a@mail.gmail.com> Message-ID: <28de5e3105071411293c2c5371@mail.gmail.com> > Thanks for the quick response. > I've tried with just about every combination of lat/long (including -72) > with no results. I was just using the list here: > http://www.realestate3d.com/gps/uslatlongdegmin.htm so I'm really not sure > if they're all hosed or what. My current viewer's extents extend from > central america up to the north pole so I figured I would have hit > something in the area by now ;) > I modified my .map file as per your suggestions to look like this: > CONNECTION "user=postgres password=pgadmin dbname=test > host=localhost port=5432" > DATA "point from cities using unique oid using SRID=4326" > I assume that's what you meant for the DATA clause. I know for sure that > MapServer is connecting to the database & executing the queries, I can see > as much in the PostgreSQL logs. > If I set the layers status to default it's turned off when I load up my > viewer & I'm still unable to display it when I turn it on and refresh the > viewer. > Maybe try to change the symbol for your points: your CLASS definition, on my system, leads to a single-pixel point, dispite the SIZE 50. You can try something like: # for CLASS part of the POINT layer definition: class color 255 0 0 symbol "circle" size 10 end # at the end of the mapfile, the following symbol def: symbol name "circle" type ellipse points 1 1 end end Nicolas From ezequias at recife.pe.gov.br Thu Jul 14 11:46:42 2005 From: ezequias at recife.pe.gov.br (Ezequias Rodrigues da Rocha) Date: Thu, 14 Jul 2005 15:46:42 -0300 (Hora oficial do Brasil) Subject: Res: Re: Res: Re: [postgis-users] SQL Update References: <28de5e3105071411202e5d45a6@mail.gmail.com> Message-ID: <42D6B312.000008.02732@DC_EZEQUIAS> This have something to do with my jdbc driver is pg74jdbc3.jar and my postgresql is 8.0 ? I load my themes by shp2pgsql and I passed the SRID parameter "-s