From mike at fuhr.org Wed Nov 1 07:02:19 2006 From: mike at fuhr.org (Michael Fuhr) Date: Wed, 1 Nov 2006 08:02:19 -0700 Subject: [postgis-users] Not able to excute spatial query on postgresql database with postgis support In-Reply-To: <be5110d00610310847k44253934t27abb7689a47c414@mail.gmail.com> References: <be5110d00610300700k6b35093aiaac6df9e0ab73dd1@mail.gmail.com> <20061030152108.GA10539@winnie.fuhr.org> <be5110d00610300733q12ffd83cw6ee187eab16f3812@mail.gmail.com> <20061031045730.GA13725@winnie.fuhr.org> <be5110d00610310847k44253934t27abb7689a47c414@mail.gmail.com> Message-ID: <20061101150219.GA62805@winnie.fuhr.org> On Tue, Oct 31, 2006 at 10:47:50AM -0600, vamsee movva wrote: > > What can you tell us about the geometries in la_damage ? > > Honestly i don't have any idea about geometries and how to find geometries. > the geometry in la_blocks for stfid = 220750501002999? > I don't know how to see the geometry of the_geom column. You can see a geometry's textual representation with functions like AsText() and AsEWKT() or you could see graphical output with various visualization tools. > > What's the output of the following query? > > SELECT summary(the_geom) FROM la_blocks WHERE stfid = '220750501002999'; > please find the attached file "stfid.txt" Ouch: > MultiPolygon[B] with 1 elements > Polygon[] with 2507 rings I count 64266 points altogether. Does this geometry's row in la_blocks contain other columns that explain what it is? Is this geometry's size an anomaly? The following queries should show the geometries with the most rings and points: SELECT stid, npoints(the_geom), nrings(the_geom) FROM la_blocks ORDER BY nrings DESC LIMIT 10; SELECT stid, npoints(the_geom), nrings(the_geom) FROM la_blocks ORDER BY npoints DESC LIMIT 10; Examining the geometry's bounding box might also be revealing: SELECT getbbox(the_geom) FROM la_blocks WHERE stfid = '220750501002999'; I'm wondering if this geometry is representative of the rest of the data or if it's an outlier and possibly bogus. -- Michael Fuhr From vamseejump at gmail.com Wed Nov 1 09:11:33 2006 From: vamseejump at gmail.com (vamsee movva) Date: Wed, 1 Nov 2006 11:11:33 -0600 Subject: [postgis-users] Not able to excute spatial query on postgresql database with postgis support In-Reply-To: <20061101150219.GA62805@winnie.fuhr.org> References: <be5110d00610300700k6b35093aiaac6df9e0ab73dd1@mail.gmail.com> <20061030152108.GA10539@winnie.fuhr.org> <be5110d00610300733q12ffd83cw6ee187eab16f3812@mail.gmail.com> <20061031045730.GA13725@winnie.fuhr.org> <be5110d00610310847k44253934t27abb7689a47c414@mail.gmail.com> <20061101150219.GA62805@winnie.fuhr.org> Message-ID: <be5110d00611010911k36df5f07ra881dcc5b5b53fe6@mail.gmail.com> Hi Michael, Thank you for your reply. Here are results of the queries you mentioned. AsText() and AsEWKT() select AsEWKT(the_geom) from la_blocks where stfid='220750501002995'; asewkt ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MULTIPOLYGON(((-89.826276 29.643064,-89.826879 29.642835,-89.827639 29.642766,-89.828321 29.642949,-89.828609 29.642858,-89.828635 29.641735,- 89.82895 29.6413,-89.829579 29.641323,-89.830628 29.641598,-89.831703 29.642079,-89.832384 29.642559,-89.833171 29.643315,-89.833617 29.643452,- 89.834429 29.643407,-89.835033 29.643819,-89.835164 29.644093,-89.835111 29.644414,-89.835033 29.644529,-89.834666 29.644712,-89.834456 29.644941,- 89.834351 29.645262,-89.834378 29.645743,-89.834719 29.646178,-89.834876 29.646338,-89.834928 29.646636,-89.834719 29.646888,-89.834352 29.646957,- 89.833985 29.646865,-89.833617 29.646636,-89.832936 29.646064,-89.832595 29.645835,-89.832018 29.64572,-89.831389 29.64572,-89.830655 29.646064,- 89.829763 29.646156,-89.828924 29.645995,-89.828269 29.645583,-89.82743 29.64485,-89.827141 29.644415,-89.826931 29.643911,-89.826722 29.64382,- 89.826617 29.643889,-89.826355 29.644324,-89.826302 29.64437,-89.826224 29.644507,-89.826014 29.644622,-89.825725 29.644622,-89.825647 29.644232,- 89.825883 29.643751,-89.826066 29.643454,-89.826197 29.643316,-89.826276 29.643064),(-89.831179 29.643567,-89.830287 29.643682,-89.829946 29.643911,- 89.82992 29.644026,-89.830182 29.644186,-89.831231 29.644735,-89.831467 29.644644,-89.831546 29.644438,-89.831546 29.64398,-89.831441 29.643773,- 89.831179 29.643567))) (1 row) (FOR stfid 220750501002999,It gave a very big set of co-ordinates) SELECT stfid, npoints(the_geom), nrings(the_geom) FROM la_blocks ORDER BY nrings DESC LIMIT 10; stfid | npoints | nrings -----------------+---------+-------- 220750501002999 | 64266 | 2507 220750501002103 | 60919 | 2487 220750508001999 | 19019 | 821 220750508001000 | 16480 | 813 220750501002998 | 45421 | 731 221090013004990 | 34863 | 354 221090011003999 | 17073 | 337 221090012024005 | 13503 | 290 220870301012999 | 44032 | 286 220750501002065 | 12727 | 248 (10 rows) These are the points where the query taking too much time to execute. SELECT getbbox(the_geom) FROM la_blocks WHERE stfid = '220750501002999'; getbbox ---------------------------------------------------------------------------- BOX(-89.5361709594727 28.8551273345947,-88.8792343139648 29.6479110717773) (1 row) I think, the number of rings is the problem Thanks alot, have a nice day vamsee movva On 11/1/06, Michael Fuhr <mike at fuhr.org> wrote: > > On Tue, Oct 31, 2006 at 10:47:50AM -0600, vamsee movva wrote: > > > What can you tell us about the geometries in la_damage ? > > > > Honestly i don't have any idea about geometries and how to find > geometries. > > the geometry in la_blocks for stfid = 220750501002999? > > I don't know how to see the geometry of the_geom column. > > You can see a geometry's textual representation with functions like > AsText() and AsEWKT() or you could see graphical output with various > visualization tools. > > > > What's the output of the following query? > > > > SELECT summary(the_geom) FROM la_blocks WHERE stfid = '220750501002999'; > > please find the attached file "stfid.txt" > > Ouch: > > > MultiPolygon[B] with 1 elements > > Polygon[] with 2507 rings > > I count 64266 points altogether. Does this geometry's row in > la_blocks contain other columns that explain what it is? Is this > geometry's size an anomaly? The following queries should show > the geometries with the most rings and points: > > SELECT stid, npoints(the_geom), nrings(the_geom) > FROM la_blocks > ORDER BY nrings DESC > LIMIT 10; > > SELECT stid, npoints(the_geom), nrings(the_geom) > FROM la_blocks > ORDER BY npoints DESC > LIMIT 10; > > Examining the geometry's bounding box might also be revealing: > > SELECT getbbox(the_geom) > FROM la_blocks > WHERE stfid = '220750501002999'; > > I'm wondering if this geometry is representative of the rest of the > data or if it's an outlier and possibly bogus. > > -- > Michael Fuhr > _______________________________________________ > 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: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061101/7d4b5637/attachment.html> From anntv84 at yahoo.com Wed Nov 1 22:52:47 2006 From: anntv84 at yahoo.com (An Nguyen) Date: Wed, 1 Nov 2006 22:52:47 -0800 (PST) Subject: [postgis-users] Problem with pgRouting function: assign_vertex_id(table, float8) Message-ID: <20061102065247.35060.qmail@web38610.mail.mud.yahoo.com> Hi all, When I use the function assign_vertex_id("mytable", 0.1) of pgRouting with 1000 records, it works well. But I try to use this function with 30000 records it runs during hours and hours and use 100% CPU. And I don't know how much time it costs until the query finishes. It still runs and runs. My computer: OS: Linux Fedora Core 5 CPU: Intel Celeron D Family 15 Model 4 Stepping 1 Genuine Intel ~2133 RAM: DDR 256MB+512MB Anyone had solved this problem before? I need your help! Thanks a lot, --------------------------------- Check out the New Yahoo! Mail - Fire up a more powerful email and get things done faster. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061101/e026f46e/attachment.html> From strk at refractions.net Thu Nov 2 02:29:08 2006 From: strk at refractions.net (strk at refractions.net) Date: Thu, 2 Nov 2006 11:29:08 +0100 Subject: [postgis-users] snap2geom In-Reply-To: <4548327B.5030900@mecola.com> References: <4548327B.5030900@mecola.com> Message-ID: <20061102102908.GD92848@keybit.net> On Wed, Nov 01, 2006 at 07:36:59AM +0200, Christo Du Preez wrote: > Hi All, > > Is there a function or something I can use to snap multiple geoms > [polygons] together so that there borders match. I want to use this > after I've simplified my geoms. This sounds an useful one... You might try exposing this functionality in the GEOS C-API as GEOS-3.0.0 provides it internally. Once it's in the C-API it will easily be used by postgis. --strk; From christo at mecola.com Thu Nov 2 03:59:03 2006 From: christo at mecola.com (Christo Du Preez) Date: Thu, 02 Nov 2006 13:59:03 +0200 Subject: [postgis-users] snap2geom In-Reply-To: <20061102102908.GD92848@keybit.net> References: <4548327B.5030900@mecola.com> <20061102102908.GD92848@keybit.net> Message-ID: <4549DD87.5020304@mecola.com> This is waaayyyy over my head. How do I go about doing this and what is the function called you're referring too? strk at refractions.net wrote: > On Wed, Nov 01, 2006 at 07:36:59AM +0200, Christo Du Preez wrote: > >> Hi All, >> >> Is there a function or something I can use to snap multiple geoms >> [polygons] together so that there borders match. I want to use this >> after I've simplified my geoms. >> > > This sounds an useful one... You might try exposing this functionality > in the GEOS C-API as GEOS-3.0.0 provides it internally. Once it's > in the C-API it will easily be used by postgis. > > --strk; > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > -- Christo Du Preez Senior Software Engineer Mecola IT +27 [0]83 326 8087 From nickblack1 at gmail.com Thu Nov 2 04:36:42 2006 From: nickblack1 at gmail.com (Nick Black) Date: Thu, 2 Nov 2006 12:36:42 +0000 Subject: [postgis-users] GEOS and PostGIS Message-ID: <223020e60611020436m55d9d02cmc9e2219645d1237b@mail.gmail.com> Hello, psql 8.1.4 Ubuntu server 6.06 I'm trying to connect QGIS to a postgis database, but I get an error saying that GEOS support is not installed in PostGIS. I have libgeos-dev and libgeos2c2a installed. The documentation that I have found only mentions GEOS in the context of compiling Postgres. Do I need to recompile POstgres with GEOS support, or is it possible to add it? Thanks in advance, Nick From strk at refractions.net Thu Nov 2 05:31:50 2006 From: strk at refractions.net (strk at refractions.net) Date: Thu, 2 Nov 2006 14:31:50 +0100 Subject: [postgis-users] snap2geom In-Reply-To: <4549DD87.5020304@mecola.com> References: <4548327B.5030900@mecola.com> <20061102102908.GD92848@keybit.net> <4549DD87.5020304@mecola.com> Message-ID: <20061102133150.GL92848@keybit.net> On Thu, Nov 02, 2006 at 01:59:03PM +0200, Christo Du Preez wrote: > This is waaayyyy over my head. How do I go about doing this and what is > the function called you're referring too? The GEOS class is GeometrySnapper (source/headers/geos/precision/GeometrySnapper.h) The CAPI is capi/geos_c.cpp AND capi/geos_c.h.in --strk; > > strk at refractions.net wrote: > > On Wed, Nov 01, 2006 at 07:36:59AM +0200, Christo Du Preez wrote: > > > >> Hi All, > >> > >> Is there a function or something I can use to snap multiple geoms > >> [polygons] together so that there borders match. I want to use this > >> after I've simplified my geoms. > >> > > > > This sounds an useful one... You might try exposing this functionality > > in the GEOS C-API as GEOS-3.0.0 provides it internally. Once it's > > in the C-API it will easily be used by postgis. > > > > --strk; > > > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > > > > -- > Christo Du Preez > > Senior Software Engineer > Mecola IT > +27 [0]83 326 8087 > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users -- /"\ ASCII Ribbon Campaign \ / Respect for low technology. X Keep e-mail messages readable by any computer system. / \ Keep it ASCII. From strk at refractions.net Thu Nov 2 05:36:04 2006 From: strk at refractions.net (strk at refractions.net) Date: Thu, 2 Nov 2006 14:36:04 +0100 Subject: [postgis-users] GEOS and PostGIS In-Reply-To: <223020e60611020436m55d9d02cmc9e2219645d1237b@mail.gmail.com> References: <223020e60611020436m55d9d02cmc9e2219645d1237b@mail.gmail.com> Message-ID: <20061102133604.GM92848@keybit.net> You need to compile *postgis* to get GEOS support (unless QGIS is wrong and you *do* have it) select postgis_full_version(); -- to tell --strk; On Thu, Nov 02, 2006 at 12:36:42PM +0000, Nick Black wrote: > Hello, > > psql 8.1.4 > Ubuntu server 6.06 > > I'm trying to connect QGIS to a postgis database, but I get an error > saying that GEOS support is not installed in PostGIS. I have > libgeos-dev and libgeos2c2a installed. The documentation that I have > found only mentions GEOS in the context of compiling Postgres. > > Do I need to recompile POstgres with GEOS support, or is it possible to add > it? > > Thanks in advance, > > Nick > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users -- /"\ ASCII Ribbon Campaign \ / Respect for low technology. X Keep e-mail messages readable by any computer system. / \ Keep it ASCII. From schabi at logix-tt.com Thu Nov 2 05:59:51 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Thu, 02 Nov 2006 14:59:51 +0100 Subject: [postgis-users] vertex2point In-Reply-To: <AC78B6BABBC9A74C95028F87A0EACF791046F4@exbe04.intra.dlr.de> References: <AC78B6BABBC9A74C95028F87A0EACF791046F4@exbe04.intra.dlr.de> Message-ID: <4549F9D7.2030205@logix-tt.com> Hi, C.Strobl, C.Strobl at dlr.de wrote: > is there a postgis function which converts vertices of polygons or lines > to points? or does anybody know a handy workaround. > thanks and greetings from munich > christian > p.s. besides this: are there functions for converting geometry types at > all, g.e. lines to polygons, points to lines, ... See the PostGIS docs, most of the functionality is there. HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org From schabi at logix-tt.com Thu Nov 2 06:21:50 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Thu, 02 Nov 2006 15:21:50 +0100 Subject: [postgis-users] GEOS and PostGIS In-Reply-To: <223020e60611020436m55d9d02cmc9e2219645d1237b@mail.gmail.com> References: <223020e60611020436m55d9d02cmc9e2219645d1237b@mail.gmail.com> Message-ID: <4549FEFE.9030103@logix-tt.com> Hi, Nick, Nick Black wrote: > psql 8.1.4 > Ubuntu server 6.06 > > I'm trying to connect QGIS to a postgis database, but I get an error > saying that GEOS support is not installed in PostGIS. I have > libgeos-dev and libgeos2c2a installed. The documentation that I have > found only mentions GEOS in the context of compiling Postgres. > > Do I need to recompile POstgres with GEOS support, or is it possible to > add it? We talked about that on #postgis. It seems that the ubuntu people built their postgis without GEOS support, but QGIS needs a geos-enabled PostGIS. Short-Term solution: build postgis himself. Long-Term solution: bug report for the ubuntu packages. -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org From nickblack1 at gmail.com Thu Nov 2 07:20:16 2006 From: nickblack1 at gmail.com (Nick Black) Date: Thu, 2 Nov 2006 15:20:16 +0000 Subject: [postgis-users] Further PostGIS / GEOS problems Message-ID: <223020e60611020720v2974c94ay724c378e350329ae@mail.gmail.com> Hello, Thanks to some help from this list and #postgis, I have diagnosed the problem with GEOS that I described earlier. So now I am trying to compile postgis, with this configure option: ./configure --prefix=/usr --with-pgsql=/usr/bin/pg_config --with-geos=/usr/bin/geos-config --with-proj=/usr Which give this error: checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... 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++... no checking for c++... no checking for gpp... no checking for aCC... no checking for CC... no checking for cxx... no checking for cc++... no checking for cl... no checking for FCC... no checking for KCC... no checking for RCC... no checking for xlC_r... no checking for xlC... no checking whether we are using the GNU C++ compiler... no checking whether g++ accepts -g... no checking whether ln -s works... yes checking for iconv_open in -liconv... no checking for libiconv_open in -liconv... no checking for iconv_open in -lc... 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-linux-gnu checking host system type... i686-pc-linux-gnu checking for geos-config... /usr/bin/geos-config Usage: geos-config [OPTIONS] Options: [--prefix] [--version] [--libs] [--cflags] [--includes] [--jtsport] checking for proj... /usr/bin/proj checking for flex... /usr/bin/flex checking for dllwrap... no checking for dlltool... no checking for bison... bison -y checking for perl... /usr/bin/perl checking for xsltproc... /usr/bin/xsltproc checking for pdfxmltex... no checking for db2pdf... no checking for jw... no checking which template to use... linux configure: creating ./config.status config.status: creating Makefile.config config.status: creating config.h config.status: config.h is unchanged SUMMARY ------------------------------------------------------- HOST_OS: linux-gnu PGSQL: /usr/bin/pg_config GEOS: /usr/bin/geos-config (ldflags: ) PROJ: prefix=/usr libdir=/usr/lib ICONV: 1 PORTNAME: linux PREFIX: /usr EPREFIX: ${prefix} DOC: ${prefix}/share/doc DATA: ${prefix}/share MAN: ${prefix}/man BIN: ${exec_prefix}/bin EXT: ${exec_prefix}/lib (${exec_prefix}/lib) ------------------------------------------------------- Seems that configure cant find g++ etc - which seems strange, as I can compile other sources without problems. I am running Ubuntu 6.06, psql 8.1.4 Thanks again, Nick From nickblack1 at gmail.com Thu Nov 2 09:02:28 2006 From: nickblack1 at gmail.com (Nick Black) Date: Thu, 2 Nov 2006 17:02:28 +0000 Subject: [postgis-users] Re: Further PostGIS / GEOS problems In-Reply-To: <223020e60611020720v2974c94ay724c378e350329ae@mail.gmail.com> References: <223020e60611020720v2974c94ay724c378e350329ae@mail.gmail.com> Message-ID: <223020e60611020902g1844d5b4g90c4fdca1b21df61@mail.gmail.com> To follow up... I posted a bit too quickly - I was missing a c++ compiler. However, I'm not in the clear yet - I still have these errors when running configure: checking for iconv_open in -liconv... no checking for libiconv_open in -liconv... no So I ran # dpkg -S libiconv libiconv-hook-dev: /usr/share/doc/libiconv-hook-dev/changelog.Debian.gz libiconv-hook-dev: /usr/share/doc/libiconv-hook-dev/changelog.gz libiconv-hook1: /usr/lib/libiconv_hook.so.1 libiconv-hook1: /usr/share/doc/libiconv-hook1/changelog.gz libiconv-hook-dev: /usr/share/doc/libiconv-hook-dev/copyright libiconv-hook1: /usr/share/doc/libiconv-hook1/changelog.Debian.gz libiconv-hook-dev: /usr/share/doc/libiconv-hook-dev libiconv-hook-dev: /usr/lib/libiconv_hook.so libiconv-hook1: /usr/share/doc/libiconv-hook1 libiconv-hook1: /usr/lib/libiconv_hook.so.1.0.0 libiconv-hook1: /usr/share/doc/libiconv-hook1/copyright libiconv-hook1: /usr/lib/libiconv_hook.a and I have all the libraries isntalled, so now I am at a bit of a dead end. If I run make and make install, there are no explicit error messages in the terminal, but when I log into postgres and run: # SELECT postgis_full_version(); ERROR: could not access file "$libdir/liblwgeom.so.1.1": No such file or directory CONTEXT: SQL statement "SELECT postgis_lib_version()" PL/pgSQL function "postgis_full_version" line 11 at select into variables >From the end of configure: PROJ: prefix=/usr libdir=/usr/lib Locate: locate liblwgeom.so.1.1 /usr/lib/liblwgeom.so.1.1 So I am wondering if the build was successfull? The output of configure is posted here: http://www.blacksworld.net/projects/stuff/conifgure_postgis.txt Thanks again, Nick On 11/2/06, Nick Black <nickblack1 at gmail.com> wrote: > Hello, > > Thanks to some help from this list and #postgis, I have diagnosed the > problem with GEOS that I described earlier. > > So now I am trying to compile postgis, with this configure option: > > ./configure --prefix=/usr --with-pgsql=/usr/bin/pg_config > --with-geos=/usr/bin/geos-config --with-proj=/usr > > Which give this error: > > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > 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++... no > checking for c++... no > checking for gpp... no > checking for aCC... no > checking for CC... no > checking for cxx... no > checking for cc++... no > checking for cl... no > checking for FCC... no > checking for KCC... no > checking for RCC... no > checking for xlC_r... no > checking for xlC... no > checking whether we are using the GNU C++ compiler... no > checking whether g++ accepts -g... no > checking whether ln -s works... yes > checking for iconv_open in -liconv... no > checking for libiconv_open in -liconv... no > checking for iconv_open in -lc... 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-linux-gnu > checking host system type... i686-pc-linux-gnu > checking for geos-config... /usr/bin/geos-config > Usage: geos-config [OPTIONS] > Options: > [--prefix] > [--version] > [--libs] > [--cflags] > [--includes] > [--jtsport] > checking for proj... /usr/bin/proj > checking for flex... /usr/bin/flex > checking for dllwrap... no > checking for dlltool... no > checking for bison... bison -y > checking for perl... /usr/bin/perl > checking for xsltproc... /usr/bin/xsltproc > checking for pdfxmltex... no > checking for db2pdf... no > checking for jw... no > checking which template to use... linux > configure: creating ./config.status > config.status: creating Makefile.config > config.status: creating config.h > config.status: config.h is unchanged > > SUMMARY > ------------------------------------------------------- > > HOST_OS: linux-gnu > > PGSQL: /usr/bin/pg_config > GEOS: /usr/bin/geos-config > (ldflags: ) > PROJ: prefix=/usr libdir=/usr/lib > ICONV: 1 > > PORTNAME: linux > PREFIX: /usr > EPREFIX: ${prefix} > DOC: ${prefix}/share/doc > DATA: ${prefix}/share > MAN: ${prefix}/man > BIN: ${exec_prefix}/bin > EXT: ${exec_prefix}/lib (${exec_prefix}/lib) > ------------------------------------------------------- > > Seems that configure cant find g++ etc - which seems strange, as I can > compile other sources without problems. > > I am running Ubuntu 6.06, psql 8.1.4 > > Thanks again, > > Nick > From mark.cave-ayland at ilande.co.uk Thu Nov 2 09:38:48 2006 From: mark.cave-ayland at ilande.co.uk (Mark Cave-Ayland) Date: Thu, 02 Nov 2006 17:38:48 +0000 Subject: [postgis-users] Re: Further PostGIS / GEOS problems In-Reply-To: <223020e60611020902g1844d5b4g90c4fdca1b21df61@mail.gmail.com> References: <223020e60611020720v2974c94ay724c378e350329ae@mail.gmail.com> <223020e60611020902g1844d5b4g90c4fdca1b21df61@mail.gmail.com> Message-ID: <1162489128.2660.22.camel@mca-desktop> Hi Nick, On Thu, 2006-11-02 at 17:02 +0000, Nick Black wrote: > To follow up... > > I posted a bit too quickly - I was missing a c++ compiler. However, > I'm not in the clear yet - I still have these errors when running > configure: > > checking for iconv_open in -liconv... no > checking for libiconv_open in -liconv... no But that's fine since configure later goes on to detect iconv.h and also reports the following: checking for iconv_open in -lc... yes So iconv is being detected without any problems. (cut) > Locate: > > locate liblwgeom.so.1.1 > /usr/lib/liblwgeom.so.1.1 Hmmm this is strange because $libdir should be set to the output of "/usr/bin/pg_config --libdir" since liblwgeom.so.1.1 needs to be in the PostgreSQL lib directory, not the system lib directory. > > ./configure --prefix=/usr --with-pgsql=/usr/bin/pg_config > > --with-geos=/usr/bin/geos-config --with-proj=/usr (looks closer)... can you try running configure without the --prefix option? I think this is what is causing liblwgeom.so.1.1 to be installed in the wrong location, e.g. just: ./configure --with-pgsql=/usr/bin/pg_config --with-geos=/usr/bin/geos-config --with-proj=/usr Kind regards, Mark. From nickblack1 at gmail.com Thu Nov 2 09:46:25 2006 From: nickblack1 at gmail.com (Nick Black) Date: Thu, 2 Nov 2006 17:46:25 +0000 Subject: [postgis-users] Re: Further PostGIS / GEOS problems In-Reply-To: <1162489128.2660.22.camel@mca-desktop> References: <223020e60611020720v2974c94ay724c378e350329ae@mail.gmail.com> <223020e60611020902g1844d5b4g90c4fdca1b21df61@mail.gmail.com> <1162489128.2660.22.camel@mca-desktop> Message-ID: <223020e60611020946o6af3ea3do308651f91dc84d9d@mail.gmail.com> Bingo. Thanks a lot - changing the configure options seems to have worked - now get POSTGIS="1.1.5" GEOS="2.1.4" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS Thanks for the help Nick On 11/2/06, Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk> wrote: > Hi Nick, > > On Thu, 2006-11-02 at 17:02 +0000, Nick Black wrote: > > To follow up... > > > > I posted a bit too quickly - I was missing a c++ compiler. However, > > I'm not in the clear yet - I still have these errors when running > > configure: > > > > checking for iconv_open in -liconv... no > > checking for libiconv_open in -liconv... no > > But that's fine since configure later goes on to detect iconv.h and also > reports the following: > > checking for iconv_open in -lc... yes > > So iconv is being detected without any problems. > > (cut) > > > Locate: > > > > locate liblwgeom.so.1.1 > > /usr/lib/liblwgeom.so.1.1 > > Hmmm this is strange because $libdir should be set to the output of > "/usr/bin/pg_config --libdir" since liblwgeom.so.1.1 needs to be in the > PostgreSQL lib directory, not the system lib directory. > > > > ./configure --prefix=/usr --with-pgsql=/usr/bin/pg_config > > > --with-geos=/usr/bin/geos-config --with-proj=/usr > > (looks closer)... can you try running configure without the --prefix > option? I think this is what is causing liblwgeom.so.1.1 to be installed > in the wrong location, e.g. just: > > ./configure --with-pgsql=/usr/bin/pg_config > --with-geos=/usr/bin/geos-config --with-proj=/usr > > > Kind regards, > > Mark. > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From takubo at saruga-tondara.net Thu Nov 2 10:36:30 2006 From: takubo at saruga-tondara.net (Akio Takubo) Date: Fri, 3 Nov 2006 03:36:30 +0900 Subject: [postgis-users] Instllation problem on WinXP In-Reply-To: <1162292850.5744.13.camel@mca-desktop> References: <20061027030618.914ba6ea.takubo@saruga-tondara.net> <1162292850.5744.13.camel@mca-desktop> Message-ID: <20061103033630.2d218cc2.takubo@saruga-tondara.net> On Tue, 31 Oct 2006 11:07:30 +0000 Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk> wrote: > On Fri, 2006-10-27 at 03:06 +0900, Akio Takubo wrote: > > Hello all, > > > > I have a strange problem with PostGIS installer for Win32. > > Have anyone experienced these problem? > > > > In my case ... > > I failed install into only WinXP SP2 *Japanese* edition, > > when I tryed PostGIS installer with some environments. > > Some user also said that they have same problem with WInXP SP2 (Japanese). > > > > This is a list of my test environments and its result. All env are Win32 not Win64. > > * WinXP Pro SP2 (Japanese) failed > > * WinXP Pro SP1 (Japanese) success > > * WinXP Pro SP2 (English) success > > * Win2003 Server SP1 (Japanese) success > > > > I got same above result by all these installers. > > * pgInstaller(PostgreSQL 8.1.4) + PostGIS installer (1.1.3) > > * pgInstaller(PostgreSQL 8.1.5) + PostGIS installer (1.1.5) > > * pgInstaller(PostgreSQL 8.2beta2 with PostGIS 1.1.5) > > > > So there is no problem on SP1 or English ver or Win2003server. > > > > But at least I can sucess install WinXP SP2 (Japanese) following combination. > > * pgInstaller(PostgreSQL 8.1.4 + PostGIS 1.0.5 or PostGIS1.0.6) > > * pgInstaller(PostgreSQL 8.1.4) + PostGIS 1.1.3 (I built with Linux/Mingw32 envrironment) > > > > This error occured a runtime of lwpostgis.sql. > > One example error message is: > > > > psql:../share/contrib/lwpostgis.sql;;35 ERROR: could not load library > > "C:/Program Files/PostgreSQL/8.1/lib/liblwgeom.dll": ( Error message in japanese) > > > > It seems that LoadLibrary API fails to load liblwgeom.dll with 998 (ERROR_NOACCESS) error. > > I thought that there is some compatibility issue (C++ memory managemnet related?) > > with WinXP SP2 japanese and current PostGIS build envirnment. > > > > Can anyone solve this? > > > > Best regards, > > > > Akio Takubo @ OSGeo-Japan > > takubo at saruga-tondara.net > > > Hi Akio, > > The only reason I can think of as to why liblwgeom.dll would fail to > load under SP2 is that Windows cannot find a dependent DLL. The setup > used to build the installer is WinXP SP2 English, and as you correctly > note, the installer works fine under this setup. > > A useful starting point would be to run the Microsoft Dependency Checker > (depends.exe) and FileMon (filemon.exe) on your SP1 and SP2 installs to > determine if there are any dependency differences between the two > versions of Windows - both of these utilities can be found using Google. > Posting any differences back to the list should help give a better > picture as to why PostgreSQL is failing to load the DLL. > > > Kind regards, > > Mark. Sorry for reporting more info too late. Now I've just finished to test postgis installer with some tools. I tested with XP SP2(japanese) and XP SP2 (English). Filemon shows a large diffrence for these two environment. As postgis installer run lwpostgis.sql, liblwgeom.dll wad read. In English env, reading libgeos_c-1.dll, libgeos-2.dll and libproj.dll were also accessed just after liblwgeom.dll. But in Japanese env, only liblwgeom.dll was read, and other three libraries were not accessed. Both environment seem to have same directory tree and files. I can't find any diffrence or condition. At last I made small program only to load liblwpostgis.dll with "LoadLibrary" function. It works fine to do "LoadLibrary" for both environment... Above is all my examing result. Can I get other useful information from my environment? Best regards, Akio Takubo @ OSGeo-Japan takubo at saruga-tondara.net From strk at refractions.net Thu Nov 2 11:42:45 2006 From: strk at refractions.net (strk at refractions.net) Date: Thu, 2 Nov 2006 20:42:45 +0100 Subject: [postgis-users] Re: Further PostGIS / GEOS problems In-Reply-To: <1162489128.2660.22.camel@mca-desktop> References: <223020e60611020720v2974c94ay724c378e350329ae@mail.gmail.com> <223020e60611020902g1844d5b4g90c4fdca1b21df61@mail.gmail.com> <1162489128.2660.22.camel@mca-desktop> Message-ID: <20061102194245.GS463@keybit.net> On Thu, Nov 02, 2006 at 05:38:48PM +0000, Mark Cave-Ayland wrote: > > > ./configure --prefix=/usr --with-pgsql=/usr/bin/pg_config > > > --with-geos=/usr/bin/geos-config --with-proj=/usr > > (looks closer)... can you try running configure without the --prefix > option? I think this is what is causing liblwgeom.so.1.1 to be installed > in the wrong location, mmm... --prefix=/usr => lib in /usr/lib is *intended* behaviour (or about it), this should modify the lwpostgis.sql file to point to the *full* path to library. If this doesn't work it's a bug. --strk; From mark.cave-ayland at ilande.co.uk Thu Nov 2 12:47:40 2006 From: mark.cave-ayland at ilande.co.uk (Mark Cave-Ayland) Date: Thu, 02 Nov 2006 20:47:40 +0000 Subject: [postgis-users] Instllation problem on WinXP In-Reply-To: <20061103033630.2d218cc2.takubo@saruga-tondara.net> References: <20061027030618.914ba6ea.takubo@saruga-tondara.net> <1162292850.5744.13.camel@mca-desktop> <20061103033630.2d218cc2.takubo@saruga-tondara.net> Message-ID: <1162500460.2660.27.camel@mca-desktop> Hi Akio, On Fri, 2006-11-03 at 03:36 +0900, Akio Takubo wrote: > Sorry for reporting more info too late. No problem - thanks for the information. > Now I've just finished to test postgis installer with some tools. > I tested with XP SP2(japanese) and XP SP2 (English). > > Filemon shows a large diffrence for these two environment. > As postgis installer run lwpostgis.sql, liblwgeom.dll wad read. > In English env, reading libgeos_c-1.dll, libgeos-2.dll and libproj.dll were also > accessed just after liblwgeom.dll. But in Japanese env, only liblwgeom.dll was read, > and other three libraries were not accessed. Both environment seem to have same > directory tree and files. I can't find any diffrence or condition. > At last I made small program only to load liblwpostgis.dll with "LoadLibrary" function. > It works fine to do "LoadLibrary" for both environment... > > Above is all my examing result. > Can I get other useful information from my environment? Yes please - can you point the Microsoft Dependency Checker at liblwgeom.dll on both a Japanese and English environment and see if the unresolved imports are different? Kind regards, Mark. From gdt at ir.bbn.com Thu Nov 2 13:09:49 2006 From: gdt at ir.bbn.com (Greg Troxel) Date: Thu, 02 Nov 2006 16:09:49 -0500 Subject: [postgis-users] Re: Further PostGIS / GEOS problems In-Reply-To: <223020e60611020946o6af3ea3do308651f91dc84d9d@mail.gmail.com> (Nick Black's message of "Thu\, 2 Nov 2006 17\:46\:25 +0000") References: <223020e60611020720v2974c94ay724c378e350329ae@mail.gmail.com> <223020e60611020902g1844d5b4g90c4fdca1b21df61@mail.gmail.com> <1162489128.2660.22.camel@mca-desktop> <223020e60611020946o6af3ea3do308651f91dc84d9d@mail.gmail.com> Message-ID: <rmi64dxzhb6.fsf@fnord.ir.bbn.com> FWIW, I've created a pkgsrc entry for 1.1.4 (and not looked at anything newer due to low spare time), and that builds against PostgreSQL 81 and geos 2.0.0. PostgreSQL, geos and postgis are all built with --prefix=/usr/pkg. All that said, if lwgeom was put in the wrong prefix (postgis's vs PostgreSQL's), I wouldn't have noticed. pkgsrc is pretty demanding in terms of needing prefix stuff to be right, so I thought my not having had trouble is a useful datapoint. -- greg< Troxel <gdt at ir.bbn.com> From Elvis.Svonja at sensis.com.au Thu Nov 2 20:27:18 2006 From: Elvis.Svonja at sensis.com.au (Svonja, Elvis) Date: Fri, 3 Nov 2006 15:27:18 +1100 Subject: [postgis-users] PostGIS Solaris problem Message-ID: <04F81F192A6B4D4CB94097D9D29899A505BBB076@C1-EXG-VS2.corp.org.local> Hi I'm trying to install PostGIS on Solaris 10 (Sparc) without any success. I have tried building it from the source, but I get an error: make: Fatal error: Command failed for target `install' I have installed all the dependant packages (i.e. geos, proj4, libiconv). I wasn't able to find anywhere a Solaris specific installation archive or package of PostGIS. Any help would be much appreciated. Elvis DETAILED ERROR MESSAGE: Using GNU make found at /usr/local/bin/gmake ... ... ... /usr/ccs/bin/yaccpar:5: warning: ignoring #pragma ident /usr/ccs/bin/yaccpar: In function `lwg_parse_yyparse': /usr/ccs/bin/yaccpar:164: warning: label `yynewstate' defined but not used /usr/ccs/bin/yaccpar:374: warning: label `yyerrlab' defined but not used /usr/local/bin/flex -Plwg_parse_yy -i -f -o'lex.yy.c' wktparse.lex flex: fatal internal error, exec failed gmake[2]: *** [lex.yy.c] Broken Pipe gmake[2]: *** Deleting file `lex.yy.c' gmake[2]: Leaving directory `/da01/postgresql/gis/postgis-1.1.5/lwgeom' gmake[1]: *** [liblwgeom] Error 2 gmake[1]: Leaving directory `/da01/postgresql/gis/postgis-1.1.5' *** Error code 2 The following command caused the error: IFS=':' ; \ for dir in $PATH; do \ for prog in gmake gnumake make; do \ if [ -f $dir/$prog ] && ( $dir/$prog -f /dev/null --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \ GMAKE=$dir/$prog; \ break 2; \ fi; \ done; \ done; \ \ if [ x"${GMAKE+set}" = xset ]; then \ echo "Using GNU make found at ${GMAKE}"; \ ${GMAKE} install ; \ else \ echo "You must use GNU make to build PostGIS." ; \ false; \ fi make: Fatal error: Command failed for target `install' Sensis. Australia's leading information resource. Making complex lives simpler by helping you find, buy and sell. www.about.sensis.com.au www.sensis.com.au www.yellow.com.au www.whitepages.com.au www.citysearch.com.au www.whereis.com.au www.gostay.com.au www.justlisted.com.au www.linkme.com.au www.telstra.com.au www.tradingpost.com.au www.universalpublishers.com.au www.invizage.com.au Sensis cares for the environment - think before you print. This email and any attachments are intended only for the use of the recipient and may be confidential and/or legally privileged. Sensis Pty Ltd disclaims liability for any errors, omissions, viruses, loss and/or damage arising from using, opening or transmitting this email. If you are not the intended recipient you must not use, interfere with, disclose, copy or retain this email and you should notify the sender immediately by return email or by contacting Sensis Pty Ltd by telephone on [+61 3 8653 5000] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061103/60358e44/attachment.html> From pramsey at refractions.net Thu Nov 2 20:46:11 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Thu, 2 Nov 2006 20:46:11 -0800 Subject: [postgis-users] PostGIS Solaris problem In-Reply-To: <04F81F192A6B4D4CB94097D9D29899A505BBB076@C1-EXG-VS2.corp.org.local> References: <04F81F192A6B4D4CB94097D9D29899A505BBB076@C1-EXG-VS2.corp.org.local> Message-ID: <05C66ABA-6A6F-4B7E-88D1-F08CD8FC349B@refractions.net> I've always had mixed results trying to build GNU projects with the default solaris tool chain. Try installing gmake and bison and taking another run at it. P On 2-Nov-06, at 8:27 PM, Svonja, Elvis wrote: > Hi > > > > I?m trying to install PostGIS on Solaris 10 (Sparc) without any > success. I have tried building it from the source, but I get an > error: > > > > make: Fatal error: Command failed for target `install' > > > > I have installed all the dependant packages (i.e. geos, proj4, > libiconv). I wasn?t able to find anywhere a Solaris specific > installation archive or package of PostGIS. Any help would be much > appreciated. > > > > Elvis > > > > DETAILED ERROR MESSAGE: > > > > Using GNU make found at /usr/local/bin/gmake > > ? > > ? > > ? > > /usr/ccs/bin/yaccpar:5: warning: ignoring #pragma ident > > /usr/ccs/bin/yaccpar: In function `lwg_parse_yyparse': > > /usr/ccs/bin/yaccpar:164: warning: label `yynewstate' defined but > not used > > /usr/ccs/bin/yaccpar:374: warning: label `yyerrlab' defined but not > used > > /usr/local/bin/flex -Plwg_parse_yy -i -f -o'lex.yy.c' wktparse.lex > > flex: fatal internal error, exec failed > > gmake[2]: *** [lex.yy.c] Broken Pipe > > gmake[2]: *** Deleting file `lex.yy.c' > > gmake[2]: Leaving directory `/da01/postgresql/gis/postgis-1.1.5/ > lwgeom' > > gmake[1]: *** [liblwgeom] Error 2 > > gmake[1]: Leaving directory `/da01/postgresql/gis/postgis-1.1.5' > > *** Error code 2 > > The following command caused the error: > > IFS=':' ; \ > > for dir in $PATH; do \ > > for prog in gmake gnumake make; do \ > > if [ -f $dir/$prog ] && ( $dir/$prog -f /dev/null --version 2>/ > dev/null | grep GNU >/dev/null 2>&1 ) ; then \ > > GMAKE=$dir/$prog; \ > > break 2; \ > > fi; \ > > done; \ > > done; \ > > \ > > if [ x"${GMAKE+set}" = xset ]; then \ > > echo "Using GNU make found at ${GMAKE}"; \ > > ${GMAKE} install ; \ > > else \ > > echo "You must use GNU make to build PostGIS." ; \ > > false; \ > > fi > > make: Fatal error: Command failed for target `install' > > Sensis. Australia's leading information resource. > Making complex lives simpler by helping you find, buy and sell. > > www.about.sensis.com.au > www.sensis.com.au > www.yellow.com.au > www.whitepages.com.au > www.citysearch.com.au > www.whereis.com.au > www.gostay.com.au > www.justlisted.com.au > www.linkme.com.au > www.telstra.com.au > www.tradingpost.com.au > www.universalpublishers.com.au > www.invizage.com.au > > Sensis cares for the environment - think before you print. > > This email and any attachments are intended only for the use of the > recipient and may be confidential and/or legally privileged. > Sensis Pty Ltd disclaims liability for any errors, omissions, > viruses, loss and/or damage arising from using, opening or > transmitting this email. > If you are not the intended recipient you must not use, interfere > with, disclose, copy or retain this email and you should notify the > sender immediately by return email or by contacting Sensis Pty Ltd > by telephone on [+61 3 8653 5000] > _______________________________________________ > 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: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061102/e017c201/attachment.html> From Elvis.Svonja at sensis.com.au Thu Nov 2 21:36:34 2006 From: Elvis.Svonja at sensis.com.au (Svonja, Elvis) Date: Fri, 3 Nov 2006 16:36:34 +1100 Subject: [postgis-users] PostGIS Solaris problem Message-ID: <04F81F192A6B4D4CB94097D9D29899A505BBB1E0@C1-EXG-VS2.corp.org.local> I have used GNU Make, and ensured the original one is removed from the PATH. I also installed bison-1.875d <ftp://ftp.sunfreeware.com/pub/freeware/intel/10/bison-1.875d-sol10-inte l-local.gz> , However I'm now getting another Broken Pipe message with executing the following Bison call: bison -y -vd -p lwg_parse_yy wktparse.y Full stack: bash-3.00# make install make -C lwgeom make[1]: Entering directory `/da01/postgresql/gis/postgis-1.1.4/lwgeom' sh ../geos_version.sh /usr/local > postgis_geos_version.h bison -y -vd -p lwg_parse_yy wktparse.y make[1]: *** [wktparse.tab.c] Broken Pipe make[1]: Leaving directory `/da01/postgresql/gis/postgis-1.1.4/lwgeom' make: *** [liblwgeom] Error 2 Again, any suggestions are very much appreciated Elvis ________________________________ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Svonja, Elvis Sent: Friday, 3 November 2006 3:27 PM To: postgis-users at postgis.refractions.net Subject: [postgis-users] PostGIS Solaris problem Hi I'm trying to install PostGIS on Solaris 10 (Sparc) without any success. I have tried building it from the source, but I get an error: make: Fatal error: Command failed for target `install' I have installed all the dependant packages (i.e. geos, proj4, libiconv). I wasn't able to find anywhere a Solaris specific installation archive or package of PostGIS. Any help would be much appreciated. Elvis DETAILED ERROR MESSAGE: Using GNU make found at /usr/local/bin/gmake ... ... ... /usr/ccs/bin/yaccpar:5: warning: ignoring #pragma ident /usr/ccs/bin/yaccpar: In function `lwg_parse_yyparse': /usr/ccs/bin/yaccpar:164: warning: label `yynewstate' defined but not used /usr/ccs/bin/yaccpar:374: warning: label `yyerrlab' defined but not used /usr/local/bin/flex -Plwg_parse_yy -i -f -o'lex.yy.c' wktparse.lex flex: fatal internal error, exec failed gmake[2]: *** [lex.yy.c] Broken Pipe gmake[2]: *** Deleting file `lex.yy.c' gmake[2]: Leaving directory `/da01/postgresql/gis/postgis-1.1.5/lwgeom' gmake[1]: *** [liblwgeom] Error 2 gmake[1]: Leaving directory `/da01/postgresql/gis/postgis-1.1.5' *** Error code 2 The following command caused the error: IFS=':' ; \ for dir in $PATH; do \ for prog in gmake gnumake make; do \ if [ -f $dir/$prog ] && ( $dir/$prog -f /dev/null --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \ GMAKE=$dir/$prog; \ break 2; \ fi; \ done; \ done; \ \ if [ x"${GMAKE+set}" = xset ]; then \ echo "Using GNU make found at ${GMAKE}"; \ ${GMAKE} install ; \ else \ echo "You must use GNU make to build PostGIS." ; \ false; \ fi make: Fatal error: Command failed for target `install' Sensis. Australia's leading information resource. Making complex lives simpler by helping you find, buy and sell. www.about.sensis.com.au www.sensis.com.au www.yellow.com.au www.whitepages.com.au www.citysearch.com.au www.whereis.com.au www.gostay.com.au www.justlisted.com.au www.linkme.com.au www.telstra.com.au www.tradingpost.com.au www.universalpublishers.com.au www.invizage.com.au Sensis cares for the environment - think before you print. This email and any attachments are intended only for the use of the recipient and may be confidential and/or legally privileged. Sensis Pty Ltd disclaims liability for any errors, omissions, viruses, loss and/or damage arising from using, opening or transmitting this email. If you are not the intended recipient you must not use, interfere with, disclose, copy or retain this email and you should notify the sender immediately by return email or by contacting Sensis Pty Ltd by telephone on [+61 3 8653 5000] Sensis. Australia's leading information resource. Making complex lives simpler by helping you find, buy and sell. www.about.sensis.com.au www.sensis.com.au www.yellow.com.au www.whitepages.com.au www.citysearch.com.au www.whereis.com.au www.gostay.com.au www.justlisted.com.au www.linkme.com.au www.telstra.com.au www.tradingpost.com.au www.universalpublishers.com.au www.invizage.com.au Sensis cares for the environment - think before you print. This email and any attachments are intended only for the use of the recipient and may be confidential and/or legally privileged. Sensis Pty Ltd disclaims liability for any errors, omissions, viruses, loss and/or damage arising from using, opening or transmitting this email. If you are not the intended recipient you must not use, interfere with, disclose, copy or retain this email and you should notify the sender immediately by return email or by contacting Sensis Pty Ltd by telephone on [+61 3 8653 5000] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061103/c4019ac8/attachment.html> From andrew.seales at ed.ac.uk Fri Nov 3 02:30:07 2006 From: andrew.seales at ed.ac.uk (Andrew Seales) Date: Fri, 03 Nov 2006 10:30:07 +0000 Subject: [postgis-users] PostGIS Solaris problem In-Reply-To: <04F81F192A6B4D4CB94097D9D29899A505BBB1E0@C1-EXG-VS2.corp.org.local> References: <04F81F192A6B4D4CB94097D9D29899A505BBB1E0@C1-EXG-VS2.corp.org.local> Message-ID: <454B1A2F.5020802@ed.ac.uk> Svonja, Elvis wrote: > I have used GNU Make, and ensured the original one is removed from the > PATH. I also installed bison-1.875d > <ftp://ftp.sunfreeware.com/pub/freeware/intel/10/bison-1.875d-sol10-inte > l-local.gz> , > > However I'm now getting another Broken Pipe message with executing the > following Bison call: > > bison -y -vd -p lwg_parse_yy wktparse.y > > I've found Solaris 10 much better to compile things on than Solaris 8. There are loads of GNU programs pre-installed in the /usr/sfw/bin so make sure that folder is in front of any other folders in your PATH environment variable(eg type export PATH=/usr/sfw/bin:$PATH). We have successfully been able to install postgres 8.1.4 and postgis 1.1.2 on a Solaris 10 machine. -- 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 andrew.seales at ed.ac.uk Fri Nov 3 02:33:46 2006 From: andrew.seales at ed.ac.uk (Andrew Seales) Date: Fri, 03 Nov 2006 10:33:46 +0000 Subject: [postgis-users] PostGIS Solaris problem In-Reply-To: <454B1A2F.5020802@ed.ac.uk> References: <04F81F192A6B4D4CB94097D9D29899A505BBB1E0@C1-EXG-VS2.corp.org.local> <454B1A2F.5020802@ed.ac.uk> Message-ID: <454B1B0A.8070101@ed.ac.uk> Andrew Seales wrote: > Svonja, Elvis wrote: >> I have used GNU Make, and ensured the original one is removed from the >> PATH. I also installed bison-1.875d >> <ftp://ftp.sunfreeware.com/pub/freeware/intel/10/bison-1.875d-sol10-inte >> l-local.gz> , >> >> However I'm now getting another Broken Pipe message with executing the >> following Bison call: >> >> bison -y -vd -p lwg_parse_yy wktparse.y >> >> Sorry, forgot to mention you'll probably need to do 'export LD_LIBRARY_PATH=/usr/sfw/lib:$LD_LIBRARY_PATH' as well. -- 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 mike at fuhr.org Fri Nov 3 07:27:47 2006 From: mike at fuhr.org (Michael Fuhr) Date: Fri, 3 Nov 2006 08:27:47 -0700 Subject: [postgis-users] Not able to excute spatial query on postgresql database with postgis support In-Reply-To: <be5110d00611010911k36df5f07ra881dcc5b5b53fe6@mail.gmail.com> References: <be5110d00610300700k6b35093aiaac6df9e0ab73dd1@mail.gmail.com> <20061030152108.GA10539@winnie.fuhr.org> <be5110d00610300733q12ffd83cw6ee187eab16f3812@mail.gmail.com> <20061031045730.GA13725@winnie.fuhr.org> <be5110d00610310847k44253934t27abb7689a47c414@mail.gmail.com> <20061101150219.GA62805@winnie.fuhr.org> <be5110d00611010911k36df5f07ra881dcc5b5b53fe6@mail.gmail.com> Message-ID: <20061103152747.GA58969@winnie.fuhr.org> On Wed, Nov 01, 2006 at 11:11:33AM -0600, vamsee movva wrote: > SELECT getbbox(the_geom) FROM la_blocks WHERE stfid = '220750501002999'; > getbbox > ---------------------------------------------------------------------------- > BOX(-89.5361709594727 28.8551273345947,-88.8792343139648 29.6479110717773) > (1 row) > > I think, the number of rings is the problem This geometry sits over part of Plaquemines Parish, which makes sense since that Parish's FIPS code is 22075. Plaquemines Parish has a lot of water so I'm wondering if the rings represent land/water boundaries. Do you know if that's the case? Is that relevant to your needs? Might you be able to use only the exterior ring, possibly simplified? -- Michael Fuhr From takubo at saruga-tondara.net Fri Nov 3 08:24:51 2006 From: takubo at saruga-tondara.net (Akio Takubo) Date: Sat, 4 Nov 2006 01:24:51 +0900 Subject: [postgis-users] Instllation problem on WinXP In-Reply-To: <1162500460.2660.27.camel@mca-desktop> References: <20061027030618.914ba6ea.takubo@saruga-tondara.net> <1162292850.5744.13.camel@mca-desktop> <20061103033630.2d218cc2.takubo@saruga-tondara.net> <1162500460.2660.27.camel@mca-desktop> Message-ID: <20061104012451.f30a84c2.takubo@saruga-tondara.net> Hi Mark, As you said, I checked dependency of liblwgeom.dll on XP SP2 ja and en env. At first, just after installation, lwgeom.dll could find kernel32.dll and msvcrt.dll but couldn't find libgeos_c-1.dll, libproj.dll and postgresql.exe in both system. Because %PATH% env didn't include Postgres's bin directry, I thoutht it isn't wrong result. Second, I added postgres's bin directry to %PATH% and checked dependency again. On both system, liblwgeom.dll could find all dll. Some system dll, which is not directly linked liblwgeom.dll, only have small diffrent in dependency tree. If you need dependency log on japanese system, I can send it for you. On Thu, 02 Nov 2006 20:47:40 +0000 Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk> wrote: > Hi Akio, > > On Fri, 2006-11-03 at 03:36 +0900, Akio Takubo wrote: > > > Sorry for reporting more info too late. > > No problem - thanks for the information. > > > Now I've just finished to test postgis installer with some tools. > > I tested with XP SP2(japanese) and XP SP2 (English). > > > > Filemon shows a large diffrence for these two environment. > > As postgis installer run lwpostgis.sql, liblwgeom.dll wad read. > > In English env, reading libgeos_c-1.dll, libgeos-2.dll and libproj.dll were also > > accessed just after liblwgeom.dll. But in Japanese env, only liblwgeom.dll was read, > > and other three libraries were not accessed. Both environment seem to have same > > directory tree and files. I can't find any diffrence or condition. > > At last I made small program only to load liblwpostgis.dll with "LoadLibrary" function. > > It works fine to do "LoadLibrary" for both environment... > > > > Above is all my examing result. > > Can I get other useful information from my environment? > > Yes please - can you point the Microsoft Dependency Checker at > liblwgeom.dll on both a Japanese and English environment and see if the > unresolved imports are different? > > > Kind regards, > > Mark. > Best regards, Akio Takubo @ OSGeo-Japan takubo at saruga-tondara.net From dave.potts at pinan.co.uk Fri Nov 3 09:39:19 2006 From: dave.potts at pinan.co.uk (David Potts) Date: Fri, 3 Nov 2006 17:39:19 -0000 (UTC) Subject: [postgis-users] postgis and pl/java Message-ID: <39114.195.27.52.9.1162575559.squirrel@dp2642.force9.co.uk> Has anybody tried to mix PL/Java and postgis ? It seems that PL/Java comes with a special version of the java postgres driver, postgis has an extended version of normal postgres java driver. Just wondering if anybody has tried mxing these two products before? I have a table with some values in it, when they get updated I want to fire a trigger which will result in an update spatial setting in an table. D. From schabi at logix-tt.com Fri Nov 3 09:52:38 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Fri, 03 Nov 2006 18:52:38 +0100 Subject: [postgis-users] postgis and pl/java In-Reply-To: <39114.195.27.52.9.1162575559.squirrel@dp2642.force9.co.uk> References: <39114.195.27.52.9.1162575559.squirrel@dp2642.force9.co.uk> Message-ID: <454B81E6.9050700@logix-tt.com> Hi, David, David Potts wrote: > Has anybody tried to mix PL/Java and postgis ? > > It seems that PL/Java comes with a special version of the java postgres > driver, postgis has an extended version of normal postgres java driver. No, it doesn't. It has its own implementation of the JDBC interface, and nearly nothing in common besides implementing the SUN JDBC standard. The main reason for this is that the standalone JDBC driver uses TCP connections to the server, whereas pl/java uses the server internal SPI interface via Java Native Interface and C glue code. > Just wondering if anybody has tried mxing these two products before? Yes, I have. The prototypes for a type Mapping for PostGIS Geometries are currently in postgis SVN, in the java/pljava directory. But I doubt that they will work with the released 1.3 version of pljava, as this version is buggy wr/t variable length datatypes. Actually, my code for PostGIS and the example "varlentuple" data type I developed for debugging purposes was the first attempt to actually implement a java mapping for a variable length custom datatype. All the examples and regression code only implements fixed length datatype mappings, apart from the supported PostgreSQL builtin types like varchar, which are special-cased in the driver. I'm currently working on a patchset with the author of pljava (see discussions on the pljava mailing list), but things are going rather slow due to time constraints on both sides. I hope to finish the patchwork this weekend, so it might be included in the next release of pljava. As soon as that's finished, the current pljava code in postgis should work, but it's still missing a build system, documentation, and some code merging between pljava and the "normal" jdbc implementation. > I have a table with some values in it, when they get updated I want to > fire a trigger which will result in an update spatial setting in an table. As long as there's no type mapping, the PostGIS types will be mapped to String in pljava, that means that you can get PostGIS geometry and boxes in their text representation (the same you see using psql command line), and you can parse them "manually" using the PostGIS java code. For return values / out parameters, do the opposite, return the String representation of the data. Alternatively, write your trigger using plpgsql, which supports all datatypes. HTH, Markus From pdoria at netmadeira.com Fri Nov 3 11:30:49 2006 From: pdoria at netmadeira.com (Pedro Doria Meunier) Date: Fri, 3 Nov 2006 19:30:49 -0000 Subject: [postgis-users] Help with query Message-ID: <003a01c6ff7e$91d6bf50$23d6bed5@oem41cbbf9e178> This is probably not the best place to be asking such a (lame) question but perhaps someone is gracious enough to lend me a hand. ;-) I have the following setup in a table: The first record which is to be found (ok easy enough :D) with a timestamp meets a certain condition (ignition off) The following record is for the event of ignition on again with a timestamp. So the question here is: how can I compute the time difference between these two records in a single query? Better yet: finding all the records that meet the first condition (ignition off) and the immediately following records as to compute the time difference. ;-) Thanks in advance! Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061103/4a0c5402/attachment.html> From robe.dnd at cityofboston.gov Fri Nov 3 13:04:14 2006 From: robe.dnd at cityofboston.gov (Obe, Regina) Date: Fri, 3 Nov 2006 16:04:14 -0500 Subject: [postgis-users] Help with query Message-ID: <53F9CF533E1AA14EA1F8C5C08ABC08D2011ADDA0@ZDND.DND.boston.cob> I'm going to assume your table has 2 fields ignition_on which is a boolean actiontime which is a timestamp and your table is called ignition_log I would try the following - haven't tested it so don't know if it will work SELECT igoff.actiontime as ignition_off_time, MIN(igon.actiontime) as ignition_on_time, MIN(igon.actiontime) - igoff.actiontime as igdifference FROM ignition_log igoff INNER JOIN ignition_log igon ON igoff.actiontime < igon.actiontime AND igoff.ignition_on = false AND igon.ignition_on = true GROUP BY igoff.actiontime ________________________________ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Pedro Doria Meunier Sent: Friday, November 03, 2006 2:31 PM To: 'PostGIS Users Discussion' Subject: [postgis-users] Help with query This is probably not the best place to be asking such a (lame) question but perhaps someone is gracious enough to lend me a hand... ;-) I have the following setup in a table: The first record which is to be found (ok easy enough :D) with a timestamp meets a certain condition (ignition off) The following record is for the event of ignition on again with a timestamp. So the question here is: how can I compute the time difference between these two records in a single query? Better yet: finding all the records that meet the first condition (ignition off) and the immediately following records as to compute the time difference. ;-) Thanks in advance! Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam ----------------------------------------- The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061103/d79903bc/attachment.html> From andresavila777 at hotmail.com Fri Nov 3 13:06:40 2006 From: andresavila777 at hotmail.com (andres avila) Date: Fri, 03 Nov 2006 17:06:40 -0400 Subject: [postgis-users] Help with query Message-ID: <BAY23-F49A0FB5EC7C8188659C6E84FE0@phx.gbl> An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061103/0f2ba3c4/attachment.html> From woodbri at swoodbridge.com Fri Nov 3 13:14:45 2006 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Fri, 03 Nov 2006 16:14:45 -0500 Subject: [postgis-users] Help with query In-Reply-To: <003a01c6ff7e$91d6bf50$23d6bed5@oem41cbbf9e178> References: <003a01c6ff7e$91d6bf50$23d6bed5@oem41cbbf9e178> Message-ID: <454BB145.80300@swoodbridge.com> Pedro, In general there is no association between records in the database unless you explicitly associate them. In fact two records that you insert from process A might not actually be adjacent in the database if other processes are inserting also. So what you need to do is create a column like 'process_id' where process_id is a unique identifier for a sequence of steps then you can select all those records and order then by the timestamp and then you can compute the time differences. -Steve Pedro Doria Meunier wrote: > > > This is probably not the best place to be asking such a (lame) question > but perhaps someone is gracious enough to lend me a hand? ;-) > > > > I have the following setup in a table: > > > > The first record which is to be found (ok easy enough :D) with a > timestamp meets a certain condition (ignition off) > > The following record is for the event of ignition on again with a > timestamp. > > > > So the question here is: how can I compute the time difference between > these two records in a single query? > > Better yet: finding all the records that meet the first condition > (ignition off) and the immediately following records as to compute the > time difference. ;-) > > > > Thanks in advance! > > > > Pedro Doria Meunier > > (351) 91 302 49 72 - (351) 96 247 99 12 > > MSN - pdoriam at hotmail.com <mailto:pdoriam at hotmail.com> > > ICQ - 308-182-126 > > Skype: pdoriam > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From pdoria at netmadeira.com Fri Nov 3 14:14:55 2006 From: pdoria at netmadeira.com (Pedro Doria Meunier) Date: Fri, 3 Nov 2006 22:14:55 -0000 Subject: [postgis-users] Help with query In-Reply-To: <53F9CF533E1AA14EA1F8C5C08ABC08D2011ADDA0@ZDND.DND.boston.cob> Message-ID: <007101c6ff95$7ea48900$23d6bed5@oem41cbbf9e178> Regina, You're absolutely the GREATEST! It worked like a charm! Thank you VERY much! All the best, Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam _____ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Obe, Regina Sent: sexta-feira, 3 de Novembro de 2006 21:04 To: PostGIS Users Discussion Subject: RE: [postgis-users] Help with query I'm going to assume your table has 2 fields ignition_on which is a boolean actiontime which is a timestamp and your table is called ignition_log I would try the following - haven't tested it so don't know if it will work SELECT igoff.actiontime as ignition_off_time, MIN(igon.actiontime) as ignition_on_time, MIN(igon.actiontime) - igoff.actiontime as igdifference FROM ignition_log igoff INNER JOIN ignition_log igon ON igoff.actiontime < igon.actiontime AND igoff.ignition_on = false AND igon.ignition_on = true GROUP BY igoff.actiontime _____ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Pedro Doria Meunier Sent: Friday, November 03, 2006 2:31 PM To: 'PostGIS Users Discussion' Subject: [postgis-users] Help with query This is probably not the best place to be asking such a (lame) question but perhaps someone is gracious enough to lend me a hand. ;-) I have the following setup in a table: The first record which is to be found (ok easy enough :D) with a timestamp meets a certain condition (ignition off) The following record is for the event of ignition on again with a timestamp. So the question here is: how can I compute the time difference between these two records in a single query? Better yet: finding all the records that meet the first condition (ignition off) and the immediately following records as to compute the time difference. ;-) Thanks in advance! Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam _____ The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061103/2fe9cc60/attachment.html> From pramsey at refractions.net Fri Nov 3 17:02:36 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Fri, 3 Nov 2006 17:02:36 -0800 Subject: [postgis-users] Help with query In-Reply-To: <007101c6ff95$7ea48900$23d6bed5@oem41cbbf9e178> References: <007101c6ff95$7ea48900$23d6bed5@oem41cbbf9e178> Message-ID: <A22DC6A3-958C-42C4-8114-F0CFED487F17@refractions.net> Ye gods, Regina, you're amazing. On 3-Nov-06, at 2:14 PM, Pedro Doria Meunier wrote: > Regina, > > > > You?re absolutely the GREATEST! It worked like a charm! > > > > Thank you VERY much! > > > > All the best, > > > > Pedro Doria Meunier > > (351) 91 302 49 72 - (351) 96 247 99 12 > > MSN - pdoriam at hotmail.com > > ICQ - 308-182-126 > > Skype: pdoriam > > > > From: postgis-users-bounces at postgis.refractions.net [mailto:postgis- > users-bounces at postgis.refractions.net] On Behalf Of Obe, Regina > Sent: sexta-feira, 3 de Novembro de 2006 21:04 > To: PostGIS Users Discussion > Subject: RE: [postgis-users] Help with query > > > > I'm going to assume your table has 2 fields > > ignition_on which is a boolean > > actiontime which is a timestamp > > > > and your table is called ignition_log > > > > I would try the following - haven't tested it so don't know if it > will work > > > > SELECT igoff.actiontime as ignition_off_time, MIN(igon.actiontime) > as ignition_on_time, MIN(igon.actiontime) - igoff.actiontime as > igdifference > > FROM ignition_log igoff INNER JOIN ignition_log igon > > ON igoff.actiontime < igon.actiontime AND igoff.ignition_on > = false AND igon.ignition_on = true > > GROUP BY igoff.actiontime > > > > From: postgis-users-bounces at postgis.refractions.net [mailto:postgis- > users-bounces at postgis.refractions.net] On Behalf Of Pedro Doria > Meunier > Sent: Friday, November 03, 2006 2:31 PM > To: 'PostGIS Users Discussion' > Subject: [postgis-users] Help with query > > This is probably not the best place to be asking such a (lame) > question but perhaps someone is gracious enough to lend me a hand? ;-) > > > > I have the following setup in a table: > > > > The first record which is to be found (ok easy enough :D) with a > timestamp meets a certain condition (ignition off) > > The following record is for the event of ignition on again with a > timestamp. > > > > So the question here is: how can I compute the time difference > between these two records in a single query? > > Better yet: finding all the records that meet the first condition > (ignition off) and the immediately following records as to compute > the time difference. ;-) > > > > Thanks in advance! > > > > Pedro Doria Meunier > > (351) 91 302 49 72 - (351) 96 247 99 12 > > MSN - pdoriam at hotmail.com > > ICQ - 308-182-126 > > Skype: pdoriam > > > > > > > > The substance of this message, including any attachments, may be > confidential, legally > privileged and/or exempt from disclosure pursuant to Massachusetts > law. It is intended > solely for the addressee. If you received this in error, please > contact the sender and > delete the material from any computer. > > _______________________________________________ > 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: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061103/f1076b85/attachment.html> From davidtecher at yahoo.fr Sun Nov 5 08:35:53 2006 From: davidtecher at yahoo.fr (TECHER David) Date: Sun, 05 Nov 2006 17:35:53 +0100 Subject: [postgis-users] Updating PostGIS Doc on Web Site Message-ID: <454E12E9.40408@yahoo.fr> hi it seems that postgis doc on web site is only for 1.1.3! Why not updating it for 1.1.5? Thanks! --david; http://www.davidgis.fr ___________________________________________________________________________ D?couvrez une nouvelle fa?on d'obtenir des r?ponses ? toutes vos questions ! Profitez des connaissances, des opinions et des exp?riences des internautes sur Yahoo! Questions/R?ponses http://fr.answers.yahoo.com From levian00 at students.oamk.fi Sun Nov 5 09:16:13 2006 From: levian00 at students.oamk.fi (Ville Antti Ensio Leinonen) Date: Sun, 5 Nov 2006 19:16:13 +0200 (EET) Subject: [postgis-users] pgrouting 0.7 and a* Message-ID: <Pine.GSO.4.64.0611051905570.21859@rhea> Hi. Im working with routing. I allready have tryed with pgdijsktra module and that worked somewhat right, now i found pgrouting 0.9.7 module. I got dijkstra to works sameway as in pgdijsktra, but i cant find any howto or tutorial to get A* work. for dijkstra i have l table with data l.edges has id,source,targer,cost,reverse_cost l.vertices has id,the_geom works fine after little modification to _internal_id() function, and actually looks like pgrouting works better that pgdijkstra when using dijsktra. Now what i need to do to get A* work, i assume that i need x1,x2,y1,y2 columns to l.edges table? but what data and how i populate those values? maybe something to do with long/lat? shortest_astar_path_as_geometry('l', source_id, target_id, delta); And what is delta, README.INSTALL file dosen't talk to me. Thanks You for help --------------------------------- -- Ville Leinonen -- ---------------------------------- From sandeepkumar.jakkaraju at gmail.com Sun Nov 5 09:19:58 2006 From: sandeepkumar.jakkaraju at gmail.com (Sandeep Kumar Jakkaraju) Date: Sun, 5 Nov 2006 22:49:58 +0530 Subject: [postgis-users] pgrouting 0.7 and a* In-Reply-To: <Pine.GSO.4.64.0611051905570.21859@rhea> References: <Pine.GSO.4.64.0611051905570.21859@rhea> Message-ID: <c653c98f0611050919y525c2499uca31f57d5ad1d4e@mail.gmail.com> I have one query ..how do you test if that pg_routing is giving correct results or not ?? Thanks - sandeep On 11/5/06, Ville Antti Ensio Leinonen <levian00 at students.oamk.fi> wrote: Hi. Im working with routing. I allready have tryed with pgdijsktra cmodule > and that worked somewhat right, now i found pgrouting 0.9.7 module. I got > dijkstra to works sameway as in pgdijsktra, but i cant find any howto or > tutorial to get A* work. > > for dijkstra i have > l table with data > l.edges has id,source,targer,cost,reverse_cost > l.vertices has id,the_geom > works fine after little modification to _internal_id() function, and > actually looks like pgrouting works better that pgdijkstra when using > dijsktra. > > Now what i need to do to get A* work, i assume that i need x1,x2,y1,y2 > columns to l.edges table? but what data and how i populate those values? > maybe something to do with long/lat? > > shortest_astar_path_as_geometry('l', source_id, target_id, delta); > And what is delta, README.INSTALL file dosen't talk to me. > > Thanks You for help > > > > --------------------------------- > -- Ville Leinonen -- > ---------------------------------- > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Sandeep Kumar Jakkaraju WeBlog: http://jakkarajus.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061105/2280c650/attachment.html> From pdoria at netmadeira.com Sun Nov 5 09:29:47 2006 From: pdoria at netmadeira.com (Pedro Doria Meunier) Date: Sun, 05 Nov 2006 17:29:47 +0000 Subject: [postgis-users] pgrouting 0.7 and a* In-Reply-To: <Pine.GSO.4.64.0611051905570.21859@rhea> References: <Pine.GSO.4.64.0611051905570.21859@rhea> Message-ID: <1162747787.31570.0.camel@mgpsmobile> PGRouting??? I'm *very* interested in this!!! where can I get the module? Regards, Pedro On Sun, 2006-11-05 at 19:16 +0200, Ville Antti Ensio Leinonen wrote: > Hi. Im working with routing. I allready have tryed with pgdijsktra module > and that worked somewhat right, now i found pgrouting 0.9.7 module. I got > dijkstra to works sameway as in pgdijsktra, but i cant find any howto or > tutorial to get A* work. > > for dijkstra i have > l table with data > l.edges has id,source,targer,cost,reverse_cost > l.vertices has id,the_geom > works fine after little modification to _internal_id() function, and > actually looks like pgrouting works better that pgdijkstra when using > dijsktra. > > Now what i need to do to get A* work, i assume that i need x1,x2,y1,y2 > columns to l.edges table? but what data and how i populate those values? > maybe something to do with long/lat? > > shortest_astar_path_as_geometry('l', source_id, target_id, delta); > And what is delta, README.INSTALL file dosen't talk to me. > > Thanks You for help > > > > --------------------------------- > -- Ville Leinonen -- > ---------------------------------- > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From levian00 at students.oamk.fi Sun Nov 5 10:00:37 2006 From: levian00 at students.oamk.fi (Ville Antti Ensio Leinonen) Date: Sun, 5 Nov 2006 20:00:37 +0200 (EET) Subject: [postgis-users] pgrouting 0.7 and a* In-Reply-To: <1162747787.31570.0.camel@mgpsmobile> References: <Pine.GSO.4.64.0611051905570.21859@rhea> <1162747787.31570.0.camel@mgpsmobile> Message-ID: <Pine.GSO.4.64.0611051957520.21859@rhea> http://www.postlbs.org/postlbs-cms/en/download linux and windows versions And working i mean shortest_astar_path_as_geometry() and shortest_astar_path() wants those x1,x2,y1,y2 but i dont where and how i create them. --------------------------------- -- Ville Leinonen -- -- TTE2SNY1/TTE2SN4Z -- -- OTE ry hallituksen j?sen -- ---------------------------------- On Sun, 5 Nov 2006, Pedro Doria Meunier wrote: > PGRouting??? > > I'm *very* interested in this!!! where can I get the module? > > Regards, > Pedro > > On Sun, 2006-11-05 at 19:16 +0200, Ville Antti Ensio Leinonen wrote: >> Hi. Im working with routing. I allready have tryed with pgdijsktra module >> and that worked somewhat right, now i found pgrouting 0.9.7 module. I got >> dijkstra to works sameway as in pgdijsktra, but i cant find any howto or >> tutorial to get A* work. >> >> for dijkstra i have >> l table with data >> l.edges has id,source,targer,cost,reverse_cost >> l.vertices has id,the_geom >> works fine after little modification to _internal_id() function, and >> actually looks like pgrouting works better that pgdijkstra when using >> dijsktra. >> >> Now what i need to do to get A* work, i assume that i need x1,x2,y1,y2 >> columns to l.edges table? but what data and how i populate those values? >> maybe something to do with long/lat? >> >> shortest_astar_path_as_geometry('l', source_id, target_id, delta); >> And what is delta, README.INSTALL file dosen't talk to me. >> >> Thanks You for help >> >> >> >> --------------------------------- >> -- Ville Leinonen -- >> ---------------------------------- >> _______________________________________________ >> 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 Elvis.Svonja at sensis.com.au Sun Nov 5 19:00:42 2006 From: Elvis.Svonja at sensis.com.au (Svonja, Elvis) Date: Mon, 6 Nov 2006 14:00:42 +1100 Subject: [postgis-users] PostGIS Solaris problem Message-ID: <04F81F192A6B4D4CB94097D9D29899A505BF861B@C1-EXG-VS2.corp.org.local> Thanks Andrew. As you suggested, I tried adding "/usr/sfw/bin" at the front of the PATH, as well as "/usr/sfw/lib" to the LD_LIBRARY_PATH. I also made sure I have the Bison latest version for Solaris 10 installed, but no luck. I keep getting the "broken pipe" error, as shown below. Is there a specific version of PostGIS that is recommended for Solaris 10 SPARC ? ERROR DETAILS: bison -y -vd -p lwg_parse_yy wktparse.y gmake[2]: *** [wktparse.tab.c] Broken Pipe gmake[2]: Leaving directory `/da01/postgresql/gis/postgis-1.1.4/lwgeom' gmake[1]: *** [liblwgeom] Error 2 gmake[1]: Leaving directory `/da01/postgresql/gis/postgis-1.1.4' *** Error code 2 -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Andrew Seales Sent: Friday, 3 November 2006 9:34 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] PostGIS Solaris problem Andrew Seales wrote: > Svonja, Elvis wrote: >> I have used GNU Make, and ensured the original one is removed from the >> PATH. I also installed bison-1.875d >> <ftp://ftp.sunfreeware.com/pub/freeware/intel/10/bison-1.875d-sol10-inte >> l-local.gz> , >> >> However I'm now getting another Broken Pipe message with executing the >> following Bison call: >> >> bison -y -vd -p lwg_parse_yy wktparse.y >> >> Sorry, forgot to mention you'll probably need to do 'export LD_LIBRARY_PATH=/usr/sfw/lib:$LD_LIBRARY_PATH' as well. -- 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 _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users Sensis. Australia's leading information resource. Making complex lives simpler by helping you find, buy and sell. www.about.sensis.com.au www.sensis.com.au www.yellow.com.au www.whitepages.com.au www.citysearch.com.au www.whereis.com.au www.gostay.com.au www.justlisted.com.au www.linkme.com.au www.telstra.com.au www.tradingpost.com.au www.universalpublishers.com.au www.invizage.com.au Sensis cares for the environment - think before you print. This email and any attachments are intended only for the use of the recipient and may be confidential and/or legally privileged. Sensis Pty Ltd disclaims liability for any errors, omissions, viruses, loss and/or damage arising from using, opening or transmitting this email. If you are not the intended recipient you must not use, interfere with, disclose, copy or retain this email and you should notify the sender immediately by return email or by contacting Sensis Pty Ltd by telephone on [+61 3 8653 5000] From meawkittycat2004 at yahoo.com Sun Nov 5 19:56:59 2006 From: meawkittycat2004 at yahoo.com (Luksana Sridawong) Date: Mon, 6 Nov 2006 03:56:59 +0000 (GMT) Subject: [postgis-users] How convert pgsql2shp UTF8 to shapefile SQL_ASCII Message-ID: <20061106035659.23669.qmail@web53901.mail.yahoo.com> Hi everybody I have a problem to use function convert pgsql2shp.I create database encoding UTF8 and I wish convert pgsql to shapefile that is encoding SQL_ASCII. ** I try to use iconv(PHP function) to convert iconv("UTF-8","SQL_ASCII",$data); !! but not succeed and I try to use postgresql function SELECT convert($data using utf8_to_windows_874);or SELECT convert($data using utf8_to_ascii); !! but not succeed too. How I can do it?(WIN874 is THAI language) thank you forword. meaw. Send instant messages to your online friends http://uk.messenger.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061106/e9cd2120/attachment.html> From pramsey at refractions.net Sun Nov 5 23:04:31 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Sun, 05 Nov 2006 23:04:31 -0800 Subject: [postgis-users] GEOS 3.0.0rc2 Message-ID: <635EC4A9-887C-4F0F-BAB7-354A5472628F@refractions.net> The latest version of GEOS is available for download. Moving towards 3.0.0 the changes this time around are some C-API fixes, more work on robust overlay operations, and lots more testing done. Please read the ChangeLog for full details! http://geos.refractions.net From andrew.seales at ed.ac.uk Mon Nov 6 05:54:08 2006 From: andrew.seales at ed.ac.uk (Andrew Seales) Date: Mon, 06 Nov 2006 13:54:08 +0000 Subject: [postgis-users] PostGIS Solaris problem In-Reply-To: <04F81F192A6B4D4CB94097D9D29899A505BF861B@C1-EXG-VS2.corp.org.local> References: <04F81F192A6B4D4CB94097D9D29899A505BF861B@C1-EXG-VS2.corp.org.local> Message-ID: <454F3E80.20103@ed.ac.uk> Svonja, Elvis wrote: > > ERROR DETAILS: > bison -y -vd -p lwg_parse_yy wktparse.y > gmake[2]: *** [wktparse.tab.c] Broken Pipe > gmake[2]: Leaving directory `/da01/postgresql/gis/postgis-1.1.4/lwgeom' > gmake[1]: *** [liblwgeom] Error 2 > gmake[1]: Leaving directory `/da01/postgresql/gis/postgis-1.1.4' > *** Error code 2 > I just tried postgis-1.1.5 and got a seg fault at the same line instead of a broken pipe error. I was using bison version 1.875. I just upgraded to the newest version from http://ftp.gnu.org/pub/gnu/bison/ (2.3) and that fixed the problem. -- 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 robtester at gmail.com Mon Nov 6 06:19:38 2006 From: robtester at gmail.com (Rob Tester) Date: Mon, 6 Nov 2006 07:19:38 -0700 Subject: [postgis-users] Invalid geometry? (and side location conflict) Message-ID: <002401c701ae$9a296590$7203a8c0@susa.local> I receive an error when getting the area for an intersection of two geometry objects. One is large containing several hundered points the other was much smaller. I get: NOTICE: TopologyException: side location conflict (-84.4858,33.6872,33.6872) ERROR: GEOS Intersection() threw an error! (note that geomunion with the same geometry objects works fine) After reading the email lists I saw that invalid geometry objects are often the cause this error, so I checked them with isValid(). Sure enough the large geometry returns false. My question is what really makes a geometry invalid? Is it the invalid geometry that is really causing this issue or something related to the intersection (since geomunion works fine)? I have tried the intersection with other polygons and have had no problems, but one table that contains these very large polygons always causes this problem. Any help is greatly appreciated. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061106/6040ca9e/attachment.html> From robe.dnd at cityofboston.gov Mon Nov 6 06:44:59 2006 From: robe.dnd at cityofboston.gov (Obe, Regina) Date: Mon, 6 Nov 2006 09:44:59 -0500 Subject: [postgis-users] Help with query Message-ID: <53F9CF533E1AA14EA1F8C5C08ABC08D2011AE045@ZDND.DND.boston.cob> Thanks, That means a lot to me coming from you. I think I cheated though - since I'm sure I've seen that trick before. One thing I love about SQL is that you can do so much with it with such little code. The trick is to state the problem in the shortest possible way you can and your statement is the answer. In this case Give me all the ignition records that are off. For each off record give me the minimum on record that is still greater than my off. ________________________________ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey Sent: Friday, November 03, 2006 8:03 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] Help with query Ye gods, Regina, you're amazing. On 3-Nov-06, at 2:14 PM, Pedro Doria Meunier wrote: Regina, You're absolutely the GREATEST! It worked like a charm! Thank you VERY much! All the best, Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam ________________________________ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Obe, Regina Sent: sexta-feira, 3 de Novembro de 2006 21:04 To: PostGIS Users Discussion Subject: RE: [postgis-users] Help with query I'm going to assume your table has 2 fields ignition_on which is a boolean actiontime which is a timestamp and your table is called ignition_log I would try the following - haven't tested it so don't know if it will work SELECT igoff.actiontime as ignition_off_time, MIN(igon.actiontime) as ignition_on_time, MIN(igon.actiontime) - igoff.actiontime as igdifference FROM ignition_log igoff INNER JOIN ignition_log igon ON igoff.actiontime < igon.actiontime AND igoff.ignition_on = false AND igon.ignition_on = true GROUP BY igoff.actiontime ________________________________ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Pedro Doria Meunier Sent: Friday, November 03, 2006 2:31 PM To: 'PostGIS Users Discussion' Subject: [postgis-users] Help with query This is probably not the best place to be asking such a (lame) question but perhaps someone is gracious enough to lend me a hand... ;-) I have the following setup in a table: The first record which is to be found (ok easy enough :D) with a timestamp meets a certain condition (ignition off) The following record is for the event of ignition on again with a timestamp. So the question here is: how can I compute the time difference between these two records in a single query? Better yet: finding all the records that meet the first condition (ignition off) and the immediately following records as to compute the time difference. ;-) Thanks in advance! Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam ________________________________ The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer. _______________________________________________ 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: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061106/ad3c0ad0/attachment.html> From strk at refractions.net Mon Nov 6 07:23:39 2006 From: strk at refractions.net (strk at refractions.net) Date: Mon, 6 Nov 2006 16:23:39 +0100 Subject: [postgis-users] Invalid geometry? (and side location conflict) In-Reply-To: <002401c701ae$9a296590$7203a8c0@susa.local> References: <002401c701ae$9a296590$7203a8c0@susa.local> Message-ID: <20061106152339.GA88063@keybit.net> On Mon, Nov 06, 2006 at 07:19:38AM -0700, Rob Tester wrote: > I receive an error when getting the area for an intersection of two geometry objects. One is large containing several hundered points the other was much smaller. > > I get: > > NOTICE: TopologyException: side location conflict (-84.4858,33.6872,33.6872) > > ERROR: GEOS Intersection() threw an error! > > (note that geomunion with the same geometry objects works fine) > > After reading the email lists I saw that invalid geometry objects are often the cause this error, so I checked them with isValid(). Sure enough the large geometry returns false. My question is what really makes a geometry invalid? Is it the invalid geometry that is really causing this issue or something related to the intersection (since geomunion works fine)? Recent postgis versions should tell you what the invalidity is, through a NOTICE message. --strk; From robe.dnd at cityofboston.gov Mon Nov 6 07:35:26 2006 From: robe.dnd at cityofboston.gov (Obe, Regina) Date: Mon, 6 Nov 2006 10:35:26 -0500 Subject: [postgis-users] PostGIS win32 binaries Message-ID: <53F9CF533E1AA14EA1F8C5C08ABC08D2011AE0FE@ZDND.DND.boston.cob> I recall way back that the win32 binaries were available not in setup form, but just the dlls and sql files. I couldn't find that option anywhere anymore. Does anyone happen to know where that is? If it no longer exists, why did we stop providing that option? It would be nice to have that option back if its not too much trouble. I'm trying to install the win32 against my EnterpriseDb install, but unfortunately EnterpriseDb folder structure is very different from the standard PostGreSQL install so the win32 setup does not work with it. Also for standard win32 installs that don't require a dump reload, I liked the convenience of just being able to overwrite my dlls and rerun the .sql files. Thanks, Regina ----------------------------------------- The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061106/d4e8e056/attachment.html> From robtester at gmail.com Mon Nov 6 08:39:22 2006 From: robtester at gmail.com (Rob Tester) Date: Mon, 6 Nov 2006 09:39:22 -0700 Subject: [postgis-users] Invalid geometry? (and side location conflict) Message-ID: <002701c701c2$1f8bfe60$7203a8c0@susa.local> >Recent postgis versions should tell you what the invalidity is, through >a NOTICE message. I am using 1.1.5 how do I get the NOTICE to show? isValid () simply returns false and the intersection errors with the side location conflict? GeomFromText() simply returns the binary object. Rob. From sdteffen at gmail.com Mon Nov 6 11:44:23 2006 From: sdteffen at gmail.com (Steffen Macke) Date: Mon, 6 Nov 2006 21:44:23 +0200 Subject: [postgis-users] PostGIS win32 binaries In-Reply-To: <53F9CF533E1AA14EA1F8C5C08ABC08D2011AE0FE@ZDND.DND.boston.cob> References: <53F9CF533E1AA14EA1F8C5C08ABC08D2011AE0FE@ZDND.DND.boston.cob> Message-ID: <3cb1691c0611061144u1a7d1060id59debacb2d04427@mail.gmail.com> Regina, > anymore. Does anyone happen to know where that is? If it no longer exists, > why did we stop providing that option? It would be nice to have that option > back if its not too much trouble. If you use 7-Zip, you can open the current PostGIS installer executables as archives and extract the files from there. http://7-zip.org In the Explorer, do a right mouse click 7-Zip->Open archive Regards, Steffen From cmorency at polymtl.ca Mon Nov 6 15:09:05 2006 From: cmorency at polymtl.ca (Catherine Morency) Date: Mon, 06 Nov 2006 15:09:05 -0800 Subject: [postgis-users] minimum spanning tree? Message-ID: <002c01c701f8$8e89ef30$6501a8c0@PHILO> Hello, I am a new user of Postgis. I am looking for a function to compile the length of the shortest string connecting a set of points. There are no network, only spatial points. I have already compiled the convex hull of these sets of points and I am looking for another indicator. Thank you. ==================================== Catherine Morency, ing., Ph.D. Professeure adjointe D?partement des g?nies civil, g?ologique et des mines ?cole Polytechnique de Montr?al Groupe MADITUC (514) 340-4711 p.4502 <mailto:cmorency at polymtl.ca> cmorency at polymtl.ca ==================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061106/652b23a7/attachment.html> From pramsey at refractions.net Mon Nov 6 12:44:39 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Mon, 6 Nov 2006 12:44:39 -0800 Subject: [postgis-users] minimum spanning tree? In-Reply-To: <002c01c701f8$8e89ef30$6501a8c0@PHILO> References: <002c01c701f8$8e89ef30$6501a8c0@PHILO> Message-ID: <D1D16E63-FF67-41F7-9264-1E36C611099C@refractions.net> No such thing right now. If someone is interested in the problem, there is some background here: <http://en.wikipedia.org/wiki/Minimum_spanning_tree> P On 6-Nov-06, at 3:09 PM, Catherine Morency wrote: > Hello, > > > > I am a new user of Postgis. > > I am looking for a function to compile the length of the shortest > string connecting a set of points. > > There are no network, only spatial points. I have already compiled > the convex hull of these sets of points and I am looking for > another indicator. > > > > Thank you. > > > > ==================================== > > Catherine Morency, ing., Ph.D. > > Professeure adjointe > > D?partement des g?nies civil, g?ologique et des mines > > ?cole Polytechnique de Montr?al > > Groupe MADITUC > > (514) 340-4711 p.4502 > > cmorency at polymtl.ca > > ==================================== > > > > _______________________________________________ > 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: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061106/72fe41e6/attachment.html> From robe.dnd at cityofboston.gov Mon Nov 6 12:45:52 2006 From: robe.dnd at cityofboston.gov (Obe, Regina) Date: Mon, 6 Nov 2006 15:45:52 -0500 Subject: [postgis-users] PostGIS win32 binaries Message-ID: <53F9CF533E1AA14EA1F8C5C08ABC08D2011AE570@ZDND.DND.boston.cob> Thanks that did the trick. -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Steffen Macke Sent: Monday, November 06, 2006 2:44 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] PostGIS win32 binaries Regina, > anymore. Does anyone happen to know where that is? If it no longer > exists, why did we stop providing that option? It would be nice to > have that option back if its not too much trouble. If you use 7-Zip, you can open the current PostGIS installer executables as archives and extract the files from there. http://7-zip.org In the Explorer, do a right mouse click 7-Zip->Open archive Regards, Steffen _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users ----------------------------------------- The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer. From robtester at gmail.com Mon Nov 6 12:57:15 2006 From: robtester at gmail.com (Rob Tester) Date: Mon, 6 Nov 2006 13:57:15 -0700 Subject: [postgis-users] minimum spanning tree? References: <002c01c701f8$8e89ef30$6501a8c0@PHILO> <D1D16E63-FF67-41F7-9264-1E36C611099C@refractions.net> Message-ID: <004f01c701e6$2550d9f0$7203a8c0@susa.local> There are a couple of organizations using the boost lib to solve shortest path graphs using Djikstra algorithms as well as the A Star and TSP. It would not be a stretch to get this code and modify it to use the min spanning tree code in boost as well. I have taken the code and made major performance enhancements that are currently being tested. So be wary of better ways to structure the SQL interface to postgis to achieve your goals. You can get the base code from http://www.cartoweb.org/ that provides the basic for interfacing with Djisktra in boost if you want more, please contact me offline and I can send you a package that also implements the AStar and TSP, along with my performance enhancements. Rob. ----- Original Message ----- From: Paul Ramsey To: PostGIS Users Discussion Sent: Monday, November 06, 2006 1:44 PM Subject: Re: [postgis-users] minimum spanning tree? No such thing right now. If someone is interested in the problem, there is some background here: <http://en.wikipedia.org/wiki/Minimum_spanning_tree> P On 6-Nov-06, at 3:09 PM, Catherine Morency wrote: Hello, I am a new user of Postgis. I am looking for a function to compile the length of the shortest string connecting a set of points. There are no network, only spatial points. I have already compiled the convex hull of these sets of points and I am looking for another indicator. Thank you. ==================================== Catherine Morency, ing., Ph.D. Professeure adjointe D?partement des g?nies civil, g?ologique et des mines ?cole Polytechnique de Montr?al Groupe MADITUC (514) 340-4711 p.4502 cmorency at polymtl.ca ==================================== _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061106/1a50df2e/attachment.html> From strk at refractions.net Mon Nov 6 13:02:59 2006 From: strk at refractions.net (strk at refractions.net) Date: Mon, 6 Nov 2006 22:02:59 +0100 Subject: [postgis-users] Invalid geometry? (and side location conflict) In-Reply-To: <002701c701c2$1f8bfe60$7203a8c0@susa.local> References: <002701c701c2$1f8bfe60$7203a8c0@susa.local> Message-ID: <20061106210259.GQ88063@keybit.net> On Mon, Nov 06, 2006 at 09:39:22AM -0700, Rob Tester wrote: > > >Recent postgis versions should tell you what the invalidity is, through > >a NOTICE message. > > I am using 1.1.5 how do I get the NOTICE to show? isValid () simply returns > false and the intersection errors with the side location conflict? > GeomFromText() simply returns the binary object. What's the output of 'select postgis_full_version()' ? --strk; From robtester at gmail.com Mon Nov 6 13:12:15 2006 From: robtester at gmail.com (Rob Tester) Date: Mon, 6 Nov 2006 14:12:15 -0700 Subject: [postgis-users] Invalid geometry? (and side location conflict) References: <002701c701c2$1f8bfe60$7203a8c0@susa.local> <20061106210259.GQ88063@keybit.net> Message-ID: <005401c701e8$417a19f0$7203a8c0@susa.local> "POSTGIS="1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS" ----- Original Message ----- From: <strk at refractions.net> To: <postgis-users at postgis.refractions.net> Sent: Monday, November 06, 2006 2:02 PM Subject: Re: [postgis-users] Invalid geometry? (and side location conflict) > On Mon, Nov 06, 2006 at 09:39:22AM -0700, Rob Tester wrote: >> >> >Recent postgis versions should tell you what the invalidity is, through >> >a NOTICE message. >> >> I am using 1.1.5 how do I get the NOTICE to show? isValid () simply >> returns >> false and the intersection errors with the side location conflict? >> GeomFromText() simply returns the binary object. > > What's the output of 'select postgis_full_version()' ? > > --strk; > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From sejohnson8 at gmail.com Mon Nov 6 19:10:06 2006 From: sejohnson8 at gmail.com (Steven Johnson) Date: Mon, 6 Nov 2006 22:10:06 -0500 Subject: [postgis-users] ver 1.1.5 configure fails on Ubuntu Message-ID: <4a88c6f40611061910gcf6f2dbm2da87f540fdfebdb@mail.gmail.com> My ./configure fails on Ubuntu Dapper (6.06) saying 'invalid argument' on 'with-geos' option. I've checked and re-checked the command line to insure I have the correct arguments (--with-geos=/usr/bin/geos-config). Any suggestions on how to resolve? Thanks in advance, Steven -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061106/811088bb/attachment.html> From kichis at gmail.com Mon Nov 6 20:22:02 2006 From: kichis at gmail.com (Krishnaa Sridharan) Date: Mon, 6 Nov 2006 23:22:02 -0500 Subject: [postgis-users] Getshape from PostGIS error Message-ID: <24c5bc5e0611062022k33bb7116q7e780e1e13c29637@mail.gmail.com> Hi all, Iam trying to use getshape() using php mapscript but getting a fata error like this "Call to a member function on a non-object in.... " $oresult = $rid->getResult(0); $orid->open(""); $Shape = $orid->getShape($result->titleindex,$result->shapeindex); $Extents = $Shape->bounds; $Shape->free(""); $orid=close(""); can some one help me with this. Or can some one sujest a way to get shape info from the results so that i can display it? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061106/e387b96f/attachment.html> From pramsey at refractions.net Mon Nov 6 21:50:26 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Mon, 6 Nov 2006 21:50:26 -0800 Subject: [postgis-users] 1.1.6 Release Message-ID: <95C4E71B-E16C-4565-9B9F-87D9CE4346F1@refractions.net> The 1.1.6 maintenance release of PostGIS is now available. http://postgis.refractions.net/download This is a minor bugfix and compatibility release. The following changes have occurred: - Fixed CAPI change that broke 64-bit platforms. - Added Z ordinate to reprojections. - Updated spatial_ref_sys.sql updated to EPSG 6.11.1. - Simplified Version.config infrastructure to use a single pack of version variables for everything. - Included the Version.config in loader/dumper USAGE messages. - Replaced hand-made, fragile JDBC version parser with Properties. - Fixed setSRID() bug in JDBC, thanks to Thomas Marti. - Fixed regression tests and usage output in loader/dumper. From christo at mecola.com Mon Nov 6 23:08:42 2006 From: christo at mecola.com (Christo Du Preez) Date: Tue, 07 Nov 2006 09:08:42 +0200 Subject: [postgis-users] break geometry into smaller chunks Message-ID: <455030FA.2090405@mecola.com> I need to break geometries into smaller chunks if they exceed a certain size. Is there a routine that already do this? The idea I have is to cut it in half depending on the the height/width, whichever is the longest. And then to repeat this process until all my geometries is less than a certain area. Thanx, Christo From strk at refractions.net Tue Nov 7 00:37:39 2006 From: strk at refractions.net (strk at refractions.net) Date: Tue, 7 Nov 2006 09:37:39 +0100 Subject: [postgis-users] Invalid geometry? (and side location conflict) In-Reply-To: <005401c701e8$417a19f0$7203a8c0@susa.local> References: <002701c701c2$1f8bfe60$7203a8c0@susa.local> <20061106210259.GQ88063@keybit.net> <005401c701e8$417a19f0$7203a8c0@susa.local> Message-ID: <20061107083739.GA4287@keybit.net> On Mon, Nov 06, 2006 at 02:12:15PM -0700, Rob Tester wrote: > "POSTGIS="1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004" > USE_STATS" Mmm.. you should see that message then, maybe you have NOTICEs turned off ? --strk; From strk at refractions.net Tue Nov 7 00:39:44 2006 From: strk at refractions.net (strk at refractions.net) Date: Tue, 7 Nov 2006 09:39:44 +0100 Subject: [postgis-users] ver 1.1.5 configure fails on Ubuntu In-Reply-To: <4a88c6f40611061910gcf6f2dbm2da87f540fdfebdb@mail.gmail.com> References: <4a88c6f40611061910gcf6f2dbm2da87f540fdfebdb@mail.gmail.com> Message-ID: <20061107083944.GB4287@keybit.net> On Mon, Nov 06, 2006 at 10:10:06PM -0500, Steven Johnson wrote: > My ./configure fails on Ubuntu Dapper (6.06) saying 'invalid argument' on > 'with-geos' option. I've checked and re-checked the command line to insure I > have the correct arguments (--with-geos=/usr/bin/geos-config). Any > suggestions on how to resolve? Look at configure.in: if test ! -f "$with_geos"; then AC_MSG_ERROR([Invalid argument to --with-geos]); else Does the command: test ! -f "/usr/bin/geos-config" return a failure or success on your system ? --strk; From jan.syryn at trasys.be Tue Nov 7 02:39:55 2006 From: jan.syryn at trasys.be (whiteman) Date: Tue, 7 Nov 2006 02:39:55 -0800 (PST) Subject: [postgis-users] RE: RE: RE: PostGIS - hibernate - EJB3 In-Reply-To: <B67A5FB7A8114B47A70517C9C0D102E81406EC@bath.uk.rsinc.com> References: <B67A5FB7A8114B47A70517C9C0D102E8131A6E@bath.uk.rsinc.com> <B67A5FB7A8114B47A70517C9C0D102E81406B8@bath.uk.rsinc.com> <5903304.post@talk.nabble.com> <B67A5FB7A8114B47A70517C9C0D102E8131ABA@bath.uk.rsinc.com> <6146402.post@talk.nabble.com> <B67A5FB7A8114B47A70517C9C0D102E81406EC@bath.uk.rsinc.com> Message-ID: <7216080.post@talk.nabble.com> Hi Norman (and others), I have serveral questions/problems: 1. Can you point me where I can find your manual concerning PostGIS and the use of GeometryType ? 2. In the thread here, people are using: <driver-class>org.postgis.DriverWrapper</driver-class> When I do the same, I get a "No suitable driver" exception. For the moment I am using: <driver-class>org.postgresql.Driver</driver-class> and that seems to work for simple tests. Is this important ? Maybe this is related with the errors I am getting further the line. 3. I wanted to use the GeometryType that is packed in PostGIS 1.1.5. After generating the new JAR and replacing the old one by this one, I start getting new exceptions: The class org.postgis.PGbox3d does not implement org.postgresql.util.PGobject. Any Idea what this means ?? 4. Now I put the old PostGIS back and make a very small JAR that contains BinaryWriter and GeometryType, and also add it to the classpath. This is what he sais now: org.hibernate.MappingException: Could not determine type for: org.postgis.hibernate.GeometryType My object looks like this: ........ @Type(type = "org.postgis.hibernate.GeometryType") @Column(name="footprint", columnDefinition="Geometry") public Geometry getFootprint() { return footprint; } public void setFootprint(Geometry footprint) { this.footprint = footprint; } .................... And if I add 'import org.postgis.hibernate.GeometryType' to the object, he does not complain he does not know that import, so the GeometryType is well added to the project. Is there anyone who sees a light through this strange effects ? thanks in advance, Jan Norman Barker-3 wrote: > > Hi, > > I have been a bit busy, but it is my intention to write a simple 'spatial' > tutorial on EJB3 using the postgis geometry type, the functionality will > be simple but should get you started. I know I said I would have it done > by last w/end so I will put it top on my priority list. > > Apologies for the delay, posting code with no instructions is bad! > > Norman > > -- View this message in context: http://www.nabble.com/PostGIS---hibernate---EJB3-tf2064211.html#a7216080 Sent from the PostGIS - User mailing list archive at Nabble.com. From nbarker at ittvis.com Tue Nov 7 05:48:52 2006 From: nbarker at ittvis.com (Norman Barker) Date: Tue, 7 Nov 2006 13:48:52 -0000 Subject: [postgis-users] RE: RE: RE: PostGIS - hibernate - EJB3 Message-ID: <B67A5FB7A8114B47A70517C9C0D102E8131C66@bath.uk.rsinc.com> Hi, -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of whiteman Sent: 07 November 2006 10:40 To: postgis-users at postgis.refractions.net Subject: [postgis-users] RE: RE: RE: PostGIS - hibernate - EJB3 Hi Norman (and others), I have serveral questions/problems: 1. Can you point me where I can find your manual concerning PostGIS and the use of GeometryType ? <ncb>Thanks to Markus this is now in SVN - http://svn.refractions.net/postgis/trunk/java/ejb3/ in particular http://svn.refractions.net/postgis/trunk/java/ejb3/ejb3spatial.pdf </ncb> 2. In the thread here, people are using: <driver-class>org.postgis.DriverWrapper</driver-class> When I do the same, I get a "No suitable driver" exception. For the moment I am using: <driver-class>org.postgresql.Driver</driver-class> and that seems to work for simple tests. Is this important ? Maybe this is related with the errors I am getting further the line. <ncb>You need to use the driverwrapper class or register the geometry types yourself; the tutorial has more details. A sample datasource is here http://svn.refractions.net/postgis/trunk/java/ejb3/jboss/geodata-ds.xml </ncb> 3. I wanted to use the GeometryType that is packed in PostGIS 1.1.5. After generating the new JAR and replacing the old one by this one, I start getting new exceptions: The class org.postgis.PGbox3d does not implement org.postgresql.util.PGobject. Any Idea what this means ?? <ncb>I don't know on this one, sorry.</ncb> 4. Now I put the old PostGIS back and make a very small JAR that contains BinaryWriter and GeometryType, and also add it to the classpath. This is what he sais now: org.hibernate.MappingException: Could not determine type for: org.postgis.hibernate.GeometryType My object looks like this: ........ @Type(type = "org.postgis.hibernate.GeometryType") @Column(name="footprint", columnDefinition="Geometry") public Geometry getFootprint() { return footprint; } public void setFootprint(Geometry footprint) { this.footprint = footprint; } .................... And if I add 'import org.postgis.hibernate.GeometryType' to the object, he does not complain he does not know that import, so the GeometryType is well added to the project. <ncb>this just means that it can't find the jar file on the classpath for this type. Please go through the tutorial and do contact me if you have any problems - quite happy to go through the steps required to get this running. Watch this space for my catalog tutorial before the end of this month on PostGIS, hibernate and Lucene! Thanks </ncb> Is there anyone who sees a light through this strange effects ? thanks in advance, Jan Norman Barker-3 wrote: > > Hi, > > I have been a bit busy, but it is my intention to write a simple 'spatial' > tutorial on EJB3 using the postgis geometry type, the functionality will > be simple but should get you started. I know I said I would have it done > by last w/end so I will put it top on my priority list. > > Apologies for the delay, posting code with no instructions is bad! > > Norman > > -- View this message in context: http://www.nabble.com/PostGIS---hibernate---EJB3-tf2064211.html#a7216080 Sent from the PostGIS - User mailing list archive at Nabble.com. _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From r.neidt at idu.de Tue Nov 7 09:58:39 2006 From: r.neidt at idu.de (Rene Neidt) Date: Tue, 7 Nov 2006 18:58:39 +0100 Subject: [postgis-users] Difference throw an error Message-ID: <A4A64E4C2FE1A14EA3C90091802F13A011095C@mowa.idu.de> Hello users, We are testing geos3.0.0.rc2 and found one problem: HINWEIS: TopologyException: no outgoing dirEdge found 5.41716e+06 5.65838e+06 5.65838e+06 FEHLER: GEOS difference() threw an error! SQL state: XX000 Version: "POSTGIS="1.1.5" GEOS="3.0.0rc2-CAPI-1.3.0" PROJ="Rel. 4.5.0, 19 Apr 2006" USE_STATS" select difference ( (GeometryFromText('POLYGON((5417148.108 5658342.603,5417139.016 5658338.009,5417126.791 5658331.833,5417116.292 5658327.518,5417112.871 5658325.598,5417110.25 5658324.127,5417106.071 5658321.781,5417104.226 5658320.745,5417093.266 5658315.008,5417091.265 5658313.961,5417085.335 5658310.857,5417060.44 5658326.26,5417064.68 5658327.52,5417088.83 5658336.46,5417088.52 5658337.31,5417102.92 5658342.65,5417103.26 5658341.83,5417111.76 5658345.51,5417121.662 5658349.583,5417121.878 5658349.672,5417125.217 5658351.119,5417131.761 5658353.388,5417137.589 5658356.276,5417142.166 5658359.67,5417146.599 5658364.988,5417151.395 5658370.641,5417150.853 5658371.392,5417152.59741167 5658373.52811061,5417154.92 5658376.37,5417155.18955743 5658376.89699992,5417154.919 5658376.371,5417155.814 5658378.111,5417157.051 5658380.297,5417158.004 5658382.304,5417159.014 5658384.47,5417159.775 5658386.619,5417160.629 5658389.278,5417161.5 5658399.49,5417160.773 5658404.194,5417159.41 5658413.02,5417158.853 5658414.442,5417153.671 5658427.659,5417153.67051161 5658427.6586943,5417153.67 5658427.66,5417152.73 5658427.07,5417149.993 5658436.599,5417148.81 5658439.42,5417149.233 5658439.67,5417148.36 5658440.81,5417146.41 5658446.6,5417144.321 5658453.127,5417144.32092232 5658453.13043826,5417154.59 5658458.01,5417154.99551047 5658455.8409905,5417155.446 5658453.413,5417157.23981414 5658448.75748237,5417157.22660892 5658448.57861162,5417157.22660849 5658448.57860592,5417157.22660865 5658448.57860812,5417157.128 5658447.265,5417157.64950997 5658446.06368023,5417157.64950961 5658446.06368108,5417158.314 5658444.533,5417172.322 5658417.957,5417174.99 5658418.57,5417175.23 5658417.74,5417176.696 5658412.61,5417177.875 5658408.488,5417178.76 5658405.39,5417178.1 5658393.55,5417178.08 5658393.36,5417177.11 5658384.95,5417178.151 5658384.915,5417178.14836289 5658384.91508866,5417178.12 5658384.83,5417177.91415246 5658383.81114117,5417176.927 5658378.944,5417176.603 5658377.341,5417176.73975922 5658378.01762048,5417176.6 5658377.34,5417176.51210558 5658376.89535766,5417176.428 5658376.483,5417175.235 5658370.602,5417171.577 5658362.886,5417170.762 5658360.107,5417168.522 5658357.989,5417166.042 5658355.047,5417164.137 5658352.264,5417162.642 5658351.593,5417160.702 5658350.843,5417160.05417889 5658350.5823586,5417158.82 5658350.09,5417158.82103105 5658350.0862195,5417159.50373263 5658350.36089455,5417158.818 5658350.085,5417159.055 5658349.214,5417155.754 5658347.679,5417156.78066321 5658348.15640928,5417155.7525011 5658347.6811561,5417155.161 5658348.532,5417149.028 5658343.237,5417152.26877967 5658346.03496647,5417149.03 5658343.24,5417148.78133339 5658343.06701453,5417148.108 5658342.603))')) , (GeometryFromText('POLYGON((5417148.36 5658440.81,5417149.233 5658439.67,5417148.81 5658439.42,5417149.993 5658436.599,5417152.73 5658427.07,5417153.67 5658427.66,5417153.67051161 5658427.6586943,5417153.671 5658427.659,5417158.853 5658414.442,5417159.41 5658413.02,5417160.773 5658404.194,5417161.5 5658399.49,5417160.63 5658389.28,5417159.78 5658386.62,5417159.366239 5658385.46469333,5417159.014 5658384.47,5417158.004 5658382.304,5417157.051 5658380.297,5417155.814 5658378.111,5417155.18955747 5658376.897,5417154.92 5658376.37,5417152.59740379 5658373.52810095,5417150.853 5658371.392,5417151.13020611 5658371.00790076,5417151.4 5658370.64,5417147.11100598 5658365.59149663,5417146.599 5658364.988,5417145.96673439 5658364.22950947,5417142.17 5658359.67,5417139.98754716 5658358.05460369,5417137.589 5658356.276,5417131.761 5658353.388,5417125.33011568 5658351.15822058,5417125.22 5658351.12,5417121.88 5658349.67,5417121.66 5658349.58,5417111.76 5658345.51,5417103.26 5658341.83,5417102.92 5658342.65,5417088.52 5658337.31,5417088.83 5658336.46,5417064.68 5658327.52,5417060.44 5658326.26,5417085.34 5658310.86,5417085.90750076 5658311.15666987,5417091.265 5658313.961,5417093.266 5658315.008,5417093.61266829 5658315.18946314,5417104.23 5658320.75,5417105.81727304 5658321.63852784,5417106.071 5658321.781,5417106.60319005 5658322.07975996,5417110.25 5658324.13,5417112.87 5658325.6,5417116.29 5658327.52,5417121.76604303 5658329.76778528,5417126.791 5658331.833,5417139.016 5658338.009,5417148.108 5658342.603,5417148.78133333 5658343.06701449,5417149.03 5658343.24,5417152.26878253 5658346.03496893,5417155.161 5658348.532,5417155.7525011 5658347.6811561,5417156.78066337 5658348.15640935,5417159.055 5658349.214,5417158.818 5658350.085,5417158.82103105 5658350.0862195,5417158.82 5658350.09,5417160.0541792 5658350.58235872,5417160.702 5658350.843,5417162.642 5658351.593,5417164.137 5658352.264,5417165.25343486 5658353.89499119,5417166.04 5658355.05,5417168.52 5658357.99,5417170.76 5658360.11,5417171.26171711 5658361.81094338,5417171.577 5658362.886,5417175.235 5658370.602,5417176.428 5658376.483,5417176.51210558 5658376.89535766,5417176.6 5658377.34,5417176.73975924 5658378.01762057,5417176.927 5658378.944,5417177.91415134 5658383.81113564,5417178.12 5658384.83,5417178.14836289 5658384.91508866,5417177.11 5658384.95,5417178.08 5658393.36,5417178.1 5658393.55,5417178.76 5658405.39,5417177.875 5658408.488,5417176.696 5658412.61,5417175.23 5658417.74,5417174.99 5658418.57,5417172.322 5658417.957,5417172.32037372 5658417.96008538,5417172.32 5658417.96,5417158.31 5658444.53,5417157.64951003 5658446.06368011,5417157.128 5658447.265,5417157.22660867 5658448.5786084,5417157.23981414 5658448.75748238,5417155.446 5658453.413,5417154.99551072 5658455.84098918,5417154.59 5658458.01,5417144.32092232 5658453.13043826,5417144.321 5658453.127,5417146.41 5658446.6,5417148.36 5658440.81))')) ) Greetings, Thomas and Rene From mbdavis at refractions.net Tue Nov 7 14:29:00 2006 From: mbdavis at refractions.net (Martin Davis) Date: Tue, 07 Nov 2006 14:29:00 -0800 Subject: [postgis-users] Re: Difference throws an error Message-ID: <455108AC.4000304@refractions.net> The reason the error is thrown is that at least one of the geometries has a very gnarly spike on one side of it. The second geometry contains the vertices: [ 0:28] POINT (5417154.92 5658376.37) [ 0:29] POINT (5417155.18955743 5658376.89699992) [ 0:30] POINT (5417154.919 5658376.371) [ 0:31] POINT (5417155.814 5658378.111) These form a spike/gore where the inside vertex 29 is almost coincident with the edge 30-31. This geometry combination causes an error in all previous versions of JTS/GEOS as well. Hopefully this problem can be addressed with some further work on robustness. -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 From neumann at karto.baug.ethz.ch Wed Nov 8 01:25:41 2006 From: neumann at karto.baug.ethz.ch (Andreas Neumann) Date: Wed, 08 Nov 2006 10:25:41 +0100 Subject: [postgis-users] Springer Encyclopedia of GIS, Postgis entry Message-ID: <4551A295.2030902@karto.baug.ethz.ch> Hello, I am contributing author for the upcoming Springer Encyclopedia of GIS (Entries for SVG and Webmapping) and noticed that they have entries for some commercial GIS and spatial DB products (e.g. Oracle, Smallworld) but don't mention OS or other commercial alternatives, such as UMN Mapserver, Postgis, etc. I asked the editors and they agree to include additional entries into the encyclopedia if they can be written until december. Are there any volunteers that would be willing to write an entry for Postgis? Additional information is available at http://refworks.springer-sbm.com/geograph/ If you are interested in writing such an entry (3000-4000 words, 8-12 pages incl figures), please contact me and I'll send you the emails of the editors and responsible person at Springer. Entries can be written in Word or Latex. Thanks for your interest, Andreas -- ---------------------------------------------- Andreas Neumann Institute of Cartography ETH Zurich Wolfgang-Paulistrasse 15 CH-8093 Zurich, Switzerland Phone: ++41-44-633 3031, Fax: ++41-44-633 1153 e-mail: neumann at karto.baug.ethz.ch www: http://www.carto.net/neumann/ SVG.Open: http://www.svgopen.org/ Carto.net: http://www.carto.net/ From strk at refractions.net Wed Nov 8 01:26:54 2006 From: strk at refractions.net (strk at refractions.net) Date: Wed, 8 Nov 2006 10:26:54 +0100 Subject: [postgis-users] Springer Encyclopedia of GIS, Postgis entry In-Reply-To: <4551A295.2030902@karto.baug.ethz.ch> References: <4551A295.2030902@karto.baug.ethz.ch> Message-ID: <20061108092654.GB28741@keybit.net> If anyone has time, I think it would be worth expanding the article on Wikipedia instead: http://en.wikipedia.org/wiki/PostGIS I think any commercial edition can legally print that material anyway. --strk; On Wed, Nov 08, 2006 at 10:25:41AM +0100, Andreas Neumann wrote: > Hello, > > I am contributing author for the upcoming Springer Encyclopedia of GIS > (Entries for SVG and Webmapping) and noticed that they have entries for > some commercial GIS and spatial DB products (e.g. Oracle, Smallworld) > but don't mention OS or other commercial alternatives, such as UMN > Mapserver, Postgis, etc. I asked the editors and they agree to include > additional entries into the encyclopedia if they can be written until > december. > > Are there any volunteers that would be willing to write an entry for > Postgis? > > Additional information is available at > http://refworks.springer-sbm.com/geograph/ > > If you are interested in writing such an entry (3000-4000 words, 8-12 > pages incl figures), please contact me and I'll send you the emails of > the editors and responsible person at Springer. Entries can be written > in Word or Latex. > > Thanks for your interest, > Andreas From strk at refractions.net Wed Nov 8 02:36:20 2006 From: strk at refractions.net (strk at refractions.net) Date: Wed, 8 Nov 2006 11:36:20 +0100 Subject: [postgis-users] Re: Difference throws an error In-Reply-To: <455108AC.4000304@refractions.net> References: <455108AC.4000304@refractions.net> Message-ID: <20061108103620.GD28741@keybit.net> On Tue, Nov 07, 2006 at 02:29:00PM -0800, Martin Davis wrote: > The reason the error is thrown is that at least one of the geometries > has a very gnarly spike on one side of it. The second geometry contains > the vertices: > > [ 0:28] POINT (5417154.92 5658376.37) > [ 0:29] POINT (5417155.18955743 5658376.89699992) > [ 0:30] POINT (5417154.919 5658376.371) > [ 0:31] POINT (5417155.814 5658378.111) > > These form a spike/gore where the inside vertex 29 is almost coincident > with the edge 30-31. > > This geometry combination causes an error in all previous versions of > JTS/GEOS as well. Hopefully this problem can be addressed with some > further work on robustness. The error is due to Geometry snapping making the first geometry invalid. Only applying commonbits removal passes the 'areatest' op. I disabled this in RC2 to try at being in sync with JTS, but might be worth re-enabling in RC3. The cost would be an additional run of the operation IFF it fails with both original and common-bits-removed inputs. What do you think ? --strk; PS: so GEOS *does* benefit JTS sometime uh ? :) From strk at refractions.net Wed Nov 8 02:43:38 2006 From: strk at refractions.net (strk at refractions.net) Date: Wed, 8 Nov 2006 11:43:38 +0100 Subject: [postgis-users] Difference throw an error In-Reply-To: <A4A64E4C2FE1A14EA3C90091802F13A011095C@mowa.idu.de> References: <A4A64E4C2FE1A14EA3C90091802F13A011095C@mowa.idu.de> Message-ID: <20061108104338.GE28741@keybit.net> Rene, I committed a patch in SVN trunk applying additional heuristics to binary ops. It seems to fix your problem, could you test it ? (I don't *see* the result, just trust the testing tools) --strk; On Tue, Nov 07, 2006 at 06:58:39PM +0100, Rene Neidt wrote: > Hello users, > We are testing geos3.0.0.rc2 and found one problem: > > > HINWEIS: TopologyException: no outgoing dirEdge found 5.41716e+06 > 5.65838e+06 5.65838e+06 > > FEHLER: GEOS difference() threw an error! > SQL state: XX000 > > Version: "POSTGIS="1.1.5" GEOS="3.0.0rc2-CAPI-1.3.0" PROJ="Rel. 4.5.0, > 19 Apr 2006" USE_STATS" From dylan.beaudette at gmail.com Wed Nov 8 09:22:30 2006 From: dylan.beaudette at gmail.com (Dylan Beaudette) Date: Wed, 8 Nov 2006 09:22:30 -0800 Subject: [postgis-users] Case Study: EU Joint Research Centre In-Reply-To: <AED0D0EF-43F2-40FE-9CFF-41DA84FDF14E@refractions.net> References: <32336808-BD5B-4491-AA81-28B3B10446A8@refractions.net> <200610261039.06205.dylan.beaudette@gmail.com> <AED0D0EF-43F2-40FE-9CFF-41DA84FDF14E@refractions.net> Message-ID: <200611080922.30177.dylan.beaudette@gmail.com> Well, the project isn't that far along, but a colleague of mine is going to be using PostGIS for some massive analysis of wetland / soils data. I think that I have convinced him of the benefits (and he is already pissed at ArcMap for the obvious reasons) of doing the attribute / vector management in PostGIS. When the project picks up some speed I will send the information on it. Cheers, Dylan On Thursday 26 October 2006 21:37, Paul Ramsey wrote: > Thanks, Dylan, but I'm running out of material... only one more left > on deck and I'm out of gas again, looking for people to talk to... > > P > > On 26-Oct-06, at 10:39 AM, Dylan Beaudette wrote: > > On Wednesday 25 October 2006 22:49, Paul Ramsey wrote: > >> New case study, get it while it's hot: > >> > >> <http://postgis.refractions.net/documentation/casestudies/jrc/> > >> > >> You know you want to be profiled, you know you do! > >> > >> Do you have something big? Something operational? Are you a > >> government organization or a largish corporation? Do you work for > >> those kinds of people? > >> > >> By telling your story, you make PostGIS and PostgreSQL more credible, > >> and make your life easier the next time your boss asks you about your > >> crazy database... > >> > >> Talk to me about writing up your story, I want to help! > >> > >> Paul > >> _______________________________________________ > >> postgis-users mailing list > >> postgis-users at postgis.refractions.net > >> http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > Great job Paul . I have enjoyed looking over the every expanding > > list of case > > studies. > > > > Cheers, > > > > > > -- > > Dylan Beaudette > > Soils and Biogeochemistry Graduate Group > > University of California at Davis > > 530.754.7341 > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From neumann at karto.baug.ethz.ch Thu Nov 9 00:16:49 2006 From: neumann at karto.baug.ethz.ch (Andreas Neumann) Date: Thu, 09 Nov 2006 09:16:49 +0100 Subject: [postgis-users] Springer Encyclopedia of GIS, Postgis entry In-Reply-To: <20061108092654.GB28741@keybit.net> References: <4551A295.2030902@karto.baug.ethz.ch> <20061108092654.GB28741@keybit.net> Message-ID: <4552E3F1.1000600@karto.baug.ethz.ch> strk at refractions.net wrote: >If anyone has time, I think it would be worth expanding the article >on Wikipedia instead: > >http://en.wikipedia.org/wiki/PostGIS > >I think any commercial edition can legally print that material anyway. > > thats a good idea. That would make the information available for a broader audience. I will ask Springer if that is possible. Andreas -- ---------------------------------------------- Andreas Neumann Institute of Cartography ETH Zurich Wolfgang-Paulistrasse 15 CH-8093 Zurich, Switzerland Phone: ++41-44-633 3031, Fax: ++41-44-633 1153 e-mail: neumann at karto.baug.ethz.ch www: http://www.carto.net/neumann/ SVG.Open: http://www.svgopen.org/ Carto.net: http://www.carto.net/ From mark.cave-ayland at ilande.co.uk Thu Nov 9 04:33:47 2006 From: mark.cave-ayland at ilande.co.uk (Mark Cave-Ayland) Date: Thu, 09 Nov 2006 12:33:47 +0000 Subject: [postgis-users] Getshape from PostGIS error In-Reply-To: <24c5bc5e0611062022k33bb7116q7e780e1e13c29637@mail.gmail.com> References: <24c5bc5e0611062022k33bb7116q7e780e1e13c29637@mail.gmail.com> Message-ID: <1163075627.5519.16.camel@mca-desktop> On Mon, 2006-11-06 at 23:22 -0500, Krishnaa Sridharan wrote: > Hi all, Iam trying to use getshape() using php mapscript but getting a > fata error like this "Call to a member function on a non-object > in.... " > > $oresult = $rid->getResult(0); > > $orid->open(""); > > $Shape = $orid->getShape($result->titleindex,$result->shapeindex); > > $Extents = $Shape->bounds; > > $Shape->free(""); > > $orid=close(""); > > > > can some one help me with this. Or can some one sujest a way to get > shape info from the results so that i can display it? > > Thanks Hi Krishnaa, This is probably a mapserver rather than a PostGIS question - try posting your mail to the mapserver-users mailing list instead. You can find more information about subscribing to the mapserver mailing list at http://mapserver.gis.umn.edu. HTH, Mark. From sejohnson8 at gmail.com Thu Nov 9 18:23:20 2006 From: sejohnson8 at gmail.com (Steven Johnson) Date: Thu, 9 Nov 2006 21:23:20 -0500 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu Message-ID: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> strk, Thanks for your response to my ./configure woes. I tried your suggestion and these are the results: test !-f "/usr/bin/geos-config" yields test flex --version "/usr/bin/geos-config" bash: test: --version: binary operator expected But if I locate geos-config it turns up in /usr/bin/ So, if I ./configure once again, I get to the "checking for geos-config" section and I get . . . checking for geos-config... /usr/bin/geos-config Usage: geos-config [OPTIONS] Options: [--prefix] [--version] [--libs] [--cflags] [--includes] [--jtsport] Is it looking for /usr/lib/libgeos.so.2.1.4? Or...? Thanks again, Steven _________________________________ Date: Tue, 7 Nov 2006 09:39:44 +0100 From: strk at refractions.net Subject: Re: [postgis-users] ver 1.1.5 configure fails on Ubuntu To: postgis-users at postgis.refractions.net Message-ID: <20061107083944.GB4287 at keybit.net> Content-Type: text/plain; charset=us-ascii On Mon, Nov 06, 2006 at 10:10:06PM -0500, Steven Johnson wrote: > My ./configure fails on Ubuntu Dapper (6.06) saying 'invalid argument' on > 'with-geos' option. I've checked and re-checked the command line to insure I > have the correct arguments (--with-geos=/usr/bin/geos-config). Any > suggestions on how to resolve? Look at configure.in: if test ! -f "$with_geos"; then AC_MSG_ERROR([Invalid argument to --with-geos]); else Does the command: test ! -f "/usr/bin/geos-config" return a failure or success on your system ? --strk; -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061109/905b21a8/attachment.html> From sejohnson8 at gmail.com Thu Nov 9 18:29:37 2006 From: sejohnson8 at gmail.com (Steven Johnson) Date: Thu, 9 Nov 2006 21:29:37 -0500 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu Message-ID: <4a88c6f40611091829n6d919ed8k26ff5a4496ca9ed2@mail.gmail.com> One more clue here... I've pasted the summary of the ./configure process below and notice that the value for ldflags is not set. Wondering if I need to recompile PostgreSQL to link against the C++ libs? Thanks again, Steven SUMMARY ------------------------------------------------------- HOST_OS: linux-gnu PGSQL: /usr/bin/pg_config GEOS: /usr/bin/geos-config (ldflags: ) PROJ: prefix=/usr libdir=/usr/lib ICONV: 1 PORTNAME: linux PREFIX: /usr EPREFIX: ${prefix} DOC: /usr/share/doc/postgresql-doc-8.1/contrib DATA: /usr/share/postgresql/8.1/contrib MAN: /usr/share/postgresql/8.1/man BIN: /usr/lib/postgresql/8.1/bin EXT: /usr/lib/postgresql/8.1/lib (\$$libdir) ------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061109/56e6759d/attachment.html> From strk at refractions.net Thu Nov 9 23:04:06 2006 From: strk at refractions.net (strk at refractions.net) Date: Fri, 10 Nov 2006 08:04:06 +0100 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu In-Reply-To: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> References: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> Message-ID: <20061110070406.GA74031@keybit.net> On Thu, Nov 09, 2006 at 09:23:20PM -0500, Steven Johnson wrote: > strk, > Thanks for your response to my ./configure woes. I tried your suggestion and > these are the results: > test !-f "/usr/bin/geos-config" yields > test flex --version "/usr/bin/geos-config" > bash: test: --version: binary operator expected Ops.. it seems that the '!' char is interpreted as a seek in the history... Try replacing that with: if test -f "$variable"; then : else .... original code here .... fi (in configure.in) --strk; From strk at refractions.net Thu Nov 9 23:05:57 2006 From: strk at refractions.net (strk at refractions.net) Date: Fri, 10 Nov 2006 08:05:57 +0100 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu In-Reply-To: <4a88c6f40611091829n6d919ed8k26ff5a4496ca9ed2@mail.gmail.com> References: <4a88c6f40611091829n6d919ed8k26ff5a4496ca9ed2@mail.gmail.com> Message-ID: <20061110070557.GB74031@keybit.net> Given the previous failure this is just random result, configure should have instead raised an error and aborted. This exactly same bug should be in 1.1.6 too... If you can provide a patch (read previous mail) I'll commit to SVN trunk for next release. Thanks --strk; On Thu, Nov 09, 2006 at 09:29:37PM -0500, Steven Johnson wrote: > One more clue here... I've pasted the summary of the ./configure process > below and notice that the value for ldflags is not set. Wondering if I need > to recompile PostgreSQL to link against the C++ libs? > > Thanks again, > Steven > > SUMMARY > ------------------------------------------------------- > > HOST_OS: linux-gnu > > PGSQL: /usr/bin/pg_config > GEOS: /usr/bin/geos-config > (ldflags: ) > PROJ: prefix=/usr libdir=/usr/lib > ICONV: 1 > > PORTNAME: linux > PREFIX: /usr > EPREFIX: ${prefix} > DOC: /usr/share/doc/postgresql-doc-8.1/contrib > DATA: /usr/share/postgresql/8.1/contrib > MAN: /usr/share/postgresql/8.1/man > BIN: /usr/lib/postgresql/8.1/bin > EXT: /usr/lib/postgresql/8.1/lib (\$$libdir) > ------------------------------------------------------- > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users -- /"\ ASCII Ribbon Campaign \ / Respect for low technology. X Keep e-mail messages readable by any computer system. / \ Keep it ASCII. From stefan.schwarzer at grid.unep.ch Fri Nov 10 05:53:52 2006 From: stefan.schwarzer at grid.unep.ch (Stefan Schwarzer) Date: Fri, 10 Nov 2006 14:53:52 +0100 Subject: [postgis-users] Correct dump and restore Message-ID: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> Hi there, I've seen the subject coming up already a couple of times. But it didn't really help me and I can't imagine that there isn't a simple strategy/method for that: I need to make a copy of a database which resides on one computer and install that copy on another. Computer 1 (Linux) has (PostgreSQL) 8.1.0 Computer 2 (Mac) has (PostgreSQL) 8.1.2 Don't know about the version of PostGIS. I tried various pg_dump and pg_restore parameters. But the restore never worked correctly. I tried it as well with a simple psql but there too I was faced with problems... Can anyone perhaps give me an advice how to correctly export-import a database? Thanks for any hints! Stefan From gdt at ir.bbn.com Fri Nov 10 06:07:12 2006 From: gdt at ir.bbn.com (Greg Troxel) Date: Fri, 10 Nov 2006 09:07:12 -0500 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu In-Reply-To: <20061110070406.GA74031@keybit.net> (strk@refractions.net's message of "Fri\, 10 Nov 2006 08\:04\:06 +0100") References: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> <20061110070406.GA74031@keybit.net> Message-ID: <rmiu017pf8v.fsf@fnord.ir.bbn.com> strk at refractions.net writes: > On Thu, Nov 09, 2006 at 09:23:20PM -0500, Steven Johnson wrote: >> strk, >> Thanks for your response to my ./configure woes. I tried your suggestion and >> these are the results: >> test !-f "/usr/bin/geos-config" yields >> test flex --version "/usr/bin/geos-config" >> bash: test: --version: binary operator expected > > Ops.. it seems that the '!' char is interpreted as a seek in > the history... > Try replacing that with: > > if test -f "$variable"; then > : > else > .... original code here .... > fi > > (in configure.in) > > --strk; >From the man page on NetBSD, it seems ! is legal (POSIX.2), but that it has to be followed by a space. It then works with NetBSD's /bin/sh, known for complying with POSIX.2 and not implementing bash extensions and thus a good test case: $ test ! -f /etc/passwd || echo foo foo From gdt at ir.bbn.com Fri Nov 10 06:16:04 2006 From: gdt at ir.bbn.com (Greg Troxel) Date: Fri, 10 Nov 2006 09:16:04 -0500 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu In-Reply-To: <20061110070406.GA74031@keybit.net> (strk@refractions.net's message of "Fri\, 10 Nov 2006 08\:04\:06 +0100") References: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> <20061110070406.GA74031@keybit.net> Message-ID: <rmimz6zpeu3.fsf@fnord.ir.bbn.com> Also, the '! -f' worked fine in bash 3.1.17. (I didn't mean for my comments to come across as anti-bash - I've used it as my login shell since around 1990.) -- Greg Troxel <gdt at ir.bbn.com> From strk at refractions.net Fri Nov 10 06:25:39 2006 From: strk at refractions.net (strk at refractions.net) Date: Fri, 10 Nov 2006 15:25:39 +0100 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu In-Reply-To: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> References: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> Message-ID: <20061110142539.GA80694@keybit.net> On Thu, Nov 09, 2006 at 09:23:20PM -0500, Steven Johnson wrote: > checking for geos-config... /usr/bin/geos-config > Usage: geos-config [OPTIONS] Ok, forget about the '!' thing, what postgis does is call geos-config with these: GEOS_DIR=`$GEOSCONFIG --prefix` GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` GEOS_MAJOR=`$GEOSCONFIG --version | cut -d. -f1` It's possible that I forgot support for older geos and the above are not actually working. So, can you try invoking /usr/bin/geos-config with the above flags in turn and see which fails ? Which version of GEOS do you have ? (note that geos-config is a shell script, you can also inspect with any pager or texteditor) --strk; From strk at refractions.net Fri Nov 10 06:26:21 2006 From: strk at refractions.net (strk at refractions.net) Date: Fri, 10 Nov 2006 15:26:21 +0100 Subject: [postgis-users] Correct dump and restore In-Reply-To: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> References: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> Message-ID: <20061110142621.GB80694@keybit.net> See 'Hard Upgrade' section in postgis manual. --strk; On Fri, Nov 10, 2006 at 02:53:52PM +0100, Stefan Schwarzer wrote: > Hi there, > > I've seen the subject coming up already a couple of times. But it > didn't really help me and I can't imagine that there isn't a simple > strategy/method for that: > > I need to make a copy of a database which resides on one computer and > install that copy on another. > > Computer 1 (Linux) has (PostgreSQL) 8.1.0 > Computer 2 (Mac) has (PostgreSQL) 8.1.2 > > Don't know about the version of PostGIS. > > I tried various pg_dump and pg_restore parameters. But the restore > never worked correctly. I tried it as well with a simple psql but > there too I was faced with problems... > > Can anyone perhaps give me an advice how to correctly export-import a > database? > > Thanks for any hints! > > Stefan > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users -- /"\ ASCII Ribbon Campaign \ / Respect for low technology. X Keep e-mail messages readable by any computer system. / \ Keep it ASCII. From stefan.schwarzer at grid.unep.ch Fri Nov 10 06:52:57 2006 From: stefan.schwarzer at grid.unep.ch (Stefan Schwarzer) Date: Fri, 10 Nov 2006 15:52:57 +0100 Subject: [postgis-users] Correct dump and restore In-Reply-To: <20061110142621.GB80694@keybit.net> References: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> <20061110142621.GB80694@keybit.net> Message-ID: <65F4FB60-39AC-428D-B5E7-71F46EA09287@grid.unep.ch> Under "Hard upgrade" I don't find anything. I guess you mean this section (page 5)? Seems still rather complicated.... # Create a "custom-format" dump of the database you want # to upgrade (let?s call it "olddb") $ pg_dump -Fc olddb olddb.dump # Restore the dump contextually upgrading postgis into # a new database. The new database doesn?t have to exist. # Let?s call it "newdb" $ sh utils/postgis_restore.pl lwpostgis.sql newdb olddb.dump > restore.log # Check that all restored dump objects really had to be restored from dump # and do not conflict with the ones defined in lwpostgis.sql $ grep ^KEEPING restore.log | less # If upgrading from PostgreSQL < 7.5 to >= 7.5 you might want to # drop the attrelid, varattnum and stats columns in the geometry_columns # table, which are no-more needed. Keeping them won?t hurt. # !!! DROPPING THEM WHEN REALLY NEEDED WILL DO HURT !!!! $ psql newdb -c "ALTER TABLE geometry_columns DROP attrelid" $ psql newdb -c "ALTER TABLE geometry_columns DROP varattnum" $ psql newdb -c "ALTER TABLE geometry_columns DROP stats" # spatial_ref_sys table is restore from the dump, to ensure your custom # additions are kept, but the distributed one might contain modification # so you should backup your entries, drop the table and source the new one. # If you did make additions we assume you know how to backup them before # upgrading the table. Replace of it with the new one is done like this: $ psql newdb newdb=> drop table spatial_ref_sys; DROP newdb=> \i spatial_ref_sys.sql On Nov 10, 2006, at 3:26 PM, strk at refractions.net wrote: > See 'Hard Upgrade' section in postgis manual. > --strk; > > On Fri, Nov 10, 2006 at 02:53:52PM +0100, Stefan Schwarzer wrote: >> Hi there, >> >> I've seen the subject coming up already a couple of times. But it >> didn't really help me and I can't imagine that there isn't a simple >> strategy/method for that: >> >> I need to make a copy of a database which resides on one computer and >> install that copy on another. >> >> Computer 1 (Linux) has (PostgreSQL) 8.1.0 >> Computer 2 (Mac) has (PostgreSQL) 8.1.2 >> >> Don't know about the version of PostGIS. >> >> I tried various pg_dump and pg_restore parameters. But the restore >> never worked correctly. I tried it as well with a simple psql but >> there too I was faced with problems... >> >> Can anyone perhaps give me an advice how to correctly export-import a >> database? >> >> Thanks for any hints! >> >> Stefan >> >> >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users > > -- > > /"\ ASCII Ribbon Campaign > \ / Respect for low technology. > X Keep e-mail messages readable by any computer system. > / \ Keep it ASCII. > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From gdt at ir.bbn.com Fri Nov 10 06:59:35 2006 From: gdt at ir.bbn.com (Greg Troxel) Date: Fri, 10 Nov 2006 09:59:35 -0500 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu In-Reply-To: <20061110142539.GA80694@keybit.net> (strk@refractions.net's message of "Fri\, 10 Nov 2006 15\:25\:39 +0100") References: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> <20061110142539.GA80694@keybit.net> Message-ID: <rmiejsbpctk.fsf@fnord.ir.bbn.com> I need to update pkgsrc, which is at 2.0.0. So I have put a patch to postgis in pkgsrc to work around it using ldflags instead of libs. gdt 2 > geos-config --prefix /usr/pkg gdt 3 > geos-config --ldflags Usage: geos-config [OPTIONS] Options: [--prefix] [--version] [--libs] [--cflags] [--includes] [--jtsport] gdt 4 > geos-config --version 2.0.0 gdt 5 > geos-config --version | cut -d. -f1 2 gdt 6 > geos-config --libs -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lgeos -- Greg Troxel <gdt at ir.bbn.com> From gdt at ir.bbn.com Fri Nov 10 07:00:04 2006 From: gdt at ir.bbn.com (Greg Troxel) Date: Fri, 10 Nov 2006 10:00:04 -0500 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu In-Reply-To: <20061110142539.GA80694@keybit.net> (strk@refractions.net's message of "Fri\, 10 Nov 2006 15\:25\:39 +0100") References: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> <20061110142539.GA80694@keybit.net> Message-ID: <rmiac2zpcsr.fsf@fnord.ir.bbn.com> It would be cool if geos grew pkg-config support; then eventually we could drop the geos-config. -- Greg Troxel <gdt at ir.bbn.com> From strk at refractions.net Fri Nov 10 07:00:31 2006 From: strk at refractions.net (strk at refractions.net) Date: Fri, 10 Nov 2006 16:00:31 +0100 Subject: [postgis-users] Correct dump and restore In-Reply-To: <65F4FB60-39AC-428D-B5E7-71F46EA09287@grid.unep.ch> References: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> <20061110142621.GB80694@keybit.net> <65F4FB60-39AC-428D-B5E7-71F46EA09287@grid.unep.ch> Message-ID: <20061110150031.GD80694@keybit.net> On Fri, Nov 10, 2006 at 03:52:57PM +0100, Stefan Schwarzer wrote: > Under "Hard upgrade" I don't find anything. I guess you mean this > section (page 5)? Seems still rather complicated.... Yes, this is the one (isn't called Hard Upgrade?). And, yes, seems complicated, but might also work :) --strk; > > # Create a "custom-format" dump of the database you want > # to upgrade (let?s call it "olddb") > $ pg_dump -Fc olddb olddb.dump > # Restore the dump contextually upgrading postgis into > # a new database. The new database doesn?t have to exist. > # Let?s call it "newdb" > $ sh utils/postgis_restore.pl lwpostgis.sql newdb olddb.dump > > restore.log > # Check that all restored dump objects really had to be restored from > dump > # and do not conflict with the ones defined in lwpostgis.sql > $ grep ^KEEPING restore.log | less > # If upgrading from PostgreSQL < 7.5 to >= 7.5 you might want to > # drop the attrelid, varattnum and stats columns in the geometry_columns > # table, which are no-more needed. Keeping them won?t hurt. > # !!! DROPPING THEM WHEN REALLY NEEDED WILL DO HURT !!!! > $ psql newdb -c "ALTER TABLE geometry_columns DROP attrelid" > $ psql newdb -c "ALTER TABLE geometry_columns DROP varattnum" > $ psql newdb -c "ALTER TABLE geometry_columns DROP stats" > # spatial_ref_sys table is restore from the dump, to ensure your custom > # additions are kept, but the distributed one might contain modification > # so you should backup your entries, drop the table and source the > new one. > # If you did make additions we assume you know how to backup them before > # upgrading the table. Replace of it with the new one is done like this: > $ psql newdb > newdb=> drop table spatial_ref_sys; > DROP > newdb=> \i spatial_ref_sys.sql > > > > On Nov 10, 2006, at 3:26 PM, strk at refractions.net wrote: > > >See 'Hard Upgrade' section in postgis manual. > >--strk; > > > >On Fri, Nov 10, 2006 at 02:53:52PM +0100, Stefan Schwarzer wrote: > >>Hi there, > >> > >>I've seen the subject coming up already a couple of times. But it > >>didn't really help me and I can't imagine that there isn't a simple > >>strategy/method for that: > >> > >>I need to make a copy of a database which resides on one computer and > >>install that copy on another. > >> > >>Computer 1 (Linux) has (PostgreSQL) 8.1.0 > >>Computer 2 (Mac) has (PostgreSQL) 8.1.2 > >> > >>Don't know about the version of PostGIS. > >> > >>I tried various pg_dump and pg_restore parameters. But the restore > >>never worked correctly. I tried it as well with a simple psql but > >>there too I was faced with problems... > >> > >>Can anyone perhaps give me an advice how to correctly export-import a > >>database? > >> > >>Thanks for any hints! > >> > >>Stefan > >> > >> > >>_______________________________________________ > >>postgis-users mailing list > >>postgis-users at postgis.refractions.net > >>http://postgis.refractions.net/mailman/listinfo/postgis-users > > > >-- > > > > /"\ ASCII Ribbon Campaign > > \ / Respect for low technology. > > X Keep e-mail messages readable by any computer system. > > / \ Keep it ASCII. > > > >_______________________________________________ > >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 -- /"\ ASCII Ribbon Campaign \ / Respect for low technology. X Keep e-mail messages readable by any computer system. / \ Keep it ASCII. From frank.koormann at intevation.de Fri Nov 10 07:04:11 2006 From: frank.koormann at intevation.de (Frank Koormann) Date: Fri, 10 Nov 2006 16:04:11 +0100 Subject: [postgis-users] Correct dump and restore In-Reply-To: <65F4FB60-39AC-428D-B5E7-71F46EA09287@grid.unep.ch> References: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> <20061110142621.GB80694@keybit.net> <65F4FB60-39AC-428D-B5E7-71F46EA09287@grid.unep.ch> Message-ID: <20061110150411.GF2075@intevation.de> * Stefan Schwarzer <stefan.schwarzer at grid.unep.ch> [061110 15:55]: > Under "Hard upgrade" I don't find anything. I guess you mean this > section (page 5)? Seems still rather complicated.... I think strk was talking about the online Doku: http://postgis.refractions.net/docs/ch02.html#upgrading Essentially it is $ pg_dump -Fc olddb olddb.dump and $ sh utils/postgis_restore.pl lwpostgis.sql newdb olddb.dump > restore.log The rest are checks and cleanups if migration from older postgresql versions - which isn't the case in your situation. Regards, Frank -- Frank Koormann <frank.koormann at intevation.de> Professional Service around Free Software (http://intevation.net/) FreeGIS Project (http://freegis.org/) PostGIS Support (http://intevation.de/services/gis/postgis.en.html) From strk at refractions.net Fri Nov 10 07:11:29 2006 From: strk at refractions.net (strk at refractions.net) Date: Fri, 10 Nov 2006 16:11:29 +0100 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu In-Reply-To: <rmiejsbpctk.fsf@fnord.ir.bbn.com> References: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> <20061110142539.GA80694@keybit.net> <rmiejsbpctk.fsf@fnord.ir.bbn.com> Message-ID: <20061110151129.GE80694@keybit.net> On Fri, Nov 10, 2006 at 09:59:35AM -0500, Greg Troxel wrote: > I need to update pkgsrc, which is at 2.0.0. So I have put a patch to > postgis in pkgsrc to work around it using ldflags instead of libs. It seems postgis doesn't automatically work with 2.0.0 version of geos, but I see it's possible to use --with-geos-libdir=... to override the default GEOS_LDFLAGS (which in your case is set to the empty string, given the invalid call). Please try that. --strk; > gdt 2 > geos-config --prefix > /usr/pkg > gdt 3 > geos-config --ldflags > Usage: geos-config [OPTIONS] > Options: > [--prefix] > [--version] > [--libs] > [--cflags] > [--includes] > [--jtsport] > gdt 4 > geos-config --version > 2.0.0 > gdt 5 > geos-config --version | cut -d. -f1 > 2 > gdt 6 > geos-config --libs > -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lgeos From strk at refractions.net Fri Nov 10 07:16:32 2006 From: strk at refractions.net (strk at refractions.net) Date: Fri, 10 Nov 2006 16:16:32 +0100 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu In-Reply-To: <20061110151129.GE80694@keybit.net> References: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> <20061110142539.GA80694@keybit.net> <rmiejsbpctk.fsf@fnord.ir.bbn.com> <20061110151129.GE80694@keybit.net> Message-ID: <20061110151632.GF80694@keybit.net> Actually, try the attached patch for configure.in, it should work out of the box for you (with --with-geos-libdir still usable for overrides) --strk; On Fri, Nov 10, 2006 at 04:11:29PM +0100, strk at refractions.net wrote: > On Fri, Nov 10, 2006 at 09:59:35AM -0500, Greg Troxel wrote: > > I need to update pkgsrc, which is at 2.0.0. So I have put a patch to > > postgis in pkgsrc to work around it using ldflags instead of libs. > > It seems postgis doesn't automatically work with 2.0.0 version of geos, > but I see it's possible to use --with-geos-libdir=... to override > the default GEOS_LDFLAGS (which in your case is set to the empty string, > given the invalid call). > Please try that. > > --strk; > > > gdt 2 > geos-config --prefix > > /usr/pkg > > gdt 3 > geos-config --ldflags > > Usage: geos-config [OPTIONS] > > Options: > > [--prefix] > > [--version] > > [--libs] > > [--cflags] > > [--includes] > > [--jtsport] > > gdt 4 > geos-config --version > > 2.0.0 > > gdt 5 > geos-config --version | cut -d. -f1 > > 2 > > gdt 6 > geos-config --libs > > -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lgeos -------------- next part -------------- Index: configure.in =================================================================== --- configure.in (revision 2526) +++ configure.in (working copy) @@ -147,7 +147,16 @@ if test $USE_GEOS -gt 0; then GEOS_DIR=`$GEOSCONFIG --prefix` - GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` + + GEOS_LDFLAGS=`$GEOSCONFIG --ldflags 2> /dev/null` + if test x"$GEOS_LDFLAGS" = "x"; then + # older geos-config versions did not + # support the --ldflags switch, we'll + # default to GEOS_DIR/lib in this case. + # + GEOS_LDFLAGS="$GEOS_DIR/lib" + fi + GEOS_MAJOR=`$GEOSCONFIG --version | cut -d. -f1` if test "$GEOS_MAJOR" = "@GEOS_VERSION@"; then GEOS_MAJOR=1 From gdt at ir.bbn.com Fri Nov 10 07:35:34 2006 From: gdt at ir.bbn.com (Greg Troxel) Date: Fri, 10 Nov 2006 10:35:34 -0500 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu In-Reply-To: <20061110151632.GF80694@keybit.net> (strk@refractions.net's message of "Fri\, 10 Nov 2006 16\:16\:32 +0100") References: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> <20061110142539.GA80694@keybit.net> <rmiejsbpctk.fsf@fnord.ir.bbn.com> <20061110151129.GE80694@keybit.net> <20061110151632.GF80694@keybit.net> Message-ID: <rmi1wobpb5l.fsf@fnord.ir.bbn.com> Thanks. Here's the workaround I have in place, which works fine. Plus, shouldn't that be -L${libdir} in your patch? (This patch is applied to postgis sources before building.) $NetBSD: patch-aa,v 1.1 2006/09/20 16:24:46 gdt Exp $ --- configure.orig 2006-07-01 00:53:02.000000000 -0400 +++ configure @@ -3735,7 +3735,7 @@ fi; if test $USE_GEOS -gt 0; then GEOS_DIR=`$GEOSCONFIG --prefix` - GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` + GEOS_LDFLAGS=`$GEOSCONFIG --libs` GEOS_MAJOR=`$GEOSCONFIG --version | cut -d. -f1` if test "$GEOS_MAJOR" = "@GEOS_VERSION@"; then GEOS_MAJOR=1 This patch (among others not relevant to this issue) is applied to geos 2.0.0. It's kludgy, but it gets -Wl,-R/usr/pkg/lib added like it should be. $NetBSD: patch-ae,v 1.1 2006/09/20 16:01:48 gdt Exp $ --- tools/geos-config.in.orig 2004-07-17 05:07:17.000000000 -0400 +++ tools/geos-config.in @@ -34,7 +34,7 @@ case $1 in echo @CFLAGS@ -I at prefix@/include ;; --libs) - echo -L at prefix@/lib -lgeos + echo -L at prefix@/lib @LDFLAGS@ -lgeos ;; --includes) echo @prefix@/include So perhaps postgis should require a newer version of geos. When did -ldflags get added? I see 2.2.3 has it. (I'm currently building 2.2.3 with an uncommitted pkgsrc update, as that seems safer than 3.0.0rc right now.) From havard.tveite at umb.no Fri Nov 10 07:35:38 2006 From: havard.tveite at umb.no (Havard Tveite) Date: Fri, 10 Nov 2006 16:35:38 +0100 Subject: [postgis-users] Correct dump and restore In-Reply-To: <20061110150411.GF2075@intevation.de> References: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> <20061110142621.GB80694@keybit.net> <65F4FB60-39AC-428D-B5E7-71F46EA09287@grid.unep.ch> <20061110150411.GF2075@intevation.de> Message-ID: <45549C4A.6010704@umb.no> Frank Koormann wrote: > * Stefan Schwarzer <stefan.schwarzer at grid.unep.ch> [061110 15:55]: >> Under "Hard upgrade" I don't find anything. I guess you mean this >> section (page 5)? Seems still rather complicated.... > > I think strk was talking about the online Doku: > http://postgis.refractions.net/docs/ch02.html#upgrading > > Essentially it is > > $ pg_dump -Fc olddb olddb.dump > > and > > $ sh utils/postgis_restore.pl lwpostgis.sql newdb olddb.dump > restore.log And you should be able to add createdb parameters at the end of the postgis_restore parameter list (useful if you are using non-default text encoding for the database): $ sh utils/postgis_restore.pl lwpostgis.sql newdb olddb.dump -E=UNICODE > restore.log Due to a bug, this does not work in 1.1.6, but shall now have been fixed in "trunk" (see bug 124). H?vard > > The rest are checks and cleanups if migration from older postgresql > versions - which isn't the case in your situation. > > Regards, > > Frank > -- H?vard Tveite Department of Mathematical Sciences and Technology, UMB Dr?bakveien 14, POBox 5003, N-1432 ?s, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt From strk at refractions.net Fri Nov 10 08:09:38 2006 From: strk at refractions.net (strk at refractions.net) Date: Fri, 10 Nov 2006 17:09:38 +0100 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu In-Reply-To: <rmi1wobpb5l.fsf@fnord.ir.bbn.com> References: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> <20061110142539.GA80694@keybit.net> <rmiejsbpctk.fsf@fnord.ir.bbn.com> <20061110151129.GE80694@keybit.net> <20061110151632.GF80694@keybit.net> <rmi1wobpb5l.fsf@fnord.ir.bbn.com> Message-ID: <20061110160938.GI80694@keybit.net> On Fri, Nov 10, 2006 at 10:35:34AM -0500, Greg Troxel wrote: > Thanks. Here's the workaround I have in place, which works fine. > Plus, shouldn't that be -L${libdir} in your patch? > > (This patch is applied to postgis sources before building.) > > $NetBSD: patch-aa,v 1.1 2006/09/20 16:24:46 gdt Exp $ > > --- configure.orig 2006-07-01 00:53:02.000000000 -0400 > +++ configure > @@ -3735,7 +3735,7 @@ fi; > > if test $USE_GEOS -gt 0; then > GEOS_DIR=`$GEOSCONFIG --prefix` > - GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` > + GEOS_LDFLAGS=`$GEOSCONFIG --libs` > GEOS_MAJOR=`$GEOSCONFIG --version | cut -d. -f1` > if test "$GEOS_MAJOR" = "@GEOS_VERSION@"; then > GEOS_MAJOR=1 --ldflags was introduced because dos not include -lgeos, so it is usable to link against the C-API lib instead (-lgeos_c). --libs will instead always add -lgeos. So, with your patch, you'll end up with both -lgeos_c and -lgeos. Not a big deal actually, as libgeos_c.so will link to libgeos.so anyway, but it might link to a specific version of it instead of the default one that would be found by -lgeos... So, I'd recommend to try my patch first, which will be included in next release. > This patch (among others not relevant to this issue) is applied to > geos 2.0.0. It's kludgy, but it gets -Wl,-R/usr/pkg/lib added like it > should be. mmm... I'm not sure we want to force that -rpath... > $NetBSD: patch-ae,v 1.1 2006/09/20 16:01:48 gdt Exp $ > > --- tools/geos-config.in.orig 2004-07-17 05:07:17.000000000 -0400 > +++ tools/geos-config.in > @@ -34,7 +34,7 @@ case $1 in > echo @CFLAGS@ -I at prefix@/include > ;; > --libs) > - echo -L at prefix@/lib -lgeos > + echo -L at prefix@/lib @LDFLAGS@ -lgeos > ;; > --includes) > echo @prefix@/include > > > So perhaps postgis should require a newer version of geos. When did > -ldflags get added? I see 2.2.3 has it. (I'm currently building > 2.2.3 with an uncommitted pkgsrc update, as that seems safer than > 3.0.0rc right now.) Postgis should work back to against GEOS-1.0.0, and I belive it still does, and I'm also proud of it ;) --strk; From ricardoluis at ufs.br Fri Nov 10 09:47:32 2006 From: ricardoluis at ufs.br (Ricardo) Date: Fri, 10 Nov 2006 14:47:32 -0300 Subject: [postgis-users] libpg Message-ID: <20061110174547.M27446@ufs.br> Hi all, I'm trying to wirite a file from a odi field of my data base with the folwing source code: ----------------------------------------------------------------------------- ------------------------------------------------ 1 const char *conninfo = "Driver=PostgreSQL Unicode; Server=10.0.0.62; Database=energia; user=postgres; password=postgres"; 2 PGconn *conn; 3 PGresult *res; 4 Oid inv_oid; 5 int r = 1; 6 int lobj_fd;// = lo_open(conn, inv_oid, 1); 7 int fd; 8 char buf[300000]; 9 int nbytes, tmp; 10 FILE* fp; 11 /* Make a connection to the database */ 12 conn = PQconnectdb(conninfo); 13 inv_oid = lo_creat(conn, 1); 14 res = PQexec(conn, "SELECT imagem FROM raster"); /* ask for binary results */ 15 lobj_fd = lo_open(conn, inv_oid, 1); 16 fp = fopen("test.tif", "wt"); 17 while ((nbytes = lo_read(conn, lobj_fd, buf, 300000)) > 0) 18 { 19 tmp = fwrite(&buf, sizeof(buf), 1, fp); 20 } 21 (void) lo_close(conn, lobj_fd); 22 (void) fclose(fp); ----------------------------------------------------------------------------- ------------------------------------------------- The query on the line 14 has been applied over the folwing table: ----------------------------------------------------------------------------- ------------------------------------------------- CREATE TABLE raster ( name varchar(30), imagem oid, geometria geometry, CONSTRAINT enforce_dims_geometria CHECK (ndims(geometria) = 3), CONSTRAINT enforce_srid_geometria CHECK (srid(geometria) = -1) ) WITH OIDS; ----------------------------------------------------------------------------- ------------------------------------------------- So evry time on the line 15 the value -1 was returned to lobj_fd variable; Forgot I something? What is the problem with that code? Where can I get references or samples to do that? Thank you all. Ricardo Lu?s. From smarshall at wsi.com Fri Nov 10 10:02:10 2006 From: smarshall at wsi.com (Marshall, Steve) Date: Fri, 10 Nov 2006 13:02:10 -0500 Subject: [postgis-users] libpg Message-ID: <8536F69C1FCC294B859D07B179F06944067914B7@EXCHANGE.ad.wsicorp.com> The second argument to the lo_creat call should be flags for read/write access mode. 1 is not a valid value. Replace this will the symbolic constants INV_READ|INV_WRITE, which are specified in the postgresql header file libpq-fs.h. -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Ricardo Sent: Friday, November 10, 2006 12:48 PM To: postgis-users at postgis.refractions.net Subject: [postgis-users] libpg Hi all, I'm trying to wirite a file from a odi field of my data base with the folwing source code: ----------------------------------------------------------------------------- ------------------------------------------------ 1 const char *conninfo = "Driver=PostgreSQL Unicode; Server=10.0.0.62; Database=energia; user=postgres; password=postgres"; 2 PGconn *conn; 3 PGresult *res; 4 Oid inv_oid; 5 int r = 1; 6 int lobj_fd;// = lo_open(conn, inv_oid, 1); 7 int fd; 8 char buf[300000]; 9 int nbytes, tmp; 10 FILE* fp; 11 /* Make a connection to the database */ 12 conn = PQconnectdb(conninfo); 13 inv_oid = lo_creat(conn, 1); 14 res = PQexec(conn, "SELECT imagem FROM raster"); /* ask for binary results */ 15 lobj_fd = lo_open(conn, inv_oid, 1); 16 fp = fopen("test.tif", "wt"); 17 while ((nbytes = lo_read(conn, lobj_fd, buf, 300000)) > 0) 18 { 19 tmp = fwrite(&buf, sizeof(buf), 1, fp); 20 } 21 (void) lo_close(conn, lobj_fd); 22 (void) fclose(fp); ----------------------------------------------------------------------------- ------------------------------------------------- The query on the line 14 has been applied over the folwing table: ----------------------------------------------------------------------------- ------------------------------------------------- CREATE TABLE raster ( name varchar(30), imagem oid, geometria geometry, CONSTRAINT enforce_dims_geometria CHECK (ndims(geometria) = 3), CONSTRAINT enforce_srid_geometria CHECK (srid(geometria) = -1) ) WITH OIDS; ----------------------------------------------------------------------------- ------------------------------------------------- So evry time on the line 15 the value -1 was returned to lobj_fd variable; Forgot I something? What is the problem with that code? Where can I get references or samples to do that? Thank you all. Ricardo Lu?s. _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From pcreso at pcreso.com Fri Nov 10 11:00:34 2006 From: pcreso at pcreso.com (Brent Wood) Date: Fri, 10 Nov 2006 11:00:34 -0800 (PST) Subject: [postgis-users] Correct dump and restore In-Reply-To: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> Message-ID: <20061110190034.71006.qmail@web33211.mail.mud.yahoo.com> --- Stefan Schwarzer <stefan.schwarzer at grid.unep.ch> wrote: > Hi there, > > I've seen the subject coming up already a couple of times. But it > didn't really help me and I can't imagine that there isn't a simple > strategy/method for that: > > I need to make a copy of a database which resides on one computer and > install that copy on another. > > Computer 1 (Linux) has (PostgreSQL) 8.1.0 > Computer 2 (Mac) has (PostgreSQL) 8.1.2 There may be an issue with end-of-line characters? I believe one uses LF & the other uses CR (unlike DOS/Windows which uses both). > Don't know about the version of PostGIS. That may be more important, esp if one uses LWGEOM & the other uses the older structures & code. > > I tried various pg_dump and pg_restore parameters. But the restore > never worked correctly. I tried it as well with a simple psql but > there too I was faced with problems... Can you dump a simple table without geometries and restore that? Let us know any errors this gives, as this will help identify whether it is a postgis or postgres problem. If this works, try a simple table with geometries, and let us know the errors. Cheers, Brent Wood > > Can anyone perhaps give me an advice how to correctly export-import a > database? > > Thanks for any hints! > > Stefan > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From volker.emmel at lwk-rlp.de Fri Nov 10 13:00:46 2006 From: volker.emmel at lwk-rlp.de (volker.emmel at lwk-rlp.de) Date: Fri, 10 Nov 2006 22:00:46 +0100 Subject: [postgis-users] Volker Emmel ist =?iso-8859-1?q?au=DFer_Haus=2E?= Message-ID: <OF86C9E616.FD7751A5-ONC1257222.00736D4F-C1257222.00736D4F@lwk-rlp.de> Ich werde ab 10.11.2006 nicht im B?ro sein. Ich kehre zur?ck am 05.12.2006. Bitte wenden sie sich in dringenden F?llen an Herrn Gr?hl (manfred.groehl at lwk-rlp.de) oder Frau Mecking (verena.mecking at lwk-rlp.de). From gdt at ir.bbn.com Fri Nov 10 13:54:33 2006 From: gdt at ir.bbn.com (Greg Troxel) Date: Fri, 10 Nov 2006 16:54:33 -0500 Subject: [postgis-users] Re: ver 1.1.5 configure fails on Ubuntu In-Reply-To: <20061110160938.GI80694@keybit.net> (strk@refractions.net's message of "Fri\, 10 Nov 2006 17\:09\:38 +0100") References: <4a88c6f40611091823l5f6ac53aif8a117eb8df62f69@mail.gmail.com> <20061110142539.GA80694@keybit.net> <rmiejsbpctk.fsf@fnord.ir.bbn.com> <20061110151129.GE80694@keybit.net> <20061110151632.GF80694@keybit.net> <rmi1wobpb5l.fsf@fnord.ir.bbn.com> <20061110160938.GI80694@keybit.net> Message-ID: <rmilkmjm0h2.fsf@fnord.ir.bbn.com> I just updated pkgsrc to geos 2.2.3 and postgis 1.1.6. Because 2.2.3 has --ldflags, I'm no longer worried about configure being patched for the old --libs. But I'm impressed that you're maintaining backwards compatibility. I see your point about --libs having the library and that --ldflags should not. strk at refractions.net writes: >> From: gdt >> This patch (among others not relevant to this issue) is applied to >> geos 2.0.0. It's kludgy, but it gets -Wl,-R/usr/pkg/lib added like it >> should be. > > mmm... I'm not sure we want to force that -rpath... That's a messy issue, and the right behavior is OS dependent. On NetBSD, the runtime library search path is only /lib and /usr/lib. /usr/pkg/lib is not in the compiler default path or the runtime path. So using geos requires "-L/usr/pkg/lib -lgeos" like you'd expect at link time, but also -R/usr/pkg/lib to put the dir in the binary for run-time resolution. I realize there are good reason to prefer the various approaches (Debian with banned rpath and all in /usr/lib, LD_LIBRARY_PATH, Darwin's use of absolute paths, and NetBSD's -rpath); my usual meta-approach is to make packages do the right local thing according to each system's norms. I don't fully understand how to do this automatically, but using libtool and pkg-config usually seems best. I'll try to write a pkg-config file for geos (or one for geos and one for geos_c, since pkg-config results in specifying the libraries). Thus, I'm not asking you to merge the rpath patch into geos, just telling you what I did. After my updates today, pkgsrc has just 1 patch for geos (to add the -R to the output of ldflags/libs), and no patches for postgis. I was able to load postgis into a fresh db and run the examples in the README. This is with PostgreSQL 8.1.4 on NetBSD/i386 4.99.3, with gcc 4.1.2. Thanks for all your efforts to make this portable. Greg From alex_chew at 163.com Fri Nov 10 20:17:15 2006 From: alex_chew at 163.com (alex_chew) Date: Sat, 11 Nov 2006 12:17:15 +0800 (CST) Subject: [postgis-users] Help initialize PostGIS with lwpostgis.sq l Message-ID: <45554ECB.000007.11777@bj163app89.163.com> Hi, I am a green hand to PostGIS.Any advise will be appreciated. Followed the tutorial, I installed PostgreSQL 8.1 with PostGIS. It seems PostgresSQL works well, I can connect to my test database from localhost and try some querys. Error occured when i tried to load lwpostgis.sql.Neither from pgAdmin and Commandline prompt, i got the same error message(s), current transaction is aborted, commands ignored until end of transaction block ROLLBACK I tried to query some geometry data with SQL, SELECT name, AsSVG(intersection(Simplify(the_geom,20),GeometryFromText("POLYGON((104 30,105 30,105 32,104 32,104 30))",4326)),1,1) AS svg_geom FROM river WHERE the_geom && setSRID("BOX3D(104 30, 105 32)"::box3d,4326) Error message i got is, ERROR: column "POLYGON((104 30,105 30,105 32,104 32,104 30))" does not exist Does this caused by lwpostgis.sql not loaded correctly? I am sure the table and geometry data are correctly build there. With SQL "SELECT name, AsSVG(the_geom) from river", I can get right result sets such as ("Tuolumne River";"M 255022.56361335239 -4203697.7660685452 254963.30627661903 -4203649.4423545403 ") Please help me find out what caused the error of "POLYGON doesnot exist". Thanks in advance. Sincerely Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061111/ad32c833/attachment.html> From adam at spatialsystems.org Fri Nov 10 20:54:54 2006 From: adam at spatialsystems.org (adam at spatialsystems.org) Date: Fri, 10 Nov 2006 21:54:54 -0700 Subject: [postgis-users] NAVTEQ Data? Message-ID: <20061110215454.292eb6c930850de810cf35869bff7bc4.aa870dbdc6.wbe@email.secureserver.net> An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061110/0ec2266b/attachment.html> From woodbri at swoodbridge.com Fri Nov 10 21:04:59 2006 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Sat, 11 Nov 2006 00:04:59 -0500 Subject: [postgis-users] NAVTEQ Data? In-Reply-To: <20061110215454.292eb6c930850de810cf35869bff7bc4.aa870dbdc6.wbe@email.secureserver.net> References: <20061110215454.292eb6c930850de810cf35869bff7bc4.aa870dbdc6.wbe@email.secureserver.net> Message-ID: <455559FB.20504@swoodbridge.com> adam at spatialsystems.org wrote: > I've seen some NAVTEQ data in cars and I like it, better than Tiger > files. I also heard it has road speeds in it. > > Has anyone loaded NAVTEQ data into a PostGIS server, is it possible? Yes, have loaded it into PostGIS and used it as shapefiles, and arcInfo formats, it is just data with lots of attributes and comes with the feature of a high price tag as it is premium licensed data. It is great data if your business model can afford it. -Steve From sxpert at sxpert.org Fri Nov 10 23:48:26 2006 From: sxpert at sxpert.org (=?ISO-8859-1?Q?Rapha=EBl_Jacquot?=) Date: Sat, 11 Nov 2006 08:48:26 +0100 Subject: [postgis-users] NAVTEQ Data? In-Reply-To: <20061110215454.292eb6c930850de810cf35869bff7bc4.aa870dbdc6.wbe@email.secureserver.net> References: <20061110215454.292eb6c930850de810cf35869bff7bc4.aa870dbdc6.wbe@email.secureserver.net> Message-ID: <4555804A.2070008@sxpert.org> adam at spatialsystems.org wrote: > I've seen some NAVTEQ data in cars and I like it, better than Tiger files. I > also heard it has road speeds in it. > > Has anyone loaded NAVTEQ data into a PostGIS server, is it possible? we have free data in the making available at http://planet.openstreetmap.org for more information http://wiki.openstreetmap.org besides, if you found the docs to the navteq format on the web, it clearly says that you can't legally use this documentation to create a parser / decoder for that format. > Thanks, > Adam From pdoria at netmadeira.com Sat Nov 11 04:51:22 2006 From: pdoria at netmadeira.com (Pedro Doria Meunier) Date: Sat, 11 Nov 2006 12:51:22 -0000 Subject: [postgis-users] NAVTEQ Data? In-Reply-To: <455559FB.20504@swoodbridge.com> Message-ID: <001301c70590$18da7cf0$23d6bed5@oem41cbbf9e178> Hey Steve, More than the actual data, I'm more interested in the method of getting navteq data into a postgres database. Could you please post an example? Best regards, Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Stephen Woodbridge Sent: s?bado, 11 de Novembro de 2006 5:05 To: PostGIS Users Discussion Subject: Re: [postgis-users] NAVTEQ Data? adam at spatialsystems.org wrote: > I've seen some NAVTEQ data in cars and I like it, better than Tiger > files. I also heard it has road speeds in it. > > Has anyone loaded NAVTEQ data into a PostGIS server, is it possible? Yes, have loaded it into PostGIS and used it as shapefiles, and arcInfo formats, it is just data with lots of attributes and comes with the feature of a high price tag as it is premium licensed data. It is great data if your business model can afford it. -Steve _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From strk at refractions.net Sat Nov 11 06:16:20 2006 From: strk at refractions.net (strk at refractions.net) Date: Sat, 11 Nov 2006 15:16:20 +0100 Subject: [postgis-users] Help initialize PostGIS with lwpostgis.sq l In-Reply-To: <45554ECB.000007.11777@bj163app89.163.com> References: <45554ECB.000007.11777@bj163app89.163.com> Message-ID: <20061111141620.GE3659@keybit.net> On Sat, Nov 11, 2006 at 12:17:15PM +0800, alex_chew wrote: > I tried to query some geometry data with SQL, > SELECT name, AsSVG(intersection(Simplify(the_geom,20),GeometryFromText("POLYGON((104 30,105 30,105 32,104 32,104 30))",4326)),1,1) AS svg_geom FROM river WHERE the_geom && setSRID("BOX3D(104 30, 105 32)"::box3d,4326) > > Error message i got is, > ERROR: column "POLYGON((104 30,105 30,105 32,104 32,104 30))" does not exist Literal strings need to be quoted with single quotes: 'POLYGON....' Double-quotes are used to specify identifiers, like column names: "My Column Name With Spaces And Mixed Case" So you're trying to reference a column names "POLYGON..." and the SQL parser is raising an error on that. --strk; From woodbri at swoodbridge.com Sat Nov 11 07:12:30 2006 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Sat, 11 Nov 2006 10:12:30 -0500 Subject: [postgis-users] NAVTEQ Data? In-Reply-To: <001301c70590$18da7cf0$23d6bed5@oem41cbbf9e178> References: <001301c70590$18da7cf0$23d6bed5@oem41cbbf9e178> Message-ID: <4555E85E.2080204@swoodbridge.com> Pedro Doria Meunier wrote: > Hey Steve, > > More than the actual data, I'm more interested in the method of getting > navteq data into a postgres database. > > Could you please post an example? We use shp2pgsql which is part of postGIS. This is the stabdard shapefile loader. For dbf only data files we dbf2pg. Am I missing something? -Steve > Best regards, > Pedro Doria Meunier > (351) 91 302 49 72 - (351) 96 247 99 12 > MSN - pdoriam at hotmail.com > ICQ - 308-182-126 > Skype: pdoriam > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Stephen > Woodbridge > Sent: s?bado, 11 de Novembro de 2006 5:05 > To: PostGIS Users Discussion > Subject: Re: [postgis-users] NAVTEQ Data? > > adam at spatialsystems.org wrote: >> I've seen some NAVTEQ data in cars and I like it, better than Tiger >> files. I also heard it has road speeds in it. >> >> Has anyone loaded NAVTEQ data into a PostGIS server, is it possible? > > Yes, have loaded it into PostGIS and used it as shapefiles, and arcInfo > formats, it is just data with lots of attributes and comes with the > feature of a high price tag as it is premium licensed data. It is great > data if your business model can afford it. > > -Steve > _______________________________________________ > 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 pdoria at netmadeira.com Sat Nov 11 10:30:09 2006 From: pdoria at netmadeira.com (Pedro Doria Meunier) Date: Sat, 11 Nov 2006 18:30:09 -0000 Subject: [postgis-users] NAVTEQ Data? In-Reply-To: <4555E85E.2080204@swoodbridge.com> Message-ID: <002801c705bf$6bac87f0$23d6bed5@oem41cbbf9e178> Hey Steve, Yup. :) I was actually looking for a way (parser/converter/whatever) to export SDAL data into shapefiles->Postgis ... ;-) Regards, Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Stephen Woodbridge Sent: s?bado, 11 de Novembro de 2006 15:13 To: PostGIS Users Discussion Subject: Re: [postgis-users] NAVTEQ Data? Pedro Doria Meunier wrote: > Hey Steve, > > More than the actual data, I'm more interested in the method of getting > navteq data into a postgres database. > > Could you please post an example? We use shp2pgsql which is part of postGIS. This is the stabdard shapefile loader. For dbf only data files we dbf2pg. Am I missing something? -Steve > Best regards, > Pedro Doria Meunier > (351) 91 302 49 72 - (351) 96 247 99 12 > MSN - pdoriam at hotmail.com > ICQ - 308-182-126 > Skype: pdoriam > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Stephen > Woodbridge > Sent: s?bado, 11 de Novembro de 2006 5:05 > To: PostGIS Users Discussion > Subject: Re: [postgis-users] NAVTEQ Data? > > adam at spatialsystems.org wrote: >> I've seen some NAVTEQ data in cars and I like it, better than Tiger >> files. I also heard it has road speeds in it. >> >> Has anyone loaded NAVTEQ data into a PostGIS server, is it possible? > > Yes, have loaded it into PostGIS and used it as shapefiles, and arcInfo > formats, it is just data with lots of attributes and comes with the > feature of a high price tag as it is premium licensed data. It is great > data if your business model can afford it. > > -Steve > _______________________________________________ > 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 jgw at alpinegeophysics.com Sat Nov 11 10:42:06 2006 From: jgw at alpinegeophysics.com (James G Wilkinson) Date: Sat, 11 Nov 2006 10:42:06 -0800 Subject: [postgis-users] Closing a LINESTRING Message-ID: <4556197E.5060806@alpinegeophysics.com> I am not sure this is the correct board for this, but here goes. I have a GEOMETRYCOLLECTION that represents a meandering line. It is a valid geometry per ISVALID(), and it is not closed per ISCLOSED(). Is there anyway that I can insert an additional line into this collection so that ISCLOSED() will return true? That is I want to connect the start point and end point of this collection. Regards, Jim From sxpert at sxpert.org Sat Nov 11 12:06:08 2006 From: sxpert at sxpert.org (=?ISO-8859-1?Q?Rapha=EBl_Jacquot?=) Date: Sat, 11 Nov 2006 21:06:08 +0100 Subject: [postgis-users] NAVTEQ Data? In-Reply-To: <002801c705bf$6bac87f0$23d6bed5@oem41cbbf9e178> References: <002801c705bf$6bac87f0$23d6bed5@oem41cbbf9e178> Message-ID: <45562D30.9040406@sxpert.org> Pedro Doria Meunier wrote: > Hey Steve, > > Yup. :) > > I was actually looking for a way (parser/converter/whatever) to export SDAL > data into shapefiles->Postgis ... ;-) that'd be illegal, unless you have a license from navteq > Regards, > Pedro Doria Meunier > (351) 91 302 49 72 - (351) 96 247 99 12 > MSN - pdoriam at hotmail.com > ICQ - 308-182-126 > Skype: pdoriam From pdoria at netmadeira.com Sat Nov 11 12:14:01 2006 From: pdoria at netmadeira.com (Pedro Doria Meunier) Date: Sat, 11 Nov 2006 20:14:01 -0000 Subject: [postgis-users] NAVTEQ Data? In-Reply-To: <45562D30.9040406@sxpert.org> Message-ID: <000301c705cd$ee1d4a40$23d6bed5@oem41cbbf9e178> Hey Rapha?l, I'm actually trying to convert my *own* map data into sdal ... We've developed the cartography for our neck of the woods as seen at www.madeiragps.com ;-) As to a licence from Navtech to use their sdal format... well... it's been over 5 unanswered emails... :O Regards, Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Rapha?l Jacquot Sent: s?bado, 11 de Novembro de 2006 20:06 To: PostGIS Users Discussion Subject: Re: [postgis-users] NAVTEQ Data? Pedro Doria Meunier wrote: > Hey Steve, > > Yup. :) > > I was actually looking for a way (parser/converter/whatever) to export SDAL > data into shapefiles->Postgis ... ;-) that'd be illegal, unless you have a license from navteq > Regards, > Pedro Doria Meunier > (351) 91 302 49 72 - (351) 96 247 99 12 > MSN - pdoriam at hotmail.com > ICQ - 308-182-126 > Skype: pdoriam _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From sxpert at sxpert.org Sat Nov 11 12:20:16 2006 From: sxpert at sxpert.org (=?ISO-8859-1?Q?Rapha=EBl_Jacquot?=) Date: Sat, 11 Nov 2006 21:20:16 +0100 Subject: [postgis-users] NAVTEQ Data? In-Reply-To: <000301c705cd$ee1d4a40$23d6bed5@oem41cbbf9e178> References: <000301c705cd$ee1d4a40$23d6bed5@oem41cbbf9e178> Message-ID: <45563080.2080202@sxpert.org> Pedro Doria Meunier wrote: > Hey Rapha?l, > > I'm actually trying to convert my *own* map data into sdal ... > We've developed the cartography for our neck of the woods as seen at > www.madeiragps.com ;-) > > As to a licence from Navtech to use their sdal format... well... it's been > over 5 unanswered emails... :O time to think it over and create your own format / navigation application.. heck you could participate in openstreetmap.org... we currently have a couple spanish people, but no portuguese... > > Regards, > > Pedro Doria Meunier > (351) 91 302 49 72 - (351) 96 247 99 12 > MSN - pdoriam at hotmail.com > ICQ - 308-182-126 > Skype: pdoriam From strk at refractions.net Sat Nov 11 13:32:24 2006 From: strk at refractions.net (strk at refractions.net) Date: Sat, 11 Nov 2006 22:32:24 +0100 Subject: [postgis-users] Closing a LINESTRING In-Reply-To: <4556197E.5060806@alpinegeophysics.com> References: <4556197E.5060806@alpinegeophysics.com> Message-ID: <20061111213224.GA9192@keybit.net> On Sat, Nov 11, 2006 at 10:42:06AM -0800, James G Wilkinson wrote: > I am not sure this is the correct board for this, but here goes. > > I have a GEOMETRYCOLLECTION that represents a > meandering line. It is a valid geometry per ISVALID(), and > it is not closed per ISCLOSED(). Is there anyway that I > can insert an additional line into this collection so that ISCLOSED() > will return true? That is I want to connect the start point and end > point of this collection. See linemerge() manual entry (to use *after* adding the new line to the collection. --strk; From robtester at gmail.com Sun Nov 12 05:12:45 2006 From: robtester at gmail.com (Rob Tester) Date: Sun, 12 Nov 2006 08:12:45 -0500 Subject: [postgis-users] NAVTEQ Data? In-Reply-To: <20061110215454.292eb6c930850de810cf35869bff7bc4.aa870dbdc6.wbe@email.secureserver.net> References: <20061110215454.292eb6c930850de810cf35869bff7bc4.aa870dbdc6.wbe@email.secureserver.net> Message-ID: <f5f60fb50611120512ld9596d1wa8de038ee8578a02@mail.gmail.com> Very possible. I have done it. It does have road speeds for some roads, not all. It is more accurate than Tiger, but then it should be for the price. On 11/10/06, adam at spatialsystems.org <adam at spatialsystems.org> wrote: > I've seen some NAVTEQ data in cars and I like it, better than Tiger files. > I also heard it has road speeds in it. > > Has anyone loaded NAVTEQ data into a PostGIS server, is it possible? > > Thanks, > Adam > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > From jgw at alpinegeophysics.com Sun Nov 12 13:55:32 2006 From: jgw at alpinegeophysics.com (James G Wilkinson) Date: Sun, 12 Nov 2006 13:55:32 -0800 Subject: [postgis-users] Closing a LINESTRING In-Reply-To: <20061111213224.GA9192@keybit.net> References: <4556197E.5060806@alpinegeophysics.com> <20061111213224.GA9192@keybit.net> Message-ID: <45579854.3050708@alpinegeophysics.com> strk, Thanks for the pointer to linemerge(), but I am still not sure how to insert an additional linestring into the existing geometrycollection. Maybe this a "duh," but I have not figured out how to inert a line segment into the existing geometry. Regards, Jim strk at refractions.net wrote: >On Sat, Nov 11, 2006 at 10:42:06AM -0800, James G Wilkinson wrote: > > >>I am not sure this is the correct board for this, but here goes. >> >>I have a GEOMETRYCOLLECTION that represents a >>meandering line. It is a valid geometry per ISVALID(), and >>it is not closed per ISCLOSED(). Is there anyway that I >>can insert an additional line into this collection so that ISCLOSED() >>will return true? That is I want to connect the start point and end >>point of this collection. >> >> > >See linemerge() manual entry (to use *after* adding the new line >to the collection. > >--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: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061112/7a463f28/attachment.html> From stefan.schwarzer at grid.unep.ch Sun Nov 12 22:59:14 2006 From: stefan.schwarzer at grid.unep.ch (Stefan Schwarzer) Date: Mon, 13 Nov 2006 07:59:14 +0100 Subject: [postgis-users] Correct dump and restore In-Reply-To: <20061110150411.GF2075@intevation.de> References: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> <20061110142621.GB80694@keybit.net> <65F4FB60-39AC-428D-B5E7-71F46EA09287@grid.unep.ch> <20061110150411.GF2075@intevation.de> Message-ID: <14138FE0-D1A0-45D5-ADE2-3D3288BB7E77@grid.unep.ch> Thanks for the suggestions. The pg_dump works. For the _restore I had to download the latest source package. But because I don't do any compilations/makes I just accessed the files in the download directory. So if I run the below mentioned postgis_restore.pl command I get the following error: dyld: Library not loaded: /usr/local/pgsql/lib/libpq.3.dylib Referenced from: /usr/local/bin/pg_restore Reason: image not found dyld: Library not loaded: /usr/local/pgsql/lib/libpq.3.dylib Referenced from: /usr/local/bin/pg_restore Reason: image not found pg_restore call failed There is a copy of that file on my computer under /Library/PHP4/lib/ libpq.3.dylib. I tried to do a link: libpq.3.dylib -> /Library/PHP4/lib/libpq.3.dylib But still it doesn't work. However there is a file libpq.4.1.dylib in /usr/local/pgsql/lib Gush, why are things always so complicated? Thanks for any help! Stefan > * Stefan Schwarzer <stefan.schwarzer at grid.unep.ch> [061110 15:55]: >> Under "Hard upgrade" I don't find anything. I guess you mean this >> section (page 5)? Seems still rather complicated.... > > I think strk was talking about the online Doku: > http://postgis.refractions.net/docs/ch02.html#upgrading > > Essentially it is > > $ pg_dump -Fc olddb olddb.dump > > and > > $ sh utils/postgis_restore.pl lwpostgis.sql newdb olddb.dump > > restore.log > > The rest are checks and cleanups if migration from older postgresql > versions - which isn't the case in your situation. > > Regards, > > Frank > > -- > Frank Koormann > <frank.koormann at intevation.de> > Professional Service around Free Software (http:// > intevation.net/) > FreeGIS Project (http://freegis.org/) > PostGIS Support (http://intevation.de/services/gis/ > postgis.en.html) > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From strk at refractions.net Mon Nov 13 00:05:17 2006 From: strk at refractions.net (strk at refractions.net) Date: Mon, 13 Nov 2006 09:05:17 +0100 Subject: [postgis-users] Closing a LINESTRING In-Reply-To: <45579854.3050708@alpinegeophysics.com> References: <4556197E.5060806@alpinegeophysics.com> <20061111213224.GA9192@keybit.net> <45579854.3050708@alpinegeophysics.com> Message-ID: <20061113080517.GB33640@keybit.net> On Sun, Nov 12, 2006 at 01:55:32PM -0800, James G Wilkinson wrote: > strk, > > Thanks for the pointer to linemerge(), but I am still not sure how to > insert an additional > linestring into the existing geometrycollection. Maybe this a "duh," > but I have not > figured out how to inert a line segment into the existing geometry. see collect() ? --strk; From strk at refractions.net Mon Nov 13 00:07:03 2006 From: strk at refractions.net (strk at refractions.net) Date: Mon, 13 Nov 2006 09:07:03 +0100 Subject: [postgis-users] Correct dump and restore In-Reply-To: <14138FE0-D1A0-45D5-ADE2-3D3288BB7E77@grid.unep.ch> References: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> <20061110142621.GB80694@keybit.net> <65F4FB60-39AC-428D-B5E7-71F46EA09287@grid.unep.ch> <20061110150411.GF2075@intevation.de> <14138FE0-D1A0-45D5-ADE2-3D3288BB7E77@grid.unep.ch> Message-ID: <20061113080703.GC33640@keybit.net> On Mon, Nov 13, 2006 at 07:59:14AM +0100, Stefan Schwarzer wrote: > Thanks for the suggestions. > > The pg_dump works. > > For the _restore I had to download the latest source package. But > because I don't do any compilations/makes I just accessed the files > in the download directory. Did it work finally ? > So if I run the below mentioned postgis_restore.pl command I get the > following error: > > dyld: Library not loaded: /usr/local/pgsql/lib/libpq.3.dylib > Referenced from: /usr/local/bin/pg_restore > Reason: image not found If explicit pg_restore worked and postgis_restore.pl doesn't I presume is because postgis_restore.pl invokes the pg_restore found in path, which is NOT the same you were manually invoked ? --strk; From Hendra at lskk.ee.itb.ac.id Mon Nov 13 00:00:52 2006 From: Hendra at lskk.ee.itb.ac.id (Hendra Yana) Date: Mon, 13 Nov 2006 15:00:52 +0700 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom of postgresql Message-ID: <WorldClient-F200611131500.AA00520164@lskk.ee.itb.ac.id> Help.... I've been trying to convert database from Ms-Access shape data to the_geom for postgresql. I try to export from MS-Access to postgresql with PGSQL-ODBC connection, but the result in postgresql still not result as the_geom field but still the shape data in fields. Can anyone tell me how to Convert database from Ms-Access shape data to the_geom for postgresql??? thanks for reply.... From computrain at paradise.net.nz Mon Nov 13 00:35:05 2006 From: computrain at paradise.net.nz (Marc Angelo) Date: Mon, 13 Nov 2006 21:35:05 +1300 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom of postgresql References: <WorldClient-F200611131500.AA00520164@lskk.ee.itb.ac.id> Message-ID: <001f01c706fe$9ec6d880$fa0a0a0a@hellboy> I can't give you a full answer but I can tell you why (I think) the "data conversion" is failing (somebody please correct me if I am wrong). I think you will find that the co-ordinate data in Access is a "double" or "single" data type as Access does not have a "geometry" data type like in Postgres. When you use the PostGres ODBC connector you are just transferring the data from one database to another so Postgres is just placing the data in the fields in the nearest data type that is equivalant to the Acces data type. If the data needs only to be transferred once (not on a regular basis) from Access you could import the data by writing a small routine in C++.Net or VB.Net. I wrote a small app a while ago that imported geometry data into Postgres. I connected to PostGres using NPGSQL data connector. All my data was in csv fomat inside a text file. The routine opened the csv file and then imported each record into Postgres by using an SQL insert statement combined with the GeometryFromText() function which converts text coordinates into a geometry data type in Postgres. Having said that I am not competent with SQL so I suspect that you could write an SQL statement within Postgres to import and convert data that resides in a csv file.....this would mean exporting your data from Access into a .txt or csv file. Hope this gives you at least some help. Cheers Marc ----- Original Message ----- From: "Hendra Yana" <Hendra at lskk.ee.itb.ac.id> To: <postgis-users at postgis.refractions.net> Sent: Monday, November 13, 2006 9:00 PM Subject: [postgis-users] HELP! Ms-Access shape data to the_geom of postgresql > Help.... > > I've been trying to convert database from Ms-Access shape data to the_geom > for postgresql. > > I try to export from MS-Access to postgresql with PGSQL-ODBC connection, > but the result in postgresql still not result as the_geom field but still > the shape data in fields. > > Can anyone tell me how to Convert database from Ms-Access shape data to > the_geom for postgresql??? > > thanks for reply.... > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.409 / Virus Database: 268.14.3/531 - Release Date: 12/11/2006 > > From stefan.schwarzer at grid.unep.ch Mon Nov 13 00:37:07 2006 From: stefan.schwarzer at grid.unep.ch (Stefan Schwarzer) Date: Mon, 13 Nov 2006 09:37:07 +0100 Subject: [postgis-users] Correct dump and restore In-Reply-To: <20061113080703.GC33640@keybit.net> References: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> <20061110142621.GB80694@keybit.net> <65F4FB60-39AC-428D-B5E7-71F46EA09287@grid.unep.ch> <20061110150411.GF2075@intevation.de> <14138FE0-D1A0-45D5-ADE2-3D3288BB7E77@grid.unep.ch> <20061113080703.GC33640@keybit.net> Message-ID: <888C2130-552E-4B65-8DE8-F606840F9723@grid.unep.ch> I added the path to the pg-bins into bash: export PATH="$PATH:/usr/ local/pgsql/bin" When I use then (for example) the psql it gives me this: ~ schwarzer$ psql geodataportal_utf8 dyld: Library not loaded: /usr/local/pgsql/lib/libpq.3.dylib Referenced from: /usr/local/bin/psql Reason: Incompatible library version: psql requires version 3.0.0 or later, but libpq.3.dylib provides version 0.0.0 Trace/BPT trap But if I use: ~ schwarzer$ /usr/local/pgsql/bin/psql geodataportal_utf8 everything works fine... Any idea? Stef On Nov 13, 2006, at 9:07 AM, strk at refractions.net wrote: > On Mon, Nov 13, 2006 at 07:59:14AM +0100, Stefan Schwarzer wrote: >> Thanks for the suggestions. >> >> The pg_dump works. >> >> For the _restore I had to download the latest source package. But >> because I don't do any compilations/makes I just accessed the files >> in the download directory. > > Did it work finally ? > >> So if I run the below mentioned postgis_restore.pl command I get the >> following error: >> >> dyld: Library not loaded: /usr/local/pgsql/lib/libpq.3.dylib >> Referenced from: /usr/local/bin/pg_restore >> Reason: image not found > > If explicit pg_restore worked and postgis_restore.pl doesn't I presume > is because postgis_restore.pl invokes the pg_restore found in path, > which is NOT the same you were manually invoked ? > --strk; > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From strk at refractions.net Mon Nov 13 00:45:58 2006 From: strk at refractions.net (strk at refractions.net) Date: Mon, 13 Nov 2006 09:45:58 +0100 Subject: [postgis-users] Correct dump and restore In-Reply-To: <888C2130-552E-4B65-8DE8-F606840F9723@grid.unep.ch> References: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> <20061110142621.GB80694@keybit.net> <65F4FB60-39AC-428D-B5E7-71F46EA09287@grid.unep.ch> <20061110150411.GF2075@intevation.de> <14138FE0-D1A0-45D5-ADE2-3D3288BB7E77@grid.unep.ch> <20061113080703.GC33640@keybit.net> <888C2130-552E-4B65-8DE8-F606840F9723@grid.unep.ch> Message-ID: <20061113084558.GA44576@keybit.net> On Mon, Nov 13, 2006 at 09:37:07AM +0100, Stefan Schwarzer wrote: > I added the path to the pg-bins into bash: export PATH="$PATH:/usr/ > local/pgsql/bin" ... > ~ schwarzer$ psql geodataportal_utf8 > dyld: Library not loaded: /usr/local/pgsql/lib/libpq.3.dylib > Referenced from: /usr/local/bin/psql > Reason: Incompatible library version: psql requires version 3.0.0 > or later, but libpq.3.dylib provides version 0.0.0 > Trace/BPT trap > > But if I use: > > ~ schwarzer$ /usr/local/pgsql/bin/psql geodataportal_utf8 > > everything works fine... You have both: /usr/local/bin/psql and /usr/local/pgsql/bin/psql The former doesn't work, the latter does. When exporting your PATH you *append* /usr/local/pgsql/bin to the existing $PATH, which likely includes /usr/local/bin. Try *prepending* it instead: export PATH="/usr/local/pgsql/bin:$PATH" Also, check with 'which psql' to make sure the correct one is being foundn (bash keeps known binaries in an hash, you can clean it up using 'hash -r') --strk; From stefan.schwarzer at grid.unep.ch Mon Nov 13 01:51:30 2006 From: stefan.schwarzer at grid.unep.ch (Stefan Schwarzer) Date: Mon, 13 Nov 2006 10:51:30 +0100 Subject: [postgis-users] Correct dump and restore In-Reply-To: <20061113084558.GA44576@keybit.net> References: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> <20061110142621.GB80694@keybit.net> <65F4FB60-39AC-428D-B5E7-71F46EA09287@grid.unep.ch> <20061110150411.GF2075@intevation.de> <14138FE0-D1A0-45D5-ADE2-3D3288BB7E77@grid.unep.ch> <20061113080703.GC33640@keybit.net> <888C2130-552E-4B65-8DE8-F606840F9723@grid.unep.ch> <20061113084558.GA44576@keybit.net> Message-ID: <D5D4A7B4-9C7F-4A42-9D7A-401794449876@grid.unep.ch> > You have both: > /usr/local/bin/psql > and > /usr/local/pgsql/bin/psql > > The former doesn't work, the latter does. > When exporting your PATH you *append* /usr/local/pgsql/bin to > the existing $PATH, which likely includes /usr/local/bin. > Try *prepending* it instead: > > export PATH="/usr/local/pgsql/bin:$PATH" > > Also, check with 'which psql' to make sure the correct one is being > foundn (bash keeps known binaries in an hash, you can clean it up > using > 'hash -r') > > --strk; Great, that seemed to be it! Thanks a lot! I now have this command (with an encoding param): schwarzer$ sh temp/downloads/postgis-1.1.6/utils/postgis_restore.pl / usr/local/pgsql/share/contrib/lwpostgis.sql geodataportal_utf8 temp/ dump_geodataportal_utf8_2006-11-13.sql --encoding=UTF_8 > restore.log It gives me the following notice & erros. Anything serious (especially with the errors at the bottom)? NOTICE: type "histogram2d" is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type histogram2d is only a shell NOTICE: type "spheroid" is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type spheroid is only a shell NOTICE: type "geometry" is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type geometry is only a shell NOTICE: return type geometry is only a shell NOTICE: argument type geometry is only a shell NOTICE: type "box3d" is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type box3d is only a shell NOTICE: type "chip" is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type chip is only a shell NOTICE: type "box2d" is not yet defined DETAIL: Creating a shell type definition. NOTICE: argument type box2d is only a shell NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "spatial_ref_sys_pkey" for table "spatial_ref_sys" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "geometry_columns_pk" for table "geometry_columns" ERROR: language "plpgsql" already exists ERROR: could not access file "$libdir/liblwgeom.so.1.1": No such file or directory ERROR: function public.affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision) does not exist From strk at refractions.net Mon Nov 13 01:57:01 2006 From: strk at refractions.net (strk at refractions.net) Date: Mon, 13 Nov 2006 10:57:01 +0100 Subject: [postgis-users] Correct dump and restore In-Reply-To: <D5D4A7B4-9C7F-4A42-9D7A-401794449876@grid.unep.ch> References: <A2D91916-E2B6-4772-9239-D10D23130DD1@grid.unep.ch> <20061110142621.GB80694@keybit.net> <65F4FB60-39AC-428D-B5E7-71F46EA09287@grid.unep.ch> <20061110150411.GF2075@intevation.de> <14138FE0-D1A0-45D5-ADE2-3D3288BB7E77@grid.unep.ch> <20061113080703.GC33640@keybit.net> <888C2130-552E-4B65-8DE8-F606840F9723@grid.unep.ch> <20061113084558.GA44576@keybit.net> <D5D4A7B4-9C7F-4A42-9D7A-401794449876@grid.unep.ch> Message-ID: <20061113095701.GE44576@keybit.net> On Mon, Nov 13, 2006 at 10:51:30AM +0100, Stefan Schwarzer wrote: > Great, that seemed to be it! Thanks a lot! > > I now have this command (with an encoding param): ... > ERROR: could not access file "$libdir/liblwgeom.so.1.1": No such > file or directory You need to *install* the *new* postgis libs (make install) before invoking the postgis_restore.pl script to import a dump. --strk; From schabi at logix-tt.com Mon Nov 13 03:25:06 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Mon, 13 Nov 2006 12:25:06 +0100 Subject: [postgis-users] NAVTEQ Data? In-Reply-To: <20061110215454.292eb6c930850de810cf35869bff7bc4.aa870dbdc6.wbe@email.secureserver.net> References: <20061110215454.292eb6c930850de810cf35869bff7bc4.aa870dbdc6.wbe@email.secureserver.net> Message-ID: <45585612.5060804@logix-tt.com> Hi, Adam, adam at spatialsystems.org wrote: > I've seen some NAVTEQ data in cars and I like it, better than Tiger > files. I also heard it has road speeds in it. > > Has anyone loaded NAVTEQ data into a PostGIS server, is it possible? We're currently using NavteQ data in shapefile format, and using shp2pgsql to load it into PostGIS. The NavteQ ShapeFiles are suited relatively well for map visualisation, but for routing applications, some advanced attributes are missing, and the data has to be preprocessed (normalized etc.). HTH, Schabi From pdoria at netmadeira.com Mon Nov 13 03:46:18 2006 From: pdoria at netmadeira.com (Pedro Doria Meunier) Date: Mon, 13 Nov 2006 11:46:18 -0000 Subject: [postgis-users] NAVTEQ Data? In-Reply-To: <45585612.5060804@logix-tt.com> Message-ID: <000001c70719$5580cdf0$23d6bed5@oem41cbbf9e178> About Navteq data and its use in Postgis The latter is most useful in their GDF (navteq variant) format where routing is concerned. The problem is that gdf is a ludicrous format to understand, let alone implementing, writing a parser, etc... FME 2006 does it at a very great expense and a great deal of time investment on the side of the programmer... :-( A demo -- time based -- of it is available at http://www.safe.com/evaluation/index.php A gdf (properly formatted) conversion to shapefile, for a future inclusion in a postgis database, produces a ludicrous amount of shapefiles and they're not even readable with shp2pgsql ... About the gdf format, There are samples and documents at Ertico -- http://www.ertico.com/en/links/links/gdf_-_geographic_data_files.htm Regards, Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Markus Schaber Sent: segunda-feira, 13 de Novembro de 2006 11:25 To: PostGIS Users Discussion Subject: Re: [postgis-users] NAVTEQ Data? Hi, Adam, adam at spatialsystems.org wrote: > I've seen some NAVTEQ data in cars and I like it, better than Tiger > files. I also heard it has road speeds in it. > > Has anyone loaded NAVTEQ data into a PostGIS server, is it possible? We're currently using NavteQ data in shapefile format, and using shp2pgsql to load it into PostGIS. The NavteQ ShapeFiles are suited relatively well for map visualisation, but for routing applications, some advanced attributes are missing, and the data has to be preprocessed (normalized etc.). HTH, Schabi _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From punkish at eidesis.org Mon Nov 13 04:43:04 2006 From: punkish at eidesis.org (P Kishor) Date: Mon, 13 Nov 2006 06:43:04 -0600 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom of postgresql In-Reply-To: <001f01c706fe$9ec6d880$fa0a0a0a@hellboy> References: <WorldClient-F200611131500.AA00520164@lskk.ee.itb.ac.id> <001f01c706fe$9ec6d880$fa0a0a0a@hellboy> Message-ID: <cdf6db500611130443g5b0dc661tf27a00095b04863e@mail.gmail.com> coordinate data in Access (equivalent to the geom in PostGIS) is stored as a blob. On 11/13/06, Marc Angelo <computrain at paradise.net.nz> wrote: > I can't give you a full answer but I can tell you why (I think) the "data > conversion" is failing (somebody please correct me if I am wrong). I think > you will find that the co-ordinate data in Access is a "double" or "single" > data type as Access does not have a "geometry" data type like in Postgres. > When you use the PostGres ODBC connector you are just transferring the data > from one database to another so Postgres is just placing the data in the > fields in the nearest data type that is equivalant to the Acces data type. > > If the data needs only to be transferred once (not on a regular basis) from > Access you could import the data by writing a small routine in C++.Net or > VB.Net. I wrote a small app a while ago that imported geometry data into > Postgres. > I connected to PostGres using NPGSQL data connector. All my data was in csv > fomat inside a text file. The routine opened the csv file and then imported > each record into Postgres by using an SQL insert statement combined with the > GeometryFromText() function which converts text coordinates into a geometry > data type in Postgres. > Having said that I am not competent with SQL so I suspect that you could > write an SQL statement within Postgres to import and convert data that > resides in a csv file.....this would mean exporting your data from Access > into a .txt or csv file. > > Hope this gives you at least some help. > > Cheers > Marc > > > ----- Original Message ----- > From: "Hendra Yana" <Hendra at lskk.ee.itb.ac.id> > To: <postgis-users at postgis.refractions.net> > Sent: Monday, November 13, 2006 9:00 PM > Subject: [postgis-users] HELP! Ms-Access shape data to the_geom of > postgresql > > > > Help.... > > > > I've been trying to convert database from Ms-Access shape data to the_geom > > for postgresql. > > > > I try to export from MS-Access to postgresql with PGSQL-ODBC connection, > > but the result in postgresql still not result as the_geom field but still > > the shape data in fields. > > > > Can anyone tell me how to Convert database from Ms-Access shape data to > > the_geom for postgresql??? > > > > thanks for reply.... > > > > > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > > > > -- > > No virus found in this incoming message. > > Checked by AVG Free Edition. > > Version: 7.1.409 / Virus Database: 268.14.3/531 - Release Date: 12/11/2006 > > > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ Open Source Geospatial Foundation https://edu.osgeo.org/ ------------------------------------------------------------------------------------------------------- collaborate, communicate, compete ==================================================== From bclay at ball.com Mon Nov 13 05:34:47 2006 From: bclay at ball.com (Clay, Bruce) Date: Mon, 13 Nov 2006 08:34:47 -0500 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom ofpostgresql Message-ID: <C482FF98AE985A47B8C982FD429C9E34FEF976@daytonmsg2k3.AERO.BALL.COM> Does anyone have the data format for the blob? -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of P Kishor Sent: Monday, November 13, 2006 7:43 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] HELP! Ms-Access shape data to the_geom ofpostgresql coordinate data in Access (equivalent to the geom in PostGIS) is stored as a blob. On 11/13/06, Marc Angelo <computrain at paradise.net.nz> wrote: > I can't give you a full answer but I can tell you why (I think) the "data > conversion" is failing (somebody please correct me if I am wrong). I think > you will find that the co-ordinate data in Access is a "double" or "single" > data type as Access does not have a "geometry" data type like in Postgres. > When you use the PostGres ODBC connector you are just transferring the data > from one database to another so Postgres is just placing the data in the > fields in the nearest data type that is equivalant to the Acces data type. > > If the data needs only to be transferred once (not on a regular basis) from > Access you could import the data by writing a small routine in C++.Net or > VB.Net. I wrote a small app a while ago that imported geometry data into > Postgres. > I connected to PostGres using NPGSQL data connector. All my data was in csv > fomat inside a text file. The routine opened the csv file and then imported > each record into Postgres by using an SQL insert statement combined with the > GeometryFromText() function which converts text coordinates into a geometry > data type in Postgres. > Having said that I am not competent with SQL so I suspect that you could > write an SQL statement within Postgres to import and convert data that > resides in a csv file.....this would mean exporting your data from Access > into a .txt or csv file. > > Hope this gives you at least some help. > > Cheers > Marc > > > ----- Original Message ----- > From: "Hendra Yana" <Hendra at lskk.ee.itb.ac.id> > To: <postgis-users at postgis.refractions.net> > Sent: Monday, November 13, 2006 9:00 PM > Subject: [postgis-users] HELP! Ms-Access shape data to the_geom of > postgresql > > > > Help.... > > > > I've been trying to convert database from Ms-Access shape data to the_geom > > for postgresql. > > > > I try to export from MS-Access to postgresql with PGSQL-ODBC connection, > > but the result in postgresql still not result as the_geom field but still > > the shape data in fields. > > > > Can anyone tell me how to Convert database from Ms-Access shape data to > > the_geom for postgresql??? > > > > thanks for reply.... > > > > > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > > > > -- > > No virus found in this incoming message. > > Checked by AVG Free Edition. > > Version: 7.1.409 / Virus Database: 268.14.3/531 - Release Date: 12/11/2006 > > > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ Open Source Geospatial Foundation https://edu.osgeo.org/ ------------------------------------------------------------------------ ------------------------------- collaborate, communicate, compete ==================================================== _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From will at mtintouch.net Mon Nov 13 05:43:28 2006 From: will at mtintouch.net (Will Muir) Date: Mon, 13 Nov 2006 06:43:28 -0700 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom of postgresql In-Reply-To: <WorldClient-F200611131500.AA00520164@lskk.ee.itb.ac.id> References: <WorldClient-F200611131500.AA00520164@lskk.ee.itb.ac.id> Message-ID: <53504962-83C3-4F4F-8292-62FCE21AF59D@mtintouch.net> If on windows ogr2ogr will load an mdb file into Postgres. Will On Nov 13, 2006, at 1:00 AM, Hendra Yana wrote: > Help.... > > I've been trying to convert database from Ms-Access shape data to > the_geom > for postgresql. > > I try to export from MS-Access to postgresql with PGSQL-ODBC > connection, > but the result in postgresql still not result as the_geom field but > still > the shape data in fields. > > Can anyone tell me how to Convert database from Ms-Access shape > data to > the_geom for postgresql??? > > thanks for reply.... > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From punkish at eidesis.org Mon Nov 13 05:44:25 2006 From: punkish at eidesis.org (P Kishor) Date: Mon, 13 Nov 2006 07:44:25 -0600 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom ofpostgresql In-Reply-To: <C482FF98AE985A47B8C982FD429C9E34FEF976@daytonmsg2k3.AERO.BALL.COM> References: <C482FF98AE985A47B8C982FD429C9E34FEF976@daytonmsg2k3.AERO.BALL.COM> Message-ID: <cdf6db500611130544t64a2e865l3f6f08b45800519b@mail.gmail.com> afaik, it is not publicly documented like shapefile. I also hear that ESRI is going to be doing away with personal geodb in the near future, and might be going back to some kind of flat file structure... perhaps a super shapefile format? On 11/13/06, Clay, Bruce <bclay at ball.com> wrote: > Does anyone have the data format for the blob? > > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of P > Kishor > Sent: Monday, November 13, 2006 7:43 AM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] HELP! Ms-Access shape data to the_geom > ofpostgresql > > coordinate data in Access (equivalent to the geom in PostGIS) is > stored as a blob. > > On 11/13/06, Marc Angelo <computrain at paradise.net.nz> wrote: > > I can't give you a full answer but I can tell you why (I think) the > "data > > conversion" is failing (somebody please correct me if I am wrong). I > think > > you will find that the co-ordinate data in Access is a "double" or > "single" > > data type as Access does not have a "geometry" data type like in > Postgres. > > When you use the PostGres ODBC connector you are just transferring the > data > > from one database to another so Postgres is just placing the data in > the > > fields in the nearest data type that is equivalant to the Acces data > type. > > > > If the data needs only to be transferred once (not on a regular basis) > from > > Access you could import the data by writing a small routine in C++.Net > or > > VB.Net. I wrote a small app a while ago that imported geometry data > into > > Postgres. > > I connected to PostGres using NPGSQL data connector. All my data was > in csv > > fomat inside a text file. The routine opened the csv file and then > imported > > each record into Postgres by using an SQL insert statement combined > with the > > GeometryFromText() function which converts text coordinates into a > geometry > > data type in Postgres. > > Having said that I am not competent with SQL so I suspect that you > could > > write an SQL statement within Postgres to import and convert data that > > resides in a csv file.....this would mean exporting your data from > Access > > into a .txt or csv file. > > > > Hope this gives you at least some help. > > > > Cheers > > Marc > > > > > > ----- Original Message ----- > > From: "Hendra Yana" <Hendra at lskk.ee.itb.ac.id> > > To: <postgis-users at postgis.refractions.net> > > Sent: Monday, November 13, 2006 9:00 PM > > Subject: [postgis-users] HELP! Ms-Access shape data to the_geom of > > postgresql > > > > > > > Help.... > > > > > > I've been trying to convert database from Ms-Access shape data to > the_geom > > > for postgresql. > > > > > > I try to export from MS-Access to postgresql with PGSQL-ODBC > connection, > > > but the result in postgresql still not result as the_geom field but > still > > > the shape data in fields. > > > > > > Can anyone tell me how to Convert database from Ms-Access shape data > to > > > the_geom for postgresql??? > > > > > > thanks for reply.... > > > > > > > > > _______________________________________________ > > > postgis-users mailing list > > > postgis-users at postgis.refractions.net > > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > > > > > > > > -- > > > No virus found in this incoming message. > > > Checked by AVG Free Edition. > > > Version: 7.1.409 / Virus Database: 268.14.3/531 - Release Date: > 12/11/2006 > > > > > > > > > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > -- > Puneet Kishor http://punkish.eidesis.org/ > Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ > Open Source Geospatial Foundation https://edu.osgeo.org/ > ------------------------------------------------------------------------ > ------------------------------- > collaborate, communicate, compete > ==================================================== > _______________________________________________ > 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 > -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ Open Source Geospatial Foundation https://edu.osgeo.org/ ------------------------------------------------------------------------------------------------------- collaborate, communicate, compete ==================================================== From bclay at ball.com Mon Nov 13 06:10:44 2006 From: bclay at ball.com (Clay, Bruce) Date: Mon, 13 Nov 2006 09:10:44 -0500 Subject: [postgis-users] NAVTEQ Data? Message-ID: <C482FF98AE985A47B8C982FD429C9E34FEF977@daytonmsg2k3.AERO.BALL.COM> -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Rapha?l Jacquot Sent: Saturday, November 11, 2006 2:48 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] NAVTEQ Data? adam at spatialsystems.org wrote: > I've seen some NAVTEQ data in cars and I like it, better than Tiger files. I > also heard it has road speeds in it. > > Has anyone loaded NAVTEQ data into a PostGIS server, is it possible? we have free data in the making available at http://planet.openstreetmap.org for more information http://wiki.openstreetmap.org besides, if you found the docs to the navteq format on the web, it clearly says that you can't legally use this documentation to create a parser / decoder for that format. > Thanks, > Adam _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From bclay at ball.com Mon Nov 13 06:12:44 2006 From: bclay at ball.com (Clay, Bruce) Date: Mon, 13 Nov 2006 09:12:44 -0500 Subject: [postgis-users] NAVTEQ Data? Message-ID: <C482FF98AE985A47B8C982FD429C9E34FEF978@daytonmsg2k3.AERO.BALL.COM> The current OpenStreetMap file expands to 4 GB. Does anyone know of a PostGis or GDAL based parser to read / convert these files? Bruce -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Rapha?l Jacquot Sent: Saturday, November 11, 2006 2:48 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] NAVTEQ Data? adam at spatialsystems.org wrote: > I've seen some NAVTEQ data in cars and I like it, better than Tiger files. I > also heard it has road speeds in it. > > Has anyone loaded NAVTEQ data into a PostGIS server, is it possible? we have free data in the making available at http://planet.openstreetmap.org for more information http://wiki.openstreetmap.org besides, if you found the docs to the navteq format on the web, it clearly says that you can't legally use this documentation to create a parser / decoder for that format. > Thanks, > Adam _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From sxpert at sxpert.org Mon Nov 13 06:29:04 2006 From: sxpert at sxpert.org (raphael Jacquot) Date: Mon, 13 Nov 2006 15:29:04 +0100 Subject: [postgis-users] NAVTEQ Data? In-Reply-To: <C482FF98AE985A47B8C982FD429C9E34FEF978@daytonmsg2k3.AERO.BALL.COM> References: <C482FF98AE985A47B8C982FD429C9E34FEF978@daytonmsg2k3.AERO.BALL.COM> Message-ID: <45588130.2050703@sxpert.org> Clay, Bruce wrote: > The current OpenStreetMap file expands to 4 GB. Does anyone know of a PostGis or GDAL based parser to read / convert these files? > > Bruce I'm currently putting the final touches on one, should take about an extra week of work (I'm doing this in my spare time) I won't really be postgis though, but postgres 8.1.x using the geometric extentions... feel free to change it to use postgis :D From orsolarte at gmail.com Mon Nov 13 06:59:58 2006 From: orsolarte at gmail.com (Orlando Giovanny Solarte Delgado) Date: Mon, 13 Nov 2006 09:59:58 -0500 Subject: [postgis-users] When I use an EXPRESSION in my map file using FIELD STRING, the condition never returns as true, even though I know the values exist in my table. Message-ID: <684843e00611130659l45a40e81ufbfb6e6b1d3aa14c@mail.gmail.com> Hi. When I use an EXPRESSION in my map file using FIELD STRING, the condition never returns as true, even though I know the values exist in my table.<http://postgis.refractions.net/docs/ch04.html#id2525201> I am doing something like: <http://postgis.refractions.net/docs/ch04.html#id2525201> CLASSITEM "cod_carto" CLASS... EXPRESSION "vts" ... END CLASS.. EXPRESSION "VTS" END I am using both lower an upper case, I know VTS value exist in my table postgis, but never returns as true. Somebody can help me? -- Atentamente, Orlando Giovanny Solarte Delgado Ing. Desarrollador SIG Emprendedor BioSIG -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061113/7a2dca7d/attachment.html> From orsolarte at gmail.com Mon Nov 13 07:31:52 2006 From: orsolarte at gmail.com (Orlando Giovanny Solarte Delgado) Date: Mon, 13 Nov 2006 10:31:52 -0500 Subject: [postgis-users] postgis bool::text and mapserver Message-ID: <684843e00611130731h617eff36q40a64b2108ad4222@mail.gmail.com> Hi. I have same problem... Hi. When I use an EXPRESSION in my map file using FIELD STRING, the condition never returns as true, even though I know the values exist in my table.<http://postgis.refractions.net/docs/ch04.html#id2525201> I am doing something like: CLASSITEM "cod_carto" CLASS... EXPRESSION "vts" ... END CLASS.. EXPRESSION "VTS" END I am using both lower an upper case, I know VTS value exist in my table postgis, but never returns as true. No I try: CLASSITEM "cod_carto" CLASS... EXPRESSION ('[cod_carto]' = 'vts') ... END CLASS.. EXPRESSION ('[cod_carto]' = 'vts') END But Not function!! Somebody can help me? -- Atentamente, Orlando Giovanny Solarte Delgado Ing. Desarrollador SIG Emprendedor BioSIG -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061113/be035052/attachment.html> From lanczos at t-zones.sk Mon Nov 13 10:12:41 2006 From: lanczos at t-zones.sk (Tomas Lanczos) Date: Mon, 13 Nov 2006 19:12:41 +0100 Subject: [postgis-users] Probelm with postgis-pg81-setup-1.1.6-1 in XP Message-ID: <001701c7074f$538a93b0$975dfe0a@tomas> Hello, I am using Postgtresql 8.1.1 installed under WinXP. When I installed it, I installed also the Postgis (I don't know which version) from the installation package, just for sure, never really used :-). Later I decided to upgrade it to version 1.1.6, using the "postgis-pg81-setup-1.1.6-1" installation package downloaded from http://postgis.refractions.net/download/windows/ , as I am planning to use it with grass 6.3 and qgis (compiled from source under Ubuntu 6.0.6 in VMWare, approaching Postgresql/postgis as on remote machine - however, planning to switch to Linux completely as I need and use more OSS and Linux stuff as Win stuff ad the moment :-)). So, I recognized the following strange behaviour of the installer during the installation procedure: - arrived to the "Loading of Postgis functions ..." then stopped and an errormessage appeared that the template_postgis database creation did not succeed. The create_tempaltepostgis_sql_error.txt error log was clear that the problem was in running the lwpostgis.sql and the spatial_ref_sys.sql - I tried to run the lwpostgis.sql manually, I succeed after manual removal of all the tables and types as well as the cast from type bool to type text. - the spatial_ref_sys.sql ran without problems now. It appears to me that it looks like as the template_postgis database was created twice during the installation procedure and it was no need to run those queries manually, am I right? My next question is that whether is the installation finished now and will the stuff work fine? Best regards Tomas From tzuberbuehler at datacomm.ch Mon Nov 13 10:52:37 2006 From: tzuberbuehler at datacomm.ch (Thomas Zuberbuehler) Date: Mon, 13 Nov 2006 19:52:37 +0100 Subject: [postgis-users] load more than one shape files to one table? Message-ID: <e545098a0611131052i5f99ece9gf8d8b501e412c5fe@mail.gmail.com> hello i have more than 150 shape files with routes (every one contains one route). can i load this files to postgis and *only* one table which contains all routes? there could be a problem: a shape file contains more than one multilines. shapefile type: arc postgis type: multilinestring[2] someone has an idea? thank you. regards, thomas -- Thomas Zuberbuehler http://www.zubi.li From woodbri at swoodbridge.com Mon Nov 13 11:00:39 2006 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Mon, 13 Nov 2006 14:00:39 -0500 Subject: [postgis-users] load more than one shape files to one table? In-Reply-To: <e545098a0611131052i5f99ece9gf8d8b501e412c5fe@mail.gmail.com> References: <e545098a0611131052i5f99ece9gf8d8b501e412c5fe@mail.gmail.com> Message-ID: <4558C0D7.9050408@swoodbridge.com> Thomas Zuberbuehler wrote: > hello > > i have more than 150 shape files with routes (every one contains one > route). can i load this files to postgis and *only* one table which > contains all routes? there could be a problem: a shape file contains > more than one multilines. > > shapefile type: arc > postgis type: multilinestring[2] > > someone has an idea? shp2pgsql has an option to create just the table. To run it once to create the table, then run it 150 times for your shapefiles but don't have it do the table create. -Steve From jgw at alpinegeophysics.com Mon Nov 13 11:03:53 2006 From: jgw at alpinegeophysics.com (James G Wilkinson) Date: Mon, 13 Nov 2006 11:03:53 -0800 Subject: [postgis-users] Closing a LINESTRING In-Reply-To: <20061113080517.GB33640@keybit.net> References: <4556197E.5060806@alpinegeophysics.com> <20061111213224.GA9192@keybit.net> <45579854.3050708@alpinegeophysics.com> <20061113080517.GB33640@keybit.net> Message-ID: <4558C199.1070702@alpinegeophysics.com> strk, >>Thanks for the pointer to linemerge(), but I am still not sure how to >>insert an additional >>linestring into the existing geometrycollection. Maybe this a "duh," >>but I have not >>figured out how to inert a line segment into the existing geometry. >> >> > >see collect() ? > > Whoops....it was a "duh." I did not correctly think through this issue. Sorry to be a bother. Regards, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061113/fae61d5c/attachment.html> From tzuberbuehler at datacomm.ch Mon Nov 13 11:14:26 2006 From: tzuberbuehler at datacomm.ch (Thomas Zuberbuehler) Date: Mon, 13 Nov 2006 20:14:26 +0100 Subject: [postgis-users] load more than one shape files to one table? In-Reply-To: <4558C0D7.9050408@swoodbridge.com> References: <e545098a0611131052i5f99ece9gf8d8b501e412c5fe@mail.gmail.com> <4558C0D7.9050408@swoodbridge.com> Message-ID: <e545098a0611131114n2925a71w60649f25a39c01cd@mail.gmail.com> steve, thank you. but i think my problem exists further. a route consists more than one segment. this segments form a route. if i load a route with shp2pgsql, as you suggest, i am going in disorder, not? then i can't differentiate the route, can i? thank you. thomas 2006/11/13, Stephen Woodbridge <woodbri at swoodbridge.com>: > Thomas Zuberbuehler wrote: > > hello > > > > i have more than 150 shape files with routes (every one contains one > > route). can i load this files to postgis and *only* one table which > > contains all routes? there could be a problem: a shape file contains > > more than one multilines. > > > > shapefile type: arc > > postgis type: multilinestring[2] > > > > someone has an idea? > > shp2pgsql has an option to create just the table. > > To run it once to create the table, then run it 150 times for your > shapefiles but don't have it do the table create. > > -Steve > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Thomas Zuberbuehler http://www.zubi.li From robert.coup at onetrackmind.co.nz Mon Nov 13 12:11:43 2006 From: robert.coup at onetrackmind.co.nz (Robert Coup) Date: Tue, 14 Nov 2006 09:11:43 +1300 Subject: [postgis-users] postgis bool::text and mapserver In-Reply-To: <684843e00611130731h617eff36q40a64b2108ad4222@mail.gmail.com> References: <684843e00611130731h617eff36q40a64b2108ad4222@mail.gmail.com> Message-ID: <4558D17F.4000902@onetrackmind.co.nz> Orlando Giovanny Solarte Delgado wrote: > When I use an EXPRESSION in my map file using FIELD STRING, the > condition never returns as true, even though I know the values exist > in my table. <http://postgis.refractions.net/docs/ch04.html#id2525201> > > ... > > I am using both lower an upper case, I know VTS value exist in my > table postgis, but never returns as true. Try checking that whitespace hasn't been added to the end of your string - the char_length() function can help you here. Also trim() will fix it for you. I had several million rows of attributes imported from MapInfo TAB format with these issues. Rob :) From woodbri at swoodbridge.com Mon Nov 13 12:33:29 2006 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Mon, 13 Nov 2006 15:33:29 -0500 Subject: [postgis-users] load more than one shape files to one table? In-Reply-To: <e545098a0611131114n2925a71w60649f25a39c01cd@mail.gmail.com> References: <e545098a0611131052i5f99ece9gf8d8b501e412c5fe@mail.gmail.com> <4558C0D7.9050408@swoodbridge.com> <e545098a0611131114n2925a71w60649f25a39c01cd@mail.gmail.com> Message-ID: <4558D699.4040205@swoodbridge.com> Then I think you will probably need to write a perl script or whatever to that will load you data and appropriately add a unique id to each files' data and add sequence numbers to the rows if you need to maintain order. Or have it load the data as a collection of multilines. I think the answer will have more to do with what you need to do with the data once you have it loaded. -Steve Thomas Zuberbuehler wrote: > steve, > > thank you. but i think my problem exists further. a route consists > more than one segment. this segments form a route. if i load a route > with shp2pgsql, as you suggest, i am going in disorder, not? then i > can't differentiate the route, can i? > > thank you. > thomas > > 2006/11/13, Stephen Woodbridge <woodbri at swoodbridge.com>: >> Thomas Zuberbuehler wrote: >> > hello >> > >> > i have more than 150 shape files with routes (every one contains one >> > route). can i load this files to postgis and *only* one table which >> > contains all routes? there could be a problem: a shape file contains >> > more than one multilines. >> > >> > shapefile type: arc >> > postgis type: multilinestring[2] >> > >> > someone has an idea? >> >> shp2pgsql has an option to create just the table. >> >> To run it once to create the table, then run it 150 times for your >> shapefiles but don't have it do the table create. >> >> -Steve >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> > > From eprand at earthlink.net Mon Nov 13 15:21:21 2006 From: eprand at earthlink.net (Eric Randall) Date: Mon, 13 Nov 2006 18:21:21 -0500 Subject: [postgis-users] load more than one shape files to one table? Message-ID: <4558FDF1.9070700@earthlink.net> Unless I misunderstand (which happens all the time). Use shp2pgsql to load the 150 routes to tables (with script). Create a new table into which to insert the route tables with a field(s) to keep the original route/segment identity. Something like: select dropgeometrycolumn('','allroutes','geom'); drop table allroutes; begin; create table allroutes (gid serial primary key, route_gid int4, segment_id int4, other_fields ); select addgeometrycolumn('','allroutes','geom','srid','multilinestring',2); insert into allroutes (route_gid,segment_id,other_fields,geom) select route_gid,segment_id,other_fields,geom from route1; insert into allroutes (route_gid,segment_id,other_fields,geom) select route_gid,segment_id,other_fields,geom from route2; ... ... insert into allroutes (route_gid,segment_id,other_fields,geom) select route_gid,segment_id,other_fields,geom from route150; end; -Eric From robert.coup at onetrackmind.co.nz Mon Nov 13 15:56:42 2006 From: robert.coup at onetrackmind.co.nz (Robert Coup) Date: Tue, 14 Nov 2006 12:56:42 +1300 Subject: [postgis-users] load more than one shape files to one table? In-Reply-To: <4558FDF1.9070700@earthlink.net> References: <4558FDF1.9070700@earthlink.net> Message-ID: <4559063A.1040005@onetrackmind.co.nz> Eric Randall wrote: > Unless I misunderstand (which happens all the time). > Use shp2pgsql to load the 150 routes to tables (with script). > Create a new table into which to insert the route tables > with a field(s) to keep the original route/segment identity. Another (potentially easy idea) might be to: * create the pg table with a bonus field with a default value of 1 * load 1st shapefile using shp2pgsql * update table so bonus field has default of 2 (psql..) * load 2nd shapefile using shp2pgsql * ... then combine geometries based on your bonus field. Rob :) From Hendra at lskk.ee.itb.ac.id Mon Nov 13 18:16:18 2006 From: Hendra at lskk.ee.itb.ac.id (Hendra Yana) Date: Tue, 14 Nov 2006 09:16:18 +0700 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom Message-ID: <WorldClient-F200611140916.AA16180165@lskk.ee.itb.ac.id> Thanks for the reply man.... Here is the sample cut of my MS-Access Database with the shape data field http://lskk.ee.itb.ac.id/Hendra/downloads/Disbun.rar My questions are: 1. Where is field of the_geom field in postgresql? 2. How to export this MS-Access to postgresql that support postgis? 3. I try to export one field in MS-Access to csv format but the OLE Object Data type doesn't export well (empty), why? Table PROPINSI : Field Name Type Size OBJECTID_1 AutoNumber 0 Shape OLE Object 0 OBJECTID Long Integer 0 PROPINSI Text 32 Shape_Leng Float 0 Shape_Length Float 0 Shape_Area Float 0 Here is the export result in cvs : "OBJECTID_1";"Shape";"OBJECTID";"PROPINSI";"Shape_Leng";"Shape_Length";"Shape_Area" 1;;2;"BANTEN";875615,85;874385,54;9342601200,25 2;;3;"DKI JAKARTA";263503,93;264679,62;672163800,44 3;;4;"JAWA TENGAH";1503623,10;1518265,46;37669858041,39 4;;1;"JAWA BARAT";236102,42;1318954,20;36963824115,52 Again thanks for the reply... Me Henks http://lskk.ee.itb.ac.id/Hendra From punkish at eidesis.org Mon Nov 13 18:28:38 2006 From: punkish at eidesis.org (P Kishor) Date: Mon, 13 Nov 2006 20:28:38 -0600 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom In-Reply-To: <WorldClient-F200611140916.AA16180165@lskk.ee.itb.ac.id> References: <WorldClient-F200611140916.AA16180165@lskk.ee.itb.ac.id> Message-ID: <cdf6db500611131828q31f9195aq9cf41ee94e3a166d@mail.gmail.com> I thought we went over this... On 11/13/06, Hendra Yana <Hendra at lskk.ee.itb.ac.id> wrote: > Thanks for the reply man.... > > Here is the sample cut of my MS-Access Database with the shape data field > http://lskk.ee.itb.ac.id/Hendra/downloads/Disbun.rar > > > My questions are: > > 1. Where is field of the_geom field in postgresql? > > 2. How to export this MS-Access to postgresql that support postgis? try one of the translators such as ogr2ogr (as mentioned, IIRC, in another email). > > 3. I try to export one field in MS-Access to csv format but the OLE Object > Data type doesn't export well (empty), why? think about it -- how do you think a binary piece of information can be represented in pure text? Is it possible? No, it is not possible. .. -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ Open Source Geospatial Foundation https://edu.osgeo.org/ ------------------------------------------------------------------------------------------------------- collaborate, communicate, compete ==================================================== From pramsey at refractions.net Mon Nov 13 19:11:16 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Mon, 13 Nov 2006 19:11:16 -0800 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom In-Reply-To: <cdf6db500611131828q31f9195aq9cf41ee94e3a166d@mail.gmail.com> References: <WorldClient-F200611140916.AA16180165@lskk.ee.itb.ac.id> <cdf6db500611131828q31f9195aq9cf41ee94e3a166d@mail.gmail.com> Message-ID: <E72F985B-8DEC-4497-B1CB-A3A7CDF6C9F0@refractions.net> This is not just any old "Access Database", it is an ESRI "geodatabase" so you will need special tools to read out of it and into PostGIS, a simple ODBC copy is not going to do it. Try ogr2ogr from FWTools. P On 13-Nov-06, at 6:28 PM, P Kishor wrote: > I thought we went over this... > > On 11/13/06, Hendra Yana <Hendra at lskk.ee.itb.ac.id> wrote: >> Thanks for the reply man.... >> >> Here is the sample cut of my MS-Access Database with the shape >> data field >> http://lskk.ee.itb.ac.id/Hendra/downloads/Disbun.rar >> >> >> My questions are: >> >> 1. Where is field of the_geom field in postgresql? >> >> 2. How to export this MS-Access to postgresql that support postgis? > > try one of the translators such as ogr2ogr (as mentioned, IIRC, in > another email). > >> >> 3. I try to export one field in MS-Access to csv format but the >> OLE Object >> Data type doesn't export well (empty), why? > > think about it -- how do you think a binary piece of information can > be represented in pure text? Is it possible? No, it is not possible. > > .. > > > -- > Puneet Kishor http://punkish.eidesis.org/ > Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ > Open Source Geospatial Foundation https://edu.osgeo.org/ > ---------------------------------------------------------------------- > --------------------------------- > collaborate, communicate, compete > ==================================================== > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From jdaly at panix.com Mon Nov 13 20:22:14 2006 From: jdaly at panix.com (John Daly) Date: Mon, 13 Nov 2006 23:22:14 -0500 Subject: [postgis-users] Problem building postgis Message-ID: <000b01c707a4$764bd260$6401a8c0@GUITAR> All, I'm a new list subscriber and I'd like to say hello to all, and also, of course, introduce my first problem using postgis. I'm trying to build postgis on Redhat 9, with Postgres version 8.1.5 and postgis ver 1.1.6. I'm getting the build errors shown below: lwgeom_gist.c:547:1: directives may not be used inside a macro argument lwgeom_gist.c:546:56: unterminated argument list invoking macro "gistentryinit" lwgeom_gist.c: In function `LWGEOM_gist_compress': lwgeom_gist.c:550: `gistentryinit' undeclared (first use in this function) lwgeom_gist.c:550: (Each undeclared identifier is reported only once lwgeom_gist.c:550: for each function it appears in.) lwgeom_gist.c:550: parse error before "entry" lwgeom_gist.c:561:1: directives may not be used inside a macro argument lwgeom_gist.c:560:69: unterminated argument list invoking macro "gistentryinit" lwgeom_gist.c:564: parse error before "entry" gmake[1]: *** [lwgeom_gist.o] Error 1 Should I try another version of postgis? Has anyone run up against this? Thanks, JD From pramsey at refractions.net Mon Nov 13 22:04:29 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Mon, 13 Nov 2006 22:04:29 -0800 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom ofpostgresql In-Reply-To: <C482FF98AE985A47B8C982FD429C9E34FEF976@daytonmsg2k3.AERO.BALL.COM> References: <C482FF98AE985A47B8C982FD429C9E34FEF976@daytonmsg2k3.AERO.BALL.COM> Message-ID: <C5EF97E5-E33A-446E-9015-094FA81C3BC5@refractions.net> My understanding it that it is just a Shape record, but if it's not, it is probably nothing more complex than a differenced version of the same thing. (using the first coordinate, create all the rest of the coordinates as offsets from the first). In any event, the answer is available in OGR, since Frank has already figured out the details and provides read support for geodatabase on platforms that support ODBC. P On 13-Nov-06, at 5:34 AM, Clay, Bruce wrote: > Does anyone have the data format for the blob? > > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of P > Kishor > Sent: Monday, November 13, 2006 7:43 AM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] HELP! Ms-Access shape data to the_geom > ofpostgresql > > coordinate data in Access (equivalent to the geom in PostGIS) is > stored as a blob. > > On 11/13/06, Marc Angelo <computrain at paradise.net.nz> wrote: >> I can't give you a full answer but I can tell you why (I think) the > "data >> conversion" is failing (somebody please correct me if I am wrong). I > think >> you will find that the co-ordinate data in Access is a "double" or > "single" >> data type as Access does not have a "geometry" data type like in > Postgres. >> When you use the PostGres ODBC connector you are just transferring >> the > data >> from one database to another so Postgres is just placing the data in > the >> fields in the nearest data type that is equivalant to the Acces data > type. >> >> If the data needs only to be transferred once (not on a regular >> basis) > from >> Access you could import the data by writing a small routine in C+ >> +.Net > or >> VB.Net. I wrote a small app a while ago that imported geometry data > into >> Postgres. >> I connected to PostGres using NPGSQL data connector. All my data was > in csv >> fomat inside a text file. The routine opened the csv file and then > imported >> each record into Postgres by using an SQL insert statement combined > with the >> GeometryFromText() function which converts text coordinates into a > geometry >> data type in Postgres. >> Having said that I am not competent with SQL so I suspect that you > could >> write an SQL statement within Postgres to import and convert data >> that >> resides in a csv file.....this would mean exporting your data from > Access >> into a .txt or csv file. >> >> Hope this gives you at least some help. >> >> Cheers >> Marc >> >> >> ----- Original Message ----- >> From: "Hendra Yana" <Hendra at lskk.ee.itb.ac.id> >> To: <postgis-users at postgis.refractions.net> >> Sent: Monday, November 13, 2006 9:00 PM >> Subject: [postgis-users] HELP! Ms-Access shape data to the_geom of >> postgresql >> >> >>> Help.... >>> >>> I've been trying to convert database from Ms-Access shape data to > the_geom >>> for postgresql. >>> >>> I try to export from MS-Access to postgresql with PGSQL-ODBC > connection, >>> but the result in postgresql still not result as the_geom field but > still >>> the shape data in fields. >>> >>> Can anyone tell me how to Convert database from Ms-Access shape data > to >>> the_geom for postgresql??? >>> >>> thanks for reply.... >>> >>> >>> _______________________________________________ >>> postgis-users mailing list >>> postgis-users at postgis.refractions.net >>> http://postgis.refractions.net/mailman/listinfo/postgis-users >>> >>> >>> >>> -- >>> No virus found in this incoming message. >>> Checked by AVG Free Edition. >>> Version: 7.1.409 / Virus Database: 268.14.3/531 - Release Date: > 12/11/2006 >>> >>> >> >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> > > > -- > Puneet Kishor http://punkish.eidesis.org/ > Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ > Open Source Geospatial Foundation https://edu.osgeo.org/ > ---------------------------------------------------------------------- > -- > ------------------------------- > collaborate, communicate, compete > ==================================================== > _______________________________________________ > 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 Hendra at lskk.ee.itb.ac.id Mon Nov 13 22:57:21 2006 From: Hendra at lskk.ee.itb.ac.id (Hendra Yana) Date: Tue, 14 Nov 2006 13:57:21 +0700 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom Message-ID: <WorldClient-F200611141357.AA57210167@lskk.ee.itb.ac.id> well can u give me a cut sampling for converting MS-Access Shape data to shp file, through the ODBC? I just download the FWTools and I'm confused how to convert this database. I'm planing to migration from MS-Access to Postgresql.. Can u help me.... My sample database is here http://lskk.ee.itb.ac.id/Hendra/downloads/Disbun.rar (Ms-Access ver 2003) Thanks in advance... From luca.casagrande at gmail.com Tue Nov 14 01:14:41 2006 From: luca.casagrande at gmail.com (Luca Casagrande) Date: Tue, 14 Nov 2006 10:14:41 +0100 Subject: [postgis-users] Php interface for loading shp file into postgis Message-ID: <20061114101441.3645328b@gekomachine.casa> Hi to all! I am trying to found a good way to approach this issue: i need to build a php interface that will do those tasks: 1) Load a shp file selected by the user; 2) Check if the file has got a prj file associated with it and if not let the user insert the PROJ code for the current file; 3) Use proj to convert the file to the needed projection; 4) Store the file inside POSTGIS The main thing i am thinking about, is when do the projection swap: is it better to do BEFORE importing the data in POSTGIS or do just after the data has been inserted inside Postgis? Any feedback would be nice Thank you very much Luca -- Help QGIS development! Make a donation right now at http://xrl.us/supportqgis LINUX User #411601 GENTOO-GIS Development Team jabber: casagrande at jabber.linux.it From mark.cave-ayland at ilande.co.uk Tue Nov 14 01:21:51 2006 From: mark.cave-ayland at ilande.co.uk (Mark Cave-Ayland) Date: Tue, 14 Nov 2006 09:21:51 -0000 (UTC) Subject: [postgis-users] Probelm with postgis-pg81-setup-1.1.6-1 in XP In-Reply-To: <001701c7074f$538a93b0$975dfe0a@tomas> References: <001701c7074f$538a93b0$975dfe0a@tomas> Message-ID: <40082.217.207.197.142.1163496111.squirrel@www.ilande.co.uk> > Hello, > > I am using Postgtresql 8.1.1 installed under WinXP. When I installed it, I > installed also the Postgis (I don't know which version) from the > installation package, just for sure, never really used :-). > Later I decided to upgrade it to version 1.1.6, using the > "postgis-pg81-setup-1.1.6-1" installation package downloaded from > http://postgis.refractions.net/download/windows/ , as I am planning to use > it with grass 6.3 and qgis (compiled from source under Ubuntu 6.0.6 in > VMWare, approaching Postgresql/postgis as on remote machine - however, > planning to switch to Linux completely as I need and use more OSS and > Linux > stuff as Win stuff ad the moment :-)). > > So, I recognized the following strange behaviour of the installer during > the > installation procedure: > - arrived to the "Loading of Postgis functions ..." then stopped and an > errormessage appeared that the template_postgis database creation did not > succeed. The create_tempaltepostgis_sql_error.txt error log was clear that > the problem was in running the lwpostgis.sql and the spatial_ref_sys.sql > > - I tried to run the lwpostgis.sql manually, I succeed after manual > removal > of all the tables and types as well as the cast from type bool to type > text. > > > - the spatial_ref_sys.sql ran without problems now. > > It appears to me that it looks like as the template_postgis database was > created twice during the installation procedure and it was no need to run > those queries manually, am I right? My next question is that whether is > the > installation finished now and will the stuff work fine? > > Best regards > > Tomas Hi Tomas, It sounds as if you didn't remove the version of PostGIS supplied by the PostgreSQL 8.1 installer before running the standalone installer from the Refractions website (this is mentioned at the top of the Windows download page in the section marked "Important"), but it's difficult to tell without the error log. For peace of mind, it may be worth uninstalling PostGIS from the PostgreSQL installer and the 1.1.6 installer, and then reinstalling just the 1.1.6 installer (you will get a warning about the template database already existing but it should be safe to ignore it). Kind regards, Mark. From lanczos at t-zones.sk Tue Nov 14 01:34:56 2006 From: lanczos at t-zones.sk (Tomas Lanczos) Date: Tue, 14 Nov 2006 10:34:56 +0100 Subject: [postgis-users] Probelm with postgis-pg81-setup-1.1.6-1 in XP In-Reply-To: <40082.217.207.197.142.1163496111.squirrel@www.ilande.co.uk> Message-ID: <004301c707d0$278220e0$975dfe0a@tomas> Hi Mark, thanks for Your answer > Hi Tomas, > > It sounds as if you didn't remove the version of PostGIS > supplied by the PostgreSQL 8.1 installer before running the > standalone installer from the Refractions website (this is > mentioned at the top of the Windows download page in the > section marked "Important"), but it's difficult to tell > without the error log. Yes of course, it was the first I did! > For peace of mind, it may be worth uninstalling PostGIS from > the PostgreSQL installer and the 1.1.6 installer, and then > reinstalling just the 1.1.6 installer (you will get a warning > about the template database already existing but it should be > safe to ignore it). I did it before I wrote this mail, at least twice. At the moment, when I run the Postgresql installer it shows that the Postgis is not installed. How can I check what version of Postgis I have? Thanks Tomas > Kind regards, > > Mark. > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From jan.syryn at trasys.be Tue Nov 14 01:58:21 2006 From: jan.syryn at trasys.be (Jan Syryn) Date: Tue, 14 Nov 2006 10:58:21 +0100 Subject: [postgis-users] Probelm with postgis-pg81-setup-1.1.6-1 in XP In-Reply-To: <004301c707d0$278220e0$975dfe0a@tomas> Message-ID: <016b01c707d3$6b0daa20$0601a8c0@ariane.tractebel.be> I had the same problem. I wanted to upgrade the Postgis install on WinXP. So I removed the postgis installation out of postgressql by the postgres installer. And indeed when re-installing postgis it generates errors. (Eventhough the postgres installer shows postgis is not installed (anymore)) The only thing I could do (without loosing too much time over this) is unstalling postgres, reinstall it without postgis and do the postgis install separately. HIH, Jan -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Tomas Lanczos Sent: mardi 14 novembre 2006 10:35 To: 'PostGIS Users Discussion' Subject: RE: [postgis-users] Probelm with postgis-pg81-setup-1.1.6-1 in XP Hi Mark, thanks for Your answer > Hi Tomas, > > It sounds as if you didn't remove the version of PostGIS supplied by > the PostgreSQL 8.1 installer before running the standalone installer > from the Refractions website (this is mentioned at the top of the > Windows download page in the section marked "Important"), but it's > difficult to tell without the error log. Yes of course, it was the first I did! > For peace of mind, it may be worth uninstalling PostGIS from the > PostgreSQL installer and the 1.1.6 installer, and then reinstalling > just the 1.1.6 installer (you will get a warning about the template > database already existing but it should be safe to ignore it). I did it before I wrote this mail, at least twice. At the moment, when I run the Postgresql installer it shows that the Postgis is not installed. How can I check what version of Postgis I have? Thanks Tomas > Kind regards, > > Mark. > > > _______________________________________________ > 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 mark.cave-ayland at ilande.co.uk Tue Nov 14 02:11:35 2006 From: mark.cave-ayland at ilande.co.uk (Mark Cave-Ayland) Date: Tue, 14 Nov 2006 10:11:35 -0000 (UTC) Subject: [postgis-users] Probelm with postgis-pg81-setup-1.1.6-1 in XP In-Reply-To: <004301c707d0$278220e0$975dfe0a@tomas> References: <004301c707d0$278220e0$975dfe0a@tomas> Message-ID: <37275.217.207.197.142.1163499095.squirrel@www.ilande.co.uk> >> For peace of mind, it may be worth uninstalling PostGIS from >> the PostgreSQL installer and the 1.1.6 installer, and then >> reinstalling just the 1.1.6 installer (you will get a warning >> about the template database already existing but it should be >> safe to ignore it). > > I did it before I wrote this mail, at least twice. At the moment, when I > run > the Postgresql installer it shows that the Postgis is not installed. How > can > I check what version of Postgis I have? > > Thanks > > Tomas Hi Tomas, The easiest way to determine the current version is to issue a simple SELECT postgis_full_version() in psql or pgAdmin. Kind regards, Mark. From mark.cave-ayland at ilande.co.uk Tue Nov 14 02:13:02 2006 From: mark.cave-ayland at ilande.co.uk (Mark Cave-Ayland) Date: Tue, 14 Nov 2006 10:13:02 -0000 (UTC) Subject: [postgis-users] Probelm with postgis-pg81-setup-1.1.6-1 in XP In-Reply-To: <016b01c707d3$6b0daa20$0601a8c0@ariane.tractebel.be> References: <016b01c707d3$6b0daa20$0601a8c0@ariane.tractebel.be> Message-ID: <37279.217.207.197.142.1163499182.squirrel@www.ilande.co.uk> > I had the same problem. > I wanted to upgrade the Postgis install on WinXP. > So I removed the postgis installation out of postgressql by the postgres > installer. > And indeed when re-installing postgis it generates errors. > (Eventhough the postgres installer shows postgis is not installed > (anymore)) > > The only thing I could do (without loosing too much time over this) is > unstalling postgres, reinstall it without postgis and do the postgis > install > separately. > > HIH, Jan Hi Jan, Thanks for your message - it does sound as if something is not working as it should. If either you or Tomas can send me a copy of the log file containing the errors offlist, I would be happy to take a look at it. Kind regards, Mark. From lanczos at t-zones.sk Tue Nov 14 02:21:28 2006 From: lanczos at t-zones.sk (Tomas Lanczos) Date: Tue, 14 Nov 2006 11:21:28 +0100 Subject: [postgis-users] Probelm with postgis-pg81-setup-1.1.6-1 in XP In-Reply-To: <37275.217.207.197.142.1163499095.squirrel@www.ilande.co.uk> Message-ID: <005801c707d6$a5b6b9c0$975dfe0a@tomas> > [mailto:postgis-users-bounces at postgis.refractions.net] On > > > > Hi Tomas, > > The easiest way to determine the current version is to issue > a simple SELECT postgis_full_version() in psql or pgAdmin. "POSTGIS="1.1.6" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, 22 Oct 2006" USE_STATS DBPROC="0.3.0" RELPROC="1.1.6" (needs proc upgrade)" It looks that the installation procedure succeed anyway, no need to reinstall the whole stuff (even I will do it, later or soon ...) Many thanks to everybody who helped. Regards Tomas > Kind regards, > > Mark. From tzuberbuehler at datacomm.ch Tue Nov 14 02:37:50 2006 From: tzuberbuehler at datacomm.ch (Thomas Zuberbuehler) Date: Tue, 14 Nov 2006 11:37:50 +0100 Subject: [postgis-users] load more than one shape files to one table? In-Reply-To: <4559063A.1040005@onetrackmind.co.nz> References: <4558FDF1.9070700@earthlink.net> <4559063A.1040005@onetrackmind.co.nz> Message-ID: <e545098a0611140237t6e6e05e5lcff0530fa40ac61a@mail.gmail.com> Rob, You're great. I will made it with an additional field. And I think you give me a solution idea how I can use only one table but with no convertion. So I will use a WFS server and there I can limit a result with a filter (the additional field). Thank you. Thanks goes also Eric, Steve and Ville for their answers! Regards, Thomas 2006/11/14, Robert Coup <robert.coup at onetrackmind.co.nz>: > Eric Randall wrote: > > Unless I misunderstand (which happens all the time). > > Use shp2pgsql to load the 150 routes to tables (with script). > > Create a new table into which to insert the route tables > > with a field(s) to keep the original route/segment identity. > Another (potentially easy idea) might be to: > > * create the pg table with a bonus field with a default value of 1 > * load 1st shapefile using shp2pgsql > * update table so bonus field has default of 2 (psql..) > * load 2nd shapefile using shp2pgsql > * ... > > then combine geometries based on your bonus field. > > Rob :) > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Thomas Zuberbuehler http://www.zubi.li From strk at refractions.net Tue Nov 14 03:22:22 2006 From: strk at refractions.net (strk at refractions.net) Date: Tue, 14 Nov 2006 12:22:22 +0100 Subject: [postgis-users] Php interface for loading shp file into postgis In-Reply-To: <20061114101441.3645328b@gekomachine.casa> References: <20061114101441.3645328b@gekomachine.casa> Message-ID: <20061114112222.GG59852@keybit.net> On Tue, Nov 14, 2006 at 10:14:41AM +0100, Luca Casagrande wrote: > Hi to all! > > I am trying to found a good way to approach this issue: > > i need to build a php interface that will do those tasks: > 1) Load a shp file selected by the user; > 2) Check if the file has got a prj file associated with it and if not > let the user insert the PROJ code for the current file; > 3) Use proj to convert the file to the needed projection; > 4) Store the file inside POSTGIS > > The main thing i am thinking about, is when do the projection swap: > is it better to do BEFORE importing the data in POSTGIS or do just after the data has > been inserted inside Postgis? There's currently no trigger checking for SRID existance added to the geometry column, so you can add the spatial_ref_sys entry at an arbitrary time. Anyway, the .prj => spatial_ref_sys record conversion seems a useful enough function to have embedded in shp2pgsql (and the reverse in pgsql2shp) so if you intend to implement such a feature I think it would be nice to have it implemented in C :) --strk; From mark.cave-ayland at ilande.co.uk Tue Nov 14 05:35:12 2006 From: mark.cave-ayland at ilande.co.uk (Mark Cave-Ayland) Date: Tue, 14 Nov 2006 13:35:12 -0000 (UTC) Subject: [postgis-users] Probelm with postgis-pg81-setup-1.1.6-1 in XP In-Reply-To: <007f01c707ee$aca4a270$975dfe0a@tomas> References: <007f01c707ee$aca4a270$975dfe0a@tomas> Message-ID: <47477.217.207.197.142.1163511312.squirrel@www.ilande.co.uk> > > Hi Mark, > > here I am sending the error log and also the installation details, as You > asked. Let me know pls. if You identify what caused this behaviour, I am > just curious. > > best regards > > Tomas (CC back to postgis-users) Hi Tomas, Ahhh I think I see what happened here - the old PostgreSQL installers had an option to install PostGIS into template1 as part of the install. Hence when the installer creates the new template_postgis database, it finds that the functions already exist :( This option has been removed from the latest 8.2 installer, but of course it may make things difficult for people upgrading. I'm not sure what the best method to work around this is, other than attempting to drop the complete list of PostGIS functions beforehand. Anyone on the list have any better ideas? Kind regards, Mark. From lanczos at t-zones.sk Tue Nov 14 06:25:36 2006 From: lanczos at t-zones.sk (Tomas Lanczos) Date: Tue, 14 Nov 2006 15:25:36 +0100 Subject: [postgis-users] Probelm with postgis-pg81-setup-1.1.6-1 in XP In-Reply-To: <47477.217.207.197.142.1163511312.squirrel@www.ilande.co.uk> Message-ID: <009801c707f8$c0d5cf30$975dfe0a@tomas> > From: Mark Cave-Ayland [mailto:mark.cave-ayland at ilande.co.uk] > > Hi Tomas, > > Ahhh I think I see what happened here - the old PostgreSQL > installers had an option to install PostGIS into template1 as > part of the install. Hence when the installer creates the new > template_postgis database, it finds that the functions > already exist :( > > This option has been removed from the latest 8.2 installer, > but of course it may make things difficult for people > upgrading. I'm not sure what the best method to work around > this is, other than attempting to drop the complete list of > PostGIS functions beforehand. Anyone on the list have any > better ideas? It works, anyway. It would be nice and correct if it will be mentioned in the installation instructions. Deleting the stuff before the installation begins is just a minor workaround. Best regards Tomas > Kind regards, > > Mark. > > From jan.syryn at trasys.be Tue Nov 14 06:26:27 2006 From: jan.syryn at trasys.be (Jan Syryn) Date: Tue, 14 Nov 2006 15:26:27 +0100 Subject: [postgis-users] Use of GeometryType does not work (yet) in my case In-Reply-To: <016b01c707d3$6b0daa20$0601a8c0@ariane.tractebel.be> Message-ID: <01bc01c707f8$df735570$0601a8c0@ariane.tractebel.be> Hi all, I am trying of inserting a geometry into postgres via Hibernate by using GeometryType. I build a random geometry generator for testing purposes. My POJO looks like this: @Entity public class GeographicalCoverage { private Integer id; private Geometry footprint; When I do an insert or an update manually, it works (so nothing is wrong with the geometry itself): GeographicalCoverage gc = (GeographicalCoverage) it.next(); String query = "update geographicalcoverage set footprint = GeomFromText('" + gc.getFootprint().toString() + "', 4326) where id = " + id + ";"; s.executeUpdate(query); Now, I want to do it directly in Hibernate: GeographicalCoverage geographicalCoverage = new GeographicalCoverage(); Polygon polygon = createPolygon(); geographicalCoverage.setFootprint(polygon); em.persist(geographicalCoverage2); and gets this error: Caused by: org.postgresql.util.PSQLException: ERROR: new row for relation "geographicalcoverage" violates check constraint "enforce_srid_footprint" Upon checking the database, I see that when using the Geometry type for 'footprint', some extra checks were created because I added the footprint column with command: select addgeometrycolumn ('geographicalcoverage','footprint','4326', 'POLYGON',2); The projection was added because we store all our polygons in this projection. After verifying the table, PGAdmin is showing next SQL code: CREATE TABLE geographicalcoverage ( id serial NOT NULL, footprint geometry, CONSTRAINT pk_geographcoverage PRIMARY KEY (id), CONSTRAINT enforce_dims_footprint CHECK (ndims(footprint) = 2), CONSTRAINT enforce_geotype_footprint CHECK (geometrytype(footprint) = 'POLYGON'::text OR footprint IS NULL), CONSTRAINT enforce_srid_footprint CHECK (srid(footprint) = 4326) ) So the problem is clearly the polygon does not fit the right projection when adding by Hibernate. Any suggestions to resolve the problem ? What is the projection when I remove the constraints ? Or when I create a column of type 'geometry' ? TIA, Jan From andresavila777 at hotmail.com Tue Nov 14 06:46:02 2006 From: andresavila777 at hotmail.com (andres avila) Date: Tue, 14 Nov 2006 10:46:02 -0400 Subject: [postgis-users] Probelm with postgis-pg81-setup-1.1.6-1 in XP In-Reply-To: <009801c707f8$c0d5cf30$975dfe0a@tomas> Message-ID: <BAY23-F1384D0D4DB01D6BBBA521084EB0@phx.gbl> An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061114/6cb856b9/attachment.html> From rrossel at airsage.com Tue Nov 14 07:58:06 2006 From: rrossel at airsage.com (Richard Rossel) Date: Tue, 14 Nov 2006 12:58:06 -0300 Subject: [postgis-users] pgsql2shp varchar convert Message-ID: <73478880611140758t9c24fe4mb26c9da555789bf6@mail.gmail.com> Hi guys, I have a problem with pgsql2shp convertion that I would like that you help me :) I have a postgres DB with data that I loaded with shp2pgsql, and then I make some transformations and added a new field call FCC as a varchar(5) and load data as: UPDATE tablename SET FCC='A31' .....; Can I do some queries and check that it is correct: Select FCC from tablename; FCC = A31 The problem is when I convert bd to shapefile using pgsql2shp the FCC data is saved with quotes that I no need, like: FCC = 'A31' How can get generate a shapefile data without these quotes? ... And other question :) How can filter fields with shp2pgsql, like "ogr2ogr -selec" does? thanks very much .- -- Richard Rossel Valparaiso - Chile From kwythers at umn.edu Tue Nov 14 12:49:22 2006 From: kwythers at umn.edu (Kirk R. Wythers) Date: Tue, 14 Nov 2006 14:49:22 -0600 Subject: [postgis-users] extending a database with another table Message-ID: <E905704F-20B8-4247-AA89-4C8DAAFCB23A@umn.edu> I am looking for suggestions on database design. I have a simple three table database that holds climate data. The first table (stations) holds station id, and geoposition information. The second table (climate) holds temp and precip information, and the third table (solar) holds solar radiation data. The column station_id acts as a foreign key to link the tables. My trouble is that I need to add a forth table (airports) that in the same manner as "stations" in that it contains a station_id number, on which data lines from "solar" and "climate" key off of. The goal here is to be able to differentiate solar data from airports and solar data from the stations. Below are the three current tables (stations, climate, and solar). Any ideas would be most appreciated. met_data=# \d stations Table "public.stations" Column | Type | Modifiers -----------------+-------------------+----------- station_id | integer | not null station_name | character varying | state | character varying | lat | double precision | lon | double precision | the_geom_lonlat | geometry | the_geom_meters | geometry | Indexes: "stations_pkey" PRIMARY KEY, btree (station_id) "stations_station_id_key" UNIQUE, btree (station_id) Check constraints: "enforce_dims_the_geom_lonlat" CHECK (ndims(the_geom_lonlat) = 2) "enforce_dims_the_geom_meters" CHECK (ndims(the_geom_meters) = 2) "enforce_geotype_the_geom_lonlat" CHECK (geometrytype (the_geom_lonlat) = 'POINT'::text OR the_geom_lonlat IS NULL) "enforce_geotype_the_geom_meters" CHECK (geometrytype (the_geom_meters) = 'POINT'::text OR the_geom_meters IS NULL) "enforce_srid_the_geom_lonlat" CHECK (srid(the_geom_lonlat) = 4269) "enforce_srid_the_geom_meters" CHECK (srid(the_geom_meters) = 32661) met_data=# \d climate Table "public.climate" Column | Type | Modifiers ------------+----------+----------- station_id | integer | year | smallint | month | smallint | day | smallint | doy | smallint | date | date | precip | real | tmin | real | tmax | real | Foreign-key constraints: "climatefk" FOREIGN KEY (station_id) REFERENCES stations (station_id) met_data=# \d solar Table "public.solar" Column | Type | Modifiers ------------+----------+----------- station_id | integer | year | smallint | month | smallint | day | smallint | doy | smallint | date | date | solar | real | Foreign-key constraints: "solarfk" FOREIGN KEY (station_id) REFERENCES stations(station_id) From robtester at gmail.com Tue Nov 14 14:24:40 2006 From: robtester at gmail.com (Rob Tester) Date: Tue, 14 Nov 2006 15:24:40 -0700 Subject: [postgis-users] Problem with overlap operator(&&) ? References: <20061114101441.3645328b@gekomachine.casa> <20061114112222.GG59852@keybit.net> Message-ID: <01e601c7083b$aee20850$7203a8c0@susa.local> I recently (with my install of 1.1.5) have run into something that is puzzling me about the overlaps operator. I have two tables that I am comparing the geometry objects using the following SQL: select overlaps(a.wkb_geometry,b.wkb_geometry),a.primaryKey,b.primaryKey from az_cr9 a,az_kz b where a.primaryKey=2203 and b.primaryKey=293546 and a.wkb_geometry&&b.wkb_geometry This returns one row: f;2203;293546 My question is how does the overlaps operator return TRUE and the overlaps function return FALSE. In fact the two geometries in question do not close to each other. Is this operator broken? This query returns no rows as expected: select overlaps(a.wkb_geometry,b.wkb_geometry),a.cr_id,b.ogc_fid,b.blockgroupid,b.blockid from az_carrierroute9 a,az_kz_calculated_test b where a.ogc_fid=2203 and b.ogc_fid=293546 and overlaps(a.wkb_geometry,b.wkb_geometry) Any help on this? Rob ----- Original Message ----- From: <strk at refractions.net> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net> Sent: Tuesday, November 14, 2006 4:22 AM Subject: Re: [postgis-users] Php interface for loading shp file into postgis > On Tue, Nov 14, 2006 at 10:14:41AM +0100, Luca Casagrande wrote: >> Hi to all! >> >> I am trying to found a good way to approach this issue: >> >> i need to build a php interface that will do those tasks: >> 1) Load a shp file selected by the user; >> 2) Check if the file has got a prj file associated with it and if not >> let the user insert the PROJ code for the current file; >> 3) Use proj to convert the file to the needed projection; >> 4) Store the file inside POSTGIS >> >> The main thing i am thinking about, is when do the projection swap: >> is it better to do BEFORE importing the data in POSTGIS or do just after >> the data has >> been inserted inside Postgis? > > There's currently no trigger checking for SRID existance added > to the geometry column, so you can add the spatial_ref_sys > entry at an arbitrary time. > Anyway, the .prj => spatial_ref_sys record conversion seems > a useful enough function to have embedded in shp2pgsql (and > the reverse in pgsql2shp) so if you intend to implement such > a feature I think it would be nice to have it implemented > in C :) > > --strk; > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From pramsey at refractions.net Tue Nov 14 19:02:12 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Tue, 14 Nov 2006 19:02:12 -0800 Subject: [postgis-users] Curves in PostGIS : Barnraising Message-ID: <D5DCF724-3AC7-4D05-AE46-A1AC92463F09@refractions.net> All, There appears to be enough latent interest in support for "curvey" objects in PostGIS, that the time has come for a barn-raising <http:// en.wikipedia.org/wiki/Barn_raising>. If you want to see curved features in PostGIS "soon" and you have $2000 or more to contribute to the process in the next four months please get in touch with me at <pramsey at refractions.net>. I will send respondents a short prospectus of what the curve project will look like. If I can bundle enough funding together, we can get this development completed in a short period of time and be up and running with Curves before April. Thanks, Paul From robtester at gmail.com Tue Nov 14 20:21:27 2006 From: robtester at gmail.com (Rob Tester) Date: Tue, 14 Nov 2006 21:21:27 -0700 Subject: [postgis-users] Problem with the overlap operator && (?) Message-ID: <f5f60fb50611142021j73ea5407y89ccb89827e6fb55@mail.gmail.com> I recently (with my install of 1.1.5) have run into something that is puzzling me about the overlaps operator. I have two tables that I am comparing the geometry objects using the following SQL: select overlaps(a.wkb_geometry,b.wkb_geometry),a.primaryKey,b.primaryKey from az_cr9 a,az_kz b where a.primaryKey=2203 and b.primaryKey=293546 and a.wkb_geometry&&b.wkb_geometry This returns one row: f;2203;293546 My question is how does the overlaps operator return TRUE and the overlaps function return FALSE. In fact the two geometries in question do not close to each other. Is this operator broken? This query returns no rows as expected: select overlaps(a.wkb_geometry,b.wkb_geometry),a.cr_id,b.ogc_fid,b.blockgroupid, b.blockid from az_carrierroute9 a,az_kz_calculated_test b where a.ogc_fid=2203 and b.ogc_fid=293546 and overlaps(a.wkb_geometry,b.wkb_geometry) Any help on this? Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061114/7a43befb/attachment.html> From gsw at globexplorer.com Tue Nov 14 20:40:07 2006 From: gsw at globexplorer.com (Gregory S. Williamson) Date: Tue, 14 Nov 2006 20:40:07 -0800 Subject: [postgis-users] Problem with the overlap operator && (?) References: <f5f60fb50611142021j73ea5407y89ccb89827e6fb55@mail.gmail.com> Message-ID: <71E37EF6B7DCC1499CEA0316A256832802B3E898@loki.wc.globexplorer.net> Rob, Without examples of the data involved, it's hard to say for sure, but offhand perhaps the && operator, which uses bounding boxes only, does find that the 2nd object's BB overlaps the first object's BB, but the stricter (and slower, non-index using, "overlaps" function) is correctly seeing that they do not really overlap. Think of a "C" shape with a much smaller circle in the open area in the middle ... or a shape that has a long diagonal, so the bounding box embraces a large are compared to the actual area of the shape. If you can reduce this to a simple case and show the geometries I am sure that smarter heads than mine could chime in. HTH Greg Williamson DBA GlobeXplorer LLC -----Original Message----- From: postgis-users-bounces at postgis.refractions.net on behalf of Rob Tester Sent: Tue 11/14/2006 8:21 PM To: postgis-users at postgis.refractions.net Cc: Subject: [postgis-users] Problem with the overlap operator && (?) I recently (with my install of 1.1.5) have run into something that is puzzling me about the overlaps operator. I have two tables that I am comparing the geometry objects using the following SQL: select overlaps(a.wkb_geometry,b.wkb_geometry),a.primaryKey,b.primaryKey from az_cr9 a,az_kz b where a.primaryKey=2203 and b.primaryKey=293546 and a.wkb_geometry&&b.wkb_geometry This returns one row: f;2203;293546 My question is how does the overlaps operator return TRUE and the overlaps function return FALSE. In fact the two geometries in question do not close to each other. Is this operator broken? This query returns no rows as expected: select overlaps(a.wkb_geometry,b.wkb_geometry),a.cr_id,b.ogc_fid,b.blockgroupid, b.blockid from az_carrierroute9 a,az_kz_calculated_test b where a.ogc_fid=2203 and b.ogc_fid=293546 and overlaps(a.wkb_geometry,b.wkb_geometry) Any help on this? Rob ------------------------------------------------------- Click link below if it is SPAM gsw at globexplorer.com "https://mailscanner.globexplorer.com/dspam/dspam.cgi?signatureID=455a9686171332117817174&user=gsw at globexplorer.com&retrain=spam&template=history&history_page=1" !DSPAM:455a9686171332117817174! ------------------------------------------------------- From pramsey at refractions.net Tue Nov 14 21:07:41 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Tue, 14 Nov 2006 21:07:41 -0800 Subject: [postgis-users] Problem with the overlap operator && (?) In-Reply-To: <71E37EF6B7DCC1499CEA0316A256832802B3E898@loki.wc.globexplorer.net> References: <f5f60fb50611142021j73ea5407y89ccb89827e6fb55@mail.gmail.com> <71E37EF6B7DCC1499CEA0316A256832802B3E898@loki.wc.globexplorer.net> Message-ID: <203EEB88-640C-431F-BFE6-B0D21C06F6E7@refractions.net> Greg is right, the issue is that Overlaps() tests geometry overlap while && tests bounding box overlap, and the two are only the same if both objects are boxes. :) But "why test bounding box overlaps???" you ask. Because that is an indexable relationship, while the strict test is not. So you use the two in combination. The && operator returns a superset of the eventual result, which you winnow using an exact function. The core trick of fast spatial database operations is to use the bounding box relation to return a superset and then filter than superset with an exact test. P. On 14-Nov-06, at 8:40 PM, Gregory S. Williamson wrote: > Rob, > > Without examples of the data involved, it's hard to say for sure, > but offhand perhaps the && operator, which uses bounding boxes > only, does find that the 2nd object's BB overlaps the first > object's BB, but the stricter (and slower, non-index using, > "overlaps" function) is correctly seeing that they do not really > overlap. Think of a "C" shape with a much smaller circle in the > open area in the middle ... or a shape that has a long diagonal, so > the bounding box embraces a large are compared to the actual area > of the shape. > > If you can reduce this to a simple case and show the geometries I > am sure that smarter heads than mine could chime in. > > HTH > > Greg Williamson > DBA > GlobeXplorer LLC > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net on behalf of > Rob Tester > Sent: Tue 11/14/2006 8:21 PM > To: postgis-users at postgis.refractions.net > Cc: > Subject: [postgis-users] Problem with the overlap operator && (?) > > I recently (with my install of 1.1.5) have run into something that is > puzzling me about the overlaps operator. I have two tables that I am > comparing the geometry objects using the following SQL: > > select overlaps > (a.wkb_geometry,b.wkb_geometry),a.primaryKey,b.primaryKey > from az_cr9 a,az_kz b where a.primaryKey=2203 and > b.primaryKey=293546 and > a.wkb_geometry&&b.wkb_geometry > > This returns one row: > > f;2203;293546 > > My question is how does the overlaps operator return TRUE and the > overlaps > function return FALSE. In fact the two geometries in question do > not close > to each other. Is this operator broken? > > This query returns no rows as expected: > > select > overlaps > (a.wkb_geometry,b.wkb_geometry),a.cr_id,b.ogc_fid,b.blockgroupid, > b.blockid > from az_carrierroute9 a,az_kz_calculated_test b where > a.ogc_fid=2203 and > b.ogc_fid=293546 and overlaps(a.wkb_geometry,b.wkb_geometry) > > > Any help on this? > > Rob > > > > ------------------------------------------------------- > Click link below if it is SPAM gsw at globexplorer.com > "https://mailscanner.globexplorer.com/dspam/dspam.cgi? > signatureID=455a9686171332117817174&user=gsw at globexplorer.com&retrain= > spam&template=history&history_page=1" > !DSPAM:455a9686171332117817174! > ------------------------------------------------------- > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From frank.koormann at intevation.de Tue Nov 14 23:55:54 2006 From: frank.koormann at intevation.de (Frank Koormann) Date: Wed, 15 Nov 2006 08:55:54 +0100 Subject: [postgis-users] Problem with overlap operator(&&) ? In-Reply-To: <01e601c7083b$aee20850$7203a8c0@susa.local> References: <20061114101441.3645328b@gekomachine.casa> <20061114112222.GG59852@keybit.net> <01e601c7083b$aee20850$7203a8c0@susa.local> Message-ID: <20061115075554.GA30633@intevation.de> * Rob Tester <robtester at gmail.com> [061114 23:26]: > I recently (with my install of 1.1.5) have run into something that is > puzzling me about the overlaps operator. I have two tables that I am > comparing the geometry objects using the following SQL: > > select overlaps(a.wkb_geometry,b.wkb_geometry),a.primaryKey,b.primaryKey > from az_cr9 a,az_kz b where a.primaryKey=2203 and b.primaryKey=293546 and > a.wkb_geometry&&b.wkb_geometry > > This returns one row: > > f;2203;293546 > > My question is how does the overlaps operator return TRUE and the overlaps > function return FALSE. In fact the two geometries in question do not close > to each other. Is this operator broken? The operator (&&) is working on the bounding boxes while the overlaps() function is working on the actual geometries. Best regards, Frank -- Frank Koormann <frank.koormann at intevation.de> Professional Service around Free Software (http://intevation.net/) FreeGIS Project (http://freegis.org/) PostGIS Support (http://intevation.net/services/gis/postgis.en.html) From strk at refractions.net Wed Nov 15 00:03:46 2006 From: strk at refractions.net (strk at refractions.net) Date: Wed, 15 Nov 2006 09:03:46 +0100 Subject: [postgis-users] pgsql2shp varchar convert In-Reply-To: <73478880611140758t9c24fe4mb26c9da555789bf6@mail.gmail.com> References: <73478880611140758t9c24fe4mb26c9da555789bf6@mail.gmail.com> Message-ID: <20061115080346.GA90510@keybit.net> On Tue, Nov 14, 2006 at 12:58:06PM -0300, Richard Rossel wrote: > Hi guys, > I have a problem with pgsql2shp convertion that I would like that you > help me :) > I have a postgres DB with data that I loaded with shp2pgsql, and then > I make some transformations and added a new field call FCC as a varchar(5) > and load data as: UPDATE tablename SET FCC='A31' .....; > Can I do some queries and check that it is correct: > Select FCC from tablename; > FCC = A31 > > The problem is when I convert bd to shapefile using pgsql2shp the FCC data > is saved with quotes that I no need, like: > FCC = 'A31' This would be a bug. Add a statemtn: printf("Value: [%s]\n", val); on line 3467 of pgsql2shp to see what's happening (1.1.5) > And other question :) > How can filter fields with shp2pgsql, like "ogr2ogr -selec" does? You can load to a temp table and then filter with SQL queries.. --strk; From naptrel at yahoo.co.uk Wed Nov 15 02:57:50 2006 From: naptrel at yahoo.co.uk (Nathaniel) Date: Wed, 15 Nov 2006 10:57:50 +0000 Subject: [postgis-users] Linking to the PostGIS library Message-ID: <174DE058-A705-4C9E-B271-0DCE85C18068@yahoo.co.uk> Dear all, I'm writing some C-functions to plug into postgres. Some of these functions need to manipulate PostGIS geometries, so I'm trying to link my code against the postgis library liblwgeom.so to make use of the postgis functions that untangle geometries (e.g. lwpoint_deserialize, lwpoint_getPointXX_p etc) Header files are included, so my code compiles cleanly, but loading the functions into postgres brings up "Symbol not found: _lwgeom_deserialize" errors as postgres tries to find symbols defined in my code and doesn't know to look in the postgis shared library to find them. I'm running macos10.4, postgres 8.1.4, postgis 1.1.6. Presently, my "build script" is taken straight out the postgres manual: cc -I/usr/local/pgsql/include/server/ -I./postgis-1.1.6/lwgeom/ - c foo.c cc -bundle -flat_namespace -undefined suppress -o libfoo.so foo.o; The -I's in the first line help the compiler find the postgres/ postgis headers respectively. What extra/different compiler/linker flags do I need to squeeze some of that postgis magic into my library? Remember it's MacOSX--it's unix Jim, but not as we know it--so although gcc compiler flags are all a bit Appleified, things may work as per linux? I'm experienced at writing C, but very inexperienced at building/linking (yes, it's a bit odd) so hopefully this is simple newbie ignorance. Please help! Nath Send instant messages to your online friends http://uk.messenger.yahoo.com From robtester at gmail.com Wed Nov 15 05:59:22 2006 From: robtester at gmail.com (Rob Tester) Date: Wed, 15 Nov 2006 06:59:22 -0700 Subject: [postgis-users] Problem with the overlap operator && (?) References: <f5f60fb50611142021j73ea5407y89ccb89827e6fb55@mail.gmail.com><71E37EF6B7DCC1499CEA0316A256832802B3E898@loki.wc.globexplorer.net> <203EEB88-640C-431F-BFE6-B0D21C06F6E7@refractions.net> Message-ID: <01fb01c708be$426b5f90$7203a8c0@susa.local> I understand that the && uses bounding boxes and I also understand why the index uses bounding boxes. This seems to be a new behavior with the data. I can tell you that spatially, they are not close. You would have to draw a bounding box for both of them that would be larger than required to get that to happen. It should also mean that this query: select overlaps(envelope(a.wkb_geometry),envelope(b.wkb_geometry)),a.cr_id,b.ogc_fid,b.blockgroupid,b.blockid from az_carrierroute9 a,az_kz_calculated_test b where a.ogc_fid=2203 and b.ogc_fid=293546 and a.wkb_geometry&&b.wkb_geometry Would return TRUE for the overlaps(geometry,geometry), but it does not. It still returns FALSE which is puzzling me. Geometry 1- MULTIPOLYGON(((-111.127256 33.284309,-111.123972 33.284791,-111.124819 33.296575,-111.117514 33.317232,-111.101362 33.326736,-111.086473 33.340807,-111.092134 33.34884,-111.08693 33.356057,-111.048166 33.318328,-111.053736 33.314172,-111.090787 33.302698,-111.087266 33.295347,-111.091988 33.292795,-111.100199 33.28848,-111.103485 33.288164,-111.103945 33.286973,-111.108114 33.286857,-111.112283 33.283821,-111.113521 33.284236,-111.113686 33.281877,-111.115918 33.281868,-111.127256 33.284309),(-111.107079 33.301021,-111.108317 33.300412,-111.107646 33.300558,-111.107079 33.301021),(-111.123411 33.286903,-111.123448 33.286839,-111.123342 33.286902,-111.123411 33.286903)),((-111.314552 33.08251,-111.31396 33.0826,-111.314319 33.082485,-111.315002 33.082063,-111.315057 33.082525,-111.314552 33.08251))) Geometry 2 - POLYGON((-111.215261 33.109331,-111.215533 33.109223,-111.215996 33.108925,-111.216132 33.108696,-111.217139 33.107871,-111.218174 33.107687,-111.218936 33.107458,-111.219344 33.10716,-111.22065 33.105418,-111.220719 33.105375,-111.221058 33.105166,-111.22133 33.105143,-111.222147 33.105739,-111.222365 33.105807,-111.222828 33.105784,-111.222991 33.105624,-111.223154 33.105097,-111.223345 33.104845,-111.225168 33.104592,-111.225794 33.10363,-111.226583 33.102392,-111.226855 33.102117,-111.228026 33.102208,-111.228597 33.102071,-111.229196 33.1023,-111.229605 33.102345,-111.230203 33.101956,-111.230965 33.100237,-111.232216 33.098472,-111.232668 33.097067,-111.232732 33.096868,-111.232868 33.096685,-111.23314 33.096547,-111.234528 33.096524,-111.236107 33.096752,-111.236498 33.096711,-111.238205 33.097541,-111.239398 33.098245,-111.239429 33.098286,-111.239892 33.098675,-111.240356 33.098883,-111.241171 33.099247,-111.241634 33.099454,-111.241964 33.099671,-111.242372 33.099939,-111.242887 33.100278,-111.243623 33.101148,-111.24414 33.101079,-111.245419 33.101239,-111.246209 33.101605,-111.247975 33.102024,-111.248414 33.102246,-111.249396 33.103047,-111.249559 33.103093,-111.250675 33.103116,-111.252036 33.103323,-111.253397 33.103873,-111.254132 33.103874,-111.255031 33.103599,-111.258733 33.103578,-111.259685 33.10367,-111.260447 33.103922,-111.261346 33.103739,-111.261645 33.103762,-111.262298 33.104015,-111.263006 33.103877,-111.269735 33.103847,-111.272425 33.103835,-111.273187 33.104087,-111.272588 33.104865,-111.272587 33.106171,-111.272423 33.107156,-111.272042 33.108485,-111.272041 33.109768,-111.271469 33.111349,-111.270842 33.112173,-111.269889 33.11286,-111.269753 33.11309,-111.269181 33.113616,-111.268473 33.114051,-111.268402 33.114066,-111.267819 33.114189,-111.267356 33.114532,-111.265559 33.116135,-111.264987 33.117029,-111.264034 33.117761,-111.263189 33.118815,-111.262863 33.119113,-111.261501 33.119502,-111.26082 33.119983,-111.260302 33.120647,-111.260193 33.121105,-111.259239 33.122663,-111.258966 33.123831,-111.258122 33.12506,-111.257521 33.125771,-111.25635 33.12687,-111.255178 33.128313,-111.254824 33.129023,-111.254497 33.129298,-111.254061 33.129481,-111.253816 33.129756,-111.253625 33.130237,-111.253107 33.130672,-111.252889 33.131497,-111.252098 33.133169,-111.251362 33.134016,-111.251226 33.134497,-111.251078 33.134726,-111.250676 33.135345,-111.250315 33.135894,-111.250192 33.136215,-111.249965 33.136834,-111.249747 33.137705,-111.249339 33.138346,-111.249204 33.139309,-111.248959 33.13979,-111.248549 33.14015,-111.243156 33.140447,-111.218147 33.141826,-111.217681 33.148859,-111.217254 33.155306,-111.217102 33.155449,-111.216421 33.156412,-111.216176 33.157076,-111.215959 33.157282,-111.215628 33.157381,-111.215033 33.157558,-111.214951 33.157649,-111.214951 33.157855,-111.215523 33.158405,-111.215496 33.158634,-111.214979 33.159139,-111.214924 33.160055,-111.214625 33.160536,-111.214298 33.160788,-111.214298 33.161155,-111.214625 33.16143,-111.214653 33.161911,-111.215198 33.162323,-111.215089 33.162896,-111.213999 33.163836,-111.214 33.164065,-111.214136 33.164156,-111.214136 33.16434,-111.213972 33.164546,-111.213973 33.165187,-111.213591 33.165554,-111.213019 33.165806,-111.212584 33.166173,-111.212066 33.16725,-111.212121 33.167594,-111.212257 33.167731,-111.21223 33.168029,-111.211359 33.169381,-111.211277 33.169747,-111.211141 33.169931,-111.210732 33.170114,-111.209779 33.170229,-111.206728 33.170184,-111.206156 33.170069,-111.20542 33.169725,-111.204466 33.169451,-111.203431 33.168649,-111.202859 33.168466,-111.201742 33.168305,-111.201664 33.16823,-111.201551 33.168122,-111.201442 33.167778,-111.20117 33.167504,-111.20117 33.167252,-111.201742 33.166908,-111.201933 33.166541,-111.20196 33.165968,-111.202286 33.165327,-111.202668 33.165121,-111.203431 33.165029,-111.203757 33.164823,-111.203866 33.164639,-111.203866 33.163998,-111.203703 33.1637,-111.202122 33.161959,-111.202121 33.161317,-111.202584 33.160767,-111.202557 33.160011,-111.202938 33.159461,-111.203265 33.158476,-111.203837 33.158155,-111.203918 33.157514,-111.20381 33.157353,-111.202856 33.157078,-111.202556 33.156872,-111.202202 33.156093,-111.202175 33.155727,-111.202311 33.155406,-111.202311 33.155062,-111.201984 33.154627,-111.201984 33.154375,-111.202066 33.154329,-111.202175 33.153871,-111.201575 33.153413,-111.201548 33.153161,-111.202174 33.152611,-111.202256 33.15158,-111.202174 33.15119,-111.201411 33.150091,-111.201302 33.149793,-111.201453 33.149617,-111.201793 33.14922,-111.202119 33.148395,-111.202691 33.147502,-111.202909 33.146907,-111.203018 33.146815,-111.203002 33.146677,-111.202991 33.146586,-111.203317 33.146059,-111.203399 33.145761,-111.203181 33.145646,-111.203045 33.145417,-111.202881 33.14528,-111.202146 33.145097,-111.201928 33.14489,-111.201819 33.144272,-111.201574 33.143607,-111.201547 33.142806,-111.2019 33.142301,-111.202173 33.141568,-111.202608 33.141454,-111.203208 33.141591,-111.203398 33.141385,-111.204542 33.141224,-111.204569 33.140926,-111.20416 33.140216,-111.204051 33.13985,-111.204133 33.139368,-111.204296 33.139048,-111.204296 33.13875,-111.20367 33.138292,-111.203697 33.137627,-111.204105 33.137238,-111.204242 33.136917,-111.204214 33.136367,-111.203615 33.136,-111.203343 33.135726,-111.20307 33.134626,-111.202579 33.13403,-111.202579 33.133959,-111.202579 33.133801,-111.20296 33.133297,-111.203123 33.132907,-111.203151 33.132541,-111.203069 33.132312,-111.202415 33.131762,-111.202415 33.131258,-111.203232 33.130822,-111.204648 33.130799,-111.205465 33.130639,-111.207153 33.129653,-111.207588 33.12892,-111.207779 33.128828,-111.208133 33.128439,-111.208296 33.128095,-111.208677 33.127637,-111.208732 33.127087,-111.208514 33.126606,-111.208541 33.125919,-111.208677 33.125407,-111.208685 33.12506,-111.20914 33.124093,-111.209275 33.122283,-111.209629 33.121046,-111.210037 33.120564,-111.21001 33.119923,-111.209683 33.11935,-111.209683 33.118709,-111.209955 33.117862,-111.210063 33.1158,-111.210254 33.114837,-111.210444 33.114379,-111.211043 33.11376,-111.211505 33.112798,-111.211914 33.112156,-111.212703 33.111331,-111.213138 33.11069,-111.21371 33.110346,-111.21385 33.110231,-111.214662 33.109567,-111.215261 33.109331),(-111.213018 33.162415,-111.212773 33.162507,-111.212637 33.162782,-111.212719 33.163057,-111.213237 33.163469,-111.213373 33.1634,-111.213128 33.163057,-111.213209 33.162851,-111.213454 33.162873,-111.214054 33.163194,-111.214381 33.163148,-111.214517 33.163034,-111.214489 33.162667,-111.214108 33.162507,-111.213018 33.162415)) ----- Original Message ----- From: "Paul Ramsey" <pramsey at refractions.net> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net> Sent: Tuesday, November 14, 2006 10:07 PM Subject: Re: [postgis-users] Problem with the overlap operator && (?) > Greg is right, the issue is that Overlaps() tests geometry overlap while > && tests bounding box overlap, and the two are only the same if both > objects are boxes. :) > > But "why test bounding box overlaps???" you ask. Because that is an > indexable relationship, while the strict test is not. So you use the two > in combination. The && operator returns a superset of the eventual > result, which you winnow using an exact function. > > The core trick of fast spatial database operations is to use the bounding > box relation to return a superset and then filter than superset with an > exact test. > > P. > > On 14-Nov-06, at 8:40 PM, Gregory S. Williamson wrote: > >> Rob, >> >> Without examples of the data involved, it's hard to say for sure, but >> offhand perhaps the && operator, which uses bounding boxes only, does >> find that the 2nd object's BB overlaps the first object's BB, but the >> stricter (and slower, non-index using, "overlaps" function) is correctly >> seeing that they do not really overlap. Think of a "C" shape with a much >> smaller circle in the open area in the middle ... or a shape that has a >> long diagonal, so the bounding box embraces a large are compared to the >> actual area of the shape. >> >> If you can reduce this to a simple case and show the geometries I am >> sure that smarter heads than mine could chime in. >> >> HTH >> >> Greg Williamson >> DBA >> GlobeXplorer LLC >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net on behalf of Rob >> Tester >> Sent: Tue 11/14/2006 8:21 PM >> To: postgis-users at postgis.refractions.net >> Cc: Subject: [postgis-users] Problem with the overlap operator && (?) >> >> I recently (with my install of 1.1.5) have run into something that is >> puzzling me about the overlaps operator. I have two tables that I am >> comparing the geometry objects using the following SQL: >> >> select overlaps (a.wkb_geometry,b.wkb_geometry),a.primaryKey,b.primaryKey >> from az_cr9 a,az_kz b where a.primaryKey=2203 and b.primaryKey=293546 >> and >> a.wkb_geometry&&b.wkb_geometry >> >> This returns one row: >> >> f;2203;293546 >> >> My question is how does the overlaps operator return TRUE and the >> overlaps >> function return FALSE. In fact the two geometries in question do not >> close >> to each other. Is this operator broken? >> >> This query returns no rows as expected: >> >> select >> overlaps >> (a.wkb_geometry,b.wkb_geometry),a.cr_id,b.ogc_fid,b.blockgroupid, >> b.blockid >> from az_carrierroute9 a,az_kz_calculated_test b where a.ogc_fid=2203 and >> b.ogc_fid=293546 and overlaps(a.wkb_geometry,b.wkb_geometry) >> >> >> Any help on this? >> >> Rob >> >> >> >> ------------------------------------------------------- >> Click link below if it is SPAM gsw at globexplorer.com >> "https://mailscanner.globexplorer.com/dspam/dspam.cgi? >> signatureID=455a9686171332117817174&user=gsw at globexplorer.com&retrain= >> spam&template=history&history_page=1" >> !DSPAM:455a9686171332117817174! >> ------------------------------------------------------- >> >> >> >> _______________________________________________ >> 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 jan.syryn at trasys.be Wed Nov 15 06:01:01 2006 From: jan.syryn at trasys.be (Jan Syryn) Date: Wed, 15 Nov 2006 15:01:01 +0100 Subject: [postgis-users] extending a database with another table In-Reply-To: <E905704F-20B8-4247-AA89-4C8DAAFCB23A@umn.edu> Message-ID: <029d01c708be$7ca40180$0601a8c0@ariane.tractebel.be> Your question has nothing to do with PostGis problems, but is merely a general DB design problem. But because we are all nice guysz all together: Don't add a table 'airports'. Just extend station with a column stationtype_id(char 1) that points (fk) to another table 'stationtype'. Stationtype with id(char1) and stationtype_name(varchar(20)) Fill it with ('S' ; 'Station') and ('A', 'Airport') Problem solved. You want solar and climate for airports: SELECT climate.*, solar.* FROM climate,solar,station WHERE climate.station_id = station.station_id AND solar.station_id = station.station_id AND station.stationtype_id='A' Replace 'A' by 'S' for stations. -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Kirk R. Wythers Sent: mardi 14 novembre 2006 21:49 To: PostGIS Discussion Users Subject: [postgis-users] extending a database with another table I am looking for suggestions on database design. I have a simple three table database that holds climate data. The first table (stations) holds station id, and geoposition information. The second table (climate) holds temp and precip information, and the third table (solar) holds solar radiation data. The column station_id acts as a foreign key to link the tables. My trouble is that I need to add a forth table (airports) that in the same manner as "stations" in that it contains a station_id number, on which data lines from "solar" and "climate" key off of. The goal here is to be able to differentiate solar data from airports and solar data from the stations. Below are the three current tables (stations, climate, and solar). Any ideas would be most appreciated. met_data=# \d stations Table "public.stations" Column | Type | Modifiers -----------------+-------------------+----------- station_id | integer | not null station_name | character varying | state | character varying | lat | double precision | lon | double precision | the_geom_lonlat | geometry | the_geom_meters | geometry | Indexes: "stations_pkey" PRIMARY KEY, btree (station_id) "stations_station_id_key" UNIQUE, btree (station_id) Check constraints: "enforce_dims_the_geom_lonlat" CHECK (ndims(the_geom_lonlat) = 2) "enforce_dims_the_geom_meters" CHECK (ndims(the_geom_meters) = 2) "enforce_geotype_the_geom_lonlat" CHECK (geometrytype (the_geom_lonlat) = 'POINT'::text OR the_geom_lonlat IS NULL) "enforce_geotype_the_geom_meters" CHECK (geometrytype (the_geom_meters) = 'POINT'::text OR the_geom_meters IS NULL) "enforce_srid_the_geom_lonlat" CHECK (srid(the_geom_lonlat) = 4269) "enforce_srid_the_geom_meters" CHECK (srid(the_geom_meters) = 32661) met_data=# \d climate Table "public.climate" Column | Type | Modifiers ------------+----------+----------- station_id | integer | year | smallint | month | smallint | day | smallint | doy | smallint | date | date | precip | real | tmin | real | tmax | real | Foreign-key constraints: "climatefk" FOREIGN KEY (station_id) REFERENCES stations (station_id) met_data=# \d solar Table "public.solar" Column | Type | Modifiers ------------+----------+----------- station_id | integer | year | smallint | month | smallint | day | smallint | doy | smallint | date | date | solar | real | Foreign-key constraints: "solarfk" FOREIGN KEY (station_id) REFERENCES stations(station_id) _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From gribas at cpqd.com.br Wed Nov 15 07:22:36 2006 From: gribas at cpqd.com.br (Gustavo Henrique Sberze Ribas) Date: Wed, 15 Nov 2006 13:22:36 -0200 Subject: RES: [postgis-users] Problem with the overlap operator && (?) Message-ID: <E6F2049DCBE10840B22DC64587E6F3EC8D5C49@MAILSRV1.aquarius.cpqd.com.br> Hi, > I can tell you that spatially, they are not close. You would > have to draw a > bounding box for both of them that would be larger than > required to get that > to happen. Check your data, the bounding boxes do overlap (see attachment). -- Gustavo -------------- next part -------------- A non-text attachment was scrubbed... Name: poly.GIF Type: image/gif Size: 3686 bytes Desc: poly.GIF URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061115/091638ca/attachment.gif> From mbdavis at refractions.net Wed Nov 15 08:45:35 2006 From: mbdavis at refractions.net (Martin Davis) Date: Wed, 15 Nov 2006 08:45:35 -0800 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom ofpostgresql In-Reply-To: <C5EF97E5-E33A-446E-9015-094FA81C3BC5@refractions.net> References: <C482FF98AE985A47B8C982FD429C9E34FEF976@daytonmsg2k3.AERO.BALL.COM> <C5EF97E5-E33A-446E-9015-094FA81C3BC5@refractions.net> Message-ID: <455B442F.2010901@refractions.net> Yep, that's exactly what it is - just the binary format used for a geometry object in Shapefiles. Paul Ramsey wrote: > My understanding it that it is just a Shape record, but if it's not, > it is probably nothing more complex than a differenced version of the > same thing. (using the first coordinate, create all the rest of the > coordinates as offsets from the first). In any event, the answer is > available in OGR, since Frank has already figured out the details and > provides read support for geodatabase on platforms that support ODBC. > > P > > On 13-Nov-06, at 5:34 AM, Clay, Bruce wrote: > >> Does anyone have the data format for the blob? >> >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of P >> Kishor >> Sent: Monday, November 13, 2006 7:43 AM >> To: PostGIS Users Discussion >> Subject: Re: [postgis-users] HELP! Ms-Access shape data to the_geom >> ofpostgresql >> >> coordinate data in Access (equivalent to the geom in PostGIS) is >> stored as a blob. >> >> On 11/13/06, Marc Angelo <computrain at paradise.net.nz> wrote: >>> I can't give you a full answer but I can tell you why (I think) the >> "data >>> conversion" is failing (somebody please correct me if I am wrong). I >> think >>> you will find that the co-ordinate data in Access is a "double" or >> "single" >>> data type as Access does not have a "geometry" data type like in >> Postgres. >>> When you use the PostGres ODBC connector you are just transferring the >> data >>> from one database to another so Postgres is just placing the data in >> the >>> fields in the nearest data type that is equivalant to the Acces data >> type. >>> >>> If the data needs only to be transferred once (not on a regular basis) >> from >>> Access you could import the data by writing a small routine in C++.Net >> or >>> VB.Net. I wrote a small app a while ago that imported geometry data >> into >>> Postgres. >>> I connected to PostGres using NPGSQL data connector. All my data was >> in csv >>> fomat inside a text file. The routine opened the csv file and then >> imported >>> each record into Postgres by using an SQL insert statement combined >> with the >>> GeometryFromText() function which converts text coordinates into a >> geometry >>> data type in Postgres. >>> Having said that I am not competent with SQL so I suspect that you >> could >>> write an SQL statement within Postgres to import and convert data that >>> resides in a csv file.....this would mean exporting your data from >> Access >>> into a .txt or csv file. >>> >>> Hope this gives you at least some help. >>> >>> Cheers >>> Marc >>> >>> >>> ----- Original Message ----- >>> From: "Hendra Yana" <Hendra at lskk.ee.itb.ac.id> >>> To: <postgis-users at postgis.refractions.net> >>> Sent: Monday, November 13, 2006 9:00 PM >>> Subject: [postgis-users] HELP! Ms-Access shape data to the_geom of >>> postgresql >>> >>> >>>> Help.... >>>> >>>> I've been trying to convert database from Ms-Access shape data to >> the_geom >>>> for postgresql. >>>> >>>> I try to export from MS-Access to postgresql with PGSQL-ODBC >> connection, >>>> but the result in postgresql still not result as the_geom field but >> still >>>> the shape data in fields. >>>> >>>> Can anyone tell me how to Convert database from Ms-Access shape data >> to >>>> the_geom for postgresql??? >>>> >>>> thanks for reply.... >>>> >>>> >>>> _______________________________________________ >>>> postgis-users mailing list >>>> postgis-users at postgis.refractions.net >>>> http://postgis.refractions.net/mailman/listinfo/postgis-users >>>> >>>> >>>> >>>> -- >>>> No virus found in this incoming message. >>>> Checked by AVG Free Edition. >>>> Version: 7.1.409 / Virus Database: 268.14.3/531 - Release Date: >> 12/11/2006 >>>> >>>> >>> >>> _______________________________________________ >>> postgis-users mailing list >>> postgis-users at postgis.refractions.net >>> http://postgis.refractions.net/mailman/listinfo/postgis-users >>> >> >> >> --Puneet Kishor http://punkish.eidesis.org/ >> Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ >> Open Source Geospatial Foundation https://edu.osgeo.org/ >> ------------------------------------------------------------------------ >> ------------------------------- >> collaborate, communicate, compete >> ==================================================== >> _______________________________________________ >> 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 > -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 From hi_ono2001 at ybb.ne.jp Wed Nov 15 12:58:53 2006 From: hi_ono2001 at ybb.ne.jp (Hisaji ONO) Date: Thu, 16 Nov 2006 05:58:53 +0900 (JST) Subject: [postgis-users] HELP! Ms-Access shape data to the_geom ofpostgresql In-Reply-To: <455B442F.2010901@refractions.net> Message-ID: <20061115205853.90316.qmail@web10708.mail.bbt.yahoo.co.jp> Hello. How about spatial indexes? Regards. --- Martin Davis <mbdavis at refractions.net> wrote: > Yep, that's exactly what it is - just the binary > format used for a > geometry object in Shapefiles. > > Paul Ramsey wrote: > > My understanding it that it is just a Shape > record, but if it's not, > > it is probably nothing more complex than a > differenced version of the > > same thing. (using the first coordinate, create > all the rest of the > > coordinates as offsets from the first). In any > event, the answer is > > available in OGR, since Frank has already figured > out the details and > > provides read support for geodatabase on platforms > that support ODBC. > > > > P > > > > On 13-Nov-06, at 5:34 AM, Clay, Bruce wrote: > > > >> Does anyone have the data format for the blob? > >> > >> > >> -----Original Message----- > >> From: > postgis-users-bounces at postgis.refractions.net > >> > [mailto:postgis-users-bounces at postgis.refractions.net] > On Behalf Of P > >> Kishor > >> Sent: Monday, November 13, 2006 7:43 AM > >> To: PostGIS Users Discussion > >> Subject: Re: [postgis-users] HELP! Ms-Access > shape data to the_geom > >> ofpostgresql > >> > >> coordinate data in Access (equivalent to the geom > in PostGIS) is > >> stored as a blob. > >> > >> On 11/13/06, Marc Angelo > <computrain at paradise.net.nz> wrote: > >>> I can't give you a full answer but I can tell > you why (I think) the > >> "data > >>> conversion" is failing (somebody please correct > me if I am wrong). I > >> think > >>> you will find that the co-ordinate data in > Access is a "double" or > >> "single" > >>> data type as Access does not have a "geometry" > data type like in > >> Postgres. > >>> When you use the PostGres ODBC connector you are > just transferring the > >> data > >>> from one database to another so Postgres is just > placing the data in > >> the > >>> fields in the nearest data type that is > equivalant to the Acces data > >> type. > >>> > >>> If the data needs only to be transferred once > (not on a regular basis) > >> from > >>> Access you could import the data by writing a > small routine in C++.Net > >> or > >>> VB.Net. I wrote a small app a while ago that > imported geometry data > >> into > >>> Postgres. > >>> I connected to PostGres using NPGSQL data > connector. All my data was > >> in csv > >>> fomat inside a text file. The routine opened the > csv file and then > >> imported > >>> each record into Postgres by using an SQL insert > statement combined > >> with the > >>> GeometryFromText() function which converts text > coordinates into a > >> geometry > >>> data type in Postgres. > >>> Having said that I am not competent with SQL so > I suspect that you > >> could > >>> write an SQL statement within Postgres to import > and convert data that > >>> resides in a csv file.....this would mean > exporting your data from > >> Access > >>> into a .txt or csv file. > >>> > >>> Hope this gives you at least some help. > >>> > >>> Cheers > >>> Marc > >>> > >>> > >>> ----- Original Message ----- > >>> From: "Hendra Yana" <Hendra at lskk.ee.itb.ac.id> > >>> To: <postgis-users at postgis.refractions.net> > >>> Sent: Monday, November 13, 2006 9:00 PM > >>> Subject: [postgis-users] HELP! Ms-Access shape > data to the_geom of > >>> postgresql > >>> > >>> > >>>> Help.... > >>>> > >>>> I've been trying to convert database from > Ms-Access shape data to > >> the_geom > >>>> for postgresql. > >>>> > >>>> I try to export from MS-Access to postgresql > with PGSQL-ODBC > >> connection, > >>>> but the result in postgresql still not result > as the_geom field but > >> still > >>>> the shape data in fields. > >>>> > >>>> Can anyone tell me how to Convert database from > Ms-Access shape data > >> to > >>>> the_geom for postgresql??? > >>>> > >>>> thanks for reply.... > >>>> > >>>> > >>>> _______________________________________________ > >>>> postgis-users mailing list > >>>> postgis-users at postgis.refractions.net > >>>> > http://postgis.refractions.net/mailman/listinfo/postgis-users > >>>> > >>>> > >>>> > >>>> -- > >>>> No virus found in this incoming message. > >>>> Checked by AVG Free Edition. > >>>> Version: 7.1.409 / Virus Database: 268.14.3/531 > - Release Date: > >> 12/11/2006 > >>>> > >>>> > >>> > >>> _______________________________________________ > >>> postgis-users mailing list > >>> postgis-users at postgis.refractions.net > >>> > http://postgis.refractions.net/mailman/listinfo/postgis-users > >>> > >> > >> > >> --Puneet Kishor http://punkish.eidesis.org/ > >> Nelson Inst. for Env. Studies, UW-Madison > http://www.nelson.wisc.edu/ > >> Open Source Geospatial Foundation > https://edu.osgeo.org/ > >> > ------------------------------------------------------------------------ > >> ------------------------------- > >> collaborate, communicate, compete > >> > ==================================================== > >> _______________________________________________ > >> 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 > > > > -- > Martin Davis > Senior Technical Architect > Refractions Research, Inc. > (250) 383-3022 > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > === ???????????????? === From tzuberbuehler at datacomm.ch Wed Nov 15 13:10:49 2006 From: tzuberbuehler at datacomm.ch (Thomas Zuberbuehler) Date: Wed, 15 Nov 2006 22:10:49 +0100 Subject: [postgis-users] Converting From MULTILINESTRINGM to MULTILINESTRING Message-ID: <e545098a0611151310u1b840fado915cfab0934e8edc@mail.gmail.com> Hi Bert, You have written a half year ago in the postgis mailinglist: > Hi All, > > I have been struggling with some dirty data from arcview, specifically a lot > of the shapefiles had a thrid dimension, but it conntained no useful data. I > am using this data with geoserver and it doesn't like multilinestringm > types. How would I go about stripping out the third dimension. is there a > way to do it in postgis or do I have to export all the geometries as text > and grep them? > > Thanks, > > Bert I have the exact similar problem. How did you found a solution? The force_2d operation, which is in the mailinglist suggested, functioned unfortunately not. Thank you. Regards, Thomas -- Thomas Zuberbuehler http://www.zubi.li From pramsey at refractions.net Wed Nov 15 13:11:55 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Wed, 15 Nov 2006 13:11:55 -0800 Subject: [postgis-users] HELP! Ms-Access shape data to the_geom ofpostgresql In-Reply-To: <20061115205853.90316.qmail@web10708.mail.bbt.yahoo.co.jp> References: <20061115205853.90316.qmail@web10708.mail.bbt.yahoo.co.jp> Message-ID: <E1BCB202-0AC6-492C-9962-3625409B7BED@refractions.net> In the file itself? I understand they use a multi-level gridding system. Probably you could figure it out by examining the f_* tables carefully. P On 15-Nov-06, at 12:58 PM, Hisaji ONO wrote: > Hello. > > > How about spatial indexes? > > > Regards. > > --- Martin Davis <mbdavis at refractions.net> wrote: > >> Yep, that's exactly what it is - just the binary >> format used for a >> geometry object in Shapefiles. >> >> Paul Ramsey wrote: >>> My understanding it that it is just a Shape >> record, but if it's not, >>> it is probably nothing more complex than a >> differenced version of the >>> same thing. (using the first coordinate, create >> all the rest of the >>> coordinates as offsets from the first). In any >> event, the answer is >>> available in OGR, since Frank has already figured >> out the details and >>> provides read support for geodatabase on platforms >> that support ODBC. >>> >>> P >>> >>> On 13-Nov-06, at 5:34 AM, Clay, Bruce wrote: >>> >>>> Does anyone have the data format for the blob? >>>> >>>> >>>> -----Original Message----- >>>> From: >> postgis-users-bounces at postgis.refractions.net >>>> >> [mailto:postgis-users-bounces at postgis.refractions.net] >> On Behalf Of P >>>> Kishor >>>> Sent: Monday, November 13, 2006 7:43 AM >>>> To: PostGIS Users Discussion >>>> Subject: Re: [postgis-users] HELP! Ms-Access >> shape data to the_geom >>>> ofpostgresql >>>> >>>> coordinate data in Access (equivalent to the geom >> in PostGIS) is >>>> stored as a blob. >>>> >>>> On 11/13/06, Marc Angelo >> <computrain at paradise.net.nz> wrote: >>>>> I can't give you a full answer but I can tell >> you why (I think) the >>>> "data >>>>> conversion" is failing (somebody please correct >> me if I am wrong). I >>>> think >>>>> you will find that the co-ordinate data in >> Access is a "double" or >>>> "single" >>>>> data type as Access does not have a "geometry" >> data type like in >>>> Postgres. >>>>> When you use the PostGres ODBC connector you are >> just transferring the >>>> data >>>>> from one database to another so Postgres is just >> placing the data in >>>> the >>>>> fields in the nearest data type that is >> equivalant to the Acces data >>>> type. >>>>> >>>>> If the data needs only to be transferred once >> (not on a regular basis) >>>> from >>>>> Access you could import the data by writing a >> small routine in C++.Net >>>> or >>>>> VB.Net. I wrote a small app a while ago that >> imported geometry data >>>> into >>>>> Postgres. >>>>> I connected to PostGres using NPGSQL data >> connector. All my data was >>>> in csv >>>>> fomat inside a text file. The routine opened the >> csv file and then >>>> imported >>>>> each record into Postgres by using an SQL insert >> statement combined >>>> with the >>>>> GeometryFromText() function which converts text >> coordinates into a >>>> geometry >>>>> data type in Postgres. >>>>> Having said that I am not competent with SQL so >> I suspect that you >>>> could >>>>> write an SQL statement within Postgres to import >> and convert data that >>>>> resides in a csv file.....this would mean >> exporting your data from >>>> Access >>>>> into a .txt or csv file. >>>>> >>>>> Hope this gives you at least some help. >>>>> >>>>> Cheers >>>>> Marc >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: "Hendra Yana" <Hendra at lskk.ee.itb.ac.id> >>>>> To: <postgis-users at postgis.refractions.net> >>>>> Sent: Monday, November 13, 2006 9:00 PM >>>>> Subject: [postgis-users] HELP! Ms-Access shape >> data to the_geom of >>>>> postgresql >>>>> >>>>> >>>>>> Help.... >>>>>> >>>>>> I've been trying to convert database from >> Ms-Access shape data to >>>> the_geom >>>>>> for postgresql. >>>>>> >>>>>> I try to export from MS-Access to postgresql >> with PGSQL-ODBC >>>> connection, >>>>>> but the result in postgresql still not result >> as the_geom field but >>>> still >>>>>> the shape data in fields. >>>>>> >>>>>> Can anyone tell me how to Convert database from >> Ms-Access shape data >>>> to >>>>>> the_geom for postgresql??? >>>>>> >>>>>> thanks for reply.... >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> postgis-users mailing list >>>>>> postgis-users at postgis.refractions.net >>>>>> >> > http://postgis.refractions.net/mailman/listinfo/postgis-users >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> No virus found in this incoming message. >>>>>> Checked by AVG Free Edition. >>>>>> Version: 7.1.409 / Virus Database: 268.14.3/531 >> - Release Date: >>>> 12/11/2006 >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> postgis-users mailing list >>>>> postgis-users at postgis.refractions.net >>>>> >> > http://postgis.refractions.net/mailman/listinfo/postgis-users >>>>> >>>> >>>> >>>> --Puneet Kishor http://punkish.eidesis.org/ >>>> Nelson Inst. for Env. Studies, UW-Madison >> http://www.nelson.wisc.edu/ >>>> Open Source Geospatial Foundation >> https://edu.osgeo.org/ >>>> >> > ---------------------------------------------------------------------- > -- >>>> ------------------------------- >>>> collaborate, communicate, compete >>>> >> ==================================================== >>>> _______________________________________________ >>>> 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 >>> >> >> -- >> Martin Davis >> Senior Technical Architect >> Refractions Research, Inc. >> (250) 383-3022 >> >> _______________________________________________ >> 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 Wed Nov 15 13:30:10 2006 From: strk at refractions.net (strk at refractions.net) Date: Wed, 15 Nov 2006 22:30:10 +0100 Subject: [postgis-users] Converting From MULTILINESTRINGM to MULTILINESTRING In-Reply-To: <e545098a0611151310u1b840fado915cfab0934e8edc@mail.gmail.com> References: <e545098a0611151310u1b840fado915cfab0934e8edc@mail.gmail.com> Message-ID: <20061115213010.GS92629@keybit.net> On Wed, Nov 15, 2006 at 10:10:49PM +0100, Thomas Zuberbuehler wrote: > I have the exact similar problem. How did you found a solution? The > force_2d operation, which is in the mailinglist suggested, functioned > unfortunately not. Do you have a testcase to support this statement ? I'd add to the regress tests if so. --strk; From tzuberbuehler at datacomm.ch Wed Nov 15 13:48:18 2006 From: tzuberbuehler at datacomm.ch (Thomas Zuberbuehler) Date: Wed, 15 Nov 2006 22:48:18 +0100 Subject: [postgis-users] Converting From MULTILINESTRINGM to MULTILINESTRING In-Reply-To: <20061115213010.GS92629@keybit.net> References: <e545098a0611151310u1b840fado915cfab0934e8edc@mail.gmail.com> <20061115213010.GS92629@keybit.net> Message-ID: <e545098a0611151348s6b022f42w32ea83ad80ad8a18@mail.gmail.com> Hi Craig Hi Strk Unfortunately this are data from a government authority, that I receive for my thesis (diploma) at the university. Sorry, I became gladly, but it's not legal in this case. I hope you have understanding. I've got a error like this: ERROR: new row for relation "routes" violates check constraint "enforce_geotype_the_geom" I found some solution in the meantime: select AddGeometryColumn('','routes','the_geom2','21781','MULTILINESTRING', 2); update routes set the_geom2 = force_2d(the_geom); alter table routes drop column the_geom; Thank you. Regards, Thomas 2006/11/15, strk at refractions.net <strk at refractions.net>: > On Wed, Nov 15, 2006 at 10:10:49PM +0100, Thomas Zuberbuehler wrote: > > > I have the exact similar problem. How did you found a solution? The > > force_2d operation, which is in the mailinglist suggested, functioned > > unfortunately not. > > Do you have a testcase to support this statement ? > I'd add to the regress tests if so. > > --strk; > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Thomas Zuberbuehler http://www.zubi.li From edylan at google.com Wed Nov 15 14:43:00 2006 From: edylan at google.com (Dylan Lorimer) Date: Wed, 15 Nov 2006 14:43:00 -0800 Subject: [postgis-users] POLYGON from MULTIPOLYGON Message-ID: <3ddac38d0611151443y63336c57nd814279414db7b9d@mail.gmail.com> Hi, I loaded a shapefile of country boundaries into PostGIS using the shp2pgsql loader. I see that the resulting geometry is a multipolygon. I need it as a polygon, and considering there is only a single outer ring, this shouldn't be a problem. But 'Polygonize' is returning a GeometryCollection, rather than Polygon. Any ideas? gnis2=# select GeometryType(Polygonize(the_geom)) from gnis_country_view where country_name='Canada'; geometrytype -------------------- GEOMETRYCOLLECTION (1 row) Cheers, -dylan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061115/8368fcaf/attachment.html> From edylan at google.com Wed Nov 15 14:57:21 2006 From: edylan at google.com (Dylan Lorimer) Date: Wed, 15 Nov 2006 14:57:21 -0800 Subject: [postgis-users] Re: POLYGON from MULTIPOLYGON In-Reply-To: <3ddac38d0611151443y63336c57nd814279414db7b9d@mail.gmail.com> References: <3ddac38d0611151443y63336c57nd814279414db7b9d@mail.gmail.com> Message-ID: <3ddac38d0611151457g3f51c6a5o11d360e04e108901@mail.gmail.com> Well, I realize 'Polygonize' isn't the right function, but I'm still stuck figuring out which is correct. Any ideas? Cheers, dylan On 11/15/06, Dylan Lorimer <edylan at google.com> wrote: > > Hi, > > I loaded a shapefile of country boundaries into PostGIS using the > shp2pgsql loader. I see that the resulting geometry is a multipolygon. I > need it as a polygon, and considering there is only a single outer ring, > this shouldn't be a problem. But 'Polygonize' is returning a > GeometryCollection, rather than Polygon. Any ideas? > > gnis2=# select GeometryType(Polygonize(the_geom)) from gnis_country_view > where country_name='Canada'; > geometrytype > -------------------- > GEOMETRYCOLLECTION > (1 row) > > Cheers, > -dylan > -- E. Dylan Lorimer | Google Earth Enterprise 650.253.2459 (O) | 650.862.6810 (M) | 650.644.0182 (F) -------------------------------------------------------------------------------- Earth Enterprise Support: fusion at google.com | 866.4GO.OGLE ext. 4 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061115/94a6e533/attachment.html> From erics at ameri-title.com Wed Nov 15 15:09:06 2006 From: erics at ameri-title.com (Eric Shuman) Date: Wed, 15 Nov 2006 15:09:06 -0800 Subject: [postgis-users] Spatial Join Performance Message-ID: <KMEIKNPGBOLILGCIHBLCGEBACBAA.erics@ameri-title.com> Hi list, I'm a bit new doing PostGIS queries and have some questions on optimizing the speed of spatial joins. Scenario: I have a tax lot polygon layer that I want to find out what zones it falls into. There are about 100,000 tax lot shapes and 1000 zones. SELECT DISTINCT ON (taxlot,zone_) taxlot,zone_ FROM taxlot,zoning WHERE taxlot != '' AND taxlot.the_geom && zoning.the_geom AND contains(zoning.the_geom,centroid(taxlot.the_geom)) ; I have created GIST indexes on both the zoning and taxlot tables and when I run the query with EXPLAIN I get results suggesting the use of indexes. ... Index Scan using taxlot_geom_index on taxlot (cost=0.00..6.02 rows=1 width=64) Index Cond: (taxlot.the_geom && "outer".the_geom)" I have been able to get a similar query to run on smaller data sets, but so far I have tried to run this one for over 2 hours with out it completing... Am I approaching this correctly or is there something I am missing that would speed up the query?? Thanks for the help!! --------------- Eric Shuman From pramsey at refractions.net Wed Nov 15 17:45:11 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Wed, 15 Nov 2006 17:45:11 -0800 Subject: [postgis-users] Re: POLYGON from MULTIPOLYGON In-Reply-To: <3ddac38d0611151457g3f51c6a5o11d360e04e108901@mail.gmail.com> References: <3ddac38d0611151443y63336c57nd814279414db7b9d@mail.gmail.com> <3ddac38d0611151457g3f51c6a5o11d360e04e108901@mail.gmail.com> Message-ID: <FB40DFE2-B038-477B-9C72-211C590D6585@refractions.net> GeometryN() is what you're looking for. On 15-Nov-06, at 2:57 PM, Dylan Lorimer wrote: > Well, > > I realize 'Polygonize' isn't the right function, but I'm still > stuck figuring out which is correct. Any ideas? > Cheers, > dylan > > On 11/15/06, Dylan Lorimer <edylan at google.com> wrote: Hi, > > I loaded a shapefile of country boundaries into PostGIS using the > shp2pgsql loader. I see that the resulting geometry is a > multipolygon. I need it as a polygon, and considering there is only > a single outer ring, this shouldn't be a problem. But 'Polygonize' > is returning a GeometryCollection, rather than Polygon. Any ideas? > > gnis2=# select GeometryType(Polygonize(the_geom)) from > gnis_country_view where country_name='Canada'; > geometrytype > -------------------- > GEOMETRYCOLLECTION > (1 row) > > Cheers, > -dylan > > > > -- > E. Dylan Lorimer | Google Earth Enterprise > 650.253.2459 (O) | 650.862.6810 (M) | 650.644.0182 (F) > ---------------------------------------------------------------------- > ---------- > Earth Enterprise Support: fusion at google.com | 866.4GO.OGLE ext. 4 > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From pramsey at refractions.net Wed Nov 15 17:49:09 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Wed, 15 Nov 2006 17:49:09 -0800 Subject: [postgis-users] Spatial Join Performance In-Reply-To: <KMEIKNPGBOLILGCIHBLCGEBACBAA.erics@ameri-title.com> References: <KMEIKNPGBOLILGCIHBLCGEBACBAA.erics@ameri-title.com> Message-ID: <05A3A961-2510-4830-A09E-816779413072@refractions.net> I am going to guess that your zoning polygons are fairly large and complex and that each one contains quite a large number of taxlots. Right? In that case, you've re-found a known performance issue which we have promised to fix on any number of occasions, which is short-circuiting some simple cases like point-in-polygon to avoid the GEOS functions (which are robust and slow) and go for a simpler point-in-polygon test when it is applicable (as it is in your case). Mark, if Eric confirms this case, can you file this as a bug and take a run at it in your AST. P On 15-Nov-06, at 3:09 PM, Eric Shuman wrote: > Hi list, I'm a bit new doing PostGIS queries and have some > questions on > optimizing the speed of spatial joins. > > Scenario: > I have a tax lot polygon layer that I want to find out what zones > it falls > into. > There are about 100,000 tax lot shapes and 1000 zones. > > SELECT DISTINCT ON (taxlot,zone_) taxlot,zone_ > FROM taxlot,zoning > WHERE taxlot != '' > AND taxlot.the_geom && zoning.the_geom > AND contains(zoning.the_geom,centroid(taxlot.the_geom)) > ; > > I have created GIST indexes on both the zoning and taxlot tables > and when I > run the query with EXPLAIN I get results suggesting the use of > indexes. > > ... > Index Scan using taxlot_geom_index on taxlot (cost=0.00..6.02 rows=1 > width=64) > Index Cond: (taxlot.the_geom && "outer".the_geom)" > > > I have been able to get a similar query to run on smaller data > sets, but so > far I have tried to run this one for over 2 hours with out it > completing... > > Am I approaching this correctly or is there something I am missing > that > would speed up the query?? > > > Thanks for the help!! > > --------------- > Eric Shuman > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From strk at refractions.net Thu Nov 16 01:10:41 2006 From: strk at refractions.net (strk at refractions.net) Date: Thu, 16 Nov 2006 10:10:41 +0100 Subject: [postgis-users] Linking to the PostGIS library In-Reply-To: <174DE058-A705-4C9E-B271-0DCE85C18068@yahoo.co.uk> References: <174DE058-A705-4C9E-B271-0DCE85C18068@yahoo.co.uk> Message-ID: <20061116091041.GD9673@keybit.net> On Wed, Nov 15, 2006 at 10:57:50AM +0000, Nathaniel wrote: > Dear all, > > I'm writing some C-functions to plug into postgres. Some of these > functions need to manipulate PostGIS geometries, so I'm trying to > link my code against the postgis library liblwgeom.so to make use of > the postgis functions that untangle geometries (e.g. > lwpoint_deserialize, lwpoint_getPointXX_p etc) > > Header files are included, so my code compiles cleanly, but loading > the functions into postgres brings up "Symbol not found: > _lwgeom_deserialize" errors as postgres tries to find symbols defined > in my code and doesn't know to look in the postgis shared library to > find them. > > I'm running macos10.4, postgres 8.1.4, postgis 1.1.6. > > Presently, my "build script" is taken straight out the postgres manual: > > cc -I/usr/local/pgsql/include/server/ -I./postgis-1.1.6/lwgeom/ - > c foo.c > > cc -bundle -flat_namespace -undefined suppress -o libfoo.so foo.o; Missing -llwgeom ? Also -rpath might be useful as liblwgeom is likely *not* in your default path. Check with 'ldd' (or whatever apple changed it to) --strk; From benny.jonsson at ilr.uni-bonn.de Thu Nov 16 05:30:03 2006 From: benny.jonsson at ilr.uni-bonn.de (Benny Jonsson) Date: Thu, 16 Nov 2006 14:30:03 +0100 Subject: [postgis-users] C compiler cannot create executables UBUNTU-SERVER Message-ID: <455C67DB.90106@ilr.uni-bonn.de> Hi, I have some problem with installing postgis under UBUNTU. I'm using this howto http://postgis.refractions.net/support/wiki/index.php?PostgisOnUbuntu but i get the following error: checking for C compiler default output file name... configure: error: C compiler cannot create executables when i execute ./configure Anyone have a clue? /Benny From kwythers at umn.edu Thu Nov 16 05:47:11 2006 From: kwythers at umn.edu (Kirk R. Wythers) Date: Thu, 16 Nov 2006 07:47:11 -0600 Subject: [postgis-users] extending a database with another table In-Reply-To: <029d01c708be$7ca40180$0601a8c0@ariane.tractebel.be> References: <029d01c708be$7ca40180$0601a8c0@ariane.tractebel.be> Message-ID: <F671CE41-4407-4FBB-B802-567E2C27EB46@umn.edu> Thanks for your patience Jan. krw On Nov 15, 2006, at 8:01 AM, Jan Syryn wrote: > Your question has nothing to do with PostGis problems, but is merely a > general DB design problem. > > But because we are all nice guysz all together: > > Don't add a table 'airports'. > Just extend station with a column stationtype_id(char 1) that > points (fk) to > another table > 'stationtype'. > Stationtype with id(char1) and stationtype_name(varchar(20)) > Fill it with ('S' ; 'Station') and ('A', 'Airport') > > Problem solved. > > You want solar and climate for airports: > SELECT climate.*, solar.* > FROM climate,solar,station > WHERE climate.station_id = station.station_id > AND solar.station_id = station.station_id > AND station.stationtype_id='A' > > Replace 'A' by 'S' for stations. > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Kirk R. > Wythers > Sent: mardi 14 novembre 2006 21:49 > To: PostGIS Discussion Users > Subject: [postgis-users] extending a database with another table > > I am looking for suggestions on database design. > > I have a simple three table database that holds climate data. The > first > table (stations) holds station id, and geoposition information. > The second table (climate) holds temp and precip information, and > the third > table (solar) holds solar radiation data. The column station_id > acts as a > foreign key to link the tables. > > My trouble is that I need to add a forth table (airports) that in > the same > manner as "stations" in that it contains a station_id number, on > which data > lines from "solar" and "climate" key off of. The goal here is to be > able to > differentiate solar data from airports and solar data from the > stations. > > Below are the three current tables (stations, climate, and solar). > Any ideas would be most appreciated. > > met_data=# \d stations > Table "public.stations" > Column | Type | Modifiers > -----------------+-------------------+----------- > station_id | integer | not null > station_name | character varying | > state | character varying | > lat | double precision | > lon | double precision | > the_geom_lonlat | geometry | > the_geom_meters | geometry | > Indexes: > "stations_pkey" PRIMARY KEY, btree (station_id) > "stations_station_id_key" UNIQUE, btree (station_id) Check > constraints: > "enforce_dims_the_geom_lonlat" CHECK (ndims(the_geom_lonlat) = 2) > "enforce_dims_the_geom_meters" CHECK (ndims(the_geom_meters) = 2) > "enforce_geotype_the_geom_lonlat" CHECK (geometrytype > (the_geom_lonlat) = 'POINT'::text OR the_geom_lonlat IS NULL) > "enforce_geotype_the_geom_meters" CHECK (geometrytype > (the_geom_meters) = 'POINT'::text OR the_geom_meters IS NULL) > "enforce_srid_the_geom_lonlat" CHECK (srid(the_geom_lonlat) = > 4269) > "enforce_srid_the_geom_meters" CHECK (srid(the_geom_meters) = > 32661) > > > met_data=# \d climate > Table "public.climate" > Column | Type | Modifiers > ------------+----------+----------- > station_id | integer | > year | smallint | > month | smallint | > day | smallint | > doy | smallint | > date | date | > precip | real | > tmin | real | > tmax | real | > Foreign-key constraints: > "climatefk" FOREIGN KEY (station_id) REFERENCES stations > (station_id) > > met_data=# \d solar > Table "public.solar" > Column | Type | Modifiers > ------------+----------+----------- > station_id | integer | > year | smallint | > month | smallint | > day | smallint | > doy | smallint | > date | date | > solar | real | > Foreign-key constraints: > "solarfk" FOREIGN KEY (station_id) REFERENCES stations > (station_id) > > > > > > > > > > _______________________________________________ > 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 madhadron at gmail.com Thu Nov 16 05:49:38 2006 From: madhadron at gmail.com (Frederick Ross) Date: Thu, 16 Nov 2006 08:49:38 -0500 Subject: [postgis-users] C compiler cannot create executables UBUNTU-SERVER In-Reply-To: <455C67DB.90106@ilr.uni-bonn.de> References: <455C67DB.90106@ilr.uni-bonn.de> Message-ID: <b91043270611160549k277dbd03gf3644d44b13aed8e@mail.gmail.com> You need to install the development tools, which are not default on Ubuntu. The package is build-essentials. You may have to add a few things on top of that, but configure should complain about them individually. On 11/16/06, Benny Jonsson <benny.jonsson at ilr.uni-bonn.de> wrote: > Hi, > I have some problem with installing postgis under UBUNTU. I'm using this > howto > http://postgis.refractions.net/support/wiki/index.php?PostgisOnUbuntu > but i get the following error: > > checking for C compiler default output file name... configure: error: C > compiler cannot create executables > > when i execute > ./configure > > Anyone have a clue? > > /Benny > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Frederick Ross Graduate Fellow, (|Siggia> + |McKinney>)/sqrt(2) Lab The Rockefeller University Je ne suis pas Fred Cross! From benny.jonsson at ilr.uni-bonn.de Thu Nov 16 05:54:45 2006 From: benny.jonsson at ilr.uni-bonn.de (Benny Jonsson) Date: Thu, 16 Nov 2006 14:54:45 +0100 Subject: [postgis-users] C compiler cannot create executables UBUNTU-SERVER In-Reply-To: <b91043270611160549k277dbd03gf3644d44b13aed8e@mail.gmail.com> References: <455C67DB.90106@ilr.uni-bonn.de> <b91043270611160549k277dbd03gf3644d44b13aed8e@mail.gmail.com> Message-ID: <455C6DA5.7060609@ilr.uni-bonn.de> Ok, but witch are the "development tools"? apt-get install ???? /Benny Frederick Ross skrev: > You need to install the development tools, which are not default on > Ubuntu. The package is build-essentials. You may have to add a few > things on top of that, but configure should complain about them > individually. > > On 11/16/06, Benny Jonsson <benny.jonsson at ilr.uni-bonn.de> wrote: >> Hi, >> I have some problem with installing postgis under UBUNTU. I'm using this >> howto >> http://postgis.refractions.net/support/wiki/index.php?PostgisOnUbuntu >> but i get the following error: >> >> checking for C compiler default output file name... configure: error: C >> compiler cannot create executables >> >> when i execute >> ./configure >> >> Anyone have a clue? >> >> /Benny >> >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> > > From naptrel at yahoo.co.uk Thu Nov 16 07:26:41 2006 From: naptrel at yahoo.co.uk (Nathaniel) Date: Thu, 16 Nov 2006 15:26:41 +0000 Subject: [postgis-users] Linking to the PostGIS library In-Reply-To: <20061116091041.GD9673@keybit.net> References: <174DE058-A705-4C9E-B271-0DCE85C18068@yahoo.co.uk> <20061116091041.GD9673@keybit.net> Message-ID: <425C1DF8-446E-48E8-8404-C8EAE43C783F@yahoo.co.uk> On 16 Nov 2006, at 09:10, strk at refractions.net wrote: > Missing -llwgeom ? > Also -rpath might be useful as liblwgeom is likely *not* in your > default path. > Check with 'ldd' (or whatever apple changed it to) Thanks strk for the reply. I used your suggestions to fuel more internet searches, and it seems it's not that simple on the mac (anyone surprised?) In case someone in the future has similar problems and stumbles upon this thread, here's what I've found so far: On the mac, postgres needs what Apple calls a "bundle" (aka "loadable module"), which is a form of dynamic library. This is a tad different from your standard unixian shared lib. For one, bundles seem to have a significant limitation: you can't link against them (at least according to <http://fink.sourceforge.net/doc/porting/shared.php> )! This explains why I've struggled for hours to build my library...achem, I mean bundle....against the PostGIS liblwgeom.so bundle. You can build proper, dynamic shared libs on the mac (using - dynamiclib flag to gcc). The generic Postgres module makefile (Makefile.shlib), as used by PostGIS, even teasingly comes with a flag (DLTYPE), that if set to "library", looks as though it should build one of these. So I thought, if I could build PostGIS as a proper dynamic, shared library rather than a bundle, I could link my code against it. (I didn't care if I had to have both liblwgeom.so and liblwgeom.dylib sitting in /usr/local/pgsql/lib/, the former for function calls to the postgis module, the latter for calls to mine). Permitting myself to hack only a handful of lines I couldn't get PostGIS to successfully build a ".dylib" that I could build against. Changing lots of build or source code would make upgrading PostGIS prohibitively time-consuming. But I did find a simple, if less-than-satisfactory, one line solution: merge my library (compiled into myfoo.o, say) into the PostGIS build! In lwgeom/Makefile: OBJS=$(SA_OBJS) liblwgeom.o [...] long_xact.o myfoo.o Then, change my SQL function definitions to point to "liblwgeom" rather than "libmyfoo" and I'm off. Thanks again Send instant messages to your online friends http://uk.messenger.yahoo.com From sandeepkumar.jakkaraju at gmail.com Thu Nov 16 07:30:01 2006 From: sandeepkumar.jakkaraju at gmail.com (Sandeep Kumar Jakkaraju) Date: Thu, 16 Nov 2006 21:00:01 +0530 Subject: [postgis-users] Hibernate with PostGIS Message-ID: <c653c98f0611160730o74a096e0g66eb314cf3194205@mail.gmail.com> Hi All I want to know if i can use Hibernate with PostGIS ?? if yes ..then can some one point me to some doc which tells abt this !! I am just skeptical about the geometry column !! Thanks Sandeep -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061116/18d8d6de/attachment.html> From nbarker at ittvis.com Thu Nov 16 07:38:51 2006 From: nbarker at ittvis.com (Norman Barker) Date: Thu, 16 Nov 2006 15:38:51 -0000 Subject: [postgis-users] Hibernate with PostGIS Message-ID: <B67A5FB7A8114B47A70517C9C0D102E8131C8A@bath.uk.rsinc.com> Sandeep, To use JBoss EJB3 with PostGIS I had to write a Hibernate Geometry Driver, the source code is in PostGIS SVN (LGPL) and there is a tutorial available here - http://postgis.refractions.net/support/wiki/index.php?SpatialEJB3 It allows creation and updates through Java, the tutorial walks you through a simple SOAP example. I am very interested in using the hibernate lucene annotations (http://www.hibernate.org/hib_docs/annotations/reference/en/html/lucene. html) in conjunction with the Geometry driver to create some sort of catalog; so that we can do a proper geometry search on PostGIS through the business layer (not just boxes!) and then seach on metadata with Lucene. A couple of people have expressed interest in this hibernate geometry driver for Java, please give me some feedback on the future direction you want this to go. Thanks, Norman ________________________________ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Sandeep Kumar Jakkaraju Sent: 16 November 2006 15:30 To: PostGIS Users Discussion Subject: [postgis-users] Hibernate with PostGIS Hi All I want to know if i can use Hibernate with PostGIS ?? if yes ..then can some one point me to some doc which tells abt this !! I am just skeptical about the geometry column !! Thanks Sandeep -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061116/706fc523/attachment.html> From erics at ameri-title.com Thu Nov 16 09:57:06 2006 From: erics at ameri-title.com (Eric Shuman) Date: Thu, 16 Nov 2006 09:57:06 -0800 Subject: [postgis-users] Spatial Join Performance Message-ID: <KMEIKNPGBOLILGCIHBLCMEBCCBAA.erics@ameri-title.com> Paul, Your analysis of my scenario is correct. Most tax lot polygons are small and relatively simple compared to the zone polygons. Though in some cases the lots can be big and cover more than one zone. So is the query I am using correct or is there something I can add to work around this issue? Thanks for the help! --------------- Eric Shuman From sandeepkumar.jakkaraju at gmail.com Thu Nov 16 09:58:10 2006 From: sandeepkumar.jakkaraju at gmail.com (Sandeep Kumar Jakkaraju) Date: Thu, 16 Nov 2006 23:28:10 +0530 Subject: [postgis-users] Hibernate with PostGIS In-Reply-To: <B67A5FB7A8114B47A70517C9C0D102E8131C8A@bath.uk.rsinc.com> References: <B67A5FB7A8114B47A70517C9C0D102E8131C8A@bath.uk.rsinc.com> Message-ID: <c653c98f0611160958x2f8745c6n5dcf33ea13539c95@mail.gmail.com> Hi Norman For using Hibernate with postgis ..i can directly use ur postgis.jar !! right ...?? Your Tutorial mainly aimed at using EJB3 with postgis ... did u think of using Spring instead of EJB3 !! ?? Thanks Sandeep On 11/16/06, Norman Barker <nbarker at ittvis.com> wrote: > > Sandeep, > > > > To use JBoss EJB3 with PostGIS I had to write a Hibernate Geometry Driver, > the source code is in PostGIS SVN (LGPL) and there is a tutorial available > here > > - > http://postgis.refractions.net/support/wiki/index.php?SpatialEJB3 > > > > It allows creation and updates through Java, the tutorial walks you > through a simple SOAP example. > > > > I am very interested in using the hibernate lucene annotations ( > http://www.hibernate.org/hib_docs/annotations/reference/en/html/lucene.html) > in conjunction with the Geometry driver to create some sort of catalog; so > that we can do a proper geometry search on PostGIS through the business > layer (not just boxes!) and then seach on metadata with Lucene. > > > > A couple of people have expressed interest in this hibernate geometry > driver for Java, please give me some feedback on the future direction you > want this to go. > > > > Thanks, > > > > Norman > > > ------------------------------ > > *From:* postgis-users-bounces at postgis.refractions.net [mailto: > postgis-users-bounces at postgis.refractions.net] *On Behalf Of *Sandeep > Kumar Jakkaraju > *Sent:* 16 November 2006 15:30 > *To:* PostGIS Users Discussion > *Subject:* [postgis-users] Hibernate with PostGIS > > > > Hi All > > I want to know if i can use Hibernate with PostGIS ?? > if yes ..then can some one point me to some doc which tells abt this !! > > I am just skeptical about the geometry column !! > > Thanks > Sandeep > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > -- Sandeep Kumar Jakkaraju WeBlog: http://jakkarajus.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061116/162357e3/attachment.html> From edylan at google.com Thu Nov 16 12:57:40 2006 From: edylan at google.com (Dylan Lorimer) Date: Thu, 16 Nov 2006 12:57:40 -0800 Subject: [postgis-users] Re: POLYGON from MULTIPOLYGON In-Reply-To: <FB40DFE2-B038-477B-9C72-211C590D6585@refractions.net> References: <3ddac38d0611151443y63336c57nd814279414db7b9d@mail.gmail.com> <3ddac38d0611151457g3f51c6a5o11d360e04e108901@mail.gmail.com> <FB40DFE2-B038-477B-9C72-211C590D6585@refractions.net> Message-ID: <3ddac38d0611161257o1dae57bv10953bd1fa0909cb@mail.gmail.com> Thanks Paul! Last followup question: Do you think, in your experience, that it is faster to go from PostGIS to JTS object via: 1) casting binary PostGIS object to PGgeometr and then parsing it to create a JTS object 2) Using the JTS WKT Reader on the AsText(...) from the Spatial SQL? Cheers, -dylan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061116/05338c7f/attachment.html> From pramsey at refractions.net Thu Nov 16 14:26:01 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Thu, 16 Nov 2006 14:26:01 -0800 Subject: [postgis-users] Spatial Join Performance In-Reply-To: <KMEIKNPGBOLILGCIHBLCMEBCCBAA.erics@ameri-title.com> References: <KMEIKNPGBOLILGCIHBLCMEBCCBAA.erics@ameri-title.com> Message-ID: <455CE579.7090103@refractions.net> Eric, You could replace your Contains(A,B) with Distance(A,B) < 0.001, which will run a shorter calculation faster (until we add a short-circuit to Contains()). Otherwise your query looks pretty good. If your tables are relatively constant, clustering them will speed things up marginally, and make sure you've increased your PgSQL settings above the (tiny tiny) defaults. http://www.varlena.com/GeneralBits/Tidbits/perf.html Eric Shuman wrote: > Paul, > > Your analysis of my scenario is correct. Most tax lot polygons are small and > relatively simple compared to the zone polygons. Though in some cases the > lots can be big and cover more than one zone. > > So is the query I am using correct or is there something I can add to work > around this issue? > > > Thanks for the help! > > --------------- > Eric Shuman > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From pramsey at refractions.net Thu Nov 16 14:28:04 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Thu, 16 Nov 2006 14:28:04 -0800 Subject: [postgis-users] Re: POLYGON from MULTIPOLYGON In-Reply-To: <3ddac38d0611161257o1dae57bv10953bd1fa0909cb@mail.gmail.com> References: <3ddac38d0611151443y63336c57nd814279414db7b9d@mail.gmail.com> <3ddac38d0611151457g3f51c6a5o11d360e04e108901@mail.gmail.com> <FB40DFE2-B038-477B-9C72-211C590D6585@refractions.net> <3ddac38d0611161257o1dae57bv10953bd1fa0909cb@mail.gmail.com> Message-ID: <455CE5F4.9040909@refractions.net> None of the above. The fastest way is to use encode(asbinary(the_geom),'base64') when pulling the geometry, use Java's own base64 decoder and then the JTS WKB reader. Paul Dylan Lorimer wrote: > Thanks Paul! > > Last followup question: > > Do you think, in your experience, that it is faster to go from PostGIS > to JTS object via: > > 1) casting binary PostGIS object to PGgeometr and then parsing it to > create a JTS object > 2) Using the JTS WKT Reader on the AsText(...) from the Spatial SQL? > > Cheers, > -dylan > > > ------------------------------------------------------------------------ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From edylan at google.com Thu Nov 16 14:32:20 2006 From: edylan at google.com (Dylan Lorimer) Date: Thu, 16 Nov 2006 14:32:20 -0800 Subject: [postgis-users] Re: POLYGON from MULTIPOLYGON In-Reply-To: <455CE5F4.9040909@refractions.net> References: <3ddac38d0611151443y63336c57nd814279414db7b9d@mail.gmail.com> <3ddac38d0611151457g3f51c6a5o11d360e04e108901@mail.gmail.com> <FB40DFE2-B038-477B-9C72-211C590D6585@refractions.net> <3ddac38d0611161257o1dae57bv10953bd1fa0909cb@mail.gmail.com> <455CE5F4.9040909@refractions.net> Message-ID: <3ddac38d0611161432w3e2cbee7jeb0d07543002d6b3@mail.gmail.com> Do you mean to use JTS WKT reader...? As there doesn't appear to be WKB reader. http://www.vividsolutions.com/jts/javadoc/index.html -dylan On 11/16/06, Paul Ramsey <pramsey at refractions.net> wrote: > > None of the above. The fastest way is to use > > encode(asbinary(the_geom),'base64') > > when pulling the geometry, use Java's own base64 decoder and then the > JTS WKB reader. > > Paul > > Dylan Lorimer wrote: > > Thanks Paul! > > > > Last followup question: > > > > Do you think, in your experience, that it is faster to go from PostGIS > > to JTS object via: > > > > 1) casting binary PostGIS object to PGgeometr and then parsing it to > > create a JTS object > > 2) Using the JTS WKT Reader on the AsText(...) from the Spatial SQL? > > > > Cheers, > > -dylan > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > 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 > -- E. Dylan Lorimer | Google Earth Enterprise 650.253.2459 (O) | 650.862.6810 (M) | 650.644.0182 (F) -------------------------------------------------------------------------------- Earth Enterprise Support: fusion at google.com | 866.4GO.OGLE ext. 4 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061116/2747fec0/attachment.html> From edylan at google.com Thu Nov 16 14:50:42 2006 From: edylan at google.com (Dylan Lorimer) Date: Thu, 16 Nov 2006 14:50:42 -0800 Subject: [postgis-users] Re: POLYGON from MULTIPOLYGON In-Reply-To: <3ddac38d0611161432w3e2cbee7jeb0d07543002d6b3@mail.gmail.com> References: <3ddac38d0611151443y63336c57nd814279414db7b9d@mail.gmail.com> <3ddac38d0611151457g3f51c6a5o11d360e04e108901@mail.gmail.com> <FB40DFE2-B038-477B-9C72-211C590D6585@refractions.net> <3ddac38d0611161257o1dae57bv10953bd1fa0909cb@mail.gmail.com> <455CE5F4.9040909@refractions.net> <3ddac38d0611161432w3e2cbee7jeb0d07543002d6b3@mail.gmail.com> Message-ID: <3ddac38d0611161450p3dedc3etd6264083a8000afa@mail.gmail.com> Ah, never mind. Looks like those docs are outdated but my Jar has a WKB reader. Cheers Paul. -dylan On 11/16/06, Dylan Lorimer <edylan at google.com> wrote: > > Do you mean to use JTS WKT reader...? As there doesn't appear to be WKB > reader. > http://www.vividsolutions.com/jts/javadoc/index.html > -dylan > > On 11/16/06, Paul Ramsey <pramsey at refractions.net> wrote: > > > > None of the above. The fastest way is to use > > > > encode(asbinary(the_geom),'base64') > > > > when pulling the geometry, use Java's own base64 decoder and then the > > JTS WKB reader. > > > > Paul > > > > Dylan Lorimer wrote: > > > Thanks Paul! > > > > > > Last followup question: > > > > > > Do you think, in your experience, that it is faster to go from PostGIS > > > to JTS object via: > > > > > > 1) casting binary PostGIS object to PGgeometr and then parsing it to > > > create a JTS object > > > 2) Using the JTS WKT Reader on the AsText(...) from the Spatial SQL? > > > > > > Cheers, > > > -dylan > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > 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 > > > > > > -- > E. Dylan Lorimer | Google Earth Enterprise > 650.253.2459 (O) | 650.862.6810 (M) | 650.644.0182 (F) > > -------------------------------------------------------------------------------- > Earth Enterprise Support: fusion at google.com | 866.4GO.OGLE ext. 4 > -- E. Dylan Lorimer | Google Earth Enterprise 650.253.2459 (O) | 650.862.6810 (M) | 650.644.0182 (F) -------------------------------------------------------------------------------- Earth Enterprise Support: fusion at google.com | 866.4GO.OGLE ext. 4 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061116/ac957816/attachment.html> From sdc at sdc.com.au Thu Nov 16 15:15:53 2006 From: sdc at sdc.com.au (Stephen Davies) Date: Fri, 17 Nov 2006 09:45:53 +1030 Subject: [postgis-users] SRID for Saudi Arabia Message-ID: <200611170945.53644.sdc@sdc.com.au> Could somebody please point me at the correct (latlong) SRID for the Riyadh region of Saudi Arabia. Cheers and thanks, Stephen Davies -- ======================================================================== This email is for the person(s) identified above, and is confidential to the sender and the person(s). No one else is authorised to use or disseminate this email or its contents. Stephen Davies Consulting Voice: 08-8177 1595 Adelaide, South Australia. Fax: 08-8177 0133 Computing & Network solutions. Mobile:0403 0405 83 From punkish at eidesis.org Thu Nov 16 16:49:58 2006 From: punkish at eidesis.org (P Kishor) Date: Thu, 16 Nov 2006 18:49:58 -0600 Subject: [postgis-users] dynamic segmentation Message-ID: <cdf6db500611161649o7a577a32he896024ecec68ba9@mail.gmail.com> Someone asked me recently about open source dynamic segmentation solutions. I thought, let's ask the PostGIS community. Is this possible with PostGIS? If not, does anyone know of other open source solutions for ds? -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ Open Source Geospatial Foundation https://edu.osgeo.org/ ------------------------------------------------------------------------------------------------------- collaborate, communicate, compete ==================================================== From woodbri at swoodbridge.com Thu Nov 16 16:53:56 2006 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Thu, 16 Nov 2006 19:53:56 -0500 Subject: [postgis-users] dynamic segmentation In-Reply-To: <cdf6db500611161649o7a577a32he896024ecec68ba9@mail.gmail.com> References: <cdf6db500611161649o7a577a32he896024ecec68ba9@mail.gmail.com> Message-ID: <455D0824.2010808@swoodbridge.com> P Kishor wrote: > Someone asked me recently about open source dynamic segmentation > solutions. I thought, let's ask the PostGIS community. Is this > possible with PostGIS? If not, does anyone know of other open source > solutions for ds? > Can you describe what dynamic segmentation is? What is the algorithm? I guess I can google for it ... -Steve From punkish at eidesis.org Thu Nov 16 16:56:53 2006 From: punkish at eidesis.org (P Kishor) Date: Thu, 16 Nov 2006 18:56:53 -0600 Subject: [postgis-users] dynamic segmentation In-Reply-To: <455D0824.2010808@swoodbridge.com> References: <cdf6db500611161649o7a577a32he896024ecec68ba9@mail.gmail.com> <455D0824.2010808@swoodbridge.com> Message-ID: <cdf6db500611161656sa3cdba9m7abae5a2ed7d58f3@mail.gmail.com> On 11/16/06, Stephen Woodbridge <woodbri at swoodbridge.com> wrote: > P Kishor wrote: > > Someone asked me recently about open source dynamic segmentation > > solutions. I thought, let's ask the PostGIS community. Is this > > possible with PostGIS? If not, does anyone know of other open source > > solutions for ds? > > > > Can you describe what dynamic segmentation is? > What is the algorithm? > I guess I can google for it ... > I don't know the algorithm, but among the many definitions, dynamic segmentation allows analysis and mapping of linear features based on their positions along a route. Another definition says that it is "the process of computing the locations of events on linear features at run time based on event tables for which distance measures are available." Used in linear reference systems (LRS), typically for roads and transportation networks analysis. -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ Open Source Geospatial Foundation https://edu.osgeo.org/ ------------------------------------------------------------------------------------------------------- collaborate, communicate, compete ==================================================== From woodbri at swoodbridge.com Thu Nov 16 17:04:21 2006 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Thu, 16 Nov 2006 20:04:21 -0500 Subject: [postgis-users] dynamic segmentation In-Reply-To: <cdf6db500611161656sa3cdba9m7abae5a2ed7d58f3@mail.gmail.com> References: <cdf6db500611161649o7a577a32he896024ecec68ba9@mail.gmail.com> <455D0824.2010808@swoodbridge.com> <cdf6db500611161656sa3cdba9m7abae5a2ed7d58f3@mail.gmail.com> Message-ID: <455D0A95.3070205@swoodbridge.com> P Kishor wrote: > On 11/16/06, Stephen Woodbridge <woodbri at swoodbridge.com> wrote: >> P Kishor wrote: >> > Someone asked me recently about open source dynamic segmentation >> > solutions. I thought, let's ask the PostGIS community. Is this >> > possible with PostGIS? If not, does anyone know of other open source >> > solutions for ds? >> > >> >> Can you describe what dynamic segmentation is? >> What is the algorithm? >> I guess I can google for it ... >> > > I don't know the algorithm, but among the many definitions, dynamic > segmentation allows analysis and mapping of linear features based on > their positions along a route. Another definition says that it is "the > process of computing the locations of events on linear features at run > time based on event tables for which distance measures are available." > Used in linear reference systems (LRS), typically for roads and > transportation networks analysis. > Ok, well google has a bunch. It seems that you need to have a route first, then dynamic segmentation just means you can reference a point along the route based on distance or cost to get to that point. For geocoding, a house is some percent of the distance along a segment. So I guess the question is, what are you asking for? A routing engine, check out pg_dijkstra, I'm not sure if it has the ability to do dynamic segmentation. In a simpler view, if you have the sum of the segments lengths along a path, and the percentage along the first and the last segment, then you have dynamic segmentation. -Steve From pcreso at pcreso.com Thu Nov 16 18:36:03 2006 From: pcreso at pcreso.com (Brent Wood) Date: Thu, 16 Nov 2006 18:36:03 -0800 (PST) Subject: [postgis-users] dynamic segmentation In-Reply-To: <455D0A95.3070205@swoodbridge.com> Message-ID: <820736.88567.qm@web33203.mail.mud.yahoo.com> P Kishor wrote: > Someone asked me recently about open source dynamic segmentation > solutions. I thought, let's ask the PostGIS community. Is this > possible with PostGIS? If not, does anyone know of other open source > solutions for ds? It sort of depende what you do with dynamic segmentation, some is easily doable with PostGIS, other stuff is harder. For example, having a single line feature, representing say, a pipeline. DS can allow various segments of this to have some different attributes, like identifying steel & concrete, or above ground & underground sections. You can't do this quite the same way in PostGIS, but having separate features with a common attribute, such as 5 separate line segments with a common pipeline_id, as well as a multiline/geometrycollection representing the composite feature means you can achieve comparable functionality using appropriate SQL & data structures. So does PostGIS "do" dynamic segmentation? Strictly speaking, not really. Can functionality equivalent to dynamic segmentation be implemented using PostGIS? Quite often yes. Cheers, Brent Wood ____________________________________________________________________________________ Sponsored Link Mortgage rates near 39yr lows. $510k for $1,698/mo. Calculate new payment! www.LowerMyBills.com/lre From mike at fuhr.org Thu Nov 16 22:14:01 2006 From: mike at fuhr.org (Michael Fuhr) Date: Thu, 16 Nov 2006 23:14:01 -0700 Subject: [postgis-users] SRID for Saudi Arabia In-Reply-To: <200611170945.53644.sdc@sdc.com.au> References: <200611170945.53644.sdc@sdc.com.au> Message-ID: <20061117061401.GA77875@winnie.fuhr.org> On Fri, Nov 17, 2006 at 09:45:53AM +1030, Stephen Davies wrote: > Could somebody please point me at the correct (latlong) SRID for the > Riyadh region of Saudi Arabia. Only the originator of the data would know for sure. Maybe the data is WGS 84 (SRID 4326) or maybe not. -- Michael Fuhr From mike at fuhr.org Thu Nov 16 22:58:39 2006 From: mike at fuhr.org (Michael Fuhr) Date: Thu, 16 Nov 2006 23:58:39 -0700 Subject: [postgis-users] Problem building postgis In-Reply-To: <000b01c707a4$764bd260$6401a8c0@GUITAR> References: <000b01c707a4$764bd260$6401a8c0@GUITAR> Message-ID: <20061117065839.GA84517@winnie.fuhr.org> On Mon, Nov 13, 2006 at 11:22:14PM -0500, John Daly wrote: > I'm a new list subscriber and I'd like to say hello to all, and also, of > course, introduce my first problem using postgis. I'm trying to build > postgis on Redhat 9, with Postgres version 8.1.5 and postgis ver 1.1.6. > I'm getting the build errors shown below: > > lwgeom_gist.c:547:1: directives may not be used inside a macro argument Does the attached patch fix the problem? -- Michael Fuhr -------------- next part -------------- Index: lwgeom/lwgeom_gist.c =================================================================== --- lwgeom/lwgeom_gist.c (revision 2528) +++ lwgeom/lwgeom_gist.c (working copy) @@ -542,14 +542,17 @@ if (in != (PG_LWGEOM*)DatumGetPointer(entry->key)) pfree(in); /* PG_FREE_IF_COPY */ +#if USE_VERSION >= 82 gistentryinit(*retval, PointerGetDatum(rr), entry->rel, entry->page, -#if USE_VERSION >= 82 entry->offset, + FALSE); #else + gistentryinit(*retval, PointerGetDatum(rr), + entry->rel, entry->page, entry->offset, sizeof(BOX2DFLOAT4), + FALSE); #endif - FALSE); } else @@ -557,10 +560,12 @@ #ifdef PGIS_DEBUG_GIST4 elog(NOTICE,"GIST: LWGEOM_gist_compress got a NULL key"); #endif + +#if USE_VERSION >= 82 gistentryinit(*retval, (Datum) 0, entry->rel, -#if USE_VERSION >= 82 entry->page, entry->offset, FALSE); #else + gistentryinit(*retval, (Datum) 0, entry->rel, entry->page, entry->offset, 0, FALSE); #endif } From Horst.Duester at bd.so.ch Thu Nov 16 23:43:17 2006 From: Horst.Duester at bd.so.ch (=?ISO-8859-1?Q?D=FCster_Horst?=) Date: Fri, 17 Nov 2006 08:43:17 +0100 Subject: AW: Re: [postgis-users] dynamic segmentation Message-ID: <H00002eb004b1c74.1163749397.SRSOFAIOI6145.ktso.ch@MHS> An embedded and charset-unspecified text was scrubbed... Name: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061117/815e3ec1/attachment.ksh> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061117/815e3ec1/attachment.html> From jsubei at yahoo.fr Fri Nov 17 02:18:54 2006 From: jsubei at yahoo.fr (Norbert) Date: Fri, 17 Nov 2006 10:18:54 +0000 (GMT) Subject: [postgis-users] why a longitude like 180 are not valid in WGS84 in postgis ? Message-ID: <20061117101854.93562.qmail@web26214.mail.ukl.yahoo.com> Hi all, Can you explain to me why a point like POINT(-54.51 158.93) is not valid in wgs84 / srid 4326 in PostGIS and make a conflict "enforce_srid_coordinates" ? What's the error and solution ? thanks in advance, Norbert ___________________________________________________________________________ D?couvrez une nouvelle fa?on d'obtenir des r?ponses ? toutes vos questions ! Profitez des connaissances, des opinions et des exp?riences des internautes sur Yahoo! Questions/R?ponses http://fr.answers.yahoo.com From guido.lemoine at jrc.it Fri Nov 17 02:26:22 2006 From: guido.lemoine at jrc.it (Guido Lemoine) Date: Fri, 17 Nov 2006 11:26:22 +0100 Subject: [postgis-users] why a longitude like 180 are not valid in WGS84 in postgis ? In-Reply-To: <20061117101854.93562.qmail@web26214.mail.ukl.yahoo.com> References: <20061117101854.93562.qmail@web26214.mail.ukl.yahoo.com> Message-ID: <455D8E4E.7060606@jrc.it> try POINT (158.93 -54.51) Notation is in X Y = LON LAT! 158.93 is far beyond the North Pole :-) GL Norbert wrote: >Hi all, > >Can you explain to me why a point like POINT(-54.51 158.93) is not valid in wgs84 / srid 4326 in PostGIS and make a conflict "enforce_srid_coordinates" ? > >What's the error and solution ? > >thanks in advance, > >Norbert > > > > > > > > >___________________________________________________________________________ >D?couvrez une nouvelle fa?on d'obtenir des r?ponses ? toutes vos questions ! >Profitez des connaissances, des opinions et des exp?riences des internautes sur Yahoo! Questions/R?ponses >http://fr.answers.yahoo.com >_______________________________________________ >postgis-users mailing list >postgis-users at postgis.refractions.net >http://postgis.refractions.net/mailman/listinfo/postgis-users > > > -- ---------------------------------------------------------------- Joint Research Centre, European Commission Institute for the Protection and Security of the Citizen (IPSC) Unit: Support to External Security Via E. Fermi, 1 TP 267 Ispra 21020 (VA), Italy Tel. +39 0332 786239 (direct line) Fax. +39 0332 785154 WWW: http://ses.jrc.it ---------------------------------------------------------------- Disclaimer: Views expressed are those of the individual and do not represent the views of the European Commission From jsubei at yahoo.fr Fri Nov 17 02:45:53 2006 From: jsubei at yahoo.fr (Norbert) Date: Fri, 17 Nov 2006 10:45:53 +0000 (GMT) Subject: RESOLVED Re : [postgis-users] why a longitude like 180 are not valid in WGS84 in postgis ? Message-ID: <20061117104553.33541.qmail@web26212.mail.ukl.yahoo.com> ;-) I'a really beginner ! yes ok, my problem was the use of conversion fonction GeometryFromText() We have to explicitly set the srid, even if the postgis/database column is already specified with a specific srid. example : GeometryFromText('POINT(long lat)') or GeometryFromText('POINT(long lat)', -1) will not work GeometryFromText('POINT(long lat)', 4326) work. ==> GeometryFromText() it's not a contextual function ! (and GeometryFromText('POINT(-54 158)', 4326) work too ! but lot of thanks Guido) ----- Message d'origine ---- De : Guido Lemoine <guido.lemoine at jrc.it> ? : PostGIS Users Discussion <postgis-users at postgis.refractions.net> Envoy? le : Vendredi, 17 Novembre 2006, 11h26mn 22s Objet : Re: [postgis-users] why a longitude like 180 are not valid in WGS84 in postgis ? try POINT (158.93 -54.51) Notation is in X Y = LON LAT! 158.93 is far beyond the North Pole :-) GL Norbert wrote: >Hi all, > >Can you explain to me why a point like POINT(-54.51 158.93) is not valid in wgs84 / srid 4326 in PostGIS and make a conflict "enforce_srid_coordinates" ? > >What's the error and solution ? > >thanks in advance, > >Norbert > > > > > > > > >___________________________________________________________________________ >D?couvrez une nouvelle fa?on d'obtenir des r?ponses ? toutes vos questions ! >Profitez des connaissances, des opinions et des exp?riences des internautes sur Yahoo! Questions/R?ponses >http://fr.answers.yahoo.com >_______________________________________________ >postgis-users mailing list >postgis-users at postgis.refractions.net >http://postgis.refractions.net/mailman/listinfo/postgis-users > > > -- ---------------------------------------------------------------- Joint Research Centre, European Commission Institute for the Protection and Security of the Citizen (IPSC) Unit: Support to External Security Via E. Fermi, 1 TP 267 Ispra 21020 (VA), Italy Tel. +39 0332 786239 (direct line) Fax. +39 0332 785154 WWW: http://ses.jrc.it ---------------------------------------------------------------- Disclaimer: Views expressed are those of the individual and do not represent the views of the European Commission _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users ___________________________________________________________________________ D?couvrez une nouvelle fa?on d'obtenir des r?ponses ? toutes vos questions ! Profitez des connaissances, des opinions et des exp?riences des internautes sur Yahoo! Questions/R?ponses http://fr.answers.yahoo.com From pramsey at refractions.net Thu Nov 16 21:16:53 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Thu, 16 Nov 2006 21:16:53 -0800 Subject: [postgis-users] dynamic segmentation In-Reply-To: <cdf6db500611161656sa3cdba9m7abae5a2ed7d58f3@mail.gmail.com> References: <cdf6db500611161649o7a577a32he896024ecec68ba9@mail.gmail.com> <455D0824.2010808@swoodbridge.com> <cdf6db500611161656sa3cdba9m7abae5a2ed7d58f3@mail.gmail.com> Message-ID: <455D45C5.2080102@refractions.net> As with many things, the terminological environment has been muddied by the conflation of specific ESRI terms for particular features with generic terms for the similar things. Call it the "Chesterfield effect". ESRI "Dynamic segmentation" is really just "linear referencing of vectors and associated attributes". ESRI "Geodatabase" is "a database with a bunch of extra tables defined by and understood almost exclusively by ESRI" ESRI "Coverage" is a "vector topology that covers an area" (ever wonder why the OGC Web Coverage Server specification is about delivering *raster* data, not vector topologies? because most people have a different understanding of the word than us GIS brainwashees). ESRI "Topology" is a "middleware enforcement of spatial relationship rules" ESRI rules the intellectual world of GIS people so thoroughly that they define the very limits of the possible. Just last week someone told me "oh, editing features over the web? the only way to do that is with ArcGIS Server". The *only* way, and said with complete certainty. You don't want to argue with people like that, it seems almost rude, like arguing with people about religion. P P Kishor wrote: > On 11/16/06, Stephen Woodbridge <woodbri at swoodbridge.com> wrote: >> P Kishor wrote: >> > Someone asked me recently about open source dynamic segmentation >> > solutions. I thought, let's ask the PostGIS community. Is this >> > possible with PostGIS? If not, does anyone know of other open source >> > solutions for ds? >> > >> >> Can you describe what dynamic segmentation is? >> What is the algorithm? >> I guess I can google for it ... >> > > I don't know the algorithm, but among the many definitions, dynamic > segmentation allows analysis and mapping of linear features based on > their positions along a route. Another definition says that it is "the > process of computing the locations of events on linear features at run > time based on event tables for which distance measures are available." > Used in linear reference systems (LRS), typically for roads and > transportation networks analysis. > From tzuberbuehler at datacomm.ch Fri Nov 17 04:53:43 2006 From: tzuberbuehler at datacomm.ch (Thomas Zuberbuehler) Date: Fri, 17 Nov 2006 13:53:43 +0100 Subject: [postgis-users] BOX2D Message-ID: <e545098a0611170453v15636520v40e319dce2500ddd@mail.gmail.com> Hi Has anybody an idea why follow query does not execute? select b.* from hikeroutes h, baseedge b where b.the_geom && setSRID('BOX2D(h.the_geom2)'::box2d, 21781) and h.id = 148 and within(b.the_geom, h.the_geom2); -- 21 sec I get 'ERROR: BOX2DFLOAT4 parser - doesnt start with BOX('. Thank you. Regards, Thomas -- Thomas Zuberbuehler http://www.zubi.li From punkish at eidesis.org Fri Nov 17 06:55:32 2006 From: punkish at eidesis.org (P Kishor) Date: Fri, 17 Nov 2006 08:55:32 -0600 Subject: [postgis-users] dynamic segmentation In-Reply-To: <455D45C5.2080102@refractions.net> References: <cdf6db500611161649o7a577a32he896024ecec68ba9@mail.gmail.com> <455D0824.2010808@swoodbridge.com> <cdf6db500611161656sa3cdba9m7abae5a2ed7d58f3@mail.gmail.com> <455D45C5.2080102@refractions.net> Message-ID: <cdf6db500611170655u6728e02cjd33419db027def62@mail.gmail.com> On 11/16/06, Paul Ramsey <pramsey at refractions.net> wrote: > As with many things, the terminological environment has been muddied by > the conflation of specific ESRI terms for particular features with > generic terms for the similar things. Call it the "Chesterfield effect". > > ESRI "Dynamic segmentation" is really just "linear referencing of > vectors and associated attributes". So, between the above, and http://postgis.refractions.net/docs/ch06.html#id2529854, I can tell this friend of mine that lrs of vectors and assoc. attributes aka dynamic segmentation is possible using PostGIS. And that is most excellent. -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ Open Source Geospatial Foundation https://edu.osgeo.org/ ------------------------------------------------------------------------------------------------------- collaborate, communicate, compete ==================================================== From egouge at refractions.net Fri Nov 17 08:36:33 2006 From: egouge at refractions.net (Emily Gouge) Date: Fri, 17 Nov 2006 08:36:33 -0800 Subject: [postgis-users] BOX2D In-Reply-To: <e545098a0611170453v15636520v40e319dce2500ddd@mail.gmail.com> References: <e545098a0611170453v15636520v40e319dce2500ddd@mail.gmail.com> Message-ID: <455DE511.8070104@refractions.net> Try removing the quotes from the BOX2D statement. The quotes cause it to interprets it as a string and thus it is trying to cast the string "BOX2D(h.the_geom2)" to a box2d object which doesn't make a lot of sense. select b.* from hikeroutes h, baseedge b where b.the_geom && setSRID(BOX2D(h.the_geom2)::box2d, 21781) and h.id = 148 and within(b.the_geom, h.the_geom2); -- 21 sec Emily Thomas Zuberbuehler wrote: > Hi > > Has anybody an idea why follow query does not execute? > > select b.* from hikeroutes h, baseedge b where b.the_geom && > setSRID('BOX2D(h.the_geom2)'::box2d, 21781) and h.id = 148 and > within(b.the_geom, h.the_geom2); -- 21 sec > > I get 'ERROR: BOX2DFLOAT4 parser - doesnt start with BOX('. > > Thank you. > Regards, Thomas > From nbarker at ittvis.com Fri Nov 17 08:53:57 2006 From: nbarker at ittvis.com (Norman Barker) Date: Fri, 17 Nov 2006 16:53:57 -0000 Subject: [postgis-users] Hibernate with PostGIS References: <B67A5FB7A8114B47A70517C9C0D102E8131C8A@bath.uk.rsinc.com> <c653c98f0611160958x2f8745c6n5dcf33ea13539c95@mail.gmail.com> Message-ID: <B67A5FB7A8114B47A70517C9C0D102E81407B9@bath.uk.rsinc.com> Hi Sandeep, the hibernate driver is at http://svn.refractions.net/postgis/trunk/java/ejb3/src/org/postgis/hibernate/GeometryType.java and as I understand it this is sufficient for hibernate to persist Geometry types, or use in JBoss EJB3. This hibernate driver in turn uses postgis.jar, which in turn uses the postgresql driver. There has been a lot said about EJB3 versus Spring with Hibernate (and I have taken your bait!!). I guess it is down to the level (scalable) of the system you want to build and whether you want to follow enterprise standards (EJB3 is the standard that builds on top of the lessons learnt in Hibernate and Spring IoC). I would use either since JPA is also a standard, but I will be looking to port to Geronimo as soon as they get EJB3 to give container options; my reasons for EJB3 were (1) Scalability via clustering - this is very important for catalogs for disaster / crisis management (2) Declarative security (3) Transaction Management (potential WFS) (4) Stateful sessions (for other parts of my app) Suddenly I was using more of a J2EE container than a lightweight framework. I would say JBoss is light as well though! The most important thing here is the Hibernate POJO Geometry Driver for PostGIS, the framework doesn't matter too much. If you want the PostGIS, Hibernate (JBoss EJB3) stack to go into a different direction (Spring) give me a compelling reason - or lets work together to make this stack 'enterprise ready' for the community! Let me know if you need any help. Norman -----Original Message----- From: postgis-users-bounces at postgis.refractions.net on behalf of Sandeep Kumar Jakkaraju Sent: Thu 11/16/2006 5:58 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] Hibernate with PostGIS Hi Norman For using Hibernate with postgis ..i can directly use ur postgis.jar !! right ...?? Your Tutorial mainly aimed at using EJB3 with postgis ... did u think of using Spring instead of EJB3 !! ?? Thanks Sandeep On 11/16/06, Norman Barker <nbarker at ittvis.com> wrote: > > Sandeep, > > > > To use JBoss EJB3 with PostGIS I had to write a Hibernate Geometry Driver, > the source code is in PostGIS SVN (LGPL) and there is a tutorial available > here > > - > http://postgis.refractions.net/support/wiki/index.php?SpatialEJB3 > > > > It allows creation and updates through Java, the tutorial walks you > through a simple SOAP example. > > > > I am very interested in using the hibernate lucene annotations ( > http://www.hibernate.org/hib_docs/annotations/reference/en/html/lucene.html) > in conjunction with the Geometry driver to create some sort of catalog; so > that we can do a proper geometry search on PostGIS through the business > layer (not just boxes!) and then seach on metadata with Lucene. > > > > A couple of people have expressed interest in this hibernate geometry > driver for Java, please give me some feedback on the future direction you > want this to go. > > > > Thanks, > > > > Norman > > > ------------------------------ > > *From:* postgis-users-bounces at postgis.refractions.net [mailto: > postgis-users-bounces at postgis.refractions.net] *On Behalf Of *Sandeep > Kumar Jakkaraju > *Sent:* 16 November 2006 15:30 > *To:* PostGIS Users Discussion > *Subject:* [postgis-users] Hibernate with PostGIS > > > > Hi All > > I want to know if i can use Hibernate with PostGIS ?? > if yes ..then can some one point me to some doc which tells abt this !! > > I am just skeptical about the geometry column !! > > Thanks > Sandeep > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > -- Sandeep Kumar Jakkaraju WeBlog: http://jakkarajus.blogspot.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 4783 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061117/eb8bfb45/attachment.bin> From erics at ameri-title.com Fri Nov 17 16:28:51 2006 From: erics at ameri-title.com (Eric Shuman) Date: Fri, 17 Nov 2006 16:28:51 -0800 Subject: [postgis-users] Spatial Join Performance Message-ID: <KMEIKNPGBOLILGCIHBLCOEBECBAA.erics@ameri-title.com> Paul, Brent, etc... So I have been trying the various work arounds for the TOAST issue, but can't seem to force the query to use the spatial index on the table in question. None of the work arounds seem to change anything. Below are some of my stats and the query with query plan. SELECT version(); "PostgreSQL 8.0.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)" SELECT postgis_version(); "1.0 USE_GEOS=1 USE_PROJ=0 USE_STATS=1" SET enable_seqscan=OFF; SET random_page_cost=1; SET effective_cache_size=1000; -- Have tried up to 10000000 as well EXPLAIN SELECT taxlot,zone_ FROM taxlot,zoning WHERE taxlot.the_geom && zoning.the_geom AND contains(zoning.the_geom,taxlot.the_point_geom) --------- Query Plan -------------------------- "Nested Loop (cost=100000000.00..100003612.20 rows=62135 width=23)" " Join Filter: contains("outer".the_geom, "inner".the_point_geom)" " -> Seq Scan on zoning (cost=100000000.00..100000132.49 rows=1149 width=1967)" " -> Index Scan using taxlot_geom_index on taxlot (cost=0.00..3.01 rows=1 width=492)" " Index Cond: (taxlot.the_geom && "outer".the_geom)" ------------------------------------------------ Some of the things I have also tried: -- SELECT AddGeometryColumn('','taxlot','the_point_geom','-1','POINT',2); -- update taxlot set the_point_geom = centroid(taxlot.the_geom); -- create index point_index on taxlot USING GIST (the_point_geom); -- vacuum analyze taxlot; -- vacuum analyze zoning; -- SELECT addGeometryColumn('','zoning','bbox','-1','GEOMETRY','2'); -- UPDATE zoning set bbox = Envelope(Force_2d(the_geom)); Would the fact that I don't have a srid set on the tables matter? Thanks again for all the help! --------------- Eric Shuman From carl.anderson at vadose.org Fri Nov 17 17:20:43 2006 From: carl.anderson at vadose.org (Carl Anderson) Date: Fri, 17 Nov 2006 20:20:43 -0500 Subject: [postgis-users] Spatial Join Performance In-Reply-To: <KMEIKNPGBOLILGCIHBLCOEBECBAA.erics@ameri-title.com> References: <KMEIKNPGBOLILGCIHBLCOEBECBAA.erics@ameri-title.com> Message-ID: <455E5FEB.2080400@vadose.org> Eric, Your query(as explained) is using the spatial indexes. Spatial predicates (intersects, contains, within, ...) are all greatly affected by the number of vertices in the geometries being compared. Try Select avg(npoints(the_geom)), stddev(npoints(the_geom)) from taxlot and again for zoning. More than a couple hundred vertices per geometry on either or both sides would definitely slow you down. Strategies that I have successfully used: (If stray positives or stray negatives are acceptable) Build a separate table for taxlots and for zoning each based on simplify(the_geom, X) where X is tuned to your tolerance for false positives and negatives. (If an exact answer is desired) Slice each the_geom from into a gridded table for each layer. Each the_geom turns into many rectangular elements in its interior and mostly rectangular elements when a grid contains a boundary for the_geom You query would have to be rewritten to account for the muliple returns for each original geometries mixed results your original query assumed only one zoning per taxlot that may not really be true. Tuning only one side does not improve things very much. let me know if you want scripts to build gridded tables. C. Eric Shuman wrote: > Paul, Brent, etc... > > So I have been trying the various work arounds for the TOAST issue, but > can't seem to force the query to use the spatial index on the table in > question. None of the work arounds seem to change anything. Below are some > of my stats and the query with query plan. > > > SELECT version(); > "PostgreSQL 8.0.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.5 > (Debian 1:3.3.5-13)" > > SELECT postgis_version(); > "1.0 USE_GEOS=1 USE_PROJ=0 USE_STATS=1" > > > SET enable_seqscan=OFF; > SET random_page_cost=1; > SET effective_cache_size=1000; -- Have tried up to 10000000 as well > > EXPLAIN > > SELECT taxlot,zone_ > FROM taxlot,zoning > WHERE > taxlot.the_geom && zoning.the_geom > AND > contains(zoning.the_geom,taxlot.the_point_geom) > > --------- Query Plan -------------------------- > "Nested Loop (cost=100000000.00..100003612.20 rows=62135 width=23)" > " Join Filter: contains("outer".the_geom, "inner".the_point_geom)" > " -> Seq Scan on zoning (cost=100000000.00..100000132.49 rows=1149 > width=1967)" > " -> Index Scan using taxlot_geom_index on taxlot (cost=0.00..3.01 rows=1 > width=492)" > " Index Cond: (taxlot.the_geom && "outer".the_geom)" > ------------------------------------------------ > > Some of the things I have also tried: > -- SELECT AddGeometryColumn('','taxlot','the_point_geom','-1','POINT',2); > -- update taxlot set the_point_geom = centroid(taxlot.the_geom); > -- create index point_index on taxlot USING GIST (the_point_geom); > -- vacuum analyze taxlot; > -- vacuum analyze zoning; > > -- SELECT addGeometryColumn('','zoning','bbox','-1','GEOMETRY','2'); > -- UPDATE zoning set bbox = Envelope(Force_2d(the_geom)); > > > Would the fact that I don't have a srid set on the tables matter? > > > > Thanks again for all the help! > > --------------- > Eric Shuman > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From pramsey at refractions.net Fri Nov 17 17:36:59 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Fri, 17 Nov 2006 17:36:59 -0800 Subject: [postgis-users] Spatial Join Performance In-Reply-To: <KMEIKNPGBOLILGCIHBLCOEBECBAA.erics@ameri-title.com> References: <KMEIKNPGBOLILGCIHBLCOEBECBAA.erics@ameri-title.com> Message-ID: <DD128E0A-8D2C-4C58-A127-26CAD3AF0D6F@refractions.net> Have you tried SELECT taxlot,zone_ FROM taxlot,zoning WHERE taxlot.the_geom && zoning.the_geom AND distance(zoning.the_geom,taxlot.the_point_geom) < 0.01 ? On 17-Nov-06, at 4:28 PM, Eric Shuman wrote: > Paul, Brent, etc... > > So I have been trying the various work arounds for the TOAST issue, > but > can't seem to force the query to use the spatial index on the table in > question. None of the work arounds seem to change anything. Below > are some > of my stats and the query with query plan. > > > SELECT version(); > "PostgreSQL 8.0.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) > 3.3.5 > (Debian 1:3.3.5-13)" > > SELECT postgis_version(); > "1.0 USE_GEOS=1 USE_PROJ=0 USE_STATS=1" > > > SET enable_seqscan=OFF; > SET random_page_cost=1; > SET effective_cache_size=1000; -- Have tried up to 10000000 as well > > EXPLAIN > > SELECT taxlot,zone_ > FROM taxlot,zoning > WHERE > taxlot.the_geom && zoning.the_geom > AND > contains(zoning.the_geom,taxlot.the_point_geom) > > --------- Query Plan -------------------------- > "Nested Loop (cost=100000000.00..100003612.20 rows=62135 width=23)" > " Join Filter: contains("outer".the_geom, "inner".the_point_geom)" > " -> Seq Scan on zoning (cost=100000000.00..100000132.49 rows=1149 > width=1967)" > " -> Index Scan using taxlot_geom_index on taxlot > (cost=0.00..3.01 rows=1 > width=492)" > " Index Cond: (taxlot.the_geom && "outer".the_geom)" > ------------------------------------------------ > > Some of the things I have also tried: > -- SELECT AddGeometryColumn > ('','taxlot','the_point_geom','-1','POINT',2); > -- update taxlot set the_point_geom = centroid(taxlot.the_geom); > -- create index point_index on taxlot USING GIST (the_point_geom); > -- vacuum analyze taxlot; > -- vacuum analyze zoning; > > -- SELECT addGeometryColumn('','zoning','bbox','-1','GEOMETRY','2'); > -- UPDATE zoning set bbox = Envelope(Force_2d(the_geom)); > > > Would the fact that I don't have a srid set on the tables matter? > > > > Thanks again for all the help! > > --------------- > Eric Shuman > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From sandeepkumar.jakkaraju at gmail.com Sat Nov 18 05:27:28 2006 From: sandeepkumar.jakkaraju at gmail.com (Sandeep Kumar Jakkaraju) Date: Sat, 18 Nov 2006 18:57:28 +0530 Subject: [postgis-users] Hibernate with PostGIS In-Reply-To: <B67A5FB7A8114B47A70517C9C0D102E81407B9@bath.uk.rsinc.com> References: <B67A5FB7A8114B47A70517C9C0D102E8131C8A@bath.uk.rsinc.com> <c653c98f0611160958x2f8745c6n5dcf33ea13539c95@mail.gmail.com> <B67A5FB7A8114B47A70517C9C0D102E81407B9@bath.uk.rsinc.com> Message-ID: <c653c98f0611180527n61b3faa1vb7c00d0320f648c6@mail.gmail.com> Hi Norman Please Help .. This my class definition ... public class RoadNetwork { private Geometry location=null; private long id; public long getId() { return id; } public void setId(long id) { this.id = id; } public void setLocation(Geometry loc) { this.location = loc; } public Geometry getLocation() { return location; } } My RoadNetwork.hbm.xml.... <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping > <class name="hello.RoadNetwork" table="Roads" > <id name="id" column="id" type="java.lang.Long" > <generator class="increment"> </generator> </id> <property name="location" type="org.postgis.hibernate.GeometryType" update="true" insert="true" column="location" /> </class> </hibernate-mapping> On 11/17/06, Norman Barker <nbarker at ittvis.com> wrote: > > Hi Sandeep, > > the hibernate driver is at > http://svn.refractions.net/postgis/trunk/java/ejb3/src/org/postgis/hibernate/GeometryType.java > and as I understand it this is sufficient for hibernate to persist > Geometry types, or use in JBoss EJB3. This hibernate driver in turn uses > postgis.jar, which in turn uses the postgresql driver. > > There has been a lot said about EJB3 versus Spring with Hibernate (and I > have taken your bait!!). I guess it is down to the level (scalable) of the > system you want to build and whether you want to follow enterprise standards > (EJB3 is the standard that builds on top of the lessons learnt in Hibernate > and Spring IoC). I would use either since JPA is also a standard, but I > will be looking to port to Geronimo as soon as they get EJB3 to give > container options; my reasons for EJB3 were > > (1) Scalability via clustering - this is very important for catalogs for > disaster / crisis management > (2) Declarative security > (3) Transaction Management (potential WFS) > (4) Stateful sessions (for other parts of my app) > > Suddenly I was using more of a J2EE container than a lightweight > framework. I would say JBoss is light as well though! > > The most important thing here is the Hibernate POJO Geometry Driver for > PostGIS, the framework doesn't matter too much. If you want the PostGIS, > Hibernate (JBoss EJB3) stack to go into a different direction (Spring) give > me a compelling reason - or lets work together to make this stack > 'enterprise ready' for the community! > > Let me know if you need any help. > > Norman > > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net on behalf of Sandeep > Kumar Jakkaraju > Sent: Thu 11/16/2006 5:58 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] Hibernate with PostGIS > > Hi Norman > > For using Hibernate with postgis ..i can directly use ur postgis.jar !! > right ...?? > > Your Tutorial mainly aimed at using EJB3 with postgis ... > did u think of using Spring instead of EJB3 !! ?? > > Thanks > Sandeep > > > > On 11/16/06, Norman Barker <nbarker at ittvis.com> wrote: > > > > Sandeep, > > > > > > > > To use JBoss EJB3 with PostGIS I had to write a Hibernate Geometry > Driver, > > the source code is in PostGIS SVN (LGPL) and there is a tutorial > available > > here > > > > - > > http://postgis.refractions.net/support/wiki/index.php?SpatialEJB3 > > > > > > > > It allows creation and updates through Java, the tutorial walks you > > through a simple SOAP example. > > > > > > > > I am very interested in using the hibernate lucene annotations ( > > > http://www.hibernate.org/hib_docs/annotations/reference/en/html/lucene.html > ) > > in conjunction with the Geometry driver to create some sort of catalog; > so > > that we can do a proper geometry search on PostGIS through the business > > layer (not just boxes!) and then seach on metadata with Lucene. > > > > > > > > A couple of people have expressed interest in this hibernate geometry > > driver for Java, please give me some feedback on the future direction > you > > want this to go. > > > > > > > > Thanks, > > > > > > > > Norman > > > > > > ------------------------------ > > > > *From:* postgis-users-bounces at postgis.refractions.net [mailto: > > postgis-users-bounces at postgis.refractions.net] *On Behalf Of *Sandeep > > Kumar Jakkaraju > > *Sent:* 16 November 2006 15:30 > > *To:* PostGIS Users Discussion > > *Subject:* [postgis-users] Hibernate with PostGIS > > > > > > > > Hi All > > > > I want to know if i can use Hibernate with PostGIS ?? > > if yes ..then can some one point me to some doc which tells abt this !! > > > > I am just skeptical about the geometry column !! > > > > Thanks > > Sandeep > > > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > > > > > -- > Sandeep Kumar Jakkaraju > WeBlog: > http://jakkarajus.blogspot.com > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > -- Sandeep Kumar Jakkaraju WeBlog: http://jakkarajus.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061118/53a634a6/attachment.html> From sandeepkumar.jakkaraju at gmail.com Sat Nov 18 05:34:41 2006 From: sandeepkumar.jakkaraju at gmail.com (Sandeep Kumar Jakkaraju) Date: Sat, 18 Nov 2006 19:04:41 +0530 Subject: [postgis-users] RESEND- Help with using Hibernate with PostGIS Message-ID: <c653c98f0611180534k63cedbfbj3351ac4d28e548d4@mail.gmail.com> Hi Norman Please Help .. This my class definition ... public class RoadNetwork { private Geometry location=null; private long id; public long getId() { return id; } public void setId(long id) { this.id = id; } public void setLocation(Geometry loc) { this.location = loc; } public Geometry getLocation() { return location; } } My RoadNetwork.hbm.xml.... <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0 //EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping > <class name="hello.RoadNetwork" table="Roads" > <id name="id" column="id" type="java.lang.Long " > <generator class="increment"> </generator> </id> <property name="location" type=" org.postgis.hibernate.GeometryType" update="true" insert="true" column="location" /> </class> </hibernate-mapping> main method ..inserting in database... { SessionFactory sessions = new Configuration().configure().buildSessionFactory(); session =sessions.openSession(); session.connection().setAutoCommit(true); System.out.println("Inserting Record"); LineString geom = new LineString(lng_str); RoadNetwork net = new RoadNetwork(); net.setLocation(geom); session.save(net); session.flush(); session.close(); System.out.println("Done"); } Errors : I get [java] Hibernate: insert into Roads (location, id) values (?, ?) [java] 19:01:40,215 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState : null [java] 19:01:40,216 ERROR JDBCExceptionReporter:72 - Batch entry 0 insert i nto Roads (location, id) values (<stream of 105 bytes>, 1) was aborted. Call ge tNextException to see the cause. [java] 19:01:40,217 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState : 42804 [java] 19:01:40,217 ERROR JDBCExceptionReporter:72 - ERROR: column "locatio n" is of type oid but expression is of type bytea [java] 19:01:40,224 ERROR AbstractFlushingEventListener:300 - Could not syn chronize database state with session [java] org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061118/2c3796d0/attachment.html> From sandeepkumar.jakkaraju at gmail.com Sat Nov 18 06:54:27 2006 From: sandeepkumar.jakkaraju at gmail.com (Sandeep Kumar Jakkaraju) Date: Sat, 18 Nov 2006 20:24:27 +0530 Subject: [postgis-users] Hibernate with PostGIS In-Reply-To: <B67A5FB7A8114B47A70517C9C0D102E81407B9@bath.uk.rsinc.com> References: <B67A5FB7A8114B47A70517C9C0D102E8131C8A@bath.uk.rsinc.com> <c653c98f0611160958x2f8745c6n5dcf33ea13539c95@mail.gmail.com> <B67A5FB7A8114B47A70517C9C0D102E81407B9@bath.uk.rsinc.com> Message-ID: <c653c98f0611180654n61d6e790t77489331da6b4849@mail.gmail.com> I think Hibernate cannot create that Geometry column automatically !!! is it something to do with hbm2ddl.auto !! I am able to ..get the geometry from a table with geometry column already created ... Norman -->> Would you like me to create a simple tutorial on how to use Hibernate with Postgis ..your tutorial .. is not easy to understand ... Thanks Sandeep -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061118/07edc802/attachment.html> From dave.potts at pinan.co.uk Sat Nov 18 09:07:48 2006 From: dave.potts at pinan.co.uk (Dave Potts) Date: Sat, 18 Nov 2006 17:07:48 +0000 Subject: [postgis-users] Hibernate with PostGIS In-Reply-To: <c653c98f0611180654n61d6e790t77489331da6b4849@mail.gmail.com> References: <B67A5FB7A8114B47A70517C9C0D102E8131C8A@bath.uk.rsinc.com> <c653c98f0611160958x2f8745c6n5dcf33ea13539c95@mail.gmail.com> <B67A5FB7A8114B47A70517C9C0D102E81407B9@bath.uk.rsinc.com> <c653c98f0611180654n61d6e790t77489331da6b4849@mail.gmail.com> Message-ID: <455F3DE4.5020802@pinan.co.uk> First of all thank you Norman for writing the orginal code. There is a slight problem with it, it does not handle a null geometry column, rewritting nullSafeGet as follows, fixes the problem. I can not say if it will address Sandeep problems, but it is worth trying. David. /** * @see org.hibernate.usertype.UserType#nullSafeGet(java.sql.ResultSet, java.lang.String[], java.lang.Object) */ public Object nullSafeGet(ResultSet resultSet, String[] names, Object owner) throws HibernateException, SQLException { Geometry result = null; String geom = resultSet.getString(names[0]); if(geom != null ) { BinaryParser parser = new BinaryParser(); result = parser.parse(geom); } return result; } Sandeep Kumar Jakkaraju wrote: > > I think Hibernate cannot create that Geometry column automatically !!! > is it something to do with hbm2ddl.auto !! > > > I am able to ..get the geometry from a table with geometry column > already created ... > > Norman -->> Would you like me to create a simple tutorial on how to > use Hibernate with Postgis ..your tutorial .. is not easy to > understand ... > > > Thanks > Sandeep > > > > ------------------------------------------------------------------------ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From nbarker at ittvis.com Sun Nov 19 02:54:45 2006 From: nbarker at ittvis.com (Norman Barker) Date: Sun, 19 Nov 2006 10:54:45 -0000 Subject: [postgis-users] Hibernate with PostGIS References: <B67A5FB7A8114B47A70517C9C0D102E8131C8A@bath.uk.rsinc.com> <c653 c98f0611160958x2f8745c6n5dcf33ea13539c95@mail.gmail.com> <B67A5FB7A8114B47A 70517C9C0D102E81407B9@bath.uk.rsinc.com><c653c98f0611180654n61d6e790t774893 31da6b4849@mail.gmail.com> <455F3DE4.5020802@pinan.co.uk> Message-ID: <B67A5FB7A8114B47A70517C9C0D102E81407BD@bath.uk.rsinc.com> David, thanks, I will add that change to the code, and will write a test that with an EJB3 entity that has to create the columns in PostGIS automatically. This should be directly analagous to hibernate. I created my database first, and then mapped the pojos; I can understand that this isn't so desirable. Sandeep I will try to do this week, and resolve your issues with hibernate. Thanks for the fix, it was bad of me not to check whether the geom was null! David are you from Pinan Software? You are only a couple of miles down the road from me in the UK! Norman -----Original Message----- From: postgis-users-bounces at postgis.refractions.net on behalf of Dave Potts Sent: Sat 11/18/2006 5:07 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] Hibernate with PostGIS First of all thank you Norman for writing the orginal code. There is a slight problem with it, it does not handle a null geometry column, rewritting nullSafeGet as follows, fixes the problem. I can not say if it will address Sandeep problems, but it is worth trying. David. /** * @see org.hibernate.usertype.UserType#nullSafeGet(java.sql.ResultSet, java.lang.String[], java.lang.Object) */ public Object nullSafeGet(ResultSet resultSet, String[] names, Object owner) throws HibernateException, SQLException { Geometry result = null; String geom = resultSet.getString(names[0]); if(geom != null ) { BinaryParser parser = new BinaryParser(); result = parser.parse(geom); } return result; } Sandeep Kumar Jakkaraju wrote: > > I think Hibernate cannot create that Geometry column automatically !!! > is it something to do with hbm2ddl.auto !! > > > I am able to ..get the geometry from a table with geometry column > already created ... > > Norman -->> Would you like me to create a simple tutorial on how to > use Hibernate with Postgis ..your tutorial .. is not easy to > understand ... > > > Thanks > Sandeep > > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061119/f73ebc50/attachment.html> From fanfoi at gmail.com Sun Nov 19 09:25:16 2006 From: fanfoi at gmail.com (=?UTF-8?Q?Fran=C3=A7ois_Weykmans?=) Date: Sun, 19 Nov 2006 12:25:16 -0500 Subject: [postgis-users] [patch] GEOS simplify functions Message-ID: <22cd967e0611190925g5eed175ck4f114467fd20286a@mail.gmail.com> Hello! Add GEOS simplify functions to PostGIS (testing only with PostGIS 1.1.6 and geos-3.0.0rc2) With them, you can use big tolerance without get null result value... SQL : simplify_geos(geometry,float8) = GEOS DouglasPeuckerSimplifier::simplify(g1, tolerance) SQL : simplifytopologypreserve_geos(geometry,float8) = GEOS TopologyPreservingSimplifier::simplify(g1, tolerance) Thanks a lots for PostGIS!!! Fran?ois diff -r -c /postgis-1.1.6/lwgeom/lwgeom_geos.c /new/postgis-1.1.6/lwgeom/lwgeom_geos.c *** /postgis-1.1.6/lwgeom/lwgeom_geos.c Mon Dec 12 09:40:50 2005 --- /new/postgis-1.1.6/lwgeom/lwgeom_geos.c Fri Nov 17 08:30:15 2006 *************** *** 66,71 **** --- 66,75 ---- Datum linemerge(PG_FUNCTION_ARGS); Datum LWGEOM_buildarea(PG_FUNCTION_ARGS); + + Datum simplify_geos(PG_FUNCTION_ARGS); + Datum simplifytopologypreserve_geos(PG_FUNCTION_ARGS); + typedef struct Geometry Geometry; *************** *** 101,106 **** --- 105,115 ---- extern Geometry *GEOSGetCentroid(Geometry *g, int *failure); extern bool GEOSHasZ(Geometry *g1); + + extern Geometry *GEOSSimplify(Geometry *g1, double tolerance); + extern Geometry *GEOSTopologyPreserveSimplify(Geometry *g1, double tolerance); + + extern void GEOSSetSRID(Geometry *g, int SRID); extern void GEOSdeleteChar(char *a); extern void GEOSdeleteGeometry(Geometry *a); *************** *** 2896,2898 **** --- 2905,3089 ---- PG_RETURN_NULL(); } + + PG_FUNCTION_INFO_V1(simplify_geos); + Datum simplify_geos(PG_FUNCTION_ARGS) + { + PG_LWGEOM *geom1; + double tolerance; + GEOSGeom g1,g2; + PG_LWGEOM *result; + int is3d; + int SRID; + + #ifdef PROFILE + profstart(PROF_QRUN); + #endif + + geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + tolerance = PG_GETARG_FLOAT8(1); + + is3d = ( TYPE_HASZ(geom1->type) ); + SRID = pglwgeom_getSRID(geom1); + initGEOS(lwnotice, lwnotice); + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify starting"); + #endif + + #ifdef PROFILE + profstart(PROF_P2G1); + #endif + g1 = POSTGIS2GEOS(geom1); + #ifdef PROFILE + profstop(PROF_P2G1); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE," constructed geometry - calling geos"); + elog(NOTICE," g1 = %s", GEOSGeomToWKT(g1)); + /*elog(NOTICE,"g1 is valid = %i",GEOSisvalid(g1)); */ + #endif + + #ifdef PROFILE + profstart(PROF_GRUN); + #endif + g2 = GEOSSimplify(g1,tolerance); + #ifdef PROFILE + profstop(PROF_GRUN); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify finished"); + #endif + + if (g2 == NULL) + { + elog(ERROR,"GEOS Simplify() threw an error!"); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); /* never get here */ + } + #ifdef PGIS_DEBUG + elog(NOTICE,"result: %s", GEOSGeomToWKT(g2) ) ; + #endif + GEOSSetSRID(g2, SRID); + #ifdef PROFILE + profstart(PROF_G2P); + #endif + result = GEOS2POSTGIS(g2, is3d); + #ifdef PROFILE + profstop(PROF_G2P); + #endif + + if (result == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + elog(ERROR,"GEOS Simplify() threw an error (result postgis geometry formation)!"); + PG_RETURN_NULL(); /* never get here */ + } + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + + /* compressType(result); */ + + #ifdef PROFILE + profstop(PROF_QRUN); + profreport("geos",geom1, result); + #endif + PG_FREE_IF_COPY(geom1, 0); + + PG_RETURN_POINTER(result); + } + + PG_FUNCTION_INFO_V1(simplifytopologypreserve_geos); + Datum simplifytopologypreserve_geos(PG_FUNCTION_ARGS) + { + PG_LWGEOM *geom1; + double tolerance; + GEOSGeom g1,g2; + PG_LWGEOM *result; + int is3d; + int SRID; + + #ifdef PROFILE + profstart(PROF_QRUN); + #endif + + geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + tolerance = PG_GETARG_FLOAT8(1); + + is3d = ( TYPE_HASZ(geom1->type) ); + SRID = pglwgeom_getSRID(geom1); + initGEOS(lwnotice, lwnotice); + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify starting"); + #endif + + #ifdef PROFILE + profstart(PROF_P2G1); + #endif + g1 = POSTGIS2GEOS(geom1); + #ifdef PROFILE + profstop(PROF_P2G1); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE," constructed geometry - calling geos"); + elog(NOTICE," g1 = %s", GEOSGeomToWKT(g1)); + /*elog(NOTICE,"g1 is valid = %i",GEOSisvalid(g1)); */ + #endif + + #ifdef PROFILE + profstart(PROF_GRUN); + #endif + g2 = GEOSTopologyPreserveSimplify(g1,tolerance); + #ifdef PROFILE + profstop(PROF_GRUN); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify finished"); + #endif + + if (g2 == NULL) + { + elog(ERROR,"GEOS TopologyPreserveSimplify() threw an error!"); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); /* never get here */ + } + #ifdef PGIS_DEBUG + elog(NOTICE,"result: %s", GEOSGeomToWKT(g2) ) ; + #endif + GEOSSetSRID(g2, SRID); + #ifdef PROFILE + profstart(PROF_G2P); + #endif + result = GEOS2POSTGIS(g2, is3d); + #ifdef PROFILE + profstop(PROF_G2P); + #endif + + if (result == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + elog(ERROR,"GEOS TopologyPreserveSimplify() threw an error (result postgis geometry formation)!"); + PG_RETURN_NULL(); /* never get here */ + } + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + + /* compressType(result); */ + + #ifdef PROFILE + profstop(PROF_QRUN); + profreport("geos",geom1, result); + #endif + PG_FREE_IF_COPY(geom1, 0); + + PG_RETURN_POINTER(result); + } + + diff -r -c /postgis-1.1.6/lwgeom/lwgeom_geos_c.c /new/postgis-1.1.6/lwgeom/lwgeom_geos_c.c *** /postgis-1.1.6/lwgeom/lwgeom_geos_c.c Wed Oct 25 03:23:00 2006 --- /new/postgis-1.1.6/lwgeom/lwgeom_geos_c.c Fri Nov 17 08:15:59 2006 *************** *** 67,72 **** --- 67,76 ---- Datum LWGEOM_buildarea(PG_FUNCTION_ARGS); Datum linemerge(PG_FUNCTION_ARGS); + + Datum simplify_geos(PG_FUNCTION_ARGS); + Datum simplifytopologypreserve_geos(PG_FUNCTION_ARGS); + LWGEOM *GEOS2LWGEOM(GEOSGeom geom, char want3d); PG_LWGEOM *GEOS2POSTGIS(GEOSGeom geom, char want3d); *************** *** 2974,2976 **** --- 2978,3162 ---- PG_RETURN_POINTER(result); } + + + PG_FUNCTION_INFO_V1(simplify_geos); + Datum simplify_geos(PG_FUNCTION_ARGS) + { + PG_LWGEOM *geom1; + double tolerance; + GEOSGeom g1,g2; + PG_LWGEOM *result; + int is3d; + int SRID; + + #ifdef PROFILE + profstart(PROF_QRUN); + #endif + + geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + tolerance = PG_GETARG_FLOAT8(1); + + is3d = ( TYPE_HASZ(geom1->type) ); + SRID = pglwgeom_getSRID(geom1); + initGEOS(lwnotice, lwnotice); + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify starting"); + #endif + + #ifdef PROFILE + profstart(PROF_P2G1); + #endif + g1 = POSTGIS2GEOS(geom1); + #ifdef PROFILE + profstop(PROF_P2G1); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE," constructed geometry - calling geos"); + elog(NOTICE," g1 = %s", GEOSGeomToWKT(g1)); + /*elog(NOTICE,"g1 is valid = %i",GEOSisvalid(g1)); */ + #endif + + #ifdef PROFILE + profstart(PROF_GRUN); + #endif + g2 = GEOSSimplify(g1,tolerance); + #ifdef PROFILE + profstop(PROF_GRUN); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify finished"); + #endif + + if (g2 == NULL) + { + elog(ERROR,"GEOS Simplify() threw an error!"); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); /* never get here */ + } + #ifdef PGIS_DEBUG + elog(NOTICE,"result: %s", GEOSGeomToWKT(g2) ) ; + #endif + GEOSSetSRID(g2, SRID); + #ifdef PROFILE + profstart(PROF_G2P); + #endif + result = GEOS2POSTGIS(g2, is3d); + #ifdef PROFILE + profstop(PROF_G2P); + #endif + + if (result == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + elog(ERROR,"GEOS Simplify() threw an error (result postgis geometry formation)!"); + PG_RETURN_NULL(); /* never get here */ + } + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + + /* compressType(result); */ + + #ifdef PROFILE + profstop(PROF_QRUN); + profreport("geos",geom1, result); + #endif + PG_FREE_IF_COPY(geom1, 0); + + PG_RETURN_POINTER(result); + } + + PG_FUNCTION_INFO_V1(simplifytopologypreserve_geos); + Datum simplifytopologypreserve_geos(PG_FUNCTION_ARGS) + { + PG_LWGEOM *geom1; + double tolerance; + GEOSGeom g1,g2; + PG_LWGEOM *result; + int is3d; + int SRID; + + #ifdef PROFILE + profstart(PROF_QRUN); + #endif + + geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + tolerance = PG_GETARG_FLOAT8(1); + + is3d = ( TYPE_HASZ(geom1->type) ); + SRID = pglwgeom_getSRID(geom1); + initGEOS(lwnotice, lwnotice); + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify starting"); + #endif + + #ifdef PROFILE + profstart(PROF_P2G1); + #endif + g1 = POSTGIS2GEOS(geom1); + #ifdef PROFILE + profstop(PROF_P2G1); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE," constructed geometry - calling geos"); + elog(NOTICE," g1 = %s", GEOSGeomToWKT(g1)); + /*elog(NOTICE,"g1 is valid = %i",GEOSisvalid(g1)); */ + #endif + + #ifdef PROFILE + profstart(PROF_GRUN); + #endif + g2 = GEOSTopologyPreserveSimplify(g1,tolerance); + #ifdef PROFILE + profstop(PROF_GRUN); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify finished"); + #endif + + if (g2 == NULL) + { + elog(ERROR,"GEOS TopologyPreserveSimplify() threw an error!"); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); /* never get here */ + } + #ifdef PGIS_DEBUG + elog(NOTICE,"result: %s", GEOSGeomToWKT(g2) ) ; + #endif + GEOSSetSRID(g2, SRID); + #ifdef PROFILE + profstart(PROF_G2P); + #endif + result = GEOS2POSTGIS(g2, is3d); + #ifdef PROFILE + profstop(PROF_G2P); + #endif + + if (result == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + elog(ERROR,"GEOS TopologyPreserveSimplify() threw an error (result postgis geometry formation)!"); + PG_RETURN_NULL(); /* never get here */ + } + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + + /* compressType(result); */ + + #ifdef PROFILE + profstop(PROF_QRUN); + profreport("geos",geom1, result); + #endif + PG_FREE_IF_COPY(geom1, 0); + + PG_RETURN_POINTER(result); + } + diff -r -c /postgis-1.1.6/lwgeom/lwgeom_geos_wrapper.cpp /new/postgis-1.1.6/lwgeom/lwgeom_geos_wrapper.cpp *** /postgis-1.1.6/lwgeom/lwgeom_geos_wrapper.cpp Fri Dec 16 00:56:15 2005 --- /new/postgis-1.1.6/lwgeom/lwgeom_geos_wrapper.cpp Fri Nov 17 07:54:29 2006 *************** *** 10,15 **** --- 10,21 ---- #include "postgis_geos_version.h" #include "geos/geom.h" #include "geos/util.h" + + + //#include <geos/simplify/DouglasPeuckerSimplifier.h> + //#include <geos/simplify/TopologyPreservingSimplifier.h> + + #if GEOS_FIRST_INTERFACE <= 3 && GEOS_LAST_INTERFACE >= 3 #include "geos/opValid.h" #include "geos/opPolygonize.h" *************** *** 140,145 **** --- 146,155 ---- extern "C" Geometry *GEOSSymDifference(Geometry *g1,Geometry *g2); extern "C" Geometry *GEOSUnion(Geometry *g1,Geometry *g2); + + extern "C" Geometry *GEOSSimplify(Geometry *g1, double tolerance); + extern "C" Geometry *GEOSTopologyPreserveSimplify(Geometry *g1, double tolerance); + extern "C" POINT3D *GEOSGetCoordinate(Geometry *g1); extern "C" POINT3D *GEOSGetCoordinates_Polygon(Polygon *g1); *************** *** 1857,1859 **** --- 1867,1917 ---- return NULL; } } + + + Geometry * + GEOSSimplify(const Geometry *g1, double tolerance) + { + using namespace geos::simplify; + + try + { + Geometry::AutoPtr g(DouglasPeuckerSimplifier::simplify(g1, tolerance)); + return g.release(); + } + catch (const std::exception &e) + { + ERROR_MESSAGE("%s", e.what()); + return NULL; + } + + catch (...) + { + ERROR_MESSAGE("Unknown exception thrown"); + return NULL; + } + } + + Geometry * + GEOSTopologyPreserveSimplify(const Geometry *g1, double tolerance) + { + using namespace geos::simplify; + + try + { + Geometry::AutoPtr g(TopologyPreservingSimplifier::simplify(g1, tolerance)); + return g.release(); + } + catch (const std::exception &e) + { + ERROR_MESSAGE("%s", e.what()); + return NULL; + } + + catch (...) + { + ERROR_MESSAGE("Unknown exception thrown"); + return NULL; + } + } + diff -r -c /postgis-1.1.6/lwgeom/lwpostgis.sql.in /new/postgis-1.1.6/lwgeom/lwpostgis.sql.in *** /postgis-1.1.6/lwgeom/lwpostgis.sql.in Fri Jul 7 06:56:52 2006 --- /new/postgis-1.1.6/lwgeom/lwpostgis.sql.in Fri Nov 17 08:55:30 2006 *************** *** 2876,2881 **** --- 2876,2893 ---- -- GEOS --------------------------------------------------------------- + + CREATEFUNCTION simplify_geos(geometry,float8) + RETURNS geometry + AS '@MODULE_FILENAME@','simplify_geos' + LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable) + + CREATEFUNCTION simplifytopologypreserve_geos(geometry,float8) + RETURNS geometry + AS '@MODULE_FILENAME@','simplifytopologypreserve_geos' + LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable) + + CREATEFUNCTION intersection(geometry,geometry) RETURNS geometry AS '@MODULE_FILENAME@','intersection' -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061119/7bd855c8/attachment.html> From technoplague at gmail.com Sun Nov 19 12:15:43 2006 From: technoplague at gmail.com (Aleks F.) Date: Sun, 19 Nov 2006 22:15:43 +0200 Subject: [postgis-users] Calculate distance from coastline to the point on the sea Message-ID: <4560BB6F.5040706@gmail.com> Hello! I am a newbie user of postgis so don't blame me if something i said seems to be wrong. I have postgis installed and running. Our lecturer gave us a task, which includes the distance calculation from the coastline to the point on the sea. Can you give any hints how i could achieve proper calculations? I made a search thorough the list, although found nothing that could really help. Another question i have is about pgDijksta implementation. Did anyone succeed in running it on linux distribution of postgres? Any steps how to make an integration with a postgres? Please assist! thanks in advance, Aleks F. From fanfoi at gmail.com Sun Nov 19 13:55:15 2006 From: fanfoi at gmail.com (=?UTF-8?Q?Fran=C3=A7ois_Weykmans?=) Date: Sun, 19 Nov 2006 16:55:15 -0500 Subject: [postgis-users] [patch] GEOS simplify functions Message-ID: <22cd967e0611191355l6d83468eq577ccdddb8ec4490@mail.gmail.com> Hello! Add GEOS simplify functions to PostGIS (testing only with PostGIS 1.1.6 and geos-3.0.0rc2) With them, you can use big tolerance without get null result value... SQL : simplify_geos(geometry,float8) = GEOS DouglasPeuckerSimplifier::simplify(g1, tolerance) SQL : simplifytopologypreserve_geos(geometry,float8) = GEOS TopologyPreservingSimplifier::simplify(g1, tolerance) Thanks a lots for PostGIS!!! Fran?ois diff -r -c /postgis-1.1.6/lwgeom/lwgeom_geos.c /new/postgis-1.1.6/lwgeom/lwgeom_geos.c *** /postgis-1.1.6/lwgeom/lwgeom_geos.c Mon Dec 12 09:40:50 2005 --- /new/postgis- 1.1.6/lwgeom/lwgeom_geos.c Fri Nov 17 08:30:15 2006 *************** *** 66,71 **** --- 66,75 ---- Datum linemerge(PG_FUNCTION_ARGS); Datum LWGEOM_buildarea(PG_FUNCTION_ARGS); + + Datum simplify_geos(PG_FUNCTION_ARGS); + Datum simplifytopologypreserve_geos(PG_FUNCTION_ARGS); + typedef struct Geometry Geometry; *************** *** 101,106 **** --- 105,115 ---- extern Geometry *GEOSGetCentroid(Geometry *g, int *failure); extern bool GEOSHasZ(Geometry *g1); + + extern Geometry *GEOSSimplify(Geometry *g1, double tolerance); + extern Geometry *GEOSTopologyPreserveSimplify(Geometry *g1, double tolerance); + + extern void GEOSSetSRID(Geometry *g, int SRID); extern void GEOSdeleteChar(char *a); extern void GEOSdeleteGeometry(Geometry *a); *************** *** 2896,2898 **** --- 2905,3089 ---- PG_RETURN_NULL(); } + + PG_FUNCTION_INFO_V1(simplify_geos); + Datum simplify_geos(PG_FUNCTION_ARGS) + { + PG_LWGEOM *geom1; + double tolerance; + GEOSGeom g1,g2; + PG_LWGEOM *result; + int is3d; + int SRID; + + #ifdef PROFILE + profstart(PROF_QRUN); + #endif + + geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + tolerance = PG_GETARG_FLOAT8(1); + + is3d = ( TYPE_HASZ(geom1->type) ); + SRID = pglwgeom_getSRID(geom1); + initGEOS(lwnotice, lwnotice); + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify starting"); + #endif + + #ifdef PROFILE + profstart(PROF_P2G1); + #endif + g1 = POSTGIS2GEOS(geom1); + #ifdef PROFILE + profstop(PROF_P2G1); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE," constructed geometry - calling geos"); + elog(NOTICE," g1 = %s", GEOSGeomToWKT(g1)); + /*elog(NOTICE,"g1 is valid = %i",GEOSisvalid(g1)); */ + #endif + + #ifdef PROFILE + profstart(PROF_GRUN); + #endif + g2 = GEOSSimplify(g1,tolerance); + #ifdef PROFILE + profstop(PROF_GRUN); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify finished"); + #endif + + if (g2 == NULL) + { + elog(ERROR,"GEOS Simplify() threw an error!"); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); /* never get here */ + } + #ifdef PGIS_DEBUG + elog(NOTICE,"result: %s", GEOSGeomToWKT(g2) ) ; + #endif + GEOSSetSRID(g2, SRID); + #ifdef PROFILE + profstart(PROF_G2P); + #endif + result = GEOS2POSTGIS(g2, is3d); + #ifdef PROFILE + profstop(PROF_G2P); + #endif + + if (result == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + elog(ERROR,"GEOS Simplify() threw an error (result postgis geometry formation)!"); + PG_RETURN_NULL(); /* never get here */ + } + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + + /* compressType(result); */ + + #ifdef PROFILE + profstop(PROF_QRUN); + profreport("geos",geom1, result); + #endif + PG_FREE_IF_COPY(geom1, 0); + + PG_RETURN_POINTER(result); + } + + PG_FUNCTION_INFO_V1(simplifytopologypreserve_geos); + Datum simplifytopologypreserve_geos(PG_FUNCTION_ARGS) + { + PG_LWGEOM *geom1; + double tolerance; + GEOSGeom g1,g2; + PG_LWGEOM *result; + int is3d; + int SRID; + + #ifdef PROFILE + profstart(PROF_QRUN); + #endif + + geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + tolerance = PG_GETARG_FLOAT8(1); + + is3d = ( TYPE_HASZ(geom1->type) ); + SRID = pglwgeom_getSRID(geom1); + initGEOS(lwnotice, lwnotice); + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify starting"); + #endif + + #ifdef PROFILE + profstart(PROF_P2G1); + #endif + g1 = POSTGIS2GEOS(geom1); + #ifdef PROFILE + profstop(PROF_P2G1); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE," constructed geometry - calling geos"); + elog(NOTICE," g1 = %s", GEOSGeomToWKT(g1)); + /*elog(NOTICE,"g1 is valid = %i",GEOSisvalid(g1)); */ + #endif + + #ifdef PROFILE + profstart(PROF_GRUN); + #endif + g2 = GEOSTopologyPreserveSimplify(g1,tolerance); + #ifdef PROFILE + profstop(PROF_GRUN); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify finished"); + #endif + + if (g2 == NULL) + { + elog(ERROR,"GEOS TopologyPreserveSimplify() threw an error!"); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); /* never get here */ + } + #ifdef PGIS_DEBUG + elog(NOTICE,"result: %s", GEOSGeomToWKT(g2) ) ; + #endif + GEOSSetSRID(g2, SRID); + #ifdef PROFILE + profstart(PROF_G2P); + #endif + result = GEOS2POSTGIS(g2, is3d); + #ifdef PROFILE + profstop(PROF_G2P); + #endif + + if (result == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + elog(ERROR,"GEOS TopologyPreserveSimplify() threw an error (result postgis geometry formation)!"); + PG_RETURN_NULL(); /* never get here */ + } + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + + /* compressType(result); */ + + #ifdef PROFILE + profstop(PROF_QRUN); + profreport("geos",geom1, result); + #endif + PG_FREE_IF_COPY(geom1, 0); + + PG_RETURN_POINTER(result); + } + + diff -r -c /postgis-1.1.6/lwgeom/lwgeom_geos_c.c /new/postgis-1.1.6/lwgeom/lwgeom_geos_c.c *** /postgis-1.1.6/lwgeom/lwgeom_geos_c.c Wed Oct 25 03:23:00 2006 --- /new/postgis-1.1.6/lwgeom/lwgeom_geos_c.c Fri Nov 17 08:15:59 2006 *************** *** 67,72 **** --- 67,76 ---- Datum LWGEOM_buildarea(PG_FUNCTION_ARGS); Datum linemerge(PG_FUNCTION_ARGS); + + Datum simplify_geos(PG_FUNCTION_ARGS); + Datum simplifytopologypreserve_geos(PG_FUNCTION_ARGS); + LWGEOM *GEOS2LWGEOM(GEOSGeom geom, char want3d); PG_LWGEOM *GEOS2POSTGIS(GEOSGeom geom, char want3d); *************** *** 2974,2976 **** --- 2978,3162 ---- PG_RETURN_POINTER(result); } + + + PG_FUNCTION_INFO_V1(simplify_geos); + Datum simplify_geos(PG_FUNCTION_ARGS) + { + PG_LWGEOM *geom1; + double tolerance; + GEOSGeom g1,g2; + PG_LWGEOM *result; + int is3d; + int SRID; + + #ifdef PROFILE + profstart(PROF_QRUN); + #endif + + geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + tolerance = PG_GETARG_FLOAT8(1); + + is3d = ( TYPE_HASZ(geom1->type) ); + SRID = pglwgeom_getSRID(geom1); + initGEOS(lwnotice, lwnotice); + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify starting"); + #endif + + #ifdef PROFILE + profstart(PROF_P2G1); + #endif + g1 = POSTGIS2GEOS(geom1); + #ifdef PROFILE + profstop(PROF_P2G1); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE," constructed geometry - calling geos"); + elog(NOTICE," g1 = %s", GEOSGeomToWKT(g1)); + /*elog(NOTICE,"g1 is valid = %i",GEOSisvalid(g1)); */ + #endif + + #ifdef PROFILE + profstart(PROF_GRUN); + #endif + g2 = GEOSSimplify(g1,tolerance); + #ifdef PROFILE + profstop(PROF_GRUN); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify finished"); + #endif + + if (g2 == NULL) + { + elog(ERROR,"GEOS Simplify() threw an error!"); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); /* never get here */ + } + #ifdef PGIS_DEBUG + elog(NOTICE,"result: %s", GEOSGeomToWKT(g2) ) ; + #endif + GEOSSetSRID(g2, SRID); + #ifdef PROFILE + profstart(PROF_G2P); + #endif + result = GEOS2POSTGIS(g2, is3d); + #ifdef PROFILE + profstop(PROF_G2P); + #endif + + if (result == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + elog(ERROR,"GEOS Simplify() threw an error (result postgis geometry formation)!"); + PG_RETURN_NULL(); /* never get here */ + } + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + + /* compressType(result); */ + + #ifdef PROFILE + profstop(PROF_QRUN); + profreport("geos",geom1, result); + #endif + PG_FREE_IF_COPY(geom1, 0); + + PG_RETURN_POINTER(result); + } + + PG_FUNCTION_INFO_V1(simplifytopologypreserve_geos); + Datum simplifytopologypreserve_geos(PG_FUNCTION_ARGS) + { + PG_LWGEOM *geom1; + double tolerance; + GEOSGeom g1,g2; + PG_LWGEOM *result; + int is3d; + int SRID; + + #ifdef PROFILE + profstart(PROF_QRUN); + #endif + + geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + tolerance = PG_GETARG_FLOAT8(1); + + is3d = ( TYPE_HASZ(geom1->type) ); + SRID = pglwgeom_getSRID(geom1); + initGEOS(lwnotice, lwnotice); + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify starting"); + #endif + + #ifdef PROFILE + profstart(PROF_P2G1); + #endif + g1 = POSTGIS2GEOS(geom1); + #ifdef PROFILE + profstop(PROF_P2G1); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE," constructed geometry - calling geos"); + elog(NOTICE," g1 = %s", GEOSGeomToWKT(g1)); + /*elog(NOTICE,"g1 is valid = %i",GEOSisvalid(g1)); */ + #endif + + #ifdef PROFILE + profstart(PROF_GRUN); + #endif + g2 = GEOSTopologyPreserveSimplify(g1,tolerance); + #ifdef PROFILE + profstop(PROF_GRUN); + #endif + + #ifdef PGIS_DEBUG + elog(NOTICE,"simplify finished"); + #endif + + if (g2 == NULL) + { + elog(ERROR,"GEOS TopologyPreserveSimplify() threw an error!"); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); /* never get here */ + } + #ifdef PGIS_DEBUG + elog(NOTICE,"result: %s", GEOSGeomToWKT(g2) ) ; + #endif + GEOSSetSRID(g2, SRID); + #ifdef PROFILE + profstart(PROF_G2P); + #endif + result = GEOS2POSTGIS(g2, is3d); + #ifdef PROFILE + profstop(PROF_G2P); + #endif + + if (result == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + elog(ERROR,"GEOS TopologyPreserveSimplify() threw an error (result postgis geometry formation)!"); + PG_RETURN_NULL(); /* never get here */ + } + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + + /* compressType(result); */ + + #ifdef PROFILE + profstop(PROF_QRUN); + profreport("geos",geom1, result); + #endif + PG_FREE_IF_COPY(geom1, 0); + + PG_RETURN_POINTER(result); + } + diff -r -c /postgis-1.1.6/lwgeom/lwgeom_geos_wrapper.cpp /new/postgis-1.1.6/lwgeom/lwgeom_geos_wrapper.cpp *** /postgis-1.1.6/lwgeom/lwgeom_geos_wrapper.cpp Fri Dec 16 00:56:15 2005 --- /new/postgis- 1.1.6/lwgeom/lwgeom_geos_wrapper.cpp Fri Nov 17 07:54:29 2006 *************** *** 10,15 **** --- 10,21 ---- #include "postgis_geos_version.h" #include "geos/geom.h" #include "geos/util.h" + + + //#include <geos/simplify/DouglasPeuckerSimplifier.h> + //#include <geos/simplify/TopologyPreservingSimplifier.h> + + #if GEOS_FIRST_INTERFACE <= 3 && GEOS_LAST_INTERFACE >= 3 #include "geos/opValid.h" #include "geos/opPolygonize.h" *************** *** 140,145 **** --- 146,155 ---- extern "C" Geometry *GEOSSymDifference(Geometry *g1,Geometry *g2); extern "C" Geometry *GEOSUnion(Geometry *g1,Geometry *g2); + + extern "C" Geometry *GEOSSimplify(Geometry *g1, double tolerance); + extern "C" Geometry *GEOSTopologyPreserveSimplify(Geometry *g1, double tolerance); + extern "C" POINT3D *GEOSGetCoordinate(Geometry *g1); extern "C" POINT3D *GEOSGetCoordinates_Polygon(Polygon *g1); *************** *** 1857,1859 **** --- 1867,1917 ---- return NULL; } } + + + Geometry * + GEOSSimplify(const Geometry *g1, double tolerance) + { + using namespace geos::simplify; + + try + { + Geometry::AutoPtr g(DouglasPeuckerSimplifier::simplify(g1, tolerance)); + return g.release(); + } + catch (const std::exception &e) + { + ERROR_MESSAGE("%s", e.what()); + return NULL; + } + + catch (...) + { + ERROR_MESSAGE("Unknown exception thrown"); + return NULL; + } + } + + Geometry * + GEOSTopologyPreserveSimplify(const Geometry *g1, double tolerance) + { + using namespace geos::simplify; + + try + { + Geometry::AutoPtr g(TopologyPreservingSimplifier::simplify(g1, tolerance)); + return g.release(); + } + catch (const std::exception &e) + { + ERROR_MESSAGE("%s", e.what()); + return NULL; + } + + catch (...) + { + ERROR_MESSAGE("Unknown exception thrown"); + return NULL; + } + } + diff -r -c /postgis-1.1.6/lwgeom/lwpostgis.sql.in /new/postgis-1.1.6/lwgeom/lwpostgis.sql.in *** /postgis-1.1.6/lwgeom/lwpostgis.sql.in Fri Jul 7 06:56:52 2006 --- /new/postgis- 1.1.6/lwgeom/lwpostgis.sql.in Fri Nov 17 08:55:30 2006 *************** *** 2876,2881 **** --- 2876,2893 ---- -- GEOS --------------------------------------------------------------- + + CREATEFUNCTION simplify_geos(geometry,float8) + RETURNS geometry + AS '@MODULE_FILENAME@','simplify_geos' + LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable) + + CREATEFUNCTION simplifytopologypreserve_geos(geometry,float8) + RETURNS geometry + AS '@MODULE_FILENAME@','simplifytopologypreserve_geos' + LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict,iscachable) + + CREATEFUNCTION intersection(geometry,geometry) RETURNS geometry AS '@MODULE_FILENAME@','intersection' -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061119/5c66c591/attachment.html> From alex_chew at 163.com Mon Nov 20 00:06:27 2006 From: alex_chew at 163.com (alex_chew) Date: Mon, 20 Nov 2006 16:06:27 +0800 (CST) Subject: [postgis-users] What does this mean? assvg(...) ==> "M 10 4.1 -30.8 l 0 -0 0 -0 0 -0 -0 -0 -0 -0 -0 -0 0 -0 " In-Reply-To: <22cd967e0611191355l6d83468eq577ccdddb8ec4490@mail.gmail.com> References: <22cd967e0611191355l6d83468eq577ccdddb8ec4490@mail.gmail.com> Message-ID: <45616203.000058.03001@bj163app93.163.com> Hi,there I tried to load all road polylines in box 104,30,106,32(EPSG:4326) with sql: SELECT AsSVG(intersection(the_geom,GeometryFromText('POLYGON((104 30,106 30,106 32,104 32,104 30))',4326)),1,1) AS svg_geom FROM road_polyline WHERE the_geom && setSRID('BOX3D(104 30, 106 32)'::box3d,4326) I got some results like, "M 104.1 -30.8 l 0 -0 0 -0 0 -0 -0 -0 -0 -0 -0 -0 0 -0 " "M 104.2 -30.8 l 0 0 0 0 0 0 " "M 104.2 -30.8 l 0 0 " "M 104.2 -30.8 l 0 0 0 0 " "M 104.1 -30.8 l 0 -0 0 -0 " "M 104.1 -30.8 l 0 0 0 0 " "M 104.2 -30.8 l 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 " "M 104.1 -30.8 l 0 -0 " what does this mean? It should be something like, M 104.1 -30.8 l 104.* -30.* l p3x p3y l p4x p4y Why does there so many zero(0)? I cannot make it display on my SVG document. thanks in advance. alex -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061120/63c27776/attachment.html> From davidtecher at yahoo.fr Mon Nov 20 00:14:32 2006 From: davidtecher at yahoo.fr (TECHER David) Date: Mon, 20 Nov 2006 09:14:32 +0100 Subject: [postgis-users] What does this mean? assvg(...) ==> "M 10 4.1 -30.8 l 0 -0 0 -0 0 -0 -0 -0 -0 -0 -0 -0 0 -0 " In-Reply-To: <45616203.000058.03001@bj163app93.163.com> References: <22cd967e0611191355l6d83468eq577ccdddb8ec4490@mail.gmail.com> <45616203.000058.03001@bj163app93.163.com> Message-ID: <456163E8.9010402@yahoo.fr> Hi Alex What version of PostGIS do U use? alex_chew a ?crit : > Hi,there > I tried to load all road polylines in box 104,30,106,32(EPSG:4326) > with sql: > SELECT AsSVG(intersection(the_geom,GeometryFromText('POLYGON((104 > 30,106 30,106 32,104 32,104 30))',4326)),1,1) AS svg_geom FROM > road_polyline WHERE the_geom && setSRID('BOX3D(104 30, 106 > 32)'::box3d,4326) > > I got some results like, > "M 104.1 -30.8 l 0 -0 0 -0 0 -0 -0 -0 -0 -0 -0 -0 0 -0 " > "M 104.2 -30.8 l 0 0 0 0 0 0 " > "M 104.2 -30.8 l 0 0 " > "M 104.2 -30.8 l 0 0 0 0 " > "M 104.1 -30.8 l 0 -0 0 -0 " > "M 104.1 -30.8 l 0 0 0 0 " > "M 104.2 -30.8 l 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 " > "M 104.1 -30.8 l 0 -0 " > > what does this mean? It should be something like, > M 104.1 -30.8 l 104.* -30.* l p3x p3y l p4x p4y > Why does there so many zero(0)? > > I cannot make it display on my SVG document. > > thanks in advance. > alex > > > > > > > > ? ? ? ? ? ? ? ? ? , ? ? ? ? ? ? > ? ? ? ? ? ? ? ? 20 ? ? , ? ? ? ? ? ? ? ? ? ? ? 20 ? >> > <http://adtaobao.allyes.com/main/adfclick?db=adtaobao&bid=600,597,58&cid=29985,198,1&sid=32501&show=ignore&url=http://event.mail.163.com/taobao/index.htm> > > ------------------------------------------------------------------------ > > _______________________________________________ > 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: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061120/baaa4443/attachment.html> From kobben at itc.nl Mon Nov 20 02:07:28 2006 From: kobben at itc.nl (Barend K=?ISO-8859-1?B?9g==?=bben) Date: Mon, 20 Nov 2006 11:07:28 +0100 Subject: [postgis-users] What does this mean? assvg(...) ==> "M 10 4.1 -30.8 l 0 -0 0 -0 0 -0 -0 -0 -0 -0 -0 -0 0 -0 " In-Reply-To: <456163E8.9010402@yahoo.fr> Message-ID: <C1873CF0.3636%kobben@itc.nl> I think it's because you asked it to use relative path coordinates and coordinate rounding in the part of the command that says ")),1,1)". The "l" commands means move relatively, the "L" would have been move to absolute coord. Then you asked it to round coordinates, and thus your latlon relative moves which should have been eg "l 0.00034 0.00056" were rounded of to "l 0 0" Look into the manual of the asSVG command on how to use the relative/absolute moves and the rounding.... __ Barend K?bben International Institute for Geo-information Sciences and Earth Observation (ITC) PO Box 6, 7500AA Enschede (The Netherlands) ph: +31 (0)53 4874253; fax: +31 (0)53 4874335 From dylan.beaudette at gmail.com Mon Nov 20 14:24:32 2006 From: dylan.beaudette at gmail.com (Dylan Beaudette) Date: Mon, 20 Nov 2006 14:24:32 -0800 Subject: [postgis-users] runing postgis init scripts on a named schema Message-ID: <200611201424.32336.dylan.beaudette@gmail.com> Hi everyone, I have a fully functional postgis DB up and running, using the default 'public' schema. I have just added a new schema, and would like to 'spatially-enable' this new one. does anyone have tips on how this might be accomplished ? thanks in advance! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From adoyle at eogeo.org Mon Nov 20 15:45:50 2006 From: adoyle at eogeo.org (Allan Doyle) Date: Mon, 20 Nov 2006 18:45:50 -0500 Subject: [postgis-users] Ubuntu install of PostGIS 1.1.6 failing Message-ID: <1D9F853E-B379-4D84-B8F2-3E5797FA573E@eogeo.org> I'm installing onto an up-to-date Ubuntu 6.06 system proj-4.5.0 installs ok geos-3.0.0rc2 installs ok postgis-1.1.6 gives the following errors: ===== mwow% sudo su postgres postgres at mwow:/usr/local/src/postgis-1.1.6$ make check make -C regress test make[1]: Entering directory `/usr/local/src/postgis-1.1.6/regress' Creating spatial db postgis_reg ERROR: function postgis_lib_version() does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts. Something went wrong (no postgis installed in postgis_reg). For details, check /tmp/pgis_reg_17211/regress_log make[1]: *** [test] Error 1 make[1]: Leaving directory `/usr/local/src/postgis-1.1.6/regress' make: *** [check] Error 2 ===== The contents of /tmp/pgis_reg_17211/regress_log are not enlightening to me: ===== CREATE DATABASE BEGIN psql:lwpostgis.sql:39: NOTICE: type "histogram2d" is not yet defined DETAIL: Creating a shell type definition. psql:lwpostgis.sql:39: ERROR: could not load library "/usr/local/src/ postgis-1.1.6/lwgeom/liblwgeom.so.1.1": libgeos_c.so.1: cannot open shared object file: No such file or directory psql:lwpostgis.sql:44: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:lwpostgis.sql:52: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:lwpostgis.sql:62: ERROR: current transaction is aborted, commands ignored until end of transaction block ... snip ... psql:lwpostgis.sql:3462: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:lwpostgis.sql:3509: ERROR: current transaction is aborted, commands ignored until end of transaction block ROLLBACK ===== I did check the geos build, there is a step that makes libgeos_c.so.1 in /usr/local/lib. I tried explicitly setting --with-geos-libdir=/usr/local/lib but there's no difference. Has anyone bumped into (and solved!) this? Thanks, Allan -- Allan Doyle +1.781.433.2695 adoyle at eogeo.org From pdoria at netmadeira.com Mon Nov 20 15:46:04 2006 From: pdoria at netmadeira.com (Pedro Doria Meunier) Date: Mon, 20 Nov 2006 23:46:04 -0000 Subject: [postgis-users] runing postgis init scripts on a named schema In-Reply-To: <200611201424.32336.dylan.beaudette@gmail.com> Message-ID: <000001c70cfe$0af31dc0$05d6bed5@oem41cbbf9e178> Hi Dylan, That depends... What's your operating system? Are you compiling from sources? Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Dylan Beaudette Sent: segunda-feira, 20 de Novembro de 2006 22:25 To: postgis-users at postgis.refractions.net Subject: [postgis-users] runing postgis init scripts on a named schema Hi everyone, I have a fully functional postgis DB up and running, using the default 'public' schema. I have just added a new schema, and would like to 'spatially-enable' this new one. does anyone have tips on how this might be accomplished ? thanks in advance! -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From dylan.beaudette at gmail.com Mon Nov 20 16:30:24 2006 From: dylan.beaudette at gmail.com (Dylan Beaudette) Date: Mon, 20 Nov 2006 16:30:24 -0800 Subject: [postgis-users] runing postgis init scripts on a named schema In-Reply-To: <200611201424.32336.dylan.beaudette@gmail.com> References: <200611201424.32336.dylan.beaudette@gmail.com> Message-ID: <200611201630.24632.dylan.beaudette@gmail.com> On Monday 20 November 2006 14:24, Dylan Beaudette wrote: > Hi everyone, > > I have a fully functional postgis DB up and running, using the > default 'public' schema. I have just added a new schema, and would like > to 'spatially-enable' this new one. > > does anyone have tips on how this might be accomplished ? > > > thanks in advance! note that this is on debian linux, postgres 8.1.2, postgis 1.1.1 thanks -- Dylan Beaudette Soils and Biogeochemistry Graduate Group University of California at Davis 530.754.7341 From erics at ameri-title.com Mon Nov 20 17:19:30 2006 From: erics at ameri-title.com (Eric Shuman) Date: Mon, 20 Nov 2006 17:19:30 -0800 Subject: [postgis-users] Spatial Join Performance Message-ID: <KMEIKNPGBOLILGCIHBLCKEBHCBAA.erics@ameri-title.com> Paul, I did try using distance function instead of contains and the query completed much faster! 30 minutes instead of 2.5 hours. Thanks for the tip!!! But... => Another issue was brought up earlier in this thread mentioning that not all taxlot will be in just one zone... which has now brought up another road block. I have been taking care of this issue by selecting distinct on (taxlot,zone) then grouping on the taxlot and concatenating the zone with a delimiter. The issue now is that comparing on a point won't pick up all the zones (I was just going to accept this), but comparing on the polygon gets false hits due to topological shifting and errors. I am experimenting with creating a negative buffer and comparing its distance to the zone. This works on a test subject lot. The road block is this... When I try to run the query on my entire data set I get this error. ----------------------------------------------- server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. ----------------------------------------------- To speed up the buffer I have also simplified the_geom.(this works) I broke the steps down by creating additional geometry fields in my taxlot layer to hold the simplified geometry and then the buffered geometry. The simplify step works, the buffer is where it bails. The taxlot geometries as multipolygon. I ran an isvalid() on the geometry and found some to be invalid, but if I exclude them from the query I still get the server crash. Here are the queries: --SELECT AddGeometryColumn('','taxlot','the_simple_geom','-1','GEOMETRY',2); --update taxlot set the_simple_geom = simplify(taxlot.the_geom,5); --SELECT AddGeometryColumn('','taxlot','the_buffer_geom','-1','GEOMETRY',2); --update taxlot set the_buffer_geom = buffer(taxlot.the_simple_geom,-5); BAILS HERE Any ideas on what might be wrong??? (should this be a new thread?) --------------- Eric Shuman From schabi at logix-tt.com Tue Nov 21 04:31:49 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Tue, 21 Nov 2006 13:31:49 +0100 Subject: [postgis-users] SRID for Saudi Arabia In-Reply-To: <200611170945.53644.sdc@sdc.com.au> References: <200611170945.53644.sdc@sdc.com.au> Message-ID: <4562F1B5.7010304@logix-tt.com> Hi, Stephen, Stephen Davies wrote: > Could somebody please point me at the correct (latlong) SRID for the > Riyadh region of Saudi Arabia. There are several SRIDs, depending on the projection used. E. G. all world-wide lat/lon formats like WGS85 (SRID 4326) cover Saudi Arabia. But there is an UTM zone, as well... So without knowing the projection information, we can't tell you the SRID. HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org From sbayana at sidestep.com Tue Nov 21 08:44:11 2006 From: sbayana at sidestep.com (Sunitha Bayana) Date: Tue, 21 Nov 2006 08:44:11 -0800 Subject: [postgis-users] lat and long format Message-ID: <1C8FFEE4F601A74EBF7E78E38EA5E53807525C1E@mailbox.jayst.sidestep.com> Hi Is there any way in postgis to convert the lat and long from degree system to decimal system. I have the data in the format as below 17.21.00S 145.30.00W Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061121/7d0ecda0/attachment.html> From sxpert at sxpert.org Tue Nov 21 08:46:46 2006 From: sxpert at sxpert.org (raphael Jacquot) Date: Tue, 21 Nov 2006 17:46:46 +0100 Subject: [postgis-users] looking for some perf data Message-ID: <45632D76.6040609@sxpert.org> hi there I'm looking for some hard verifiable proof that using r-tree based geometry indexes is better than using 2 columns and a btree index on it, performance wise. has there any study done on that ? From mbdavis at refractions.net Tue Nov 21 09:12:31 2006 From: mbdavis at refractions.net (Martin Davis) Date: Tue, 21 Nov 2006 09:12:31 -0800 Subject: [postgis-users] looking for some perf data In-Reply-To: <45632D76.6040609@sxpert.org> References: <45632D76.6040609@sxpert.org> Message-ID: <4563337F.1090404@refractions.net> First of all, you need to be more specific. The performance of an index is related to the kinds of queries you are making on it. If you are making a simple equality query, then a B-tree on the (x,y) pair is probably fine. But if you're wanting to do range searches in two dimensions, a B-tree does not support this kind of query, and hence performance will be slow compared to an access method which does support this (e.g. R-tree, quad-tree, etc etc). I don't know of any reference which has a "hard verifiable" comparison with a simple B-tree for range queries. I suspect this is because the performance difference is so obviously bad for B-trees that researchers haven't bothered to document it. You might try looking at two of the books by Hanan Samet: Foundations of Multidimensional and Metric Data Structures The Design and Analysis of Spatial Data Structures You could also try the original R-tree papers, or a survey entitled "R-Trees are everywhere". Also a paper entitled "Multidimensional Access Methods" by Gaede et al. raphael Jacquot wrote: > hi there > I'm looking for some hard verifiable proof that using r-tree based > geometry indexes is better than using 2 columns and a btree index on > it, performance wise. > > has there any study done on that ? > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 From sxpert at sxpert.org Tue Nov 21 09:14:44 2006 From: sxpert at sxpert.org (raphael Jacquot) Date: Tue, 21 Nov 2006 18:14:44 +0100 Subject: [postgis-users] looking for some perf data In-Reply-To: <4563337F.1090404@refractions.net> References: <45632D76.6040609@sxpert.org> <4563337F.1090404@refractions.net> Message-ID: <45633404.7020604@sxpert.org> Martin Davis wrote: > First of all, you need to be more specific. The performance of an index > is related to the kinds of queries you are making on it. If you are > making a simple equality query, then a B-tree on the (x,y) pair is > probably fine. But if you're wanting to do range searches in two > dimensions, a B-tree does not support this kind of query, and hence > performance will be slow compared to an access method which does support > this (e.g. R-tree, quad-tree, etc etc). typically I'm looking to compare using create table blah1 ( lon double precision, lat double precision ) with one index on lon and another one on lat the classic request being lon>constant1 and lon<constant2 and lat>constant3 and lat<constant4 and create table blah2 ( position Point ) with a gist r-tree index using the @ operator > raphael Jacquot wrote: >> hi there >> I'm looking for some hard verifiable proof that using r-tree based >> geometry indexes is better than using 2 columns and a btree index on >> it, performance wise. >> >> has there any study done on that ? >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> > From mbdavis at refractions.net Tue Nov 21 09:22:12 2006 From: mbdavis at refractions.net (Martin Davis) Date: Tue, 21 Nov 2006 09:22:12 -0800 Subject: [postgis-users] looking for some perf data In-Reply-To: <45633404.7020604@sxpert.org> References: <45632D76.6040609@sxpert.org> <4563337F.1090404@refractions.net> <45633404.7020604@sxpert.org> Message-ID: <456335C4.1060503@refractions.net> Well, those are range queries. Not too surprising, 99.9% of spatial queries are. The real question is: given that every modern spatial database uses some sort of spatial index (R-tree, quad-tree, or grid), why even bother to question whether B-trees might be better? raphael Jacquot wrote: > > typically I'm looking to compare using > > create table blah1 ( > lon double precision, > lat double precision > ) > with one index on lon and another one on lat > > the classic request being > lon>constant1 and lon<constant2 and lat>constant3 and lat<constant4 > > and > > create table blah2 ( > position Point > ) > with a gist r-tree index > > using the @ operator -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 From sxpert at sxpert.org Tue Nov 21 09:21:07 2006 From: sxpert at sxpert.org (raphael Jacquot) Date: Tue, 21 Nov 2006 18:21:07 +0100 Subject: [postgis-users] looking for some perf data In-Reply-To: <456335C4.1060503@refractions.net> References: <45632D76.6040609@sxpert.org> <4563337F.1090404@refractions.net> <45633404.7020604@sxpert.org> <456335C4.1060503@refractions.net> Message-ID: <45633583.2010009@sxpert.org> Martin Davis wrote: > Well, those are range queries. Not too surprising, 99.9% of spatial > queries are. > > The real question is: given that every modern spatial database uses some > sort of spatial index (R-tree, quad-tree, or grid), why even bother to > question whether B-trees might be better? ask my boss :D > raphael Jacquot wrote: >> >> typically I'm looking to compare using >> >> create table blah1 ( >> lon double precision, >> lat double precision >> ) >> with one index on lon and another one on lat >> >> the classic request being >> lon>constant1 and lon<constant2 and lat>constant3 and lat<constant4 >> >> and >> >> create table blah2 ( >> position Point >> ) >> with a gist r-tree index >> >> using the @ operator > From nickblack1 at gmail.com Tue Nov 21 09:21:22 2006 From: nickblack1 at gmail.com (Nick Black) Date: Tue, 21 Nov 2006 17:21:22 +0000 Subject: [postgis-users] Splitting multistrings Message-ID: <223020e60611210921y6f4d68buaf0310e7a5fae6c5@mail.gmail.com> Hi, I'm trying to split multistrings into individual linestrings using SQL within PostGIS, but I cant find an appropriate function. Is it possible to do this using SQL? If not, does anyone know a way this can be done? Many Thanks Nick From sdteffen at gmail.com Tue Nov 21 09:28:55 2006 From: sdteffen at gmail.com (Steffen Macke) Date: Tue, 21 Nov 2006 19:28:55 +0200 Subject: [postgis-users] Splitting multistrings In-Reply-To: <223020e60611210921y6f4d68buaf0310e7a5fae6c5@mail.gmail.com> References: <223020e60611210921y6f4d68buaf0310e7a5fae6c5@mail.gmail.com> Message-ID: <3cb1691c0611210928h56023b9dtd3faea5ed6f0b9cd@mail.gmail.com> Hi Nick, > I'm trying to split multistrings into individual linestrings using SQL > within PostGIS, but I cant find an appropriate function. Is it > possible to do this using SQL? If not, does anyone know a way this > can be done? Did you have a look at the GeometryN() function? Together with the PostgreSQL generate_series() and NumGeometries() you should be able to split your lines accordingly. Or do you have to insert new vertices at the split points? In this case, a little bit of additional information would help. Regards, Steffen From kobben at itc.nl Tue Nov 21 09:54:53 2006 From: kobben at itc.nl (Barend K=?ISO-8859-1?B?9g==?=bben) Date: Tue, 21 Nov 2006 18:54:53 +0100 Subject: [postgis-users] Splitting multistrings In-Reply-To: <3cb1691c0611210928h56023b9dtd3faea5ed6f0b9cd@mail.gmail.com> Message-ID: <C188FBFD.36C0%kobben@itc.nl> Hi , Find below an example how to change MultiPolygons to Polygons, Should eb simple to convert for (mulit)linestrings... __ Barend K?bben International Institute for Geo-information Sciences and Earth Observation (ITC) PO Box 6, 7500AA Enschede (The Netherlands) ph: +31 (0)53 4874253; fax: +31 (0)53 4874335 +++++++++++++ -- -- STEP 1: get maximum of NumGeometries into tmp table -- CREATE TABLE tmp (maxnumgeoms int4) WITH OIDS; INSERT into tmp (select gid from world where gid <= (select max(NumGeometries(the_geom)) from world) ); -- -- STEP 2: create World_exploded table -- CREATE SEQUENCE world_exploded_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1; CREATE TABLE world_exploded ( id int4 NOT NULL DEFAULT nextval('world_exploded_id_seq'::regclass), gid int4 NOT NULL, the_geom geometry, CONSTRAINT world_exploded_pkey PRIMARY KEY (id), CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2), CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POLYGON'::text OR the_geom IS NULL), CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 4326) ) ; CREATE INDEX world_exploded_the_geom_gist ON world_exploded USING gist(the_geom); CREATE INDEX world_exploded_gid ON world_exploded USING btree(gid); -- -- STEP 3: insert exploded polygons -- insert into world_exploded (gid,the_geom) select gid, GeometryN(world.the_geom,maxnumgeoms) from tmp,world From pramsey at refractions.net Tue Nov 21 10:53:24 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Tue, 21 Nov 2006 10:53:24 -0800 Subject: [postgis-users] looking for some perf data In-Reply-To: <456335C4.1060503@refractions.net> References: <45632D76.6040609@sxpert.org> <4563337F.1090404@refractions.net> <45633404.7020604@sxpert.org> <456335C4.1060503@refractions.net> Message-ID: <45634B24.1070907@refractions.net> It's not so much a matter of "better" as it is a matter of "good enough". As long as your data volume remains low enough, you can keep your simple non-spatial tables and b-trees. At some point you'll flip though and need to move to spatial for "adequate" performance. It all depends on your definitions of "large" and "adequate", none of which are in scope for me :) P Martin Davis wrote: > Well, those are range queries. Not too surprising, 99.9% of spatial > queries are. > > The real question is: given that every modern spatial database uses some > sort of spatial index (R-tree, quad-tree, or grid), why even bother to > question whether B-trees might be better? > > raphael Jacquot wrote: >> >> typically I'm looking to compare using >> >> create table blah1 ( >> lon double precision, >> lat double precision >> ) >> with one index on lon and another one on lat >> >> the classic request being >> lon>constant1 and lon<constant2 and lat>constant3 and lat<constant4 >> >> and >> >> create table blah2 ( >> position Point >> ) >> with a gist r-tree index >> >> using the @ operator > From matt.pettis at thomson.com Tue Nov 21 11:04:07 2006 From: matt.pettis at thomson.com (matt.pettis at thomson.com) Date: Tue, 21 Nov 2006 13:04:07 -0600 Subject: [postgis-users] centroid() and AddGeometryColumn() questions Message-ID: <89C159F45B13A24682D98BDEF58E451F0B331CAA@TLRUSMNEAGMBX28.ERF.THOMSON.COM> Hi, I am trying to add a column to my table that lists the centroids the polygon described in the 'the_geom' field. I use the following, which works (I think), but of which I have questions: SELECT AddGeometryColumn( '', 'shp_mcd', 'centroid', -1, 'POINT', 2 ); UPDATE shp_mcd SET centroid = centroid ( the_geom ); My question is about the final argument to AddGeometryColumn. Documentation states that centroid() returns a POINT. I figure that that implies that the last argument should then be a 0, not a 2. But if I use a 0 in the last field, the updated doesn't work -- it tells me that i violate a dimension constraint. Can someone explain why I need to have a 2 as the last argument and not a 0? It doesn't make sense to me. Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061121/faf4d354/attachment.html> From pramsey at refractions.net Tue Nov 21 12:04:46 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Tue, 21 Nov 2006 12:04:46 -0800 Subject: [postgis-users] centroid() and AddGeometryColumn() questions In-Reply-To: <89C159F45B13A24682D98BDEF58E451F0B331CAA@TLRUSMNEAGMBX28.ERF.THOMSON.COM> References: <89C159F45B13A24682D98BDEF58E451F0B331CAA@TLRUSMNEAGMBX28.ERF.THOMSON.COM> Message-ID: <45635BDE.8050504@refractions.net> Matt, COORD_DIMENSION is about the number of coordinates in each vertex (for PostGIS, 2, 3 or 4). The dimensionality of the geometry is already given, by specifying POINT. To specify it again as "0" would be redundant. P matt.pettis at thomson.com wrote: > Hi, > > I am trying to add a column to my table that lists the centroids the > polygon described in the 'the_geom' field. I use the following, which > works (I think), but of which I have questions: > > SELECT AddGeometryColumn( '', 'shp_mcd', 'centroid', -1, 'POINT', 2 ); > UPDATE shp_mcd SET centroid = centroid ( the_geom ); > > My question is about the final argument to AddGeometryColumn. > Documentation states that centroid() returns a POINT. I figure that > that implies that the last argument should then be a 0, not a 2. But if > I use a 0 in the last field, the updated doesn't work -- it tells me > that i violate a dimension constraint. Can someone explain why I need > to have a 2 as the last argument and not a 0? It doesn't make sense to me. > > Thanks, > Matt > > > ------------------------------------------------------------------------ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From sdc at sdc.com.au Tue Nov 21 15:39:40 2006 From: sdc at sdc.com.au (Stephen Davies) Date: Wed, 22 Nov 2006 10:09:40 +1030 Subject: [postgis-users] Re: looking for some perf data Message-ID: <200611221009.40109.sdc@sdc.com.au> Many years ago, I tried to implement a fairly simple GIS application using separate B-trees on lat/long coordinates. The idea died as soon as the data volumes became non-trivial. The reason was obvious in hindsight: a query for x>=g1 and x <=g2 and y>=t1 and y<=t2 using separate B-trees has to retrieve a "vertical" and then a "horizontal" slice of the whole world and then take the intersect. R-trees, quad-trees etc greatly reduce this cost. HTH, Stephen Davies -- ======================================================================== This email is for the person(s) identified above, and is confidential to the sender and the person(s). No one else is authorised to use or disseminate this email or its contents. Stephen Davies Consulting Voice: 08-8177 1595 Adelaide, South Australia. Fax: 08-8177 0133 Computing & Network solutions. Mobile:0403 0405 83 From robert.coup at onetrackmind.co.nz Tue Nov 21 16:12:28 2006 From: robert.coup at onetrackmind.co.nz (Robert Coup) Date: Wed, 22 Nov 2006 13:12:28 +1300 Subject: [postgis-users] looking for some perf data In-Reply-To: <45633583.2010009@sxpert.org> References: <45632D76.6040609@sxpert.org> <4563337F.1090404@refractions.net> <45633404.7020604@sxpert.org> <456335C4.1060503@refractions.net> <45633583.2010009@sxpert.org> Message-ID: <456395EC.1030201@onetrackmind.co.nz> raphael Jacquot wrote: > Martin Davis wrote: >> Well, those are range queries. Not too surprising, 99.9% of spatial >> queries are. >> >> The real question is: given that every modern spatial database uses >> some sort of spatial index (R-tree, quad-tree, or grid), why even >> bother to question whether B-trees might be better? > > ask my boss :D http://en.wikipedia.org/wiki/R-tree >>> typically I'm looking to compare using >>> >>> create table blah1 ( >>> lon double precision, >>> lat double precision >>> ) >>> with one index on lon and another one on lat >>> >>> the classic request being >>> lon>constant1 and lon<constant2 and lat>constant3 and lat<constant4 >>> >>> and >>> >>> create table blah2 ( >>> position Point >>> ) >>> with a gist r-tree index >>> >>> using the @ operator Assuming a non-trivial sized dataset, here's a really simplistic overview of my understanding ... B-Tree on x & y: 1. search lat to find matching Lat slice of dataset == 1 tree descent, returning 50K records 2. search lon to find matching Lon slice of dataset == 1 tree descent, returning 50K records 3. perform AND on 1&2, returning 1K records 4. seq scan over 3 to check extents within the tree granularities, returning 900 records R-Tree on geom: 1. search to find matching bounds == 1 tree descent, returning 1K records 2. seq scan over 1 to check extent within the tree granularity, returning 900 records It's pretty easy to use EXPLAIN to try it out (pgAdmin even has a nice graphical view). Rob :) -- One Track Mind Ltd. PO Box 1604, Shortland St, Auckland, New Zealand Phone +64-9-966 0433 Mobile +64-21-572 632 Web http://www.onetrackmind.co.nz From ollerery at engr.orst.edu Tue Nov 21 17:22:02 2006 From: ollerery at engr.orst.edu (Ryan Ollerenshaw) Date: Tue, 21 Nov 2006 17:22:02 -0800 Subject: [postgis-users] Invalid Geometry Message-ID: <4563A63A.3010605@engr.orst.edu> Can anyone help me with this error, i cant seem to find the source of my problem. # UPDATE mro_asu SET the_geom = 'GeometryFromText(POLYGON((81 48, 82 48, 82 49, 81 49, 81 48)),4326)' WHERE team_id = 'PSP_001332_2620_RED'; ERROR: parse error - invalid geometry My table looks like this =# \d mro_asu Table "public.mro_asu" Column | Type | Modifiers --------------+-----------------------------+----------- team_id | character varying(100) | date | date | location | character varying(500) | jpg | boolean | jp2 | boolean | browse | boolean | thumb | boolean | orbit | integer | map_location | character varying(500) | map_jpg | boolean | map_jp2 | boolean | map_browse | boolean | map_thumb | boolean | res | double precision | minlat | double precision | minlon | double precision | maxlat | double precision | maxlon | double precision | the_geom | geometry | starttime | timestamp without time zone | stoptime | timestamp without time zone | Check constraints: "enforce_dims_the_geom" CHECK (ndims(the_geom) = 2) "enforce_geotype_the_geom" CHECK (geometrytype(the_geom) = 'POLYGON'::text OR the_geom IS NULL) "enforce_srid_the_geom" CHECK (srid(the_geom) = 4326) Thank you very much. -Ryan From jackieict at gmail.com Tue Nov 21 17:31:47 2006 From: jackieict at gmail.com (zhang Jackie) Date: Wed, 22 Nov 2006 09:31:47 +0800 Subject: [postgis-users] build a SDB cache for Spatial Database based on postgis and postgresql Message-ID: <13432ab00611211731g32104206kc2b6dcebcffd813e@mail.gmail.com> I am interesting in PostGis and want to do something on it. My idea is to build a Spatial Database Cache to accelerate GIS applications .So I want to ask you some question and hope to get your answer. 1. As we all know, PostGis is a Spatial extention for PostGreSQL. And there are also some other products such as ArcSDE, Oracle Spatial .Have you ever do some performance comparison between them.If you have ever done such work,Could you give me some information on it. If not, is it because that you team did not care about performance and just concerned with correctness of the program. And if you can give me some materials on performance comparison on such Spatial Database extention including ArcSDE, Oracle Spatial ,MySQL ,etc. 2. Since Google Earth is lauched ,Many GIS systems are used by more and more people,so the important features of Software becomes more and more important,such as sacalibity, robust, stability,etc. Can you give me some information and papers on the bottleneck of these applications.Especially, are computing and I/O requirements very important and become bottlenecks,Of course, If you know some related solutions , you can mail me. I have searche lots of papers and get an overview of it. But I felt I did not figure out the truth. So I want to get some more accurate information on this field. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/56c92f90/attachment.html> From pdoria at netmadeira.com Tue Nov 21 18:04:06 2006 From: pdoria at netmadeira.com (Pedro Doria Meunier) Date: Wed, 22 Nov 2006 02:04:06 -0000 Subject: [postgis-users] build a SDB cache for Spatial Database based onpostgis and postgresql In-Reply-To: <13432ab00611211731g32104206kc2b6dcebcffd813e@mail.gmail.com> Message-ID: <003101c70dda$7e41c6a0$05d6bed5@oem41cbbf9e178> Mr Jackie, It's obvious you're pulling out straws since it's apparent that you don't have a clue how to even benchmark Postgresql. Solutions are as good as the one who develops them. My best advice to you is that, beyond asking for free papers/experience, you should first take the time to experiment/study Posgresql and specifically PostGIS extensions, know how to benchmark your own implementations and then compare the same line of though with other products. Speaking strictly for myself, my company uses PG/PostGIS *extensively* with tables spanning millions of records and we still tip the hat to the PG/PostGIS developers. Robustness is a given as well as scalability and stability. In short, PG/PostGIS rocks! Building a SDB is more complex than you can now imagine and it's a multidisciplinary task. Tip: start with asking small questions (reflecting your commitment/investment to PG/PostGIS). This group is a very friendly bunch (and helpful) when someone asks specific/informed questions. Sincerely, Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam _____ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of zhang Jackie Sent: quarta-feira, 22 de Novembro de 2006 1:32 To: postgis-users at postgis.refractions.net Subject: [postgis-users] build a SDB cache for Spatial Database based onpostgis and postgresql I am interesting in PostGis and want to do something on it. My idea is to build a Spatial Database Cache to accelerate GIS applications .So I want to ask you some question and hope to get your answer. 1. As we all know, PostGis is a Spatial extention for PostGreSQL. And there are also some other products such as ArcSDE, Oracle Spatial .Have you ever do some performance comparison between them.If you have ever done such work,Could you give me some information on it. If not, is it because that you team did not care about performance and just concerned with correctness of the program. And if you can give me some materials on performance comparison on such Spatial Database extention including ArcSDE, Oracle Spatial ,MySQL ,etc. 2. Since Google Earth is lauched ,Many GIS systems are used by more and more people,so the important features of Software becomes more and more important,such as sacalibity, robust, stability,etc. Can you give me some information and papers on the bottleneck of these applications.Especially, are computing and I/O requirements very important and become bottlenecks,Of course, If you know some related solutions , you can mail me. I have searche lots of papers and get an overview of it. But I felt I did not figure out the truth. So I want to get some more accurate information on this field. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/25111abc/attachment.html> From jackieict at gmail.com Tue Nov 21 18:56:35 2006 From: jackieict at gmail.com (zhang Jackie) Date: Wed, 22 Nov 2006 10:56:35 +0800 Subject: [postgis-users] build a SDB cache for Spatial Database based onpostgis and postgresql In-Reply-To: <003101c70dda$7e41c6a0$05d6bed5@oem41cbbf9e178> References: <13432ab00611211731g32104206kc2b6dcebcffd813e@mail.gmail.com> <003101c70dda$7e41c6a0$05d6bed5@oem41cbbf9e178> Message-ID: <13432ab00611211856s3ee6486di9d918545285662d8@mail.gmail.com> Mr.Pedro your advice is very important for me an thank you very much for this. can you tell me how to profile the performance of PostGreSQL? you say "Solutions are as good as the one who develops them" Do you mean that my cooperative cache idea can not achieve expected performance? and so this is a not a good idea? 2006/11/22, Pedro Doria Meunier <pdoria at netmadeira.com>: > > Mr Jackie, > > > > It's obvious you're pulling out straws since it's apparent that you don't > have a clue how to even benchmark Postgresql. > > > > Solutions are as good as the one who develops them. > > My best advice to you is that, beyond asking for free papers/experience, > you should first take the time to experiment/study Posgresql and > specifically PostGIS extensions, know how to benchmark your own > implementations and then compare the same line of though with other > products. > > > > Speaking strictly for myself, my company uses PG/PostGIS **extensively** > with tables spanning millions of records and we still tip the hat to the > PG/PostGIS developers. > > Robustness is a given as well as scalability and stability. In short, > PG/PostGIS rocks! > > > > Building a SDB is more complex than you can now imagine and it's a > multidisciplinary task. > > > > Tip: start with asking small questions (reflecting your > commitment/investment to PG/PostGIS). This group is a very friendly bunch > (and helpful) when someone asks specific/informed questions. > > > > Sincerely, > > *Pedro Doria Meunier* > > (351) 91 302 49 72 - (351) 96 247 99 12 > > MSN - pdoriam at hotmail.com > > ICQ - 308-182-126 > > Skype: pdoriam > > > ------------------------------ > > *From:* postgis-users-bounces at postgis.refractions.net [mailto: > postgis-users-bounces at postgis.refractions.net] *On Behalf Of *zhang Jackie > *Sent:* quarta-feira, 22 de Novembro de 2006 1:32 > *To:* postgis-users at postgis.refractions.net > *Subject:* [postgis-users] build a SDB cache for Spatial Database based > onpostgis and postgresql > > > > I am interesting in PostGis and want to do something on it. My idea is > to build a Spatial Database Cache to accelerate GIS applications .So I want > to ask you some question and hope to get your answer. > > 1. As we all know, PostGis is a Spatial extention for PostGreSQL. And > there are also some other products such as ArcSDE, Oracle Spatial .Have you > ever do some performance comparison between them.If you have ever done > such work,Could you give me some information on it. If not, is it because > that you team did not care about performance and just concerned with > correctness of the program. And if you can give me some materials on > performance comparison on such Spatial Database extention including ArcSDE, > Oracle Spatial ,MySQL ,etc. > > 2. Since Google Earth is lauched ,Many GIS systems are used by more > and more people,so the important features of Software becomes more and more > important,such as sacalibity, robust, stability,etc. Can you give me some > information and papers on the bottleneck of these applications.Especially, > are computing and I/O requirements very important and become bottlenecks,Of > course, If you know some related solutions , you can mail me. > > I have searche lots of papers and get an overview of it. But I felt I did > not figure out the truth. So I want to get some more accurate information > on this field. > > _______________________________________________ > 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: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/da5c8ac2/attachment.html> From spatialguru.net at gmail.com Tue Nov 21 22:36:19 2006 From: spatialguru.net at gmail.com (Mark Thomas) Date: Wed, 22 Nov 2006 00:36:19 -0600 Subject: [postgis-users] Re: Splitting multistrings Message-ID: <2b5aa3d50611212236q7cd78350h5008b69448dc6d5@mail.gmail.com> If you're just looking to iterate over all lines in a multilinestring do something like this... for i in 1..NumGeometries(the_geom) loop a_geom := GeometryN(the_geom, i); --do something end loop; On 11/21/06, postgis-users-request at postgis.refractions.net < postgis-users-request at postgis.refractions.net> wrote: > > Send postgis-users mailing list submissions to > postgis-users at postgis.refractions.net > > To subscribe or unsubscribe via the World Wide Web, visit > http://postgis.refractions.net/mailman/listinfo/postgis-users > or, via email, send a message with subject or body 'help' to > postgis-users-request at postgis.refractions.net > > You can reach the person managing the list at > postgis-users-owner at postgis.refractions.net > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of postgis-users digest..." > > > Today's Topics: > > 1. runing postgis init scripts on a named schema (Dylan Beaudette) > 2. Ubuntu install of PostGIS 1.1.6 failing (Allan Doyle) > 3. RE: runing postgis init scripts on a named schema > (Pedro Doria Meunier) > 4. Re: runing postgis init scripts on a named schema > (Dylan Beaudette) > 5. Spatial Join Performance (Eric Shuman) > 6. Re: SRID for Saudi Arabia (Markus Schaber) > 7. lat and long format (Sunitha Bayana) > 8. looking for some perf data (raphael Jacquot) > 9. Re: looking for some perf data (Martin Davis) > 10. Re: looking for some perf data (raphael Jacquot) > 11. Re: looking for some perf data (Martin Davis) > 12. Re: looking for some perf data (raphael Jacquot) > 13. Splitting multistrings (Nick Black) > 14. Re: Splitting multistrings (Steffen Macke) > 15. Re: Splitting multistrings (Barend K ? bben) > 16. Re: looking for some perf data (Paul Ramsey) > 17. centroid() and AddGeometryColumn() questions > (matt.pettis at thomson.com) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 20 Nov 2006 14:24:32 -0800 > From: Dylan Beaudette <dylan.beaudette at gmail.com> > Subject: [postgis-users] runing postgis init scripts on a named schema > To: postgis-users at postgis.refractions.net > Message-ID: <200611201424.32336.dylan.beaudette at gmail.com> > Content-Type: text/plain; charset="us-ascii" > > Hi everyone, > > I have a fully functional postgis DB up and running, using the > default 'public' schema. I have just added a new schema, and would like > to 'spatially-enable' this new one. > > does anyone have tips on how this might be accomplished ? > > > thanks in advance! > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 > > > ------------------------------ > > Message: 2 > Date: Mon, 20 Nov 2006 18:45:50 -0500 > From: Allan Doyle <adoyle at eogeo.org> > Subject: [postgis-users] Ubuntu install of PostGIS 1.1.6 failing > To: PostGIS Users Discussion <postgis-users at postgis.refractions.net> > Message-ID: <1D9F853E-B379-4D84-B8F2-3E5797FA573E at eogeo.org> > Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed > > I'm installing onto an up-to-date Ubuntu 6.06 system > > proj-4.5.0 installs ok > geos-3.0.0rc2 installs ok > postgis-1.1.6 gives the following errors: > > ===== > mwow% sudo su postgres > postgres at mwow:/usr/local/src/postgis-1.1.6$ make check > make -C regress test > make[1]: Entering directory `/usr/local/src/postgis-1.1.6/regress' > Creating spatial db postgis_reg > ERROR: function postgis_lib_version() does not exist > HINT: No function matches the given name and argument types. You may > need to add explicit type casts. > > Something went wrong (no postgis installed in postgis_reg). > For details, check /tmp/pgis_reg_17211/regress_log > > make[1]: *** [test] Error 1 > make[1]: Leaving directory `/usr/local/src/postgis-1.1.6/regress' > make: *** [check] Error 2 > ===== > > The contents of /tmp/pgis_reg_17211/regress_log are not enlightening > to me: > ===== > CREATE DATABASE > BEGIN > psql:lwpostgis.sql:39: NOTICE: type "histogram2d" is not yet defined > DETAIL: Creating a shell type definition. > psql:lwpostgis.sql:39: ERROR: could not load library "/usr/local/src/ > postgis-1.1.6/lwgeom/liblwgeom.so.1.1": libgeos_c.so.1: cannot open > shared object file: No such file or directory > psql:lwpostgis.sql:44: ERROR: current transaction is aborted, > commands ignored until end of transaction block > psql:lwpostgis.sql:52: ERROR: current transaction is aborted, > commands ignored until end of transaction block > psql:lwpostgis.sql:62: ERROR: current transaction is aborted, > commands ignored until end of transaction block > > ... snip ... > > psql:lwpostgis.sql:3462: ERROR: current transaction is aborted, > commands ignored until end of transaction block > psql:lwpostgis.sql:3509: ERROR: current transaction is aborted, > commands ignored until end of transaction block > ROLLBACK > ===== > > I did check the geos build, there is a step that makes libgeos_c.so.1 > in /usr/local/lib. > > I tried explicitly setting --with-geos-libdir=/usr/local/lib but > there's no difference. > > Has anyone bumped into (and solved!) this? > > Thanks, > > Allan > > -- > Allan Doyle > +1.781.433.2695 > adoyle at eogeo.org > > > > > > ------------------------------ > > Message: 3 > Date: Mon, 20 Nov 2006 23:46:04 -0000 > From: "Pedro Doria Meunier" <pdoria at netmadeira.com> > Subject: RE: [postgis-users] runing postgis init scripts on a named > schema > To: <dylan.beaudette at gmail.com>, "'PostGIS Users Discussion'" > <postgis-users at postgis.refractions.net> > Message-ID: <000001c70cfe$0af31dc0$05d6bed5 at oem41cbbf9e178> > Content-Type: text/plain; charset="us-ascii" > > Hi Dylan, > > That depends... > What's your operating system? > Are you compiling from sources? > > > Pedro Doria Meunier > (351) 91 302 49 72 - (351) 96 247 99 12 > MSN - pdoriam at hotmail.com > ICQ - 308-182-126 > Skype: pdoriam > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Dylan > Beaudette > Sent: segunda-feira, 20 de Novembro de 2006 22:25 > To: postgis-users at postgis.refractions.net > Subject: [postgis-users] runing postgis init scripts on a named schema > > Hi everyone, > > I have a fully functional postgis DB up and running, using the > default 'public' schema. I have just added a new schema, and would like > to 'spatially-enable' this new one. > > does anyone have tips on how this might be accomplished ? > > > thanks in advance! > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > ------------------------------ > > Message: 4 > Date: Mon, 20 Nov 2006 16:30:24 -0800 > From: Dylan Beaudette <dylan.beaudette at gmail.com> > Subject: Re: [postgis-users] runing postgis init scripts on a named > schema > To: postgis-users at postgis.refractions.net > Message-ID: <200611201630.24632.dylan.beaudette at gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > On Monday 20 November 2006 14:24, Dylan Beaudette wrote: > > Hi everyone, > > > > I have a fully functional postgis DB up and running, using the > > default 'public' schema. I have just added a new schema, and would like > > to 'spatially-enable' this new one. > > > > does anyone have tips on how this might be accomplished ? > > > > > > thanks in advance! > > note that this is on debian linux, postgres 8.1.2, postgis 1.1.1 > > thanks > > -- > Dylan Beaudette > Soils and Biogeochemistry Graduate Group > University of California at Davis > 530.754.7341 > > > ------------------------------ > > Message: 5 > Date: Mon, 20 Nov 2006 17:19:30 -0800 > From: "Eric Shuman" <erics at ameri-title.com> > Subject: [postgis-users] Spatial Join Performance > To: "Postgis-Users" <postgis-users at postgis.refractions.net> > Message-ID: <KMEIKNPGBOLILGCIHBLCKEBHCBAA.erics at ameri-title.com> > Content-Type: text/plain; charset="iso-8859-1" > > Paul, > > I did try using distance function instead of contains and the query > completed much faster! 30 minutes instead of 2.5 hours. Thanks for the > tip!!! > > But... => > Another issue was brought up earlier in this thread mentioning that not > all > taxlot will be in just one zone... which has now brought up another road > block. I have been taking care of this issue by selecting distinct on > (taxlot,zone) then grouping on the taxlot and concatenating the zone with > a > delimiter. > > The issue now is that comparing on a point won't pick up all the zones (I > was just going to accept this), but comparing on the polygon gets false > hits > due to topological shifting and errors. I am experimenting with creating > a > negative buffer and comparing its distance to the zone. This works on a > test subject lot. > > The road block is this... When I try to run the query on my entire data > set > I get this error. > ----------------------------------------------- > server closed the connection unexpectedly > This probably means the server terminated abnormally > before or while processing the request. > ----------------------------------------------- > > To speed up the buffer I have also simplified the_geom.(this works) I > broke > the steps down by creating additional geometry fields in my taxlot layer > to > hold the simplified geometry and then the buffered geometry. The simplify > step works, the buffer is where it bails. > > The taxlot geometries as multipolygon. I ran an isvalid() on the geometry > and found some to be invalid, but if I exclude them from the query I still > get the server crash. > > Here are the queries: > --SELECT > AddGeometryColumn('','taxlot','the_simple_geom','-1','GEOMETRY',2); > --update taxlot set the_simple_geom = simplify(taxlot.the_geom,5); > --SELECT > AddGeometryColumn('','taxlot','the_buffer_geom','-1','GEOMETRY',2); > --update taxlot set the_buffer_geom = buffer(taxlot.the_simple_geom,-5); > BAILS HERE > > > Any ideas on what might be wrong??? > > (should this be a new thread?) > > --------------- > Eric Shuman > > > > > > ------------------------------ > > Message: 6 > Date: Tue, 21 Nov 2006 13:31:49 +0100 > From: Markus Schaber <schabi at logix-tt.com> > Subject: Re: [postgis-users] SRID for Saudi Arabia > To: PostGIS Users Discussion <postgis-users at postgis.refractions.net> > Message-ID: <4562F1B5.7010304 at logix-tt.com> > Content-Type: text/plain; charset=ISO-8859-15 > > Hi, Stephen, > > Stephen Davies wrote: > > Could somebody please point me at the correct (latlong) SRID for the > > Riyadh region of Saudi Arabia. > > There are several SRIDs, depending on the projection used. > > E. G. all world-wide lat/lon formats like WGS85 (SRID 4326) cover Saudi > Arabia. But there is an UTM zone, as well... > > So without knowing the projection information, we can't tell you the SRID. > > HTH, > Markus > > -- > Markus Schaber | Logical Tracking&Tracing International AG > Dipl. Inf. | Software Development GIS > > Fight against software patents in Europe! www.ffii.org > www.nosoftwarepatents.org > > > ------------------------------ > > Message: 7 > Date: Tue, 21 Nov 2006 08:44:11 -0800 > From: "Sunitha Bayana" <sbayana at sidestep.com> > Subject: [postgis-users] lat and long format > To: <postgis-users at postgis.refractions.net> > Message-ID: > < > 1C8FFEE4F601A74EBF7E78E38EA5E53807525C1E at mailbox.jayst.sidestep.com> > Content-Type: text/plain; charset="us-ascii" > > Hi > > > > > > > > Is there any way in postgis to convert the lat and long from degree system > to > decimal system. I have the data in the format as below > > > > > > > > 17.21.00S > > > > > > > > 145.30.00W > > > > > > > > > > > > > > Thanks in advance. > > > > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.refractions.net/pipermail/postgis-users/attachments/20061121/7d0ecda0/attachment-0001.html > > ------------------------------ > > Message: 8 > Date: Tue, 21 Nov 2006 17:46:46 +0100 > From: raphael Jacquot <sxpert at sxpert.org> > Subject: [postgis-users] looking for some perf data > To: PostGIS Users Discussion <postgis-users at postgis.refractions.net> > Message-ID: <45632D76.6040609 at sxpert.org> > Content-Type: text/plain; charset=ISO-8859-15; format=flowed > > hi there > I'm looking for some hard verifiable proof that using r-tree based > geometry indexes is better than using 2 columns and a btree index on it, > performance wise. > > has there any study done on that ? > > > ------------------------------ > > Message: 9 > Date: Tue, 21 Nov 2006 09:12:31 -0800 > From: Martin Davis <mbdavis at refractions.net> > Subject: Re: [postgis-users] looking for some perf data > To: PostGIS Users Discussion <postgis-users at postgis.refractions.net> > Message-ID: <4563337F.1090404 at refractions.net> > Content-Type: text/plain; charset=ISO-8859-15; format=flowed > > First of all, you need to be more specific. The performance of an index > is related to the kinds of queries you are making on it. If you are > making a simple equality query, then a B-tree on the (x,y) pair is > probably fine. But if you're wanting to do range searches in two > dimensions, a B-tree does not support this kind of query, and hence > performance will be slow compared to an access method which does support > this (e.g. R-tree, quad-tree, etc etc). > > I don't know of any reference which has a "hard verifiable" comparison > with a simple B-tree for range queries. I suspect this is because the > performance difference is so obviously bad for B-trees that researchers > haven't bothered to document it. > > You might try looking at two of the books by Hanan Samet: > > Foundations of Multidimensional and Metric Data Structures > The Design and Analysis of Spatial Data Structures > > You could also try the original R-tree papers, or a survey entitled > "R-Trees are everywhere". Also a paper entitled "Multidimensional > Access Methods" by Gaede et al. > > > raphael Jacquot wrote: > > hi there > > I'm looking for some hard verifiable proof that using r-tree based > > geometry indexes is better than using 2 columns and a btree index on > > it, performance wise. > > > > has there any study done on that ? > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > -- > Martin Davis > Senior Technical Architect > Refractions Research, Inc. > (250) 383-3022 > > > > ------------------------------ > > Message: 10 > Date: Tue, 21 Nov 2006 18:14:44 +0100 > From: raphael Jacquot <sxpert at sxpert.org> > Subject: Re: [postgis-users] looking for some perf data > To: PostGIS Users Discussion <postgis-users at postgis.refractions.net> > Message-ID: <45633404.7020604 at sxpert.org> > Content-Type: text/plain; charset=ISO-8859-15; format=flowed > > Martin Davis wrote: > > First of all, you need to be more specific. The performance of an index > > is related to the kinds of queries you are making on it. If you are > > making a simple equality query, then a B-tree on the (x,y) pair is > > probably fine. But if you're wanting to do range searches in two > > dimensions, a B-tree does not support this kind of query, and hence > > performance will be slow compared to an access method which does support > > this (e.g. R-tree, quad-tree, etc etc). > > typically I'm looking to compare using > > create table blah1 ( > lon double precision, > lat double precision > ) > with one index on lon and another one on lat > > the classic request being > lon>constant1 and lon<constant2 and lat>constant3 and lat<constant4 > > and > > create table blah2 ( > position Point > ) > with a gist r-tree index > > using the @ operator > > > raphael Jacquot wrote: > >> hi there > >> I'm looking for some hard verifiable proof that using r-tree based > >> geometry indexes is better than using 2 columns and a btree index on > >> it, performance wise. > >> > >> has there any study done on that ? > >> _______________________________________________ > >> postgis-users mailing list > >> postgis-users at postgis.refractions.net > >> http://postgis.refractions.net/mailman/listinfo/postgis-users > >> > > > > > > ------------------------------ > > Message: 11 > Date: Tue, 21 Nov 2006 09:22:12 -0800 > From: Martin Davis <mbdavis at refractions.net> > Subject: Re: [postgis-users] looking for some perf data > To: PostGIS Users Discussion <postgis-users at postgis.refractions.net> > Message-ID: <456335C4.1060503 at refractions.net> > Content-Type: text/plain; charset=ISO-8859-15; format=flowed > > Well, those are range queries. Not too surprising, 99.9% of spatial > queries are. > > The real question is: given that every modern spatial database uses some > sort of spatial index (R-tree, quad-tree, or grid), why even bother to > question whether B-trees might be better? > > raphael Jacquot wrote: > > > > typically I'm looking to compare using > > > > create table blah1 ( > > lon double precision, > > lat double precision > > ) > > with one index on lon and another one on lat > > > > the classic request being > > lon>constant1 and lon<constant2 and lat>constant3 and lat<constant4 > > > > and > > > > create table blah2 ( > > position Point > > ) > > with a gist r-tree index > > > > using the @ operator > > -- > Martin Davis > Senior Technical Architect > Refractions Research, Inc. > (250) 383-3022 > > > > ------------------------------ > > Message: 12 > Date: Tue, 21 Nov 2006 18:21:07 +0100 > From: raphael Jacquot <sxpert at sxpert.org> > Subject: Re: [postgis-users] looking for some perf data > To: PostGIS Users Discussion <postgis-users at postgis.refractions.net> > Message-ID: <45633583.2010009 at sxpert.org> > Content-Type: text/plain; charset=ISO-8859-15; format=flowed > > Martin Davis wrote: > > Well, those are range queries. Not too surprising, 99.9% of spatial > > queries are. > > > > The real question is: given that every modern spatial database uses some > > sort of spatial index (R-tree, quad-tree, or grid), why even bother to > > question whether B-trees might be better? > > ask my boss :D > > > raphael Jacquot wrote: > >> > >> typically I'm looking to compare using > >> > >> create table blah1 ( > >> lon double precision, > >> lat double precision > >> ) > >> with one index on lon and another one on lat > >> > >> the classic request being > >> lon>constant1 and lon<constant2 and lat>constant3 and lat<constant4 > >> > >> and > >> > >> create table blah2 ( > >> position Point > >> ) > >> with a gist r-tree index > >> > >> using the @ operator > > > > > > ------------------------------ > > Message: 13 > Date: Tue, 21 Nov 2006 17:21:22 +0000 > From: "Nick Black" <nickblack1 at gmail.com> > Subject: [postgis-users] Splitting multistrings > To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net> > Message-ID: > <223020e60611210921y6f4d68buaf0310e7a5fae6c5 at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi, > > I'm trying to split multistrings into individual linestrings using SQL > within PostGIS, but I cant find an appropriate function. Is it > possible to do this using SQL? If not, does anyone know a way this > can be done? > > Many Thanks > > Nick > > > ------------------------------ > > Message: 14 > Date: Tue, 21 Nov 2006 19:28:55 +0200 > From: "Steffen Macke" <sdteffen at gmail.com> > Subject: Re: [postgis-users] Splitting multistrings > To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net> > Message-ID: > <3cb1691c0611210928h56023b9dtd3faea5ed6f0b9cd at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Nick, > > > I'm trying to split multistrings into individual linestrings using SQL > > within PostGIS, but I cant find an appropriate function. Is it > > possible to do this using SQL? If not, does anyone know a way this > > can be done? > > Did you have a look at the GeometryN() function? > Together with the PostgreSQL generate_series() and NumGeometries() you > should be able to split your lines accordingly. > > Or do you have to insert new vertices at the split points? In this > case, a little bit > of additional information would help. > > Regards, > > Steffen > > > ------------------------------ > > Message: 15 > Date: Tue, 21 Nov 2006 18:54:53 +0100 > From: Barend K ? bben <kobben at itc.nl> > Subject: Re: [postgis-users] Splitting multistrings > To: PostGIS Users Discussion <postgis-users at postgis.refractions.net> > Message-ID: <C188FBFD.36C0%kobben at itc.nl> > Content-Type: text/plain; charset="ISO-8859-1" > > Hi , > > Find below an example how to change MultiPolygons to Polygons, Should eb > simple to convert for (mulit)linestrings... > > > __ > Barend K?bben > International Institute for Geo-information > Sciences and Earth Observation (ITC) > PO Box 6, 7500AA Enschede (The Netherlands) > ph: +31 (0)53 4874253; fax: +31 (0)53 4874335 > > +++++++++++++ > > -- > -- STEP 1: get maximum of NumGeometries into tmp table > -- > > CREATE TABLE tmp (maxnumgeoms int4) WITH OIDS; > > INSERT into tmp > (select gid from world where gid <= > (select max(NumGeometries(the_geom)) from world) > ); > > -- > -- STEP 2: create World_exploded table > -- > > CREATE SEQUENCE world_exploded_id_seq > INCREMENT 1 > MINVALUE 1 > MAXVALUE 9223372036854775807 > START 1 > CACHE 1; > > CREATE TABLE world_exploded > ( > id int4 NOT NULL DEFAULT nextval('world_exploded_id_seq'::regclass), > gid int4 NOT NULL, > the_geom geometry, > CONSTRAINT world_exploded_pkey PRIMARY KEY (id), > CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2), > CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = > 'POLYGON'::text OR the_geom IS NULL), > CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 4326) > ) ; > > CREATE INDEX world_exploded_the_geom_gist > ON world_exploded USING gist(the_geom); > > CREATE INDEX world_exploded_gid > ON world_exploded USING btree(gid); > > -- > -- STEP 3: insert exploded polygons > -- > > insert into world_exploded (gid,the_geom) > select > gid, GeometryN(world.the_geom,maxnumgeoms) > from tmp,world > > > > ------------------------------ > > Message: 16 > Date: Tue, 21 Nov 2006 10:53:24 -0800 > From: Paul Ramsey <pramsey at refractions.net> > Subject: Re: [postgis-users] looking for some perf data > To: PostGIS Users Discussion <postgis-users at postgis.refractions.net> > Message-ID: <45634B24.1070907 at refractions.net> > Content-Type: text/plain; charset=ISO-8859-15; format=flowed > > It's not so much a matter of "better" as it is a matter of "good > enough". As long as your data volume remains low enough, you can keep > your simple non-spatial tables and b-trees. At some point you'll flip > though and need to move to spatial for "adequate" performance. It all > depends on your definitions of "large" and "adequate", none of which are > in scope for me :) > > P > > Martin Davis wrote: > > Well, those are range queries. Not too surprising, 99.9% of spatial > > queries are. > > > > The real question is: given that every modern spatial database uses some > > sort of spatial index (R-tree, quad-tree, or grid), why even bother to > > question whether B-trees might be better? > > > > raphael Jacquot wrote: > >> > >> typically I'm looking to compare using > >> > >> create table blah1 ( > >> lon double precision, > >> lat double precision > >> ) > >> with one index on lon and another one on lat > >> > >> the classic request being > >> lon>constant1 and lon<constant2 and lat>constant3 and lat<constant4 > >> > >> and > >> > >> create table blah2 ( > >> position Point > >> ) > >> with a gist r-tree index > >> > >> using the @ operator > > > > > > ------------------------------ > > Message: 17 > Date: Tue, 21 Nov 2006 13:04:07 -0600 > From: <matt.pettis at thomson.com> > Subject: [postgis-users] centroid() and AddGeometryColumn() questions > To: <postgis-users at postgis.refractions.net> > Message-ID: > < > 89C159F45B13A24682D98BDEF58E451F0B331CAA at TLRUSMNEAGMBX28.ERF.THOMSON.COM> > > Content-Type: text/plain; charset="us-ascii" > > Hi, > > I am trying to add a column to my table that lists the centroids the > polygon described in the 'the_geom' field. I use the following, which > works (I think), but of which I have questions: > > SELECT AddGeometryColumn( '', 'shp_mcd', 'centroid', -1, 'POINT', 2 ); > UPDATE shp_mcd SET centroid = centroid ( the_geom ); > > My question is about the final argument to AddGeometryColumn. > Documentation states that centroid() returns a POINT. I figure that > that implies that the last argument should then be a 0, not a 2. But if > I use a 0 in the last field, the updated doesn't work -- it tells me > that i violate a dimension constraint. Can someone explain why I need > to have a 2 as the last argument and not a 0? It doesn't make sense to > me. > > Thanks, > Matt > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.refractions.net/pipermail/postgis-users/attachments/20061121/faf4d354/attachment-0001.html > > ------------------------------ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > End of postgis-users Digest, Vol 49, Issue 21 > ********************************************* > -- Regards, Mark Thomas spatialguru.net at gmail.com 205.529.9013 "Commit to the Lord whatever you do, and your plans will succeed." - Proverbs 16:3 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/f7d2d709/attachment.html> From kobben at itc.nl Wed Nov 22 01:54:43 2006 From: kobben at itc.nl (Barend K=?ISO-8859-1?B?9g==?=bben) Date: Wed, 22 Nov 2006 10:54:43 +0100 Subject: [postgis-users] Invalid Geometry In-Reply-To: <4563A63A.3010605@engr.orst.edu> Message-ID: <C189DCF3.36DC%kobben@itc.nl> I think 'GeometryFromText(POLYGON((81 48, 82 48, 82 49, 81 49, 81 48)),4326)' Should be GeometryFromText('POLYGON((81 48, 82 48, 82 49, 81 49, 81 48)),4326') Mind the quotes, they contain the string that indeed should be made into a geometry On 22-11-2006 02:22, "Ryan Ollerenshaw" <ollerery at engr.orst.edu> wrote: > 'GeometryFromText(POLYGON((81 48, 82 48, > 82 49, 81 49, 81 48)),4326)' From maovieira at gmail.com Wed Nov 22 03:17:25 2006 From: maovieira at gmail.com (marco vieira) Date: Wed, 22 Nov 2006 09:17:25 -0200 Subject: [postgis-users] lat and long format In-Reply-To: <1C8FFEE4F601A74EBF7E78E38EA5E53807525C1E@mailbox.jayst.sidestep.com> References: <1C8FFEE4F601A74EBF7E78E38EA5E53807525C1E@mailbox.jayst.sidestep.com> Message-ID: <5becacd20611220317i6cb87ceetc71ffe4d540514bc@mail.gmail.com> Sunitha: Use a simple mathematical sentence like: select (substring(lat from 1 for 2)::float+substring(lat from 4 for 2)::float/60.0+substring(lat from 7 for 2)::float/3600.0)*-1.0 from ( select '17.21.00S'::text as lat ) as foo Be careful with the "seconds" on sexagezimal sintax becouse you can have data with more digits than 2 and use -1.0 product only in ocident (W) and meridional hemisphere (S). Regards, -- Marco Vieira +55 21 9499-6800 e-mail: maovieira at gmail.com 2006/11/21, Sunitha Bayana <sbayana at sidestep.com>: > > Hi > > > > > > > > Is there any way in postgis to convert the lat and long from degree system > to decimal system. I have the data in the format as below > > > > > > > > 17.21.00S > > > > > > > > 145.30.00W > > > > > > > > > > > > > > Thanks in advance. > > > > > > > > _______________________________________________ > 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: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/9c271cd0/attachment.html> From robtester at gmail.com Wed Nov 22 05:50:24 2006 From: robtester at gmail.com (Rob Tester) Date: Wed, 22 Nov 2006 06:50:24 -0700 Subject: [postgis-users] Help with fixing invalid geometries Message-ID: <010901c70e3d$2aa4dd30$7203a8c0@susa.local> I imported some shape files into postgres everything went well except that many (several thousand) of the polygons have self intersections. I was wondering if there was a way to easily find the point(s) on the polygon that causes the self intersection as well as then 'nudge' the point away from the line it is intersecting. I would prefer to not do this manually if possible. Any thoughts? Thanks, Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/6752d5be/attachment.html> From jan.syryn at trasys.be Wed Nov 22 06:32:00 2006 From: jan.syryn at trasys.be (Jan Syryn) Date: Wed, 22 Nov 2006 15:32:00 +0100 Subject: [postgis-users] Hibernate with PostGIS In-Reply-To: <c653c98f0611180654n61d6e790t77489331da6b4849@mail.gmail.com> Message-ID: <004a01c70e42$f98a2880$0801a8c0@ariane.tractebel.be> Hi Sandeep, I am also doing a project with PostgresSQL/PostGIS and Hibernate. In general: it seems that you are lacking a common knowledge of Hibernate in general and that you problems are merely related to Hibernate than to PostGIS. In a normal Hibernate situation, you don't need to create the database schema automatically, so you should not use the property hbm2dll.auto. I propose you leave it out of you config file. You just create the Geometry column in your table of the DB. Also, it is a good practice to add a constructor to your POJO objects This helps of easely creating objects that need to persisted in the database Little suggestion: - make the geometry column nullable. With the correction of Dave you should be able of doing so with the GeometryUserType. - Add for exemple an extra 'name' field to your table. - Try to add a line in your DB without the geometry column. for exemple: session.save(new RoadNetwork("sandeep")) This way, you know a) your keygenerator works b) a session is well intantiated c) transaction did work - If this goes well, try to use the postgis component: Geometry myGeom = factory.createGeometry(); session.save(new RoadNetwork("sandeep",myGeom)) HIH (I hope it helps), Jan PS: I am also using Spring. But this is not your problem. The use of Spring only complicate the things. Try to get the thing fired as simple as possible. Then start building things up from there. _____ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Sandeep Kumar Jakkaraju Sent: samedi 18 novembre 2006 15:54 To: PostGIS Users Discussion Subject: Re: [postgis-users] Hibernate with PostGIS I think Hibernate cannot create that Geometry column automatically !!! is it something to do with hbm2ddl.auto !! I am able to ..get the geometry from a table with geometry column already created ... Norman -->> Would you like me to create a simple tutorial on how to use Hibernate with Postgis ..your tutorial .. is not easy to understand ... Thanks Sandeep -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/b60de3b5/attachment.html> From sandeepkumar.jakkaraju at gmail.com Wed Nov 22 07:10:28 2006 From: sandeepkumar.jakkaraju at gmail.com (Sandeep Kumar Jakkaraju) Date: Wed, 22 Nov 2006 20:40:28 +0530 Subject: [postgis-users] Hibernate with PostGIS In-Reply-To: <004a01c70e42$f98a2880$0801a8c0@ariane.tractebel.be> References: <c653c98f0611180654n61d6e790t77489331da6b4849@mail.gmail.com> <004a01c70e42$f98a2880$0801a8c0@ariane.tractebel.be> Message-ID: <c653c98f0611220710y7cb9d64asb61ec1e298cf77b9@mail.gmail.com> Hello Jan .. Thanks for ur reply .. u r right i am newbie in Hibernate and Spring !! I thought that creating table schema automatically is a GOOD feature of Hibernate .. For example:- If your application is using some tables .. u create those tables in your db .. but when u want to use some other db ..u have to send all the sql scripts with schema.. and some has to run it ...to create the table schemas... But If you u r using hibernate ...there is no need for this ..because it automatically creates the table schemas .. Please correct do me ..if my argument is wrong .. With Hibernate-PostGIS .. it is not able to create the Geometry column automatically .. i thought it was BUG which needed attention .. so i posted it ... I have no other problem with using Hibernate with postgis .... I really appreciate ur other suggestions as well.. Thanks Regards Sandeep On 11/22/06, Jan Syryn <jan.syryn at trasys.be> wrote: > > Hi Sandeep, > > I am also doing a project with PostgresSQL/PostGIS and Hibernate. > > In general: it seems that you are lacking a common knowledge of Hibernate > in general and that you problems are merely related to Hibernate than to > PostGIS. > > In a normal Hibernate situation, you don't need to create the database > schema automatically, so you should not use the property hbm2dll.auto. > I propose you leave it out of you config file. > You just create the Geometry column in your table of the DB. > Also, it is a good practice to add a constructor to your POJO objects This > helps of easely creating objects that need to persisted in the database > > > Little suggestion: > - make the geometry column nullable. With the correction of Dave you > should be able of doing so with the GeometryUserType. > - Add for exemple an extra 'name' field to your table. > - Try to add a line in your DB without the geometry column. > for exemple: > session.save(new RoadNetwork("sandeep")) > This way, you know a) your keygenerator works b) a session is > well intantiated c) transaction did work > - If this goes well, try to use the postgis component: > > Geometry myGeom = factory.createGeometry(); > session.save(new RoadNetwork("sandeep",myGeom)) > > HIH (I hope it helps), > Jan > > PS: I am also using Spring. But this is not your problem. The use of > Spring only complicate the things. Try to get the thing fired as simple as > possible. Then start building things up from there. > > ------------------------------ > *From:* postgis-users-bounces at postgis.refractions.net [mailto: > postgis-users-bounces at postgis.refractions.net] *On Behalf Of *Sandeep > Kumar Jakkaraju > *Sent:* samedi 18 novembre 2006 15:54 > *To:* PostGIS Users Discussion > *Subject:* Re: [postgis-users] Hibernate with PostGIS > > > I think Hibernate cannot create that Geometry column automatically !!! > is it something to do with hbm2ddl.auto !! > > > I am able to ..get the geometry from a table with geometry column already > created ... > > Norman -->> Would you like me to create a simple tutorial on how to use > Hibernate with Postgis ..your tutorial .. is not easy to understand ... > > > Thanks > Sandeep > > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > -- Sandeep Kumar Jakkaraju WeBlog: http://jakkarajus.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/6e0aec00/attachment.html> From jan.syryn at trasys.be Wed Nov 22 09:14:36 2006 From: jan.syryn at trasys.be (Jan Syryn) Date: Wed, 22 Nov 2006 18:14:36 +0100 Subject: [postgis-users] Hibernate with PostGIS In-Reply-To: <c653c98f0611220710y7cb9d64asb61ec1e298cf77b9@mail.gmail.com> Message-ID: <00d901c70e59$b0280740$0801a8c0@ariane.tractebel.be> Yes indeed, Hibernate has the possibility to create a schema for you. And yes, it is practical, I used it also. But the problem is, it is not well done. For example: the name of the PK en FK indices are random. Not nice if you have a fk144524524541 contraint exception Also when you execute your code, you will also loose all your data already inserted before. (he creates new tables). So I used it once, cleaned the schema and never uses it again. What is your status exactly ? Do you succeed in inserting an object (without PostGis data) into your DB ? It is possible (and probably true) that Hibernate is not capable of creating a Geometry column itself. But what is the use or benefit ? Very limited. Like I said: - make a working version without Geometry (with the auto-creation feature if you want). - remove the auto-creating feature - Add a column yourself in db that is of type Geometry - try to insert a POJO that also contains the Geometry. Try to keep it simple ! Jan _____ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Sandeep Kumar Jakkaraju Sent: mercredi 22 novembre 2006 16:10 To: PostGIS Users Discussion Subject: Re: [postgis-users] Hibernate with PostGIS Hello Jan .. Thanks for ur reply .. u r right i am newbie in Hibernate and Spring !! I thought that creating table schema automatically is a GOOD feature of Hibernate .. For example:- If your application is using some tables .. u create those tables in your db .. but when u want to use some other db ..u have to send all the sql scripts with schema.. and some has to run it ...to create the table schemas... But If you u r using hibernate ...there is no need for this ..because it automatically creates the table schemas .. Please correct do me ..if my argument is wrong .. With Hibernate-PostGIS .. it is not able to create the Geometry column automatically .. i thought it was BUG which needed attention .. so i posted it ... I have no other problem with using Hibernate with postgis .... I really appreciate ur other suggestions as well.. Thanks Regards Sandeep On 11/22/06, Jan Syryn <jan.syryn at trasys.be> wrote: Hi Sandeep, I am also doing a project with PostgresSQL/PostGIS and Hibernate. In general: it seems that you are lacking a common knowledge of Hibernate in general and that you problems are merely related to Hibernate than to PostGIS. In a normal Hibernate situation, you don't need to create the database schema automatically, so you should not use the property hbm2dll.auto. I propose you leave it out of you config file. You just create the Geometry column in your table of the DB. Also, it is a good practice to add a constructor to your POJO objects This helps of easely creating objects that need to persisted in the database Little suggestion: - make the geometry column nullable. With the correction of Dave you should be able of doing so with the GeometryUserType. - Add for exemple an extra 'name' field to your table. - Try to add a line in your DB without the geometry column. for exemple: session.save(new RoadNetwork("sandeep")) This way, you know a) your keygenerator works b) a session is well intantiated c) transaction did work - If this goes well, try to use the postgis component: Geometry myGeom = factory.createGeometry(); session.save(new RoadNetwork("sandeep",myGeom)) HIH (I hope it helps), Jan PS: I am also using Spring. But this is not your problem. The use of Spring only complicate the things. Try to get the thing fired as simple as possible. Then start building things up from there. _____ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Sandeep Kumar Jakkaraju Sent: samedi 18 novembre 2006 15:54 To: PostGIS Users Discussion Subject: Re: [postgis-users] Hibernate with PostGIS I think Hibernate cannot create that Geometry column automatically !!! is it something to do with hbm2ddl.auto !! I am able to ..get the geometry from a table with geometry column already created ... Norman -->> Would you like me to create a simple tutorial on how to use Hibernate with Postgis ..your tutorial .. is not easy to understand ... Thanks Sandeep _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net <mailto:postgis-users at postgis.refractions.net> http://postgis.refractions.net/mailman/listinfo/postgis-users -- Sandeep Kumar Jakkaraju WeBlog: http://jakkarajus.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/78114817/attachment.html> From jan.syryn at trasys.be Wed Nov 22 09:28:57 2006 From: jan.syryn at trasys.be (Jan Syryn) Date: Wed, 22 Nov 2006 18:28:57 +0100 Subject: [postgis-users] build a SDB cache for Spatial Database basedonpostgis and postgresql In-Reply-To: <13432ab00611211856s3ee6486di9d918545285662d8@mail.gmail.com> Message-ID: <00fc01c70e5b$b16c3520$0801a8c0@ariane.tractebel.be> Mr Jackie, My advice is (and a bit the same as Pedro): If you are not very experienced but there is (lot of) money in the project: don't hesitate and go for ORACLE / SPATIAL. I offeres a very extended, stable, framework with zillion of features. Furthermore, they offer a very quick and elaborate support system. To conclude: VERY proffessional, but RATHER expensive. If you wanna go for the 'cheap' version. Then Postgis is a choice. It still has a rather fast update-cycle (this means it is not that stable yet). But that is logic: it is open source. Also support......... by the people like this little mailing list. So not that professional, and above all (like Pedro indicated too): most of the solutions you have to devine yourself and ask simple/small questions to mailing list. ArcView: same story: commercial, professional and licenced Choice between Oracle or Arcview ? I don't know. First, I only worked with Oracle/Spatial and that rockes as hell. Second, it depends on the budget and other factors like: - dimension (DB/DB-cluster ; mono-processors /multi-processors) (Oracle for example is licenced by CPU) - response time - .......... _____ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of zhang Jackie Sent: mercredi 22 novembre 2006 03:57 To: PostGIS Users Discussion Subject: Re: [postgis-users] build a SDB cache for Spatial Database basedonpostgis and postgresql Mr.Pedro your advice is very important for me an thank you very much for this. can you tell me how to profile the performance of PostGreSQL? you say "Solutions are as good as the one who develops them" Do you mean that my cooperative cache idea can not achieve expected performance? and so this is a not a good idea? 2006/11/22, Pedro Doria Meunier <pdoria at netmadeira.com>: Mr Jackie, It's obvious you're pulling out straws since it's apparent that you don't have a clue how to even benchmark Postgresql. Solutions are as good as the one who develops them. My best advice to you is that, beyond asking for free papers/experience, you should first take the time to experiment/study Posgresql and specifically PostGIS extensions, know how to benchmark your own implementations and then compare the same line of though with other products. Speaking strictly for myself, my company uses PG/PostGIS *extensively * with tables spanning millions of records and we still tip the hat to the PG/PostGIS developers. Robustness is a given as well as scalability and stability. In short, PG/PostGIS rocks! Building a SDB is more complex than you can now imagine and it's a multidisciplinary task. Tip: start with asking small questions (reflecting your commitment/investment to PG/PostGIS). This group is a very friendly bunch (and helpful) when someone asks specific/informed questions. Sincerely, Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam _____ From: postgis-users-bounces at postgis.refractions.net [mailto: <mailto:postgis-users-bounces at postgis.refractions.net> postgis-users-bounces at postgis.refractions.net] On Behalf Of zhang Jackie Sent: quarta-feira, 22 de Novembro de 2006 1:32 To: postgis-users at postgis.refractions.net Subject: [postgis-users] build a SDB cache for Spatial Database based onpostgis and postgresql I am interesting in PostGis and want to do something on it. My idea is to build a Spatial Database Cache to accelerate GIS applications .So I want to ask you some question and hope to get your answer. 1. As we all know, PostGis is a Spatial extention for PostGreSQL. And there are also some other products such as ArcSDE, Oracle Spatial .Have you ever do some performance comparison between them.If you have ever done such work,Could you give me some information on it. If not, is it because that you team did not care about performance and just concerned with correctness of the program. And if you can give me some materials on performance comparison on such Spatial Database extention including ArcSDE, Oracle Spatial ,MySQL ,etc. 2. Since Google Earth is lauched ,Many GIS systems are used by more and more people,so the important features of Software becomes more and more important,such as sacalibity, robust, stability,etc. Can you give me some information and papers on the bottleneck of these applications.Especially, are computing and I/O requirements very important and become bottlenecks,Of course, If you know some related solutions , you can mail me. I have searche lots of papers and get an overview of it. But I felt I did not figure out the truth. So I want to get some more accurate information on this field. _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users <http://postgis.refractions.net/mailman/listinfo/postgis-users> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/1772944d/attachment.html> From pramsey at refractions.net Wed Nov 22 10:44:23 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Wed, 22 Nov 2006 10:44:23 -0800 Subject: [postgis-users] build a SDB cache for Spatial Database basedonpostgis and postgresql In-Reply-To: <00fc01c70e5b$b16c3520$0801a8c0@ariane.tractebel.be> References: <00fc01c70e5b$b16c3520$0801a8c0@ariane.tractebel.be> Message-ID: <45649A87.1020805@refractions.net> Jan, Be kind to the ones who love you... Jan Syryn wrote: > If you are not very experienced but there is (lot of) money in the project: > don't hesitate and go for ORACLE / SPATIAL. > I offeres a very extended, stable, framework with zillion of features. > Furthermore, they offer a very quick and elaborate support system. > To conclude: VERY proffessional, but RATHER expensive. Oracle has not been faster than PostGIS in our experience, which has been extensive. It *is* more featureful, but as usual the cost of the installation should be judged against the cost of adding the feature to PostGIS. > If you wanna go for the 'cheap' version. Then Postgis is a choice. It > still has a rather fast update-cycle (this means it is not that stable yet). > But that is logic: it is open source. We can release less often, if that will make you feel we are more stable. :) I would have thought stability has more to do with uptime, performance under load, graceful crash recovery, and so on, all of which PostgreSQL/PostGIS have in spades. > Also support......... by the people like this little mailing list. > So not that professional, and above all (like Pedro indicated too): most > of the solutions you have to divine yourself and ask simple/small > questions to mailing list. At the risk of pre-announcing, there should be a more formal support mechanism available, "soon". Paul From aaronkoning at gmail.com Wed Nov 22 11:23:34 2006 From: aaronkoning at gmail.com (Aaron Koning) Date: Wed, 22 Nov 2006 11:23:34 -0800 Subject: [postgis-users] Identity Overlay Message-ID: <1319fbba0611221123p2a8d1189xcf28443f05d7c95d@mail.gmail.com> Hi All, I am trying to perform an identity overlay where each point in a point layer gets a value from a polygon layer based on what polygon contains the point. I have come up with the following query which is working fairly well. UPDATE point_layer SET b250k_tag = polygon_layer.b250k_tag WHERE contains(polygon_layer.the_geom, point_layer.the_geom); I am just wondering if other people have performed identity like overlays in PostGIS and is there a better / more efficient way to perform them? Thanks, Aaron +------------------------------------------------- | Aaron Koning | Information Technologist | Prince George, BC, Canada. +------------------------------------------------- | Flexible Internet Spatial Template: | http://fist-mapping.org +------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/e68c1d1d/attachment.html> From woodbri at swoodbridge.com Wed Nov 22 11:55:08 2006 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 22 Nov 2006 14:55:08 -0500 Subject: [postgis-users] Identity Overlay In-Reply-To: <1319fbba0611221123p2a8d1189xcf28443f05d7c95d@mail.gmail.com> References: <1319fbba0611221123p2a8d1189xcf28443f05d7c95d@mail.gmail.com> Message-ID: <4564AB1C.8030002@swoodbridge.com> Try: UPDATE point_layer SET b250k_tag = polygon_layer.b250k_tag WHERE polygon_layer.the_geom && point_layer.the_geom and distance(polygon_layer.the_geom, point_layer.the_geom) < 0.00001; It is not good to compare floats with equals due to possible rounding errors. -Steve Aaron Koning wrote: > Hi All, > > I am trying to perform an identity overlay where each point in a point > layer gets a value from a polygon layer based on what polygon contains > the point. I have come up with the following query which is working > fairly well. > UPDATE point_layer SET b250k_tag = polygon_layer.b250k_tag WHERE > contains(polygon_layer.the_geom, point_layer.the_geom); > > I am just wondering if other people have performed identity like > overlays in PostGIS and is there a better / more efficient way to > perform them? > > Thanks, > Aaron > > +------------------------------------------------- > | Aaron Koning > | Information Technologist > | Prince George, BC, Canada. > +------------------------------------------------- > | Flexible Internet Spatial Template: > | http://fist-mapping.org > +------------------------------------------------- > > > ------------------------------------------------------------------------ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From pramsey at refractions.net Wed Nov 22 12:06:38 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Wed, 22 Nov 2006 12:06:38 -0800 Subject: [postgis-users] Identity Overlay In-Reply-To: <4564AB1C.8030002@swoodbridge.com> References: <1319fbba0611221123p2a8d1189xcf28443f05d7c95d@mail.gmail.com> <4564AB1C.8030002@swoodbridge.com> Message-ID: <4564ADCE.1020008@refractions.net> This is such a common performance case, we're going to add some automagical code to make Contains() work more efficiently, by short-circuiting and Contains(POLYGON, POINT) cases directly to an internal postgis PIP algorithm. P Stephen Woodbridge wrote: > Try: > > UPDATE point_layer SET b250k_tag = polygon_layer.b250k_tag WHERE > polygon_layer.the_geom && point_layer.the_geom and > distance(polygon_layer.the_geom, point_layer.the_geom) < 0.00001; > > It is not good to compare floats with equals due to possible rounding > errors. > > -Steve > > Aaron Koning wrote: >> Hi All, >> >> I am trying to perform an identity overlay where each point in a point >> layer gets a value from a polygon layer based on what polygon contains >> the point. I have come up with the following query which is working >> fairly well. >> UPDATE point_layer SET b250k_tag = polygon_layer.b250k_tag WHERE >> contains(polygon_layer.the_geom, point_layer.the_geom); >> >> I am just wondering if other people have performed identity like >> overlays in PostGIS and is there a better / more efficient way to >> perform them? >> >> Thanks, >> Aaron >> >> +------------------------------------------------- >> | Aaron Koning >> | Information Technologist >> | Prince George, BC, Canada. >> +------------------------------------------------- >> | Flexible Internet Spatial Template: >> | http://fist-mapping.org >> +------------------------------------------------- >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> 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 aaronkoning at gmail.com Wed Nov 22 13:10:59 2006 From: aaronkoning at gmail.com (Aaron Koning) Date: Wed, 22 Nov 2006 13:10:59 -0800 Subject: [postgis-users] Identity Overlay In-Reply-To: <4564ADCE.1020008@refractions.net> References: <1319fbba0611221123p2a8d1189xcf28443f05d7c95d@mail.gmail.com> <4564AB1C.8030002@swoodbridge.com> <4564ADCE.1020008@refractions.net> Message-ID: <1319fbba0611221310o6051aa06if124a9b855214bdc@mail.gmail.com> I forgot about the float comparison, so thanks for that pointer. Great to hear that PIP will be built in. Currently, with a million and half points it can take a while, but the end result is great! Aaron On 11/22/06, Paul Ramsey <pramsey at refractions.net> wrote: > > This is such a common performance case, we're going to add some > automagical code to make Contains() work more efficiently, by > short-circuiting and Contains(POLYGON, POINT) cases directly to an > internal postgis PIP algorithm. > > P > > Stephen Woodbridge wrote: > > Try: > > > > UPDATE point_layer SET b250k_tag = polygon_layer.b250k_tag WHERE > > polygon_layer.the_geom && point_layer.the_geom and > > distance(polygon_layer.the_geom, point_layer.the_geom) < 0.00001; > > > > It is not good to compare floats with equals due to possible rounding > > errors. > > > > -Steve > > > > Aaron Koning wrote: > >> Hi All, > >> > >> I am trying to perform an identity overlay where each point in a point > >> layer gets a value from a polygon layer based on what polygon contains > >> the point. I have come up with the following query which is working > >> fairly well. > >> UPDATE point_layer SET b250k_tag = polygon_layer.b250k_tag WHERE > >> contains(polygon_layer.the_geom, point_layer.the_geom); > >> > >> I am just wondering if other people have performed identity like > >> overlays in PostGIS and is there a better / more efficient way to > >> perform them? > >> > >> Thanks, > >> Aaron > >> > >> +------------------------------------------------- > >> | Aaron Koning > >> | Information Technologist > >> | Prince George, BC, Canada. > >> +------------------------------------------------- > >> | Flexible Internet Spatial Template: > >> | http://fist-mapping.org > >> +------------------------------------------------- > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> 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 > -- +------------------------------------------------- | Aaron Koning | Information Technologist | Prince George, BC, Canada. +------------------------------------------------- | Flexible Internet Spatial Template: | http://fist-mapping.org +------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/1d6734c0/attachment.html> From frank.koormann at intevation.de Thu Nov 23 00:48:45 2006 From: frank.koormann at intevation.de (Frank Koormann) Date: Thu, 23 Nov 2006 09:48:45 +0100 Subject: [postgis-users] build a SDB cache for Spatial Database basedonpostgis and postgresql In-Reply-To: <00fc01c70e5b$b16c3520$0801a8c0@ariane.tractebel.be> References: <13432ab00611211856s3ee6486di9d918545285662d8@mail.gmail.com> <00fc01c70e5b$b16c3520$0801a8c0@ariane.tractebel.be> Message-ID: <20061123084844.GP27083@intevation.de> * Jan Syryn <jan.syryn at trasys.be> [061122 18:29]: > Also support......... by the people like this little mailing list. > So not that professional, and above all (like Pedro indicated too): most > of the solutions you have to devine yourself and ask simple/small > questions to mailing list. Sorry for slight advertising, but actually this is not true. I cannot speak for Refractions, but here in Europe my company offers professional support (with Refractions as backup). There are also other offers. Might be a matter of visibility. Best regards, Frank -- Frank Koormann <frank.koormann at intevation.de> Professional Service around Free Software (http://intevation.net/) FreeGIS Project (http://freegis.org/) PostGIS Support (http://www.intevation.net/geospatial/postgis-support.en.html) From jan.syryn at trasys.be Thu Nov 23 01:34:34 2006 From: jan.syryn at trasys.be (Jan Syryn) Date: Thu, 23 Nov 2006 10:34:34 +0100 Subject: [postgis-users] build a SDB cache for Spatial Databasebasedonpostgis and postgresql In-Reply-To: <20061123084844.GP27083@intevation.de> Message-ID: <001f01c70ee2$9631eac0$0801a8c0@ariane.tractebel.be> I plead guilty on all charges, your honor ! Coming from the Oracle Stellular System, I am a bit new in the PostGis Galaxy..... Indeed, most of the remarks are a matter of visibility. It is the Krypton that did this, your honor, it was not me ! -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Frank Koormann Sent: jeudi 23 novembre 2006 09:49 To: PostGIS Users Discussion Subject: Re: [postgis-users] build a SDB cache for Spatial Databasebasedonpostgis and postgresql * Jan Syryn <jan.syryn at trasys.be> [061122 18:29]: > Also support......... by the people like this little mailing list. > So not that professional, and above all (like Pedro indicated too): most > of the solutions you have to devine yourself and ask simple/small > questions to mailing list. Sorry for slight advertising, but actually this is not true. I cannot speak for Refractions, but here in Europe my company offers professional support (with Refractions as backup). There are also other offers. Might be a matter of visibility. Best regards, Frank -- Frank Koormann <frank.koormann at intevation.de> Professional Service around Free Software (http://intevation.net/) FreeGIS Project (http://freegis.org/) PostGIS Support (http://www.intevation.net/geospatial/postgis-support.en.html) _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From schabi at logix-tt.com Thu Nov 23 04:32:21 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Thu, 23 Nov 2006 13:32:21 +0100 Subject: [postgis-users] Invalid Geometry In-Reply-To: <C189DCF3.36DC%kobben@itc.nl> References: <C189DCF3.36DC%kobben@itc.nl> Message-ID: <456594D5.2010201@logix-tt.com> Hi, Barend, Barend K?bben wrote: > I think > 'GeometryFromText(POLYGON((81 48, 82 48, > 82 49, 81 49, 81 48)),4326)' > Should be > GeometryFromText('POLYGON((81 48, 82 48, > 82 49, 81 49, 81 48)),4326') You spotted the problem, but not the solution, it is: GeometryFromText('POLYGON((81 48, 82 48, 82 49, 81 49, 81 48))',4326) HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org From mbdavis at refractions.net Thu Nov 23 08:49:05 2006 From: mbdavis at refractions.net (Martin Davis) Date: Thu, 23 Nov 2006 08:49:05 -0800 Subject: [postgis-users] Identity Overlay In-Reply-To: <1319fbba0611221123p2a8d1189xcf28443f05d7c95d@mail.gmail.com> References: <1319fbba0611221123p2a8d1189xcf28443f05d7c95d@mail.gmail.com> Message-ID: <4565D101.1000400@refractions.net> You may want to use the intersects() predicate rather than contains() for this query. The reasons are: 1) Technically, the OGC definition of contains implies that "polygons do not contain their boundary". This means that the test poly.contains(pt) produces a false result if pt lies exactly on the boundary of the polygon. Usually this is not the result that is desired. intersects() does not have this behaviour. (It's also worth noting that JTS now offers a covers() and coverBy() predicates, which also have the expected behaviour. 2) Because of its simpler semantics, intersects is a bit easier to optimize, and hence may get more attention and get done sooner than contains. Aaron Koning wrote: > Hi All, > > I am trying to perform an identity overlay where each point in a point > layer gets a value from a polygon layer based on what polygon contains > the point. I have come up with the following query which is working > fairly well. > UPDATE point_layer SET b250k_tag = polygon_layer.b250k_tag WHERE > contains(polygon_layer.the_geom, point_layer.the_geom); > > I am just wondering if other people have performed identity like > overlays in PostGIS and is there a better / more efficient way to > perform them? > > Thanks, > Aaron > > +------------------------------------------------- > | Aaron Koning > | Information Technologist > | Prince George, BC, Canada. > +------------------------------------------------- > | Flexible Internet Spatial Template: > | http://fist-mapping.org > +------------------------------------------------- > ------------------------------------------------------------------------ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 From alex_chew at 163.com Thu Nov 23 19:53:10 2006 From: alex_chew at 163.com (Alex Chew) Date: Fri, 24 Nov 2006 11:53:10 +0800 Subject: [postgis-users] How can i get accurate world coordinate (WGS84) with mouse click? Message-ID: <45666CE2.0B803A.03614> Hi,gentlmen, I am not sure it is fit to ask such a question here. It puzzled me several days.Thanks a lot to your kindly advise. Using svg and javascript I build a simple GIS application. GIS data are under WGS84 coordinate. Data in my application falles in lat(103.75-104.1),lon(30.3-30.5), which descripts a Chinese city, Chengdu. For sake of simplification, I set svg attribute, viewBox = "103.75 -30.5 0.5 0.2" height = "600" width = "800" then, I changed viewBox to realize zoom and pan. It seems worked well.Problems happened when I try to mark user point on svg with mouse click. I tried to convert screen points to world coordinate, but i could not make it be accurate. It seems number formate in javascript make such error. code fragment, pointx = parseFloat(evt.getClientX()); pointy = parseFloat(evt.getClientY()); px = pointx/this.currentScale/this.ratioX;//translate screen point to world one py = pointy/this.currentScale/this.ratioY;//translate screen point to world one worldx = this.viewBoxX; worldy = this.viewBoxY; markx = worldx+px; marky = worldy+py; What intrest me is when I look insight I found that markx is accurate while marky not. Would you please show me a hand? Any advice are appreciated. Thanks again Alex From christian.braun at tudor.lu Fri Nov 24 05:13:37 2006 From: christian.braun at tudor.lu (Christian Braun) Date: Fri, 24 Nov 2006 14:13:37 +0100 Subject: [postgis-users] Joining tables for QGIS Message-ID: <002601c70fca$5a53a4b0$090f030a@private.tudor.lu> Hello, I have problem with joining tables for QGIS. I have e large table with rain measurements at a specific point in Luxembourg. In another table I store the coordinates of the measurement devices. The devices have a temporal resolution of 1min. So the table with measurements have about 300000 entries. I want to link the table with the coordinates to the table with the measurements that I can save the diskspace of two additional columns with X and Y coordinates for every measurement of the 300000 entries. I found the option to do that with a view-statement, but QGIS complains about that there is no primary key in the view. Any suggestions to solve that problem? cheers, Christian -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 2919 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061124/1a0d3f09/attachment.bin> From Tom.Kralidis at ec.gc.ca Fri Nov 24 05:56:08 2006 From: Tom.Kralidis at ec.gc.ca (Kralidis,Tom [Burlington]) Date: Fri, 24 Nov 2006 08:56:08 -0500 Subject: [postgis-users] oid indexes issue Message-ID: <2576812186CDD411BF1500508B6DCE950D17F93E@ecnwri1.ontario.int.ec.gc.ca> Hi, I'm attempting to recast a database instance with some scripts developed against PostGIS 1.1.1. Below is a code snippet of the init: # CREATE TABLE service_endpoints ( resource_id serial primary key, title text, ); # SELECT AddGeometryColumn ('service_endpoints','the_geom',4326,'MULTIPOLYGON',2); # CREATE INDEX service_endpoints_idx ON service_endpoints USING GIST ( the_geom GIST_GEOMETRY_OPS ); # CREATE INDEX service_endpoints_idx_oid ON service_endpoints ( oid ); This works successfully against - POSTGIS="1.1.1" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, 22 Oct 2006" USE_STATS DBPROC="0.3.0" RELPROC="1.1.1" (needs proc upgrade) (1 row) - PostgreSQL 8.1.2 - FC4 This does NOT work successfully against: - POSTGIS="1.1.6" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, 22 Oct 2006" USE_STATS - PostgreSQL 8.1.5 - MS Windows Server 2003 The error message I received when running against the latter environment is: "ERROR: column "oid" does not exist" Are oid's no longer supported? Thanks ..Tom From mark.cave-ayland at ilande.co.uk Fri Nov 24 06:12:04 2006 From: mark.cave-ayland at ilande.co.uk (Mark Cave-Ayland) Date: Fri, 24 Nov 2006 14:12:04 -0000 (UTC) Subject: [postgis-users] oid indexes issue In-Reply-To: <2576812186CDD411BF1500508B6DCE950D17F93E@ecnwri1.ontario.int.ec.gc.ca > References: <2576812186CDD411BF1500508B6DCE950D17F93E@ecnwri1.ontario.int.ec.gc.ca> Message-ID: <33316.217.207.197.142.1164377524.squirrel@www.ilande.co.uk> > > Hi, > > I'm attempting to recast a database instance with some scripts developed > against PostGIS 1.1.1. Below is a code snippet of the init: > > # CREATE TABLE service_endpoints ( > resource_id serial primary key, > title text, > ); > > # SELECT AddGeometryColumn > ('service_endpoints','the_geom',4326,'MULTIPOLYGON',2); > > # CREATE INDEX service_endpoints_idx ON service_endpoints USING GIST ( > the_geom GIST_GEOMETRY_OPS ); > > # CREATE INDEX service_endpoints_idx_oid ON service_endpoints ( oid ); > > This works successfully against > > - POSTGIS="1.1.1" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, 22 Oct 2006" > USE_STATS DBPROC="0.3.0" RELPROC="1.1.1" (needs proc upgrade) > (1 row) > - PostgreSQL 8.1.2 > - FC4 > > This does NOT work successfully against: > > - POSTGIS="1.1.6" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, 22 Oct 2006" > USE_STATS > - PostgreSQL 8.1.5 > - MS Windows Server 2003 > > The error message I received when running against the latter environment > is: > > "ERROR: column "oid" does not exist" > > Are oid's no longer supported? > > Thanks > > ..Tom Hi Tom, Oids have been deprecated in PostgreSQL for several versions now, and since PostgreSQL 8.1 you need to explicitly enable them in postgresql.conf to support legacy applications. The chances are that your FC4 installation has had this setting changed from the default installation, while the new one hasn't. I would highly recommend that for future compatibility you should modify your application so it uses a different field (such as a primary key) instead of oid to help avoid this issue in future. One of the benefits of dropping oids is that you save an extra 4 bytes per row which can really add up when you are working with large tables. Kind regards, Mark. From venturato at faunalia.it Fri Nov 24 06:25:49 2006 From: venturato at faunalia.it (Emilia Venturato) Date: Fri, 24 Nov 2006 15:25:49 +0100 Subject: [postgis-users] Joining tables for QGIS In-Reply-To: <002601c70fca$5a53a4b0$090f030a@private.tudor.lu> References: <002601c70fca$5a53a4b0$090f030a@private.tudor.lu> Message-ID: <200611241525.50259.venturato@faunalia.it> Hi, I don't know what qgis version you have. But in the 0.8 it runs if in your view there is a field coming from a field (in the original table) having a primary key int4. Bye, Lia Alle 14:13, venerd? 24 novembre 2006, Christian Braun ha probabilmente scritto: > Hello, > > I have problem with joining tables for QGIS. > I have e large table with rain measurements at a specific point in > Luxembourg. In another table I store the coordinates of the measurement > devices. The devices have a temporal resolution of 1min. So the table with > measurements have about 300000 entries. I want to link the table with the > coordinates to the table with the measurements that I can save the > diskspace of two additional columns with X and Y coordinates for every > measurement of the 300000 entries. > I found the option to do that with a view-statement, but QGIS complains > about that there is no primary key in the view. > > Any suggestions to solve that problem? > > cheers, Christian -- Emilia Venturato email+jabber: venturato at faunalia.it www.faunalia.it Tel: (+39) 347-2770007 Tel+Fax: (+39) 0587-213742 Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy From Tom.Kralidis at ec.gc.ca Fri Nov 24 06:30:06 2006 From: Tom.Kralidis at ec.gc.ca (Kralidis,Tom [Burlington]) Date: Fri, 24 Nov 2006 09:30:06 -0500 Subject: [postgis-users] oid indexes issue Message-ID: <2576812186CDD411BF1500508B6DCE95103E2E30@ecnwri1.ontario.int.ec.gc.ca> > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On > Behalf Of Mark Cave-Ayland > Sent: 24 November, 2006 9:12 AM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] oid indexes issue > > > > > Hi, > > > > I'm attempting to recast a database instance with some scripts > > developed against PostGIS 1.1.1. Below is a code snippet > of the init: > > > > # CREATE TABLE service_endpoints ( > > resource_id serial primary key, > > title text, > > ); > > > > # SELECT AddGeometryColumn > > ('service_endpoints','the_geom',4326,'MULTIPOLYGON',2); > > > > # CREATE INDEX service_endpoints_idx ON service_endpoints > USING GIST ( > > the_geom GIST_GEOMETRY_OPS ); > > > > # CREATE INDEX service_endpoints_idx_oid ON > service_endpoints ( oid ); > > > > This works successfully against > > > > - POSTGIS="1.1.1" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, > 22 Oct 2006" > > USE_STATS DBPROC="0.3.0" RELPROC="1.1.1" (needs proc upgrade) > > (1 row) > > - PostgreSQL 8.1.2 > > - FC4 > > > > This does NOT work successfully against: > > > > - POSTGIS="1.1.6" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, > 22 Oct 2006" > > USE_STATS > > - PostgreSQL 8.1.5 > > - MS Windows Server 2003 > > > > The error message I received when running against the latter > > environment > > is: > > > > "ERROR: column "oid" does not exist" > > > > Are oid's no longer supported? > > > > Thanks > > > > ..Tom > > > Hi Tom, > > Oids have been deprecated in PostgreSQL for several versions > now, and since PostgreSQL 8.1 you need to explicitly enable > them in postgresql.conf to support legacy applications. The > chances are that your FC4 installation has had this setting > changed from the default installation, while the new one hasn't. > > I would highly recommend that for future compatibility you > should modify your application so it uses a different field > (such as a primary key) instead of oid to help avoid this > issue in future. One of the benefits of dropping oids is that > you save an extra 4 bytes per row which can really add up > when you are working with large tables. > > Thanks for the info. So should one still invoke the following: From Tom.Kralidis at ec.gc.ca Fri Nov 24 06:32:10 2006 From: Tom.Kralidis at ec.gc.ca (Kralidis,Tom [Burlington]) Date: Fri, 24 Nov 2006 09:32:10 -0500 Subject: [postgis-users] oid indexes issue Message-ID: <2576812186CDD411BF1500508B6DCE950D17F941@ecnwri1.ontario.int.ec.gc.ca> Sorry, hit send too early :) Response below. > > -----Original Message----- > > From: postgis-users-bounces at postgis.refractions.net > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > > Mark Cave-Ayland > > Sent: 24 November, 2006 9:12 AM > > To: PostGIS Users Discussion > > Subject: Re: [postgis-users] oid indexes issue > > > > > > > > Hi, > > > > > > I'm attempting to recast a database instance with some scripts > > > developed against PostGIS 1.1.1. Below is a code snippet > > of the init: > > > > > > # CREATE TABLE service_endpoints ( > > > resource_id serial primary key, > > > title text, > > > ); > > > > > > # SELECT AddGeometryColumn > > > ('service_endpoints','the_geom',4326,'MULTIPOLYGON',2); > > > > > > # CREATE INDEX service_endpoints_idx ON service_endpoints > > USING GIST ( > > > the_geom GIST_GEOMETRY_OPS ); > > > > > > # CREATE INDEX service_endpoints_idx_oid ON > > service_endpoints ( oid ); > > > > > > This works successfully against > > > > > > - POSTGIS="1.1.1" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, > > 22 Oct 2006" > > > USE_STATS DBPROC="0.3.0" RELPROC="1.1.1" (needs proc upgrade) > > > (1 row) > > > - PostgreSQL 8.1.2 > > > - FC4 > > > > > > This does NOT work successfully against: > > > > > > - POSTGIS="1.1.6" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, > > 22 Oct 2006" > > > USE_STATS > > > - PostgreSQL 8.1.5 > > > - MS Windows Server 2003 > > > > > > The error message I received when running against the latter > > > environment > > > is: > > > > > > "ERROR: column "oid" does not exist" > > > > > > Are oid's no longer supported? > > > > > > Thanks > > > > > > ..Tom > > > > > > Hi Tom, > > > > Oids have been deprecated in PostgreSQL for several > versions now, and > > since PostgreSQL 8.1 you need to explicitly enable them in > > postgresql.conf to support legacy applications. The chances > are that > > your FC4 installation has had this setting changed from the default > > installation, while the new one hasn't. > > > > I would highly recommend that for future compatibility you should > > modify your application so it uses a different field (such as a > > primary key) instead of oid to help avoid this issue in > future. One of > > the benefits of dropping oids is that you save an extra 4 bytes per > > row which can really add up when you are working with large tables. > > > > > Thanks for the info. So should one still invoke BOTH of the following index creations: # CREATE INDEX service_endpoints_idx ON service_endpoints USING GIST ( the_geom GIST_GEOMETRY_OPS ); # CREATE INDEX service_endpoints_idx_oid ON service_endpoints ( some_other_id ); Or just the first one? ..Tom From mark.cave-ayland at ilande.co.uk Fri Nov 24 06:38:04 2006 From: mark.cave-ayland at ilande.co.uk (Mark Cave-Ayland) Date: Fri, 24 Nov 2006 14:38:04 -0000 (UTC) Subject: [postgis-users] oid indexes issue In-Reply-To: <2576812186CDD411BF1500508B6DCE950D17F941@ecnwri1.ontario.int.ec.gc.ca > References: <2576812186CDD411BF1500508B6DCE950D17F941@ecnwri1.ontario.int.ec.gc.ca> Message-ID: <48396.217.207.197.142.1164379084.squirrel@www.ilande.co.uk> > Thanks for the info. So should one still invoke BOTH of the following > index creations: > > # CREATE INDEX service_endpoints_idx ON service_endpoints USING GIST ( > the_geom GIST_GEOMETRY_OPS ); > # CREATE INDEX service_endpoints_idx_oid ON service_endpoints ( > some_other_id ); > > Or just the first one? > > ..Tom Hi Tom, Just the first one will suffix. The index on oid is only needed if your tables contain an oid column and your application issues SQL in the form "SELECT * FROM service_endpoints WHERE oid = x". Note that Mapserver is one popular application which does attempt to reference oids by default, however you can override this behaviour by adding a "USING UNIQUE <fieldname>" clause to the DATA statement in the mapfile (see the Mapserver docs for more info). HTH, Mark. From pramsey at refractions.net Fri Nov 24 12:03:45 2006 From: pramsey at refractions.net (Paul Ramsey) Date: Fri, 24 Nov 2006 12:03:45 -0800 Subject: [postgis-users] oid indexes issue In-Reply-To: <2576812186CDD411BF1500508B6DCE950D17F93E@ecnwri1.ontario.int.ec.gc.ca> References: <2576812186CDD411BF1500508B6DCE950D17F93E@ecnwri1.ontario.int.ec.gc.ca> Message-ID: <45675021.1090809@refractions.net> Tom, use the below: Kralidis,Tom [Burlington] wrote: > # CREATE TABLE service_endpoints ( > resource_id serial primary key, > title text, > ); > > # SELECT AddGeometryColumn > ('service_endpoints','the_geom',4326,'MULTIPOLYGON',2); > > # CREATE INDEX service_endpoints_idx ON service_endpoints USING GIST ( > the_geom GIST_GEOMETRY_OPS ); > > > This works successfully against And for your mapserver DATA statement: "the_geom from service_endpoints using SRID=4325 using unique resource_id" Paul From schabi at logix-tt.com Sat Nov 25 00:43:43 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Sat, 25 Nov 2006 09:43:43 +0100 Subject: [postgis-users] Help with fixing invalid geometries In-Reply-To: <010901c70e3d$2aa4dd30$7203a8c0@susa.local> References: <010901c70e3d$2aa4dd30$7203a8c0@susa.local> Message-ID: <4568023F.3080100@logix-tt.com> Hi, Rob, Rob Tester wrote: > I imported some shape files into postgres everything went well except > that many (several thousand) of the polygons have self intersections. I > was wondering if there was a way to easily find the point(s) on the > polygon that causes the self intersection as well as then 'nudge' the > point away from the line it is intersecting. I would prefer to not do > this manually if possible. Any thoughts? May be the polygonize function can help you. HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org From schabi at logix-tt.com Sat Nov 25 00:50:19 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Sat, 25 Nov 2006 09:50:19 +0100 Subject: [postgis-users] How can i get accurate world coordinate (WGS84) with mouse click? In-Reply-To: <45666CE2.0B803A.03614> References: <45666CE2.0B803A.03614> Message-ID: <456803CB.9040601@logix-tt.com> Hi, Alex, Alex Chew wrote: > I am not sure it is fit to ask such a question here. I'm afraid that it's better to ask your question in an SVG and/or javaScript forum. Also: Which SVG implemention are you using? Mozilla, Opera, Adobe, Apache? > What intrest me is when I look insight I found that markx is accurate while marky not. How much off is it? If it's only in the last digits, it may be a rounding issue. Also, if your SVG implementation only uses floats, it simply lacks precesion. Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org From schabi at logix-tt.com Sat Nov 25 01:10:40 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Sat, 25 Nov 2006 10:10:40 +0100 Subject: [postgis-users] RE: RE: PostGIS - hibernate - EJB3 In-Reply-To: <20060911164550.62482.qmail@web52112.mail.yahoo.com> References: <20060911164550.62482.qmail@web52112.mail.yahoo.com> Message-ID: <45680890.8020702@logix-tt.com> Hi, Daniel, Daniel Martinez wrote: > Also, after creating my 'Geometry' object I was required to set the > 'srid' field, like this: > > double x = 10.50; > double y = 8.20; > Geometry geometry = new org.postgis.Point(x,y); > geometry.setSrid(4326); > > Otherwise, I kept getting errors when trying to persist the object into > the database. Which error are you getting exactly? If it's complaining about a constraint violation, then your table has a check constraint requiring the SRID to be 4326, and so you have to set it appropriately in your java objects before the database accepts them. HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org From schabi at logix-tt.com Sat Nov 25 01:12:38 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Sat, 25 Nov 2006 10:12:38 +0100 Subject: [postgis-users] newbie PostGIS SQL question In-Reply-To: <78db210f0610061634t1d304452y210421c8f3cbd283@mail.gmail.com> References: <78db210f0610061634t1d304452y210421c8f3cbd283@mail.gmail.com> Message-ID: <45680906.2030906@logix-tt.com> Hi, dio, kulbinder dio wrote: > I've got a table with a name and a goem column made up from Latitude and > Longitude values. > I've been trying to perform queries that will return all the entries > within a given rectangle. > I have tried a few SQL queries but none of these seem to work the latest > one I have tried is the following > > SELECT outcode,x,y from test where > geom && 'POLYGON((0.0418 51.3701, 0.0418 51.6273, 0.0591 51.6272, 0.0418 > 51.3701, 0.0418 51.3701))' ; > > > THis always returns back 0 rows, even though I have increased the size > of the polygon several times to cover a large area > and I know there are points within the database that should fall inside > this. Can you give us the output of "SELECT extent(geom) FROM test"? Thanks, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org From schabi at logix-tt.com Sat Nov 25 01:15:51 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Sat, 25 Nov 2006 10:15:51 +0100 Subject: [postgis-users] RE: RE: RE: PostGIS - hibernate - EJB3 In-Reply-To: <B67A5FB7A8114B47A70517C9C0D102E8131C66@bath.uk.rsinc.com> References: <B67A5FB7A8114B47A70517C9C0D102E8131C66@bath.uk.rsinc.com> Message-ID: <456809C7.7060206@logix-tt.com> Hi, Norman Barker wrote: > 2. In the thread here, people are using: > <driver-class>org.postgis.DriverWrapper</driver-class> > When I do the same, I get a "No suitable driver" exception. [...] > 3. I wanted to use the GeometryType that is packed in PostGIS 1.1.5. > After generating the new JAR and replacing the old one by this one, > I start getting new exceptions: > The class org.postgis.PGbox3d does not implement > org.postgresql.util.PGobject. Those 2 things look like a classpath/classloader problem. You have to make sure that the postgis.jar and the postgresql-jdbc.jar are available via the same classloader (and that you don't have two incarnations of them in your classpath) HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org From strk at refractions.net Sat Nov 25 02:58:15 2006 From: strk at refractions.net (strk at refractions.net) Date: Sat, 25 Nov 2006 11:58:15 +0100 Subject: [postgis-users] Ubuntu install of PostGIS 1.1.6 failing In-Reply-To: <1D9F853E-B379-4D84-B8F2-3E5797FA573E@eogeo.org> References: <1D9F853E-B379-4D84-B8F2-3E5797FA573E@eogeo.org> Message-ID: <20061125105815.GF13793@keybit.net> On Mon, Nov 20, 2006 at 06:45:50PM -0500, Allan Doyle wrote: > The contents of /tmp/pgis_reg_17211/regress_log are not enlightening > to me: ... > psql:lwpostgis.sql:39: ERROR: could not load library "/usr/local/src/ > postgis-1.1.6/lwgeom/liblwgeom.so.1.1": libgeos_c.so.1: cannot open > shared object file: No such file or directory Not enlighening ? The dynamic linker can not find libgeos_c.so.1. Usually this is due to a missing call to ldconfig. Where do you have libgeos_c.so.1 ? Is that directory in /etc/ld.so.conf ? Did you run ldconfig(8) after installation ? --strk; From harald.schwenk at agentur-geoinfo.de Sat Nov 25 04:34:59 2006 From: harald.schwenk at agentur-geoinfo.de (Harald Schwenk) Date: Sat, 25 Nov 2006 13:34:59 +0100 Subject: [postgis-users] AcadMap2pgsql 1.0 available Message-ID: <005b01c7108e$3859acf0$9875fe91@IBM29A94F6811C> Dear user, The 1.0 release of AcadMap2pgsql is now available. http://sourceforge.net/projects/acadmap2pgsql The following entities change or retrofit: ? Point ? Text ? MText ? Insert (+ attributes) ? Circle ? Line ? Polyline ? 2D-Polyline ? 3D-Polyline ? and maybe by April: arc It is possible to create a database dump with WKT or EWKT geometries and with object data. regards Harald ________________________________________ agentur geoinfo Harald Schwenk mailto:harald.schwenk at agentur-geoinfo.de www.agentur-geoinfo.de Konverter AcadMap2pgsql: http://www.agentur-geoinfo.de/acadmap2pgsql.htm neu: Konverter dxf2pgsql > Version zur Evaluierung anfordern -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061125/56bff222/attachment.html> From sandeepkumar.jakkaraju at gmail.com Sun Nov 26 05:22:13 2006 From: sandeepkumar.jakkaraju at gmail.com (Sandeep Kumar Jakkaraju) Date: Sun, 26 Nov 2006 18:52:13 +0530 Subject: [postgis-users] postgis on fedora ... Message-ID: <c653c98f0611260522x626f59c0tbbab49773a8e688e@mail.gmail.com> when i am runnig this query select name from tiles where contains(tilebounds,GEOMFROMTEXT('POINT(0 0)')); I get this error : NOTICE: IllegalArgumentException: point array must contain 0 or >1 elements ERROR: POSTGIS2GEOS conversion failed What is wrong with my postgis ... ( I am using postgresql-8.1.4 .. with latest postgis ..installed from source on Fedora core 5)... Please help .. me Thanks in advance... Sandeep -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061126/37d3186f/attachment.html> From mike at fuhr.org Sun Nov 26 09:28:46 2006 From: mike at fuhr.org (Michael Fuhr) Date: Sun, 26 Nov 2006 10:28:46 -0700 Subject: [postgis-users] postgis on fedora ... In-Reply-To: <c653c98f0611260522x626f59c0tbbab49773a8e688e@mail.gmail.com> References: <c653c98f0611260522x626f59c0tbbab49773a8e688e@mail.gmail.com> Message-ID: <20061126172846.GA4067@winnie.fuhr.org> On Sun, Nov 26, 2006 at 06:52:13PM +0530, Sandeep Kumar Jakkaraju wrote: > when i am runnig this query > > select name from tiles where contains(tilebounds,GEOMFROMTEXT('POINT(0 > 0)')); > > I get this error : > > NOTICE: IllegalArgumentException: point array must contain 0 or >1 elements > ERROR: POSTGIS2GEOS conversion failed I'd guess that you have at least one bad geometry, e.g., a POLYGON with a ring that has exactly one point. The following example replicates the above error: CREATE TABLE tiles (name text); SELECT AddGeometryColumn('tiles', 'tilebounds', -1, 'GEOMETRY', 2); INSERT INTO tiles (name, tilebounds) VALUES ('test', '0103000000010000000100000000000000000000000000000000000000'); SELECT name, AsText(tilebounds) FROM tiles; name | astext ------+---------------- test | POLYGON((0 0)) (1 row) SELECT name FROM tiles WHERE Contains(tilebounds, GeomFromText('POINT(0 0)')); NOTICE: IllegalArgumentException: point array must contain 0 or >1 elements ERROR: POSTGIS2GEOS conversion failed You might be able to find the bad geometry with isvalid() or npoints(): SELECT name, AsText(tilebounds) FROM tiles WHERE NOT isvalid(tilebounds); SELECT name, AsText(tilebounds) FROM tiles WHERE npoints(tilebounds) = 1; -- Michael Fuhr From sandeepkumar.jakkaraju at gmail.com Sun Nov 26 09:51:03 2006 From: sandeepkumar.jakkaraju at gmail.com (Sandeep Kumar Jakkaraju) Date: Sun, 26 Nov 2006 23:21:03 +0530 Subject: [postgis-users] postgis on fedora ... In-Reply-To: <20061126172846.GA4067@winnie.fuhr.org> References: <c653c98f0611260522x626f59c0tbbab49773a8e688e@mail.gmail.com> <20061126172846.GA4067@winnie.fuhr.org> Message-ID: <c653c98f0611260951y10eeabdamf82da4d0082fc35@mail.gmail.com> Hi Mike Thanx for your reply ...but my geometry has 5 points .. please see the attached file .. I get all the polygons for isvalid() and also for NOT isvalid() ... Thanks Sandeep On 11/26/06, Michael Fuhr <mike at fuhr.org> wrote: > > On Sun, Nov 26, 2006 at 06:52:13PM +0530, Sandeep Kumar Jakkaraju wrote: > > when i am runnig this query > > > > select name from tiles where contains(tilebounds,GEOMFROMTEXT('POINT(0 > > 0)')); > > > > I get this error : > > > > NOTICE: IllegalArgumentException: point array must contain 0 or >1 > elements > > ERROR: POSTGIS2GEOS conversion failed > > I'd guess that you have at least one bad geometry, e.g., a POLYGON > with a ring that has exactly one point. The following example > replicates the above error: > > CREATE TABLE tiles (name text); > SELECT AddGeometryColumn('tiles', 'tilebounds', -1, 'GEOMETRY', 2); > INSERT INTO tiles (name, tilebounds) VALUES ('test', > '0103000000010000000100000000000000000000000000000000000000'); > > SELECT name, AsText(tilebounds) FROM tiles; > name | astext > ------+---------------- > test | POLYGON((0 0)) > (1 row) > > SELECT name FROM tiles WHERE Contains(tilebounds, GeomFromText('POINT(0 > 0)')); > NOTICE: IllegalArgumentException: point array must contain 0 or >1 > elements > > ERROR: POSTGIS2GEOS conversion failed > > You might be able to find the bad geometry with isvalid() or > npoints(): > > SELECT name, AsText(tilebounds) FROM tiles WHERE NOT isvalid(tilebounds); > SELECT name, AsText(tilebounds) FROM tiles WHERE npoints(tilebounds) = 1; > > -- > Michael Fuhr > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Sandeep Kumar Jakkaraju WeBlog: http://jakkarajus.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061126/b57f3b36/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: results Type: application/octet-stream Size: 5766 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061126/b57f3b36/attachment.obj> From mike at fuhr.org Sun Nov 26 10:06:36 2006 From: mike at fuhr.org (Michael Fuhr) Date: Sun, 26 Nov 2006 11:06:36 -0700 Subject: [postgis-users] postgis on fedora ... In-Reply-To: <c653c98f0611260951y10eeabdamf82da4d0082fc35@mail.gmail.com> References: <c653c98f0611260522x626f59c0tbbab49773a8e688e@mail.gmail.com> <20061126172846.GA4067@winnie.fuhr.org> <c653c98f0611260951y10eeabdamf82da4d0082fc35@mail.gmail.com> Message-ID: <20061126180636.GA4267@winnie.fuhr.org> On Sun, Nov 26, 2006 at 11:21:03PM +0530, Sandeep Kumar Jakkaraju wrote: > Thanx for your reply ...but my geometry has 5 points .. > please see the attached file .. The polygons in the first half of the file (lines 1-48) don't have five points but rather five rings, each with one point. The first one is: POLYGON((0 0),(280 0),(280 280),(0 280),(0 0)) The polygons in the second half of the file (lines 49-96) appear to be duplicates of those in the first half, but with one ring of five points: POLYGON((0 0,280 0,280 280,0 280,0 0)) > I get all the polygons for isvalid() and also for NOT isvalid() ... Are you sure? Or are you getting the 48 good polygons (one ring of five points) for isvalid() and the 48 bad polygons (five rings of one point each) for NOT isvalid()? -- Michael Fuhr From sandeepkumar.jakkaraju at gmail.com Sun Nov 26 10:58:28 2006 From: sandeepkumar.jakkaraju at gmail.com (Sandeep Kumar Jakkaraju) Date: Mon, 27 Nov 2006 00:28:28 +0530 Subject: [postgis-users] postgis on fedora ... In-Reply-To: <20061126180636.GA4267@winnie.fuhr.org> References: <c653c98f0611260522x626f59c0tbbab49773a8e688e@mail.gmail.com> <20061126172846.GA4067@winnie.fuhr.org> <c653c98f0611260951y10eeabdamf82da4d0082fc35@mail.gmail.com> <20061126180636.GA4267@winnie.fuhr.org> Message-ID: <c653c98f0611261058j6cc1fd1bl1acd26ea6502924b@mail.gmail.com> Thanks Mike ... I am sorry .. that i did not even check my results ... I am able to do my work with INTERSECTS(geom,geom)... but with CONTAINS(geom,geom) i dont get any results .. If you want i can re post this in different thread !!?? Thanks Regards sandeep On 11/26/06, Michael Fuhr <mike at fuhr.org> wrote: > > On Sun, Nov 26, 2006 at 11:21:03PM +0530, Sandeep Kumar Jakkaraju wrote: > > Thanx for your reply ...but my geometry has 5 points .. > > please see the attached file .. > > The polygons in the first half of the file (lines 1-48) don't have > five points but rather five rings, each with one point. The first > one is: > > POLYGON((0 0),(280 0),(280 280),(0 280),(0 0)) > > The polygons in the second half of the file (lines 49-96) appear > to be duplicates of those in the first half, but with one ring of > five points: > > POLYGON((0 0,280 0,280 280,0 280,0 0)) > > > I get all the polygons for isvalid() and also for NOT isvalid() ... > > Are you sure? Or are you getting the 48 good polygons (one ring > of five points) for isvalid() and the 48 bad polygons (five rings > of one point each) for NOT isvalid()? > > -- > Michael Fuhr > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Sandeep Kumar Jakkaraju WeBlog: http://jakkarajus.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061127/1a2178d1/attachment.html> From mike at fuhr.org Sun Nov 26 13:13:32 2006 From: mike at fuhr.org (Michael Fuhr) Date: Sun, 26 Nov 2006 14:13:32 -0700 Subject: [postgis-users] postgis on fedora ... In-Reply-To: <c653c98f0611261058j6cc1fd1bl1acd26ea6502924b@mail.gmail.com> References: <c653c98f0611260522x626f59c0tbbab49773a8e688e@mail.gmail.com> <20061126172846.GA4067@winnie.fuhr.org> <c653c98f0611260951y10eeabdamf82da4d0082fc35@mail.gmail.com> <20061126180636.GA4267@winnie.fuhr.org> <c653c98f0611261058j6cc1fd1bl1acd26ea6502924b@mail.gmail.com> Message-ID: <20061126211332.GA5108@winnie.fuhr.org> On Mon, Nov 27, 2006 at 12:28:28AM +0530, Sandeep Kumar Jakkaraju wrote: > I am sorry .. that i did not even check my results ... > > I am able to do my work with INTERSECTS(geom,geom)... > but with CONTAINS(geom,geom) i dont get any results .. Intersects and Contains are different spatial relationships. For detailed explanation see "Simple Feature Access - Part 1: Common Architecture" Section 6.1.14 "Relational operators": http://www.opengeospatial.org/standards/sfa -- Michael Fuhr From ekene at hypehypehype.net Sun Nov 26 15:47:54 2006 From: ekene at hypehypehype.net (kidult) Date: Sun, 26 Nov 2006 15:47:54 -0800 (PST) Subject: [postgis-users] dynamic point values Message-ID: <7552826.post@talk.nabble.com> the sql query INSERT INTO location(geom, x, y, longitude, latitude, easting, northing) SELECT Transform(SetSRID(GeomFromText('POINT(primary_lat_dec primary_lon_dec)'), 10002), 2263) AS geom, primary_lat_dec AS x, primary_lon_dec AS y, x(Transform(SetSRID(GeomFromText('POINT(primary_lat_dec primary_lon_dec)'), 10002), 4326)) AS longitude, y(Transform(SetSRID(GeomFromText('POINT(primary_lat_dec primary_lon_dec)'), 10002), 4326)) AS latitude, x(Transform(SetSRID(GeomFromText('POINT(primary_lat_dec primary_lon_dec)'), 10002), 2263))::int AS easting, y(Transform(SetSRID(GeomFromText('POINT(primary_lat_dec primary_lon_dec)'), 10002), 2263))::int AS northing FROM gnis; throws the error ERROR: parse error - invalid geometry CONTEXT: SQL function "geomfromtext" statement 1 because the POINT object parameters EX: Transform(SetSRID(GeomFromText('POINT(primary_lat_dec primary_lon_dec)'), 10002), 2263) are columns and not to static numeric decimal values. when i use static numeric decimal values the query is successful. EX: Transform(SetSRID(GeomFromText('POINT(44.3475481 -73.6287475)'), 10002), 2263) what is the correct syntax for using columns as parameters for the POINT object? -- View this message in context: http://www.nabble.com/dynamic-point-values-tf2709026.html#a7552826 Sent from the PostGIS - User mailing list archive at Nabble.com. From mike at fuhr.org Sun Nov 26 19:04:22 2006 From: mike at fuhr.org (Michael Fuhr) Date: Sun, 26 Nov 2006 20:04:22 -0700 Subject: [postgis-users] dynamic point values In-Reply-To: <7552826.post@talk.nabble.com> References: <7552826.post@talk.nabble.com> Message-ID: <20061127030422.GA8463@winnie.fuhr.org> On Sun, Nov 26, 2006 at 03:47:54PM -0800, kidult wrote: > what is the correct syntax for using columns as parameters for the POINT > object? You can use MakePoint(): SELECT latitude, longitude, AsText(MakePoint(longitude, latitude)) FROM test; latitude | longitude | astext ------------+-------------+------------------------------- 44.3475481 | -73.6287475 | POINT(-73.6287475 44.3475481) (1 row) Geometry coordinates are (X, Y) so use (longitude, latitude) instead of (latitude, longitude). -- Michael Fuhr From azza at lisasoft.com Sun Nov 26 23:21:58 2006 From: azza at lisasoft.com (Andrew Hughes) Date: Mon, 27 Nov 2006 17:51:58 +1030 Subject: [postgis-users] Extracting the Linestring Geometry from a BBox (noob) Message-ID: <456A9216.2020601@lisasoft.com> An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061127/cdb053b4/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: moz-screenshot-12.jpg Type: image/jpeg Size: 10360 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061127/cdb053b4/attachment.jpg> -------------- next part -------------- A non-text attachment was scrubbed... Name: moz-screenshot-10.jpg Type: image/jpeg Size: 3670 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061127/cdb053b4/attachment-0001.jpg> From jan.syryn at trasys.be Mon Nov 27 02:46:50 2006 From: jan.syryn at trasys.be (Jan Syryn) Date: Mon, 27 Nov 2006 11:46:50 +0100 Subject: [postgis-users] RE: RE: RE: PostGIS - hibernate - EJB3 In-Reply-To: <456809C7.7060206@logix-tt.com> Message-ID: <001301c71211$586c6030$0801a8c0@ariane.tractebel.be> Thanks Markus for responding. In the meantime I found the same answer you are suggesting elsewhere: http://postgis.refractions.net/pipermail/postgis-users/2005-March/007153.htm l I just pass it, so other might be helped by it too. -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Markus Schaber Sent: samedi 25 novembre 2006 10:16 To: PostGIS Users Discussion Subject: Re: [postgis-users] RE: RE: RE: PostGIS - hibernate - EJB3 Hi, Norman Barker wrote: > 2. In the thread here, people are using: > <driver-class>org.postgis.DriverWrapper</driver-class> > When I do the same, I get a "No suitable driver" exception. [...] > 3. I wanted to use the GeometryType that is packed in PostGIS 1.1.5. > After generating the new JAR and replacing the old one by this one, I > start getting new exceptions: > The class org.postgis.PGbox3d does not implement > org.postgresql.util.PGobject. Those 2 things look like a classpath/classloader problem. You have to make sure that the postgis.jar and the postgresql-jdbc.jar are available via the same classloader (and that you don't have two incarnations of them in your classpath) HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From pdoria at netmadeira.com Mon Nov 27 03:58:08 2006 From: pdoria at netmadeira.com (Pedro Doria Meunier) Date: Mon, 27 Nov 2006 11:58:08 -0000 Subject: [postgis-users] Extracting the Linestring Geometry from a BBox(noob) In-Reply-To: <456A9216.2020601@lisasoft.com> Message-ID: <000c01c7121b$4e597150$07d6bed5@oem41cbbf9e178> Hey Andrew, I had to do a similiar thing ?Cut? the road segments belonging to a municipality and the query ended like this: create my_road_segment as select intersection(r.geometry, f.geometry) as geometry, r.name, r.sec_name, r.city, r.region, r.country, r.pcode, r.road_type, r.route_class, r.speed_class, r.one_way, r.has_dir, r.toll, r.no_car, r.no_bus, r.no_taxi, r.no_bic, r.no_truck, r.no_emerg, r.no_deliv, r.no_pedes, r.classific from rede_estradas as r, freguesias_ram as f where r.geometry && f.geometry and intersects(r.geometry, f.geometry) and f.nome_freg like 'Faj? da Ovelha%'; the keyword here is INTERSECTS This query creates a table based on a select. This select returns the road segments *contained* in a polygon defining a municipality. Hope this helps. Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam _____ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Andrew Hughes Sent: segunda-feira, 27 de Novembro de 2006 7:22 To: postgis-users at postgis.refractions.net Subject: [postgis-users] Extracting the Linestring Geometry from a BBox(noob) Hey All, I'm trying to extract some linestrings from a collection of linestrings and conditional on being within a BBox. I will try and explain this best with some images... My input looks like: My desired output looks like this: (note that I DO want the point where it intersects the bbox) Is this at all possible to do? or do I need to start writing my own postgis fuctions??? Thanks in advance --AH -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061127/3480308f/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 10360 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061127/3480308f/attachment.jpg> -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 3670 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061127/3480308f/attachment-0001.jpg> From ruckc at yahoo.com Mon Nov 27 05:48:27 2006 From: ruckc at yahoo.com (Curtis W. Ruck) Date: Mon, 27 Nov 2006 05:48:27 -0800 (PST) Subject: [postgis-users] MakeLine question Message-ID: <20061127134828.19716.qmail@web32207.mail.mud.yahoo.com> I have a table with gps tracks stored as points, each point being one data record for every second. I am trying to write a view which generates a polyline for each track. I know I need to "select MakeLine(the_geom) from track_log" but the postgis documentation suggests "You might want to use a subselect to order points before feeding them to this aggregate." Does anyone have an example of how to do this, the postgres documentation doesn't show an example of using a subquery in the SELECT list portion of the query. Curtis -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061127/16bdbca1/attachment.html> From pdoria at netmadeira.com Mon Nov 27 06:04:48 2006 From: pdoria at netmadeira.com (Pedro Doria Meunier) Date: Mon, 27 Nov 2006 14:04:48 -0000 Subject: [postgis-users] MakeLine question In-Reply-To: <20061127134828.19716.qmail@web32207.mail.mud.yahoo.com> Message-ID: <003201c7122d$00c6df10$07d6bed5@oem41cbbf9e178> Hey Curtis, Should your points contain a timestamp field you might try to order by it ;-) Pedro Doria Meunier (351) 91 302 49 72 - (351) 96 247 99 12 MSN - pdoriam at hotmail.com ICQ - 308-182-126 Skype: pdoriam _____ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Curtis W. Ruck Sent: segunda-feira, 27 de Novembro de 2006 13:48 To: postgis-users at postgis.refractions.net Subject: [postgis-users] MakeLine question I have a table with gps tracks stored as points, each point being one data record for every second. I am trying to write a view which generates a polyline for each track. I know I need to "select MakeLine(the_geom) from track_log" but the postgis documentation suggests "You might want to use a subselect to order points before feeding them to this aggregate." Does anyone have an example of how to do this, the postgres documentation doesn't show an example of using a subquery in the SELECT list portion of the query. Curtis -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061127/64580b28/attachment.html> From schabi at logix-tt.com Mon Nov 27 06:21:36 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Mon, 27 Nov 2006 15:21:36 +0100 Subject: [postgis-users] MakeLine question In-Reply-To: <20061127134828.19716.qmail@web32207.mail.mud.yahoo.com> References: <20061127134828.19716.qmail@web32207.mail.mud.yahoo.com> Message-ID: <456AF470.9060106@logix-tt.com> Hi, Curtis, Curtis W. Ruck wrote: > I have a table with gps tracks stored as points, each point being one > data record for every second. > > I am trying to write a view which generates a polyline for each track. > I know I need to "select MakeLine(the_geom) from track_log" but the > postgis documentation suggests "You might want to use a subselect to > order points before feeding them to this aggregate." > > Does anyone have an example of how to do this, the postgres > documentation doesn't show an example of using a subquery in the SELECT > list portion of the query. One way would be: SELECT track_id, MakeLine(the_geom) FROM (SELECT track_id, the_geom FROM track_log ORDER BY seconds) AS foo GROUP BY track_id; HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org From jan.syryn at trasys.be Mon Nov 27 08:39:28 2006 From: jan.syryn at trasys.be (Jan Syryn) Date: Mon, 27 Nov 2006 17:39:28 +0100 Subject: [postgis-users] PostGIS - hibernate (new postgis.jar) In-Reply-To: <456809C7.7060206@logix-tt.com> Message-ID: <000001c71242$9bbcc650$0801a8c0@ariane.tractebel.be> Hi Markus, The thing I did to be able to continue is I have created a postgis_addon.jar lib that contained only new stuff like BinaryWriter.class and GeometryUserType. And that works. It does not solve the problem, though I can use the latest version of postgis. I tried to use the tip I found in my previous posting by changing the name of the postgresql-jdbc.jar drvier to pg-jdbc.jar driver with my new build postgis2.jar (version 1.1.5) I did not help. If I remove the 2 stub files (PGConnection and Connection) from postgis2.jar : same result. It stucks again on "No suitable driver". If I replace the postgis2.jar by postgis.jar(1.1.0) and postgis_addon.jar by changing the settings on the classpath, everything works again. So, I assume there is a thing in postgis2.jar. And to create my postgis2.jar, I made a separate project in Eclipse, created a jar file of almost all java files(exl examples). This should do it, no ? Anyway, I included my postgis2.jar so maybe one can replace his one with mine and see what that does. Or maybe one sees what I am doing wrong elsewhere... TIA, Jan -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Markus Schaber Sent: samedi 25 novembre 2006 10:16 To: PostGIS Users Discussion Subject: Re: [postgis-users] RE: RE: RE: PostGIS - hibernate - EJB3 Hi, Norman Barker wrote: > 2. In the thread here, people are using: > <driver-class>org.postgis.DriverWrapper</driver-class> > When I do the same, I get a "No suitable driver" exception. [...] > 3. I wanted to use the GeometryType that is packed in PostGIS 1.1.5. > After generating the new JAR and replacing the old one by this one, I > start getting new exceptions: > The class org.postgis.PGbox3d does not implement > org.postgresql.util.PGobject. Those 2 things look like a classpath/classloader problem. You have to make sure that the postgis.jar and the postgresql-jdbc.jar are available via the same classloader (and that you don't have two incarnations of them in your classpath) HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users -------------- next part -------------- A non-text attachment was scrubbed... Name: postgis2.jar Type: application/octet-stream Size: 78174 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061127/0ba2c86c/attachment.obj> From nbarker at ittvis.com Mon Nov 27 09:12:58 2006 From: nbarker at ittvis.com (Norman Barker) Date: Mon, 27 Nov 2006 17:12:58 -0000 Subject: [postgis-users] PostGIS - hibernate (new postgis.jar) Message-ID: <B67A5FB7A8114B47A70517C9C0D102E8131CA7@bath.uk.rsinc.com> I think I missed the start of this thread (and I can't find it in the archives), can you summarize the problem, and the server you are using? The GeometryUserType class doesn't do very much but call out to the utility functions provided in the postgis jar, so it does sound like a classpath issue. If you can send me a summary I will try to recreate the problem. (I have both tomcat and jboss set up here). If the attachment is large please send it to norman.barker<at>gmail.com Thanks, Norman -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Jan Syryn Sent: 27 November 2006 16:39 To: 'PostGIS Users Discussion' Subject: RE: [postgis-users] PostGIS - hibernate (new postgis.jar) *********************** Warning: Your file, postgis2.jar, contains more than 32 files after decompression and cannot be scanned. ***********-*********** Hi Markus, The thing I did to be able to continue is I have created a postgis_addon.jar lib that contained only new stuff like BinaryWriter.class and GeometryUserType. And that works. It does not solve the problem, though I can use the latest version of postgis. I tried to use the tip I found in my previous posting by changing the name of the postgresql-jdbc.jar drvier to pg-jdbc.jar driver with my new build postgis2.jar (version 1.1.5) I did not help. If I remove the 2 stub files (PGConnection and Connection) from postgis2.jar : same result. It stucks again on "No suitable driver". If I replace the postgis2.jar by postgis.jar(1.1.0) and postgis_addon.jar by changing the settings on the classpath, everything works again. So, I assume there is a thing in postgis2.jar. And to create my postgis2.jar, I made a separate project in Eclipse, created a jar file of almost all java files(exl examples). This should do it, no ? Anyway, I included my postgis2.jar so maybe one can replace his one with mine and see what that does. Or maybe one sees what I am doing wrong elsewhere... TIA, Jan -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Markus Schaber Sent: samedi 25 novembre 2006 10:16 To: PostGIS Users Discussion Subject: Re: [postgis-users] RE: RE: RE: PostGIS - hibernate - EJB3 Hi, Norman Barker wrote: > 2. In the thread here, people are using: > <driver-class>org.postgis.DriverWrapper</driver-class> > When I do the same, I get a "No suitable driver" exception. [...] > 3. I wanted to use the GeometryType that is packed in PostGIS 1.1.5. > After generating the new JAR and replacing the old one by this one, I > start getting new exceptions: > The class org.postgis.PGbox3d does not implement > org.postgresql.util.PGobject. Those 2 things look like a classpath/classloader problem. You have to make sure that the postgis.jar and the postgresql-jdbc.jar are available via the same classloader (and that you don't have two incarnations of them in your classpath) HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From azza at lisasoft.com Mon Nov 27 15:50:49 2006 From: azza at lisasoft.com (Andrew Hughes) Date: Tue, 28 Nov 2006 10:20:49 +1030 Subject: [postgis-users] Extracting the Linestring Geometry from a BBox(noob) In-Reply-To: <000c01c7121b$4e597150$07d6bed5@oem41cbbf9e178> References: <000c01c7121b$4e597150$07d6bed5@oem41cbbf9e178> Message-ID: <456B79D9.3070904@lisasoft.com> An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061128/46e84553/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 10360 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061128/46e84553/attachment.jpe> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 3670 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061128/46e84553/attachment-0001.jpe> -------------- next part -------------- A non-text attachment was scrubbed... Name: button.gif Type: image/gif Size: 2529 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061128/46e84553/attachment.gif> From egouge at refractions.net Mon Nov 27 16:38:56 2006 From: egouge at refractions.net (Emily Gouge) Date: Mon, 27 Nov 2006 16:38:56 -0800 Subject: [postgis-users] Extracting the Linestring Geometry from a BBox(noob) In-Reply-To: <456B79D9.3070904@lisasoft.com> References: <000c01c7121b$4e597150$07d6bed5@oem41cbbf9e178> <456B79D9.3070904@lisasoft.com> Message-ID: <456B8520.3020304@refractions.net> Try the intersection function in the select statement. Something like: select intersection(the_geom, setsrid('BOX3D(138.4925 -34.905393,138.493313 -34.90458)', 4283)) from route_service_transaction where intersects(the_geom, SetSRID('BOX3D(138.4925 -34.905393,138.493313 -34.90458)'::box3d,4283)) Andrew Hughes wrote: > Hi Pedro, > > Thanks for the reply!!!!! > > I'm finding some problems with my query (specifically the "intersection" > function).... I can select the entire LINESTRING that intersects a BBox.... but > I can not limit the geometry of that LINESTRING to the path through the BBox > (like in the images below). > > My Query to Find the entire LINESTRING(s) is: > > select the_geom from route_service_transaction where intersects(the_geom, > SetSRID('BOX3D(138.4925 -34.905393,138.493313 -34.90458)'::box3d,4283)) > > This does sucessfully find the LINESTRINGs I am looking for, however they > return the Complete LINESTRING inside AND outside the bbox. I only want the > LINESTRING(s) that are inside the BBox. > > Returns: > SRID=4283;LINESTRING(138.49680675 -34.89338892,138.496643 > -34.8935516,138.496643 -34.8935516,138.496882 -34.893792,138.496882 > -34.893792,138.496773 -34.893837,138.496186 -34.894212,138.496186 > -34.894212,138.495597 -34.894607,138.495475 -34.894711,138.495422 > -34.894779,138.495422 -34.894779,138.495369 -34.894848,138.495301 > -34.894999,138.49529 -34.895088,138.49529 -34.895088,138.495277 > -34.895194,138.495291 -34.895815,138.495291 -34.895815,138.494732 > -34.895772,138.494732 -34.895772,138.494418 -34.895756,138.494418 > -34.895756,138.494421 -34.895791,138.494368 -34.896227,138.49427 > -34.896491,138.494183 -34.89665,138.493852 -34.897041,138.493775 > -34.897091,138.493775 -34.897091,138.493586 -34.89721,138.493344 > -34.897282,138.493127 -34.897301,138.493127 -34.897301,138.492088 > -34.897342,138.492088 -34.897342,138.492174 -34.898481,138.492174 > -34.898481,138.492178 -34.898537,138.492219 -34.899098,138.492219 > -34.899098,138.492252 -34.899601,138.492252 -34.899601,138.492261 > -34.899752,138.492261 -34.899752,138.492303 -34.900254,138.492303 > -34.900254,138.492415 -34.901815,138.492415 -34.901815,138.492439 > -34.902282,138.492439 -34.902282,138.492453 -34.902282,138.492472 > -34.902285,138.492489 -34.902291,138.492505 -34.902301,138.492518 > -34.902312,138.492527 -34.902326,138.492533 -34.902341,138.492534 > -34.902353,138.492534 -34.902353,138.492535 -34.902357,138.492533 > -34.902373,138.492527 -34.902388,138.492518 -34.902402,138.492505 > -34.902413,138.492489 -34.902423,138.492472 -34.902429,138.492453 > -34.902432,138.492448 -34.902432,138.492448 -34.902432,138.492631 > -34.904971,138.492631 -34.904971,138.492646 -34.904971,138.492666 > -34.904974,138.492685 -34.904981,138.492701 -34.904991,138.492715 > -34.905003,138.492725 -34.905018,138.492731 -34.905033,138.492732 > -34.905044,138.492732 -34.905044,138.492733 -34.90505,138.492731 > -34.905067,138.492725 -34.905082,138.492715 -34.905097,138.492701 > -34.905109,138.492685 -34.905119,138.492666 -34.905126,138.492646 > -34.905129,138.492642 -34.905129,138.492642 -34.905129,138.4927512 > -34.9065512,138.4927512 -34.9065512,138.49314358 -34.90652109) > > I have tried to limit the above LINESTRING to the geometry with the following query: > > select intersection( > (select the_geom from route_service_transaction where > intersects(the_geom, SetSRID('BOX3D(138.4925 -34.905393,138.493313 > -34.90458)'::box3d,4283)) ) > , > (SetSRID('BOX3D(138.4925 -34.905393,138.493313 -34.90458)'::box3d,4283)) > ) > > However this returns something very strange - ???MULIPOINT??? and : > Returns: > SRID=4283;MULTIPOINT(138.492602818432 -34.90458 1.7e-308,138.492662270567 > -34.905393 1.7e-308) > > > Any idea how to "trim" or "limit" the LINESTRING in the first query to that of > the path through a BBox??? Also, maintaining this as a LINESTRING not a multipoint. > > > > Many Thanks!!!! > > > > p.s. sorry if these questions are annoying, I am rather new to PostGIS! > > > > > Pedro Doria Meunier wrote: >> >> Hey Andrew, >> >> >> >> I had to do a similiar thing? >> >> ?Cut? the road segments belonging to a municipality? and the query ended like >> this: >> >> >> >> create my_road_segment as >> >> select intersection(r.geometry, f.geometry) as geometry, >> >> r.name, r.sec_name, r.city, r.region, r.country, r.pcode, r.road_type, >> >> r.route_class, r.speed_class, r.one_way, r.has_dir, r.toll, r.no_car, >> >> r.no_bus, r.no_taxi, r.no_bic, r.no_truck, r.no_emerg, r.no_deliv, r.no_pedes, >> r.classific >> >> from rede_estradas as r, freguesias_ram as f >> >> where r.geometry && f.geometry >> >> and intersects(r.geometry, f.geometry) >> >> and f.nome_freg like 'Faj? da Ovelha%'; >> >> >> >> the keyword here is INTERSECTS >> >> >> >> This query creates a table based on a select. This select returns the road >> segments **contained** in a polygon defining a municipality. >> >> >> >> Hope this helps. >> >> >> >> _Pedro Doria Meunier_ >> >> (351) 91 302 49 72 - (351) 96 247 99 12 >> >> MSN - pdoriam at hotmail.com <mailto:pdoriam at hotmail.com> >> >> ICQ - 308-182-126 >> >> Skype: pdoriam >> >> >> >> -------------------------------------------------------------------------------- >> >> *From:* postgis-users-bounces at postgis.refractions.net >> [mailto:postgis-users-bounces at postgis.refractions.net] *On Behalf Of *Andrew >> Hughes >> *Sent:* segunda-feira, 27 de Novembro de 2006 7:22 >> *To:* postgis-users at postgis.refractions.net >> *Subject:* [postgis-users] Extracting the Linestring Geometry from a BBox(noob) >> >> >> >> Hey All, >> >> I'm trying to extract some linestrings from a collection of linestrings and >> conditional on being within a BBox. >> >> I will try and explain this best with some images... >> >> My input looks like: >> >> >> >> My desired output looks like this: >> >> (note that I DO want the point where it intersects the bbox) >> >> >> >> Is this at all possible to do? or do I need to start writing my own postgis >> fuctions??? >> >> >> >> Thanks in advance >> >> --AH >> >> -------------------------------------------------------------------------------- >> >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> > > > -- > > Regards, > > *Andrew Hughes* > Software Engineer > LISAsoft Pty. Ltd. (Adelaide) > > -------------------------------------------------------------------------------- > > > LISAsoft Pty. Ltd. > > <http://www.lisasoft.com> > *ADELAIDE Office* > <http://terrapages.net/mapbutton/RetrieveButtonServlet?buttonID=4> > 38 Greenhill Road > Wayville SA 5034 > Australia > *Telephone +61 8 8272 1555* > *Facsimile +61 8 8271 1199* > *SYDNEY Office* > <http://terrapages.net/mapbutton/RetrieveButtonServlet?buttonID=1> > Suite 112 The Lower Deck > Jones Bay Wharf > 19-21 Pirrama Road > Pyrmont NSW 2009 AUS > *Telephone +61 2 8570 5060* > *Facsimile +61 2 8570 5099* > *MELBOURNE Office* > <http://terrapages.net/mapbutton/RetrieveButtonServlet?buttonID=3> > Level 7 520 Collins Street > Melbourne VIC 3000 > Australia > *Telephone +61 3 9629 1799* > *Facsimile +61 3 9629 4955* > > -------------------------------------------------------------------------------- > > > ------------------------------------------------------------------------ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From azza at lisasoft.com Mon Nov 27 17:07:09 2006 From: azza at lisasoft.com (Andrew Hughes) Date: Tue, 28 Nov 2006 11:37:09 +1030 Subject: [postgis-users] Extracting the Linestring Geometry from a BBox(noob) In-Reply-To: <456B8520.3020304@refractions.net> References: <000c01c7121b$4e597150$07d6bed5@oem41cbbf9e178> <456B79D9.3070904@lisasoft.com> <456B8520.3020304@refractions.net> Message-ID: <456B8BBD.7000806@lisasoft.com> An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061128/734b7251/attachment.html> From egouge at refractions.net Mon Nov 27 17:13:28 2006 From: egouge at refractions.net (Emily Gouge) Date: Mon, 27 Nov 2006 17:13:28 -0800 Subject: [postgis-users] Extracting the Linestring Geometry from a BBox(noob) In-Reply-To: <456B8BBD.7000806@lisasoft.com> References: <000c01c7121b$4e597150$07d6bed5@oem41cbbf9e178> <456B79D9.3070904@lisasoft.com> <456B8520.3020304@refractions.net> <456B8BBD.7000806@lisasoft.com> Message-ID: <456B8D38.8060802@refractions.net> Try it. This simple example shows that the intersection of a polygon and linestring returns a linestring. select astext(intersection(geomfromtext('POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))'), geomfromtext('LINESTRING(0 0, 3 3)'))); Returns: LINESTRING(1 1,2 2) Andrew Hughes wrote: > Hi Emily, > > Thanks for that! Unless I am mistaken...... > > I think I am working out that the intersection function returns the points at > which the two geometry's intersect. This is the points at which my LINESTRING > enters and exits the BBox (hence the MULTIPOINT). So I don't think that this > really does what I want. > > >From : http://postgis.refractions.net/docs/ch06.html#id2526581 > > Intersection(geometry, geometry) > > Returns a geometry that represents the point set intersection of the > Geometies. > > Performed by the GEOS module > > Do not call with a GeometryCollection as an argument > > OGC SPEC s2.1.1.3 > > > I am not sure anything does what I am looking for, maybe someone else knows??? > > > --Thanks Heaps Though! > > > > > Emily Gouge wrote: >> Try the intersection function in the select statement. Something like: >> >> select intersection(the_geom, setsrid('BOX3D(138.4925 -34.905393,138.493313 >> -34.90458)', 4283)) >> from route_service_transaction where intersects(the_geom, >> SetSRID('BOX3D(138.4925 -34.905393,138.493313 -34.90458)'::box3d,4283)) >> >> Andrew Hughes wrote: >>> Hi Pedro, >>> >>> Thanks for the reply!!!!! >>> >>> I'm finding some problems with my query (specifically the "intersection" >>> function).... I can select the entire LINESTRING that intersects a BBox.... >>> but I can not limit the geometry of that LINESTRING to the path through the >>> BBox (like in the images below). >>> >>> My Query to Find the entire LINESTRING(s) is: >>> >>> select the_geom from route_service_transaction where intersects(the_geom, >>> SetSRID('BOX3D(138.4925 -34.905393,138.493313 -34.90458)'::box3d,4283)) >>> >>> This does sucessfully find the LINESTRINGs I am looking for, however they >>> return the Complete LINESTRING inside AND outside the bbox. I only want the >>> LINESTRING(s) that are inside the BBox. >>> >>> Returns: >>> SRID=4283;LINESTRING(138.49680675 -34.89338892,138.496643 >>> -34.8935516,138.496643 -34.8935516,138.496882 -34.893792,138.496882 >>> -34.893792,138.496773 -34.893837,138.496186 -34.894212,138.496186 >>> -34.894212,138.495597 -34.894607,138.495475 -34.894711,138.495422 >>> -34.894779,138.495422 -34.894779,138.495369 -34.894848,138.495301 >>> -34.894999,138.49529 -34.895088,138.49529 -34.895088,138.495277 >>> -34.895194,138.495291 -34.895815,138.495291 -34.895815,138.494732 >>> -34.895772,138.494732 -34.895772,138.494418 -34.895756,138.494418 >>> -34.895756,138.494421 -34.895791,138.494368 -34.896227,138.49427 >>> -34.896491,138.494183 -34.89665,138.493852 -34.897041,138.493775 >>> -34.897091,138.493775 -34.897091,138.493586 -34.89721,138.493344 >>> -34.897282,138.493127 -34.897301,138.493127 -34.897301,138.492088 >>> -34.897342,138.492088 -34.897342,138.492174 -34.898481,138.492174 >>> -34.898481,138.492178 -34.898537,138.492219 -34.899098,138.492219 >>> -34.899098,138.492252 -34.899601,138.492252 -34.899601,138.492261 >>> -34.899752,138.492261 -34.899752,138.492303 -34.900254,138.492303 >>> -34.900254,138.492415 -34.901815,138.492415 -34.901815,138.492439 >>> -34.902282,138.492439 -34.902282,138.492453 -34.902282,138.492472 >>> -34.902285,138.492489 -34.902291,138.492505 -34.902301,138.492518 >>> -34.902312,138.492527 -34.902326,138.492533 -34.902341,138.492534 >>> -34.902353,138.492534 -34.902353,138.492535 -34.902357,138.492533 >>> -34.902373,138.492527 -34.902388,138.492518 -34.902402,138.492505 >>> -34.902413,138.492489 -34.902423,138.492472 -34.902429,138.492453 >>> -34.902432,138.492448 -34.902432,138.492448 -34.902432,138.492631 >>> -34.904971,138.492631 -34.904971,138.492646 -34.904971,138.492666 >>> -34.904974,138.492685 -34.904981,138.492701 -34.904991,138.492715 >>> -34.905003,138.492725 -34.905018,138.492731 -34.905033,138.492732 >>> -34.905044,138.492732 -34.905044,138.492733 -34.90505,138.492731 >>> -34.905067,138.492725 -34.905082,138.492715 -34.905097,138.492701 >>> -34.905109,138.492685 -34.905119,138.492666 -34.905126,138.492646 >>> -34.905129,138.492642 -34.905129,138.492642 -34.905129,138.4927512 >>> -34.9065512,138.4927512 -34.9065512,138.49314358 -34.90652109) >>> >>> I have tried to limit the above LINESTRING to the geometry with the following >>> query: >>> >>> select intersection( >>> (select the_geom from route_service_transaction where >>> intersects(the_geom, SetSRID('BOX3D(138.4925 -34.905393,138.493313 >>> -34.90458)'::box3d,4283)) ) >>> , >>> (SetSRID('BOX3D(138.4925 -34.905393,138.493313 -34.90458)'::box3d,4283)) >>> ) >>> >>> However this returns something very strange - ???MULIPOINT??? and : >>> Returns: >>> SRID=4283;MULTIPOINT(138.492602818432 -34.90458 1.7e-308,138.492662270567 >>> -34.905393 1.7e-308) >>> >>> >>> Any idea how to "trim" or "limit" the LINESTRING in the first query to that >>> of the path through a BBox??? Also, maintaining this as a LINESTRING not a >>> multipoint. >>> >>> >>> >>> Many Thanks!!!! >>> >>> >>> >>> p.s. sorry if these questions are annoying, I am rather new to PostGIS! >>> >>> >>> >>> >>> Pedro Doria Meunier wrote: >>>> >>>> Hey Andrew, >>>> >>>> >>>> >>>> I had to do a similiar thing? >>>> >>>> ?Cut? the road segments belonging to a municipality? and the query ended >>>> like this: >>>> >>>> >>>> >>>> create my_road_segment as >>>> >>>> select intersection(r.geometry, f.geometry) as geometry, >>>> >>>> r.name, r.sec_name, r.city, r.region, r.country, r.pcode, r.road_type, >>>> >>>> r.route_class, r.speed_class, r.one_way, r.has_dir, r.toll, r.no_car, >>>> >>>> r.no_bus, r.no_taxi, r.no_bic, r.no_truck, r.no_emerg, r.no_deliv, >>>> r.no_pedes, r.classific >>>> >>>> from rede_estradas as r, freguesias_ram as f >>>> >>>> where r.geometry && f.geometry >>>> >>>> and intersects(r.geometry, f.geometry) >>>> >>>> and f.nome_freg like 'Faj? da Ovelha%'; >>>> >>>> >>>> >>>> the keyword here is INTERSECTS >>>> >>>> >>>> >>>> This query creates a table based on a select. This select returns the road >>>> segments **contained** in a polygon defining a municipality. >>>> >>>> >>>> >>>> Hope this helps. >>>> >>>> >>>> >>>> _Pedro Doria Meunier_ >>>> >>>> (351) 91 302 49 72 - (351) 96 247 99 12 >>>> >>>> MSN - pdoriam at hotmail.com <mailto:pdoriam at hotmail.com> >>>> >>>> ICQ - 308-182-126 >>>> >>>> Skype: pdoriam >>>> >>>> >>>> >>>> -------------------------------------------------------------------------------- >>>> >>>> >>>> *From:* postgis-users-bounces at postgis.refractions.net >>>> [mailto:postgis-users-bounces at postgis.refractions.net] *On Behalf Of *Andrew >>>> Hughes >>>> *Sent:* segunda-feira, 27 de Novembro de 2006 7:22 >>>> *To:* postgis-users at postgis.refractions.net >>>> *Subject:* [postgis-users] Extracting the Linestring Geometry from a BBox(noob) >>>> >>>> >>>> >>>> Hey All, >>>> >>>> I'm trying to extract some linestrings from a collection of linestrings and >>>> conditional on being within a BBox. >>>> >>>> I will try and explain this best with some images... >>>> >>>> My input looks like: >>>> >>>> >>>> >>>> My desired output looks like this: >>>> >>>> (note that I DO want the point where it intersects the bbox) >>>> >>>> >>>> >>>> Is this at all possible to do? or do I need to start writing my own postgis >>>> fuctions??? >>>> >>>> >>>> >>>> Thanks in advance >>>> >>>> --AH >>>> >>>> -------------------------------------------------------------------------------- >>>> >>>> >>>> _______________________________________________ >>>> postgis-users mailing list >>>> postgis-users at postgis.refractions.net >>>> http://postgis.refractions.net/mailman/listinfo/postgis-users >>>> >>> >>> >>> -- >>> >>> Regards, >>> >>> *Andrew Hughes* >>> Software Engineer >>> LISAsoft Pty. Ltd. (Adelaide) >>> >>> -------------------------------------------------------------------------------- >>> >>> >>> LISAsoft Pty. Ltd. >>> >>> <http://www.lisasoft.com> >>> *ADELAIDE Office* >>> <http://terrapages.net/mapbutton/RetrieveButtonServlet?buttonID=4> >>> 38 Greenhill Road >>> Wayville SA 5034 >>> Australia >>> *Telephone +61 8 8272 1555* >>> *Facsimile +61 8 8271 1199* >>> *SYDNEY Office* >>> <http://terrapages.net/mapbutton/RetrieveButtonServlet?buttonID=1> >>> Suite 112 The Lower Deck >>> Jones Bay Wharf >>> 19-21 Pirrama Road >>> Pyrmont NSW 2009 AUS >>> *Telephone +61 2 8570 5060* >>> *Facsimile +61 2 8570 5099* >>> *MELBOURNE Office* >>> <http://terrapages.net/mapbutton/RetrieveButtonServlet?buttonID=3> >>> Level 7 520 Collins Street >>> Melbourne VIC 3000 >>> Australia >>> *Telephone +61 3 9629 1799* >>> *Facsimile +61 3 9629 4955* >>> >>> -------------------------------------------------------------------------------- >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> 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 azza at lisasoft.com Mon Nov 27 17:40:08 2006 From: azza at lisasoft.com (Andrew Hughes) Date: Tue, 28 Nov 2006 12:10:08 +1030 Subject: [postgis-users] Extracting the Linestring Geometry from a BBox(noob) In-Reply-To: <456B8D38.8060802@refractions.net> References: <000c01c7121b$4e597150$07d6bed5@oem41cbbf9e178> <456B79D9.3070904@lisasoft.com> <456B8520.3020304@refractions.net> <456B8BBD.7000806@lisasoft.com> <456B8D38.8060802@refractions.net> Message-ID: <456B9378.8040703@lisasoft.com> An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061128/0da31c03/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: button.gif Type: image/gif Size: 2529 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061128/0da31c03/attachment.gif> From akrherz at iastate.edu Mon Nov 27 18:34:41 2006 From: akrherz at iastate.edu (Daryl Herzmann) Date: Mon, 27 Nov 2006 20:34:41 -0600 (CST) Subject: [postgis-users] Tiger postgis dump files Message-ID: <Pine.LNX.4.61.0611272028530.4538@ics128-198.icsincorporated.com> Greetings, I'm curious about an old post Paul Ramsey made here: http://postgis.refractions.net/pipermail/postgis-users/2004-September/005795.html namely, "Since TIGER is freely redistributable, when we have run the whole data set, we will re-export the results as dump files by state, so people can load up the tables they want" Did anything come of this? thanks! daryl From egouge at refractions.net Mon Nov 27 19:34:42 2006 From: egouge at refractions.net (egouge at refractions.net) Date: Mon, 27 Nov 2006 19:34:42 -0800 Subject: [postgis-users] Extracting the Linestring Geometry from a BBox(noob) In-Reply-To: <456B9378.8040703@lisasoft.com> References: <000c01c7121b$4e597150$07d6bed5@oem41cbbf9e178> <456B79D9.3070904@lisasoft.com> <456B8520.3020304@refractions.net> <456B8BBD.7000806@lisasoft.com> <456B8D38.8060802@refractions.net> <456B9378.8040703@lisasoft.com> Message-ID: <1164684882.456bae52e8064@ssl.refractions.net> Interesting - learn something new everyday! Glad it works for you. Quoting Andrew Hughes <azza at lisasoft.com>: > > > > > > > Wow thanks emily! > > > > That seems to work with Polygon's... but not with the bbox! > > > > Problem solvered! > > > > > > Emily Gouge wrote: > Try > it. > > > > > This simple example shows that the intersection of a polygon and > linestring returns a linestring. > > > > > select astext(intersection(geomfromtext('POLYGON((1 1, 1 2, 2 2, 2 1, 1 > 1))'), geomfromtext('LINESTRING(0 0, 3 3)'))); > > > > > Returns: > > > LINESTRING(1 1,2 2) > > > > > > > > > Andrew Hughes wrote: > > > Hi Emily, > > > > > Thanks for that! Unless I am mistaken...... > > > > > I think I am working out that the intersection function returns the > points at which the two geometry's intersect. This is the points at > which my LINESTRING enters and exits the BBox (hence the MULTIPOINT). > So I don't think that this really does what I want. > > > > > >From : http://postgis.refractions.net/docs/ch06.html#id2526581 > > > > > Intersection(geometry, geometry) > > > > > Returns a geometry that represents the point set intersection > of the > > > Geometies. > > > > > Performed by the GEOS module > > > > > Do not call with a GeometryCollection as an argument > > > > > OGC SPEC s2.1.1.3 > > > > > > > I am not sure anything does what I am looking for, maybe someone else > knows??? > > > > > > > --Thanks Heaps Though! > > > > > > > > > > > Emily Gouge wrote: > > > Try the intersection function in the select > statement. Something like: > > > > > select intersection(the_geom, setsrid('BOX3D(138.4925 > -34.905393,138.493313 -34.90458)', 4283)) > > > from route_service_transaction where intersects(the_geom, > SetSRID('BOX3D(138.4925 -34.905393,138.493313 -34.90458)'::box3d,4283)) > > > > > Andrew Hughes wrote: > > > Hi Pedro, > > > > > Thanks for the reply!!!!! > > > > > I'm finding some problems with my query (specifically the > "intersection" function).... I can select the entire LINESTRING that > intersects a BBox.... but I can not limit the geometry of that > LINESTRING to the path through the BBox (like in the images below). > > > > > My Query to Find the entire LINESTRING(s) is: > > > > > select the_geom from route_service_transaction where > intersects(the_geom, > > > SetSRID('BOX3D(138.4925 -34.905393,138.493313 > -34.90458)'::box3d,4283)) > > > > > This does sucessfully find the LINESTRINGs I am looking for, > however they > > > return the Complete LINESTRING inside AND outside the bbox. I only > want the > > > LINESTRING(s) that are inside the BBox. > > > > > Returns: > > > SRID=4283;LINESTRING(138.49680675 -34.89338892,138.496643 > > > -34.8935516,138.496643 -34.8935516,138.496882 -34.893792,138.496882 > > > -34.893792,138.496773 -34.893837,138.496186 -34.894212,138.496186 > > > -34.894212,138.495597 -34.894607,138.495475 -34.894711,138.495422 > > > -34.894779,138.495422 -34.894779,138.495369 -34.894848,138.495301 > > > -34.894999,138.49529 -34.895088,138.49529 -34.895088,138.495277 > > > -34.895194,138.495291 -34.895815,138.495291 -34.895815,138.494732 > > > -34.895772,138.494732 -34.895772,138.494418 -34.895756,138.494418 > > > -34.895756,138.494421 -34.895791,138.494368 -34.896227,138.49427 > > > -34.896491,138.494183 -34.89665,138.493852 -34.897041,138.493775 > > > -34.897091,138.493775 -34.897091,138.493586 -34.89721,138.493344 > > > -34.897282,138.493127 -34.897301,138.493127 -34.897301,138.492088 > > > -34.897342,138.492088 -34.897342,138.492174 -34.898481,138.492174 > > > -34.898481,138.492178 -34.898537,138.492219 -34.899098,138.492219 > > > -34.899098,138.492252 -34.899601,138.492252 -34.899601,138.492261 > > > -34.899752,138.492261 -34.899752,138.492303 -34.900254,138.492303 > > > -34.900254,138.492415 -34.901815,138.492415 -34.901815,138.492439 > > > -34.902282,138.492439 -34.902282,138.492453 -34.902282,138.492472 > > > -34.902285,138.492489 -34.902291,138.492505 -34.902301,138.492518 > > > -34.902312,138.492527 -34.902326,138.492533 -34.902341,138.492534 > > > -34.902353,138.492534 -34.902353,138.492535 -34.902357,138.492533 > > > -34.902373,138.492527 -34.902388,138.492518 -34.902402,138.492505 > > > -34.902413,138.492489 -34.902423,138.492472 -34.902429,138.492453 > > > -34.902432,138.492448 -34.902432,138.492448 -34.902432,138.492631 > > > -34.904971,138.492631 -34.904971,138.492646 -34.904971,138.492666 > > > -34.904974,138.492685 -34.904981,138.492701 -34.904991,138.492715 > > > -34.905003,138.492725 -34.905018,138.492731 -34.905033,138.492732 > > > -34.905044,138.492732 -34.905044,138.492733 -34.90505,138.492731 > > > -34.905067,138.492725 -34.905082,138.492715 -34.905097,138.492701 > > > -34.905109,138.492685 -34.905119,138.492666 -34.905126,138.492646 > > > -34.905129,138.492642 -34.905129,138.492642 -34.905129,138.4927512 > > > -34.9065512,138.4927512 -34.9065512,138.49314358 -34.90652109) > > > > > I have tried to limit the above LINESTRING to the geometry with the > following query: > > > > > select intersection( > > > (select the_geom from route_service_transaction where > > > intersects(the_geom, SetSRID('BOX3D(138.4925 > -34.905393,138.493313 > > > -34.90458)'::box3d,4283)) ) > > > , > > > (SetSRID('BOX3D(138.4925 -34.905393,138.493313 > -34.90458)'::box3d,4283)) > > > ) > > > > > However this returns something very strange - ???MULIPOINT??? and : > > > Returns: > > > SRID=4283;MULTIPOINT(138.492602818432 -34.90458 > 1.7e-308,138.492662270567 > > > -34.905393 1.7e-308) > > > > > > > Any idea how to "trim" or "limit" the LINESTRING in the first query to > that of the path through a BBox??? Also, maintaining this as a > LINESTRING not a multipoint. > > > > > > > > > Many Thanks!!!! > > > > > > > > > p.s. sorry if these questions are annoying, I am rather new to PostGIS! > > > > > > > > > > > Pedro Doria Meunier wrote: > > > > > Hey Andrew, > > > > > > > > > > I had to do a similiar thing > > > > > ?Cut? the road segments belonging to a municipality and the query > ended like this: > > > > > > > > > > create my_road_segment as > > > > > select intersection(r.geometry, f.geometry) as geometry, > > > > > r.name, r.sec_name, r.city, r.region, r.country, r.pcode, r.road_type, > > > > > r.route_class, r.speed_class, r.one_way, r.has_dir, r.toll, r.no_car, > > > > > r.no_bus, r.no_taxi, r.no_bic, r.no_truck, r.no_emerg, r.no_deliv, > r.no_pedes, r.classific > > > > > from rede_estradas as r, freguesias_ram as f > > > > > where r.geometry && f.geometry > > > > > and intersects(r.geometry, f.geometry) > > > > > and f.nome_freg like 'Faj? da Ovelha%'; > > > > > > > > > > the keyword here is INTERSECTS > > > > > > > > > > This query creates a table based on a select. This select returns the > road segments **contained** in a polygon defining a municipality. > > > > > > > > > > Hope this helps. > > > > > > > > > > _Pedro Doria Meunier_ > > > > > (351) 91 302 49 72 - (351) 96 247 99 12 > > > > > MSN - pdoriam at hotmail.com <mailto:pdoriam at hotmail.com> > > > > > ICQ - 308-182-126 > > > > > Skype: pdoriam > > > > > > > > > > -------------------------------------------------------------------------------- > > > > > *From:* postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] *On Behalf Of > *Andrew Hughes > > > *Sent:* segunda-feira, 27 de Novembro de 2006 7:22 > > > *To:* postgis-users at postgis.refractions.net > > > *Subject:* [postgis-users] Extracting the Linestring Geometry from a > BBox(noob) > > > > > > > > > > Hey All, > > > > > I'm trying to extract some linestrings from a collection of > linestrings and conditional on being within a BBox. > > > > > I will try and explain this best with some images... > > > > > My input looks like: > > > > > > > > > My desired output looks like this: > > > > > (note that I DO want the point where it intersects the bbox) > > > > > > > > > Is this at all possible to do? or do I need to start writing my own > postgis fuctions??? > > > > > > > > > Thanks in advance > > > > > --AH > > > > > -------------------------------------------------------------------------------- > > > > > _______________________________________________ > > > postgis-users mailing list > > > postgis-users at postgis.refractions.net > > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > > > > -- > > > > Regards, > > > > > *Andrew Hughes* > > > Software Engineer > > > LISAsoft Pty. Ltd. (Adelaide) > > > > > -------------------------------------------------------------------------------- > > > > > > > LISAsoft Pty. Ltd. > > > > > <http://www.lisasoft.com> > > > *ADELAIDE Office* > > > <http://terrapages.net/mapbutton/RetrieveButtonServlet?buttonID=4> > > > 38 Greenhill Road > > > Wayville SA 5034 > > > Australia > > > *Telephone +61 8 8272 1555* > > > *Facsimile +61 8 8271 1199* *SYDNEY Office* > > > <http://terrapages.net/mapbutton/RetrieveButtonServlet?buttonID=1> > > > Suite 112 The Lower Deck > > > Jones Bay Wharf > > > 19-21 Pirrama Road > > > Pyrmont NSW 2009 AUS > > > *Telephone +61 2 8570 5060* > > > *Facsimile +61 2 8570 5099* *MELBOURNE Office* > > > <http://terrapages.net/mapbutton/RetrieveButtonServlet?buttonID=3> > > > Level 7 520 Collins Street > > > Melbourne VIC 3000 > > > Australia > > > *Telephone +61 3 9629 1799* > > > *Facsimile +61 3 9629 4955* > > > > > -------------------------------------------------------------------------------- > > > > > > > ------------------------------------------------------------------------ > > > > > _______________________________________________ > > > 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 > > > > > > _______________________________________________ > > > postgis-users mailing list > > > postgis-users at postgis.refractions.net > > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > > > > > > -- > > > > Regards, > > > > Andrew Hughes > > Software Engineer > > LISAsoft Pty. Ltd. (Adelaide) > > > > > > > > > > > LISAsoft Pty. Ltd. > > > > ADELAIDE Office > > > > 38 Greenhill Road > > Wayville SA 5034 > > Australia > > Telephone +61 8 8272 1555 > > Facsimile +61 8 8271 1199 > > > > SYDNEY Office > > > > Suite 112 The Lower Deck > > Jones Bay Wharf > > 19-21 Pirrama Road > > Pyrmont NSW 2009 AUS > > Telephone +61 2 8570 5060 > > Facsimile +61 2 8570 5099 > > > > MELBOURNE Office > > > > Level 7 520 Collins Street > > Melbourne VIC 3000 > > Australia > > Telephone +61 3 9629 1799 > > Facsimile +61 3 9629 4955 > > > > > > > > From alex_chew at 163.com Mon Nov 27 20:39:47 2006 From: alex_chew at 163.com (Alex Chew) Date: Tue, 28 Nov 2006 12:39:47 +0800 Subject: [postgis-users] How can i get accurate world coordinate (WGS84)with mouse click? Message-ID: <456BBDC9.0A383E.17156> Hi?Markus ?Can you read image followed? All red points are mouse clicked point in Screen Coordinate and green points are in World Coordinate. I am still got know idea about why this happened. X is accurate while Y is error. Would you please show me the way to a resolution? Thanks Alex ????? ??????????????? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061128/b4b6f1cb/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: mark error.JPG Type: image/jpeg Size: 37124 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061128/b4b6f1cb/attachment.jpe> From ruckc at yahoo.com Mon Nov 27 21:31:56 2006 From: ruckc at yahoo.com (Curtis W. Ruck) Date: Mon, 27 Nov 2006 21:31:56 -0800 (PST) Subject: [postgis-users] How can i get accurate world coordinate (WGS84)with mouse click? Message-ID: <20061128053157.83157.qmail@web32215.mail.mud.yahoo.com> >From what I see your Y (latitude) scaling in your translation from screenpoint to coordinate point application isn't accounting for latitudes further away from the equator. Inside your application you should have something that calculates the translation for longitude properly (longitude appears fine), so replicate the scaling that you are using for your longitude for your latitude also, don't reuse the scaling variable in your latitude math from your longitude math. Curtis ----- Original Message ---- From: Alex Chew <alex_chew at 163.com> To: PostGIS Users Discussion <postgis-users at postgis.refractions.net> Sent: Monday, November 27, 2006 10:39:47 PM Subject: Re: Re: [postgis-users] How can i get accurate world coordinate (WGS84)with mouse click? Hi?Markus ?Can you read image followed? All red points are mouse clicked point in Screen Coordinate and green points are in World Coordinate. I am still got know idea about why this happened. X is accurate while Y is error. Would you please show me the way to a resolution? Thanks Alex ????? ??????????????? _______________________________________________ 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: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061127/f7ac2177/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: mark Type: image/jpeg Size: 37124 bytes Desc: not available URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061127/f7ac2177/attachment.jpe> From pcorti at gmail.com Mon Nov 27 08:46:10 2006 From: pcorti at gmail.com (Paolo Corti) Date: Mon, 27 Nov 2006 08:46:10 -0800 (PST) Subject: [postgis-users] zigGIS Usage Experiences In-Reply-To: <a6d397e30512071116t36ac22e8sd3cf313e77a2e728@mail.gmail.com> References: <a6d397e30512071116t36ac22e8sd3cf313e77a2e728@mail.gmail.com> Message-ID: <7563276.post@talk.nabble.com> Hello Abe you made a great job with your ZigGis! The ArcObjects code is amazing! maybe you can give me a help I compiled your code for using it with ArcGis 9 (i made some little modifications at the code to get this) and .NET 2.0 It compiled fine, but when I start ArcMap and I add a PostGIS layer, it adds the layer on the TOC but nothing is showed/drawed on the map. Looks like geometries are not read from the shape column. I am wondering if you are still on this project, and maybe you could give me some help, or if I am on my own and must deeply investigate/debug myself the code in order to find what is not going properly best regards Paolo Corti GIS Developer http://www.paolocorti.net Abe Gillespie wrote: > > Sorry for the cross post, but the zigGIS list only has 9 subscribers > with a ton more downloads than that. > > I'm curious about any experiences people are having using or even > *trying* to use zigGIS. Is it working? Anyone need any help? Any > constructive criticism? ... I haven't heard a peep yet. > > Thanks. > -Abe > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > -- View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7563276 Sent from the PostGIS - User mailing list archive at Nabble.com. From gopal at getmapping.com Tue Nov 28 04:22:31 2006 From: gopal at getmapping.com (Gopal) Date: Tue, 28 Nov 2006 12:22:31 -0000 Subject: [postgis-users] RE: [PERFORM] Postgres scalability and performance on windows In-Reply-To: <20061124110451.4538d901.frank@wiles.org> Message-ID: <A5DE6132B8D812419321747E42710E2204C080@EXCHANGE01.gm.local> Tom, This is the query and the schema.... Query is : SELECT subq.percentCover, ds.datasetname, ds.maxresolution FROM ( select sum(area(intersection(snaptogrid(chunkgeometry,0.00000001), GeometryFromText('POLYGON((-0.140030845589332 50.8208343077265,-0.138958398039148 50.8478005422809,-0.0963639712296823 50.8471133071392,-0.0974609286275892 50.8201477285483,-0.140030845589332 50.8208343077265))',4326))) * 100/ (0.00114901195862628)) as percentCover, datasetid as did from tbl_metadata_chunks where chunkgeometry && GeometryFromText('POLYGON((-0.140030845589332 50.8208343077265,-0.138958398039148 50.8478005422809,-0.0963639712296823 50.8471133071392,-0.0974609286275892 50.8201477285483,-0.140030845589332 50.8208343077265))',4326) and datasetid in (select datasetid from tbl_metadata_dataset where typeofdataid=1) group by did order by did desc ) AS subq INNER JOIN tbl_metadata_dataset AS ds ON subq.did = ds.datasetid ORDER by ceil(subq.percentCover),1/ds.maxresolution DESC; Schema is Table 1 CREATE TABLE public.tbl_metadata_dataset ( datasetname varchar(70) NOT NULL, maxresolution real, typeofdataid integer NOT NULL, datasetid serial NOT NULL, CONSTRAINT "PK_Dataset" PRIMARY KEY (datasetid) ); -- Indexes CREATE INDEX dsnameindex ON tbl_metadata_dataset USING btree (datasetname);-- Owner ALTER TABLE public.tbl_metadata_dataset OWNER TO postgres; -- Triggers CREATE CONSTRAINT TRIGGER "RI_ConstraintTrigger_2196039" AFTER DELETE ON tbl_metadata_dataset FROM tbl_metadata_chunks NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE "RI_FKey_noaction_del"('dsid', 'tbl_metadata_chunks', 'tbl_metadata_dataset', 'UNSPECIFIED', 'datasetid', 'datasetid'); CREATE CONSTRAINT TRIGGER "RI_ConstraintTrigger_2196040" AFTER UPDATE ON tbl_metadata_dataset FROM tbl_metadata_chunks NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE "RI_FKey_noaction_upd"('dsid', 'tbl_metadata_chunks', 'tbl_metadata_dataset', 'UNSPECIFIED', 'datasetid', 'datasetid'); Table 2 CREATE TABLE public.tbl_metadata_chunks ( chunkid serial NOT NULL, chunkgeometry geometry NOT NULL, datasetid integer NOT NULL, CONSTRAINT tbl_metadata_chunks_pkey PRIMARY KEY (chunkid), CONSTRAINT dsid FOREIGN KEY (datasetid) REFERENCES tbl_metadata_dataset(datasetid) ); -- Indexes CREATE INDEX idx_dsid ON tbl_metadata_chunks USING btree (datasetid); CREATE UNIQUE INDEX tbl_metadata_chunks_idx2 ON tbl_metadata_chunks USING btree (nativetlx, nativetly, datasetid); CREATE INDEX tbl_metadata_chunks_idx3 ON tbl_metadata_chunks USING gist (chunkgeometry);-- Owner ALTER TABLE public.tbl_metadata_chunks OWNER TO postgres; -- Triggers CREATE CONSTRAINT TRIGGER "RI_ConstraintTrigger_2194515" AFTER DELETE ON tbl_metadata_chunks FROM tbl_metadata_chunkinfo NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE "RI_FKey_restrict_del"('fk', 'tbl_metadata_chunkinfo', 'tbl_metadata_chunks', 'UNSPECIFIED', 'chunkid', 'chunkid'); CREATE CONSTRAINT TRIGGER "RI_ConstraintTrigger_2194516" AFTER UPDATE ON tbl_metadata_chunks FROM tbl_metadata_chunkinfo NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE "RI_FKey_restrict_upd"('fk', 'tbl_metadata_chunkinfo', 'tbl_metadata_chunks', 'UNSPECIFIED', 'chunkid', 'chunkid'); CREATE CONSTRAINT TRIGGER "RI_ConstraintTrigger_2196037" AFTER INSERT ON tbl_metadata_chunks FROM tbl_metadata_dataset NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE "RI_FKey_check_ins"('dsid', 'tbl_metadata_chunks', 'tbl_metadata_dataset', 'UNSPECIFIED', 'datasetid', 'datasetid'); CREATE CONSTRAINT TRIGGER "RI_ConstraintTrigger_2196038" AFTER UPDATE ON tbl_metadata_chunks FROM tbl_metadata_dataset NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE "RI_FKey_check_upd"('dsid', 'tbl_metadata_chunks', 'tbl_metadata_dataset', 'UNSPECIFIED', 'datasetid', 'datasetid'); -----Original Message----- From: Frank Wiles [mailto:frank at wiles.org] Sent: 24 November 2006 17:05 To: Guido Neitzer Cc: Gopal; pgsql-performance at postgresql.org Subject: Re: [PERFORM] Postgres scalability and performance on windows On Fri, 24 Nov 2006 09:22:45 +0100 Guido Neitzer <lists at event-s.net> wrote: > > effective_cache_size = 82728 # typically 8KB each > Hmm. I don't know what the real effect of this might be as the doc > states: > > "This parameter has no effect on the size of shared memory allocated > by PostgreSQL, nor does it reserve kernel disk cache; it is used > only for estimation purposes." This is a hint to the optimizer about how much of the database may be in the OS level cache. --------------------------------- Frank Wiles <frank at wiles.org> http://www.wiles.org --------------------------------- ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ From Christian.Strobl at dlr.de Tue Nov 28 05:56:10 2006 From: Christian.Strobl at dlr.de (Christian.Strobl at dlr.de) Date: Tue, 28 Nov 2006 14:56:10 +0100 Subject: [postgis-users] NOTICE: type "spheroid" is not yet defined Message-ID: <AC78B6BABBC9A74C95028F87A0EACF791C37E4@exbe04.intra.dlr.de> hi all, i have compiled postgis 1.1.6 for ubuntu 6.06. at a first glance all worked fine but with psql -d mytestdb -f /usr/src/postgresql/postgresql-8.1.5/contrib/postgis-1.1.6/lwpostgis.sql i got the following messages (see below) is that anything i have to get worried about. greetings from munich christian BEGIN psql:/usr/src/postgresql-8.1.5/contrib/postgis-1.1.6/lwpostgis.sql:39: NOTICE: type "histogram2d" is not yet defined DETAIL: Creating a shell type definition. CREATE FUNCTION psql:/usr/src/postgresql-8.1.5/contrib/postgis-1.1.6/lwpostgis.sql:44: NOTICE: argument type histogram2d is only a shell CREATE FUNCTION CREATE TYPE psql:/usr/src/postgresql-8.1.5/contrib/postgis-1.1.6/lwpostgis.sql:62: NOTICE: type "spheroid" is not yet defined DETAIL: Creating a shell type definition. CREATE FUNCTION psql:/usr/src/postgresql-8.1.5/contrib/postgis-1.1.6/lwpostgis.sql:67: NOTICE: argument type spheroid is only a shell CREATE FUNCTION CREATE TYPE psql:/usr/src/postgresql-8.1.5/contrib/postgis-1.1.6/lwpostgis.sql:84: NOTICE: type "geometry" is not yet defined DETAIL: Creating a shell type definition. CREATE FUNCTION psql:/usr/src/postgresql-8.1.5/contrib/postgis-1.1.6/lwpostgis.sql:89: NOTICE: argument type geometry is only a shell CREATE FUNCTION CREATE FUNCTION psql:/usr/src/postgresql-8.1.5/contrib/postgis-1.1.6/lwpostgis.sql:99: NOTICE: return type geometry is only a shell CREATE FUNCTION psql:/usr/src/postgresql-8.1.5/contrib/postgis-1.1.6/lwpostgis.sql:104: NOTICE: argument type geometry is only a shell CREATE FUNCTION CREATE TYPE CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION psql:/usr/src/postgresql-8.1.5/contrib/postgis-1.1.6/lwpostgis.sql:203: NOTICE: type "box3d" is not yet defined DETAIL: Creating a shell type definition. CREATE FUNCTION psql:/usr/src/postgresql-8.1.5/contrib/postgis-1.1.6/lwpostgis.sql:208: NOTICE: argument type box3d is only a shell CREATE FUNCTION CREATE TYPE CREATE FUNCTION CREATE FUNCTION ..... From frank.koormann at intevation.de Tue Nov 28 06:24:10 2006 From: frank.koormann at intevation.de (Frank Koormann) Date: Tue, 28 Nov 2006 15:24:10 +0100 Subject: [postgis-users] NOTICE: type "spheroid" is not yet defined In-Reply-To: <AC78B6BABBC9A74C95028F87A0EACF791C37E4@exbe04.intra.dlr.de> References: <AC78B6BABBC9A74C95028F87A0EACF791C37E4@exbe04.intra.dlr.de> Message-ID: <20061128142410.GA9126@intevation.de> Hi Christian, * Christian.Strobl at dlr.de <Christian.Strobl at dlr.de> [061128 14:56]: > hi all, > > i have compiled postgis 1.1.6 for ubuntu 6.06. at a first glance all > worked fine but with > > psql -d mytestdb -f > /usr/src/postgresql/postgresql-8.1.5/contrib/postgis-1.1.6/lwpostgis.sql > > i got the following messages (see below) > > is that anything i have to get worried about. No, these notices are typical. You could issue a "make check" in the PostGIS build directory to initially test the Build. Note that you must have rights to create databases on the running postgresql server to do so. Best regards, Frank -- Frank Koormann <frank.koormann at intevation.de> Professional Service around Free Software (http://intevation.net/) FreeGIS Project (http://freegis.org/) PostGIS Support (http://www.intevation.net/geospatial/postgis-support.en.html) From schabi at logix-tt.com Tue Nov 28 06:38:48 2006 From: schabi at logix-tt.com (Markus Schaber) Date: Tue, 28 Nov 2006 15:38:48 +0100 Subject: [postgis-users] NOTICE: type "spheroid" is not yet defined In-Reply-To: <AC78B6BABBC9A74C95028F87A0EACF791C37E4@exbe04.intra.dlr.de> References: <AC78B6BABBC9A74C95028F87A0EACF791C37E4@exbe04.intra.dlr.de> Message-ID: <456C49F8.80704@logix-tt.com> Hi, Christian, Christian.Strobl at dlr.de wrote: > NOTICE: type "histogram2d" is not yet defined > DETAIL: Creating a shell type definition. > is that anything i have to get worried about? Short answer: No, those messages are expected, and no problem. Long answer: First, this messages are "NOTICE"s, their level of importance is way below WARNING and ERROR. The reason for this is a hen-and-egg problem: - For creating a type, you need to specify its input/output functions. - For creating the input / output functions, you need the type for the parameter declaration. To solve this problem, PostgreSQL has the concept of a "shell type", that means you can use a type name in function declarations before the type has been specified, allowing you to create the input/output functions first. (But, of course, you've to fully declare the type before you can actually use it.) As soon as all input/output functions exist, you can issue the "CREATE TYPE" declaration to convert the shell type into a real one. PostgreSQL 8.2 has an explicit syntax "CREATE TYPE foobar;" to create such an shell type. Older releases, however, did not have that special syntax. Instead, they assume that the input/output functions are written in C. Now, when you declare a function in C, and use unknown types, PostgreSQL accepts it and creates the "shell type". But as this can easily lead to introduce new shell types accidentally by making a typo in the function definition, PostgreSQL issues this NOTICE. Btw, language implememtations like pljava which want to allow the user to implement custom types without resorting to C also suffer from this problem, as there's no possibility to create a shell type in older PostgreSQL versions, but abusing a C function, as it is described on: http://wiki.tada.se/wiki/display/pljava/Creating+a+Scalar+UDT+in+Java HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org From joshua.uyehara at syngenta.com Tue Nov 28 10:14:49 2006 From: joshua.uyehara at syngenta.com (joshua.uyehara at syngenta.com) Date: Tue, 28 Nov 2006 13:14:49 -0500 Subject: [postgis-users] zigGIS Usage Experiences Message-ID: <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> Hey Paolo, Abe isn't working on it anymore, but I have been occasionally plugging away at it myself. The problem with adding the layer in ArcMap is due to a minor bug. ZigGIS pulls the geometry column data from PostGIS in its native binary format and passes it to ArcMap. Unfortunately, PostGIS' internal binary format is not identical to the expected wkb format, so ArcMap silently ignores it and basically treats the table as a feature-less object class. One quick workaround is to create a view of the table that converts the geometry column with asbinary(), and then manually add the necessary entry to the geometry_columns table. E.g., CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as geom_column, column2, column3, FROM geom_table; INSERT INTO geometry_columns (f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) VALUES ('public', 'geom_table_view', 'geom_column', 2, -1, 'MULTIPOLYGON'); Change schema, table, column names, srid, etc. to match your table, then specify the view as the table to be opened with ZigGIS. It's an ugly kludge, but I haven't had the time to fix the problem in ZigGIS itself yet. Many of the feature class functionality hasn't been implemented yet, so you can't do much besides display the features. I'm planning to add features to ZigGIS as I need them for work, but I can't give you any timelines on it, as I'm swamped with other stuff at the moment. Hope that helped, Joshua Uyehara joshua.uyehara at syngenta.com -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paolo Corti Sent: Monday, November 27, 2006 6:46 AM To: postgis-users at postgis.refractions.net Subject: Re: [postgis-users] zigGIS Usage Experiences Hello Abe you made a great job with your ZigGis! The ArcObjects code is amazing! maybe you can give me a help I compiled your code for using it with ArcGis 9 (i made some little modifications at the code to get this) and .NET 2.0 It compiled fine, but when I start ArcMap and I add a PostGIS layer, it adds the layer on the TOC but nothing is showed/drawed on the map. Looks like geometries are not read from the shape column. I am wondering if you are still on this project, and maybe you could give me some help, or if I am on my own and must deeply investigate/debug myself the code in order to find what is not going properly best regards Paolo Corti GIS Developer http://www.paolocorti.net Abe Gillespie wrote: > > Sorry for the cross post, but the zigGIS list only has 9 subscribers > with a ton more downloads than that. > > I'm curious about any experiences people are having using or even > *trying* to use zigGIS. Is it working? Anyone need any help? Any > constructive criticism? ... I haven't heard a peep yet. > > Thanks. > -Abe > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > -- View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7563276 Sent from the PostGIS - User mailing list archive at Nabble.com. _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From abe.gillespie at gmail.com Tue Nov 28 10:32:23 2006 From: abe.gillespie at gmail.com (Abe Gillespie) Date: Tue, 28 Nov 2006 13:32:23 -0500 Subject: [postgis-users] zigGIS Usage Experiences In-Reply-To: <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> References: <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> Message-ID: <a6d397e30611281032t34c9ac7ft2cd163dbabd27762@mail.gmail.com> I'm not sure if there was a breaking change since I last worked on it, but there was actually a lot of functionality already working; Features rendering, Identify, and Table View all worked. I'm pretty sure I had asbinary() in my querying already. Maybe I'm wrong. Anyhow, this is what should occur. Do a lookup on the PostGIS registry table and find what column is the vector column for your table in question. Then, anytime a query goes to the Npgsql driver, that geometry column should first be wrapped with asbinary(). Good luck. -Abe On 11/28/06, joshua.uyehara at syngenta.com <joshua.uyehara at syngenta.com> wrote: > Hey Paolo, > > Abe isn't working on it anymore, but I have been occasionally plugging > away at it myself. The problem with adding the layer in ArcMap is due > to a minor bug. > > ZigGIS pulls the geometry column data from PostGIS in its native binary > format and passes it to ArcMap. Unfortunately, PostGIS' internal binary > format is not identical to the expected wkb format, so ArcMap silently > ignores it and basically treats the table as a feature-less object > class. > > One quick workaround is to create a view of the table that converts the > geometry column with asbinary(), and then manually add the necessary > entry to the geometry_columns table. > > E.g., > > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as > geom_column, column2, column3, FROM geom_table; > INSERT INTO geometry_columns (f_table_schema, f_table_name, > f_geometry_column, coord_dimension, srid, type) VALUES > ('public', 'geom_table_view', 'geom_column', 2, -1, > 'MULTIPOLYGON'); > > Change schema, table, column names, srid, etc. to match your table, then > specify the view as the table to be opened with ZigGIS. It's an ugly > kludge, but I haven't had the time to fix the problem in ZigGIS itself > yet. > > Many of the feature class functionality hasn't been implemented yet, so > you can't do much besides display the features. I'm planning to add > features to ZigGIS as I need them for work, but I can't give you any > timelines on it, as I'm swamped with other stuff at the moment. > > Hope that helped, > Joshua Uyehara > joshua.uyehara at syngenta.com > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Paolo Corti > Sent: Monday, November 27, 2006 6:46 AM > To: postgis-users at postgis.refractions.net > Subject: Re: [postgis-users] zigGIS Usage Experiences > > > Hello Abe > > you made a great job with your ZigGis! The ArcObjects code is amazing! > > maybe you can give me a help > I compiled your code for using it with ArcGis 9 (i made some little > modifications at the code to get this) and .NET 2.0 It compiled fine, > but when I start ArcMap and I add a PostGIS layer, it adds the layer on > the TOC but nothing is showed/drawed on the map. > Looks like geometries are not read from the shape column. > I am wondering if you are still on this project, and maybe you could > give me some help, or if I am on my own and must deeply > investigate/debug myself the code in order to find what is not going > properly > > best regards > Paolo Corti > GIS Developer > http://www.paolocorti.net > > > Abe Gillespie wrote: > > > > Sorry for the cross post, but the zigGIS list only has 9 subscribers > > with a ton more downloads than that. > > > > I'm curious about any experiences people are having using or even > > *trying* to use zigGIS. Is it working? Anyone need any help? Any > > constructive criticism? ... I haven't heard a peep yet. > > > > Thanks. > > -Abe > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > > > > -- > View this message in context: > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7563276 > Sent from the PostGIS - User mailing list archive at Nabble.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 > From pcorti at gmail.com Tue Nov 28 10:46:19 2006 From: pcorti at gmail.com (Paolo Corti) Date: Tue, 28 Nov 2006 10:46:19 -0800 (PST) Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> References: <a6d397e30512071116t36ac22e8sd3cf313e77a2e728@mail.gmail.com> <7563276.post@talk.nabble.com> <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> Message-ID: <7585042.post@talk.nabble.com> Hello Joshua and thanks for the workaround, I will test it as ASAP It is very possibly that we could join to make some modification at ZigGis, as far as I would like in my spare time to write a connector for PostGis for ArcMap. First I was looking at PgArc (I also migrated that at ArcObjects 9), but I think the best approach is like ZigGis does, without a proxy shapefile, but directly reading the data. I have one more question, before going on. In this mailing list it was claimed, I think just from Abe, that ZigGis can read and also WRITE PostGis data. Is this correct? Because from what you are writing seems that ZigGis can just read and not write, and maybe I could be not interested in continuing using ZigGis. In fact I have decided to write in my spare time a full Read/Write PostGis connector for ArcMap. But before doing that I would like to deeply investigate if ZigGis already does the job. Best regards Paolo Corti http://www.paolocorti.net joshua.uyehara wrote: > > Hey Paolo, > > Abe isn't working on it anymore, but I have been occasionally plugging > away at it myself. The problem with adding the layer in ArcMap is due > to a minor bug. > > ZigGIS pulls the geometry column data from PostGIS in its native binary > format and passes it to ArcMap. Unfortunately, PostGIS' internal binary > format is not identical to the expected wkb format, so ArcMap silently > ignores it and basically treats the table as a feature-less object > class. > > One quick workaround is to create a view of the table that converts the > geometry column with asbinary(), and then manually add the necessary > entry to the geometry_columns table. > > E.g., > > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as > geom_column, column2, column3, FROM geom_table; > INSERT INTO geometry_columns (f_table_schema, f_table_name, > f_geometry_column, coord_dimension, srid, type) VALUES > ('public', 'geom_table_view', 'geom_column', 2, -1, > 'MULTIPOLYGON'); > > Change schema, table, column names, srid, etc. to match your table, then > specify the view as the table to be opened with ZigGIS. It's an ugly > kludge, but I haven't had the time to fix the problem in ZigGIS itself > yet. > > Many of the feature class functionality hasn't been implemented yet, so > you can't do much besides display the features. I'm planning to add > features to ZigGIS as I need them for work, but I can't give you any > timelines on it, as I'm swamped with other stuff at the moment. > > Hope that helped, > Joshua Uyehara > joshua.uyehara at syngenta.com > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Paolo Corti > Sent: Monday, November 27, 2006 6:46 AM > To: postgis-users at postgis.refractions.net > Subject: Re: [postgis-users] zigGIS Usage Experiences > > > Hello Abe > > you made a great job with your ZigGis! The ArcObjects code is amazing! > > maybe you can give me a help > I compiled your code for using it with ArcGis 9 (i made some little > modifications at the code to get this) and .NET 2.0 It compiled fine, > but when I start ArcMap and I add a PostGIS layer, it adds the layer on > the TOC but nothing is showed/drawed on the map. > Looks like geometries are not read from the shape column. > I am wondering if you are still on this project, and maybe you could > give me some help, or if I am on my own and must deeply > investigate/debug myself the code in order to find what is not going > properly > > best regards > Paolo Corti > GIS Developer > http://www.paolocorti.net > > > Abe Gillespie wrote: >> >> Sorry for the cross post, but the zigGIS list only has 9 subscribers >> with a ton more downloads than that. >> >> I'm curious about any experiences people are having using or even >> *trying* to use zigGIS. Is it working? Anyone need any help? Any >> constructive criticism? ... I haven't heard a peep yet. >> >> Thanks. >> -Abe >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> > > -- > View this message in context: > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7563276 > Sent from the PostGIS - User mailing list archive at Nabble.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 > > -- View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 Sent from the PostGIS - User mailing list archive at Nabble.com. From abe.gillespie at gmail.com Tue Nov 28 10:55:15 2006 From: abe.gillespie at gmail.com (Abe Gillespie) Date: Tue, 28 Nov 2006 13:55:15 -0500 Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <7585042.post@talk.nabble.com> References: <a6d397e30512071116t36ac22e8sd3cf313e77a2e728@mail.gmail.com> <7563276.post@talk.nabble.com> <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> <7585042.post@talk.nabble.com> Message-ID: <a6d397e30611281055u3956c9f4tb16ce93a50093098@mail.gmail.com> Sorry, zigGIS does not write. That, of course, is the "Holy Grail" of these efforts. -Abe On 11/28/06, Paolo Corti <pcorti at gmail.com> wrote: > > Hello Joshua > and thanks for the workaround, I will test it as ASAP > It is very possibly that we could join to make some modification at ZigGis, > as far as I would like in my spare time to write a connector for PostGis for > ArcMap. > First I was looking at PgArc (I also migrated that at ArcObjects 9), but I > think the best approach is like ZigGis does, without a proxy shapefile, but > directly reading the data. > I have one more question, before going on. > In this mailing list it was claimed, I think just from Abe, that ZigGis can > read and also WRITE PostGis data. Is this correct? Because from what you are > writing seems that ZigGis can just read and not write, and maybe I could be > not interested in continuing using ZigGis. > In fact I have decided to write in my spare time a full Read/Write PostGis > connector for ArcMap. But before doing that I would like to deeply > investigate if ZigGis already does the job. > > Best regards > Paolo Corti > http://www.paolocorti.net > > > joshua.uyehara wrote: > > > > Hey Paolo, > > > > Abe isn't working on it anymore, but I have been occasionally plugging > > away at it myself. The problem with adding the layer in ArcMap is due > > to a minor bug. > > > > ZigGIS pulls the geometry column data from PostGIS in its native binary > > format and passes it to ArcMap. Unfortunately, PostGIS' internal binary > > format is not identical to the expected wkb format, so ArcMap silently > > ignores it and basically treats the table as a feature-less object > > class. > > > > One quick workaround is to create a view of the table that converts the > > geometry column with asbinary(), and then manually add the necessary > > entry to the geometry_columns table. > > > > E.g., > > > > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as > > geom_column, column2, column3, FROM geom_table; > > INSERT INTO geometry_columns (f_table_schema, f_table_name, > > f_geometry_column, coord_dimension, srid, type) VALUES > > ('public', 'geom_table_view', 'geom_column', 2, -1, > > 'MULTIPOLYGON'); > > > > Change schema, table, column names, srid, etc. to match your table, then > > specify the view as the table to be opened with ZigGIS. It's an ugly > > kludge, but I haven't had the time to fix the problem in ZigGIS itself > > yet. > > > > Many of the feature class functionality hasn't been implemented yet, so > > you can't do much besides display the features. I'm planning to add > > features to ZigGIS as I need them for work, but I can't give you any > > timelines on it, as I'm swamped with other stuff at the moment. > > > > Hope that helped, > > Joshua Uyehara > > joshua.uyehara at syngenta.com > > > > -----Original Message----- > > From: postgis-users-bounces at postgis.refractions.net > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > > Paolo Corti > > Sent: Monday, November 27, 2006 6:46 AM > > To: postgis-users at postgis.refractions.net > > Subject: Re: [postgis-users] zigGIS Usage Experiences > > > > > > Hello Abe > > > > you made a great job with your ZigGis! The ArcObjects code is amazing! > > > > maybe you can give me a help > > I compiled your code for using it with ArcGis 9 (i made some little > > modifications at the code to get this) and .NET 2.0 It compiled fine, > > but when I start ArcMap and I add a PostGIS layer, it adds the layer on > > the TOC but nothing is showed/drawed on the map. > > Looks like geometries are not read from the shape column. > > I am wondering if you are still on this project, and maybe you could > > give me some help, or if I am on my own and must deeply > > investigate/debug myself the code in order to find what is not going > > properly > > > > best regards > > Paolo Corti > > GIS Developer > > http://www.paolocorti.net > > > > > > Abe Gillespie wrote: > >> > >> Sorry for the cross post, but the zigGIS list only has 9 subscribers > >> with a ton more downloads than that. > >> > >> I'm curious about any experiences people are having using or even > >> *trying* to use zigGIS. Is it working? Anyone need any help? Any > >> constructive criticism? ... I haven't heard a peep yet. > >> > >> Thanks. > >> -Abe > >> _______________________________________________ > >> postgis-users mailing list > >> postgis-users at postgis.refractions.net > >> http://postgis.refractions.net/mailman/listinfo/postgis-users > >> > >> > > > > -- > > View this message in context: > > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7563276 > > Sent from the PostGIS - User mailing list archive at Nabble.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 > > > > > > -- > View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 > Sent from the PostGIS - User mailing list archive at Nabble.com. > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From pcorti at gmail.com Tue Nov 28 11:01:34 2006 From: pcorti at gmail.com (Paolo Corti) Date: Tue, 28 Nov 2006 11:01:34 -0800 (PST) Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <a6d397e30611281055u3956c9f4tb16ce93a50093098@mail.gmail.com> References: <a6d397e30512071116t36ac22e8sd3cf313e77a2e728@mail.gmail.com> <7563276.post@talk.nabble.com> <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> <7585042.post@talk.nabble.com> <a6d397e30611281055u3956c9f4tb16ce93a50093098@mail.gmail.com> Message-ID: <7585331.post@talk.nabble.com> Yes Abe I have seen your 3ed at support.esri.com no one seemed to help you I am sorry Have you checked out these 3 alternatives at ArcObjects help (under extending arcobjects)? 1) Custom Layers 2) Plug in data sources 3) OGIS compliant OLE DB providers Plug in is not applicable (it is read only), but the other 2 are viable Custom Layers also from .NET I was investigating if also OGIS OLE DB could be developed in .NET (in the Help is written only VC++ realistic for implementation, but maybe this comment is obsolete now) in any case, congratulations for your great job, even if ZigGis do not write ;-) Paolo Abe Gillespie wrote: > > Sorry, zigGIS does not write. That, of course, is the "Holy Grail" of > these efforts. > > -Abe > > On 11/28/06, Paolo Corti <pcorti at gmail.com> wrote: >> >> Hello Joshua >> and thanks for the workaround, I will test it as ASAP >> It is very possibly that we could join to make some modification at >> ZigGis, >> as far as I would like in my spare time to write a connector for PostGis >> for >> ArcMap. >> First I was looking at PgArc (I also migrated that at ArcObjects 9), but >> I >> think the best approach is like ZigGis does, without a proxy shapefile, >> but >> directly reading the data. >> I have one more question, before going on. >> In this mailing list it was claimed, I think just from Abe, that ZigGis >> can >> read and also WRITE PostGis data. Is this correct? Because from what you >> are >> writing seems that ZigGis can just read and not write, and maybe I could >> be >> not interested in continuing using ZigGis. >> In fact I have decided to write in my spare time a full Read/Write >> PostGis >> connector for ArcMap. But before doing that I would like to deeply >> investigate if ZigGis already does the job. >> >> Best regards >> Paolo Corti >> http://www.paolocorti.net >> >> >> joshua.uyehara wrote: >> > >> > Hey Paolo, >> > >> > Abe isn't working on it anymore, but I have been occasionally plugging >> > away at it myself. The problem with adding the layer in ArcMap is due >> > to a minor bug. >> > >> > ZigGIS pulls the geometry column data from PostGIS in its native binary >> > format and passes it to ArcMap. Unfortunately, PostGIS' internal >> binary >> > format is not identical to the expected wkb format, so ArcMap silently >> > ignores it and basically treats the table as a feature-less object >> > class. >> > >> > One quick workaround is to create a view of the table that converts the >> > geometry column with asbinary(), and then manually add the necessary >> > entry to the geometry_columns table. >> > >> > E.g., >> > >> > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as >> > geom_column, column2, column3, FROM geom_table; >> > INSERT INTO geometry_columns (f_table_schema, f_table_name, >> > f_geometry_column, coord_dimension, srid, type) VALUES >> > ('public', 'geom_table_view', 'geom_column', 2, -1, >> > 'MULTIPOLYGON'); >> > >> > Change schema, table, column names, srid, etc. to match your table, >> then >> > specify the view as the table to be opened with ZigGIS. It's an ugly >> > kludge, but I haven't had the time to fix the problem in ZigGIS itself >> > yet. >> > >> > Many of the feature class functionality hasn't been implemented yet, so >> > you can't do much besides display the features. I'm planning to add >> > features to ZigGIS as I need them for work, but I can't give you any >> > timelines on it, as I'm swamped with other stuff at the moment. >> > >> > Hope that helped, >> > Joshua Uyehara >> > joshua.uyehara at syngenta.com >> > >> > -----Original Message----- >> > From: postgis-users-bounces at postgis.refractions.net >> > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> > Paolo Corti >> > Sent: Monday, November 27, 2006 6:46 AM >> > To: postgis-users at postgis.refractions.net >> > Subject: Re: [postgis-users] zigGIS Usage Experiences >> > >> > >> > Hello Abe >> > >> > you made a great job with your ZigGis! The ArcObjects code is amazing! >> > >> > maybe you can give me a help >> > I compiled your code for using it with ArcGis 9 (i made some little >> > modifications at the code to get this) and .NET 2.0 It compiled fine, >> > but when I start ArcMap and I add a PostGIS layer, it adds the layer on >> > the TOC but nothing is showed/drawed on the map. >> > Looks like geometries are not read from the shape column. >> > I am wondering if you are still on this project, and maybe you could >> > give me some help, or if I am on my own and must deeply >> > investigate/debug myself the code in order to find what is not going >> > properly >> > >> > best regards >> > Paolo Corti >> > GIS Developer >> > http://www.paolocorti.net >> > >> > >> > Abe Gillespie wrote: >> >> >> >> Sorry for the cross post, but the zigGIS list only has 9 subscribers >> >> with a ton more downloads than that. >> >> >> >> I'm curious about any experiences people are having using or even >> >> *trying* to use zigGIS. Is it working? Anyone need any help? Any >> >> constructive criticism? ... I haven't heard a peep yet. >> >> >> >> Thanks. >> >> -Abe >> >> _______________________________________________ >> >> postgis-users mailing list >> >> postgis-users at postgis.refractions.net >> >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> >> >> >> > >> > -- >> > View this message in context: >> > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7563276 >> > Sent from the PostGIS - User mailing list archive at Nabble.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 >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 >> Sent from the PostGIS - User mailing list archive at Nabble.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 > > -- View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585331 Sent from the PostGIS - User mailing list archive at Nabble.com. From rindahl at lrcwe.com Tue Nov 28 11:34:12 2006 From: rindahl at lrcwe.com (Bruce Rindahl) Date: Tue, 28 Nov 2006 12:34:12 -0700 Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <7585331.post@talk.nabble.com> Message-ID: <003101c71324$2f0b2b40$1e00a8c0@Bruce> General discussion :) I am using pgArc for my PostGIS/ArcMap connection. It does both read/write with some bugs. I hope to post the changes to 9.x soon on the pgArc site. There is also another effort at: http://datashare.gis.unbc.ca/transhape/ that uses a different approach. I looked at zigGIS and passed only because I don't program in C#. Finally, Would there be any interest in a ArcToolbox version of PostGIS/ArcMap ?? I have done a lot of work on toolboxes and think I could get a proof of concept going pretty soon. Advantages would be Python as a scripting language, the GUI is drag and drop and the tools could be modular (One for read, one for append, one for update, etc). No compiling would be necessary and the scripts could be used in Model Builder. Comments?? Bruce Rindahl -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paolo Corti Sent: Tuesday, November 28, 2006 12:02 PM To: postgis-users at postgis.refractions.net Subject: Re: [postgis-users] RE: zigGIS Usage Experiences Yes Abe I have seen your 3ed at support.esri.com no one seemed to help you I am sorry Have you checked out these 3 alternatives at ArcObjects help (under extending arcobjects)? 1) Custom Layers 2) Plug in data sources 3) OGIS compliant OLE DB providers Plug in is not applicable (it is read only), but the other 2 are viable Custom Layers also from .NET I was investigating if also OGIS OLE DB could be developed in .NET (in the Help is written only VC++ realistic for implementation, but maybe this comment is obsolete now) in any case, congratulations for your great job, even if ZigGis do not write ;-) Paolo Abe Gillespie wrote: > > Sorry, zigGIS does not write. That, of course, is the "Holy Grail" of > these efforts. > > -Abe > > On 11/28/06, Paolo Corti <pcorti at gmail.com> wrote: >> >> Hello Joshua >> and thanks for the workaround, I will test it as ASAP >> It is very possibly that we could join to make some modification at >> ZigGis, >> as far as I would like in my spare time to write a connector for PostGis >> for >> ArcMap. >> First I was looking at PgArc (I also migrated that at ArcObjects 9), but >> I >> think the best approach is like ZigGis does, without a proxy shapefile, >> but >> directly reading the data. >> I have one more question, before going on. >> In this mailing list it was claimed, I think just from Abe, that ZigGis >> can >> read and also WRITE PostGis data. Is this correct? Because from what you >> are >> writing seems that ZigGis can just read and not write, and maybe I could >> be >> not interested in continuing using ZigGis. >> In fact I have decided to write in my spare time a full Read/Write >> PostGis >> connector for ArcMap. But before doing that I would like to deeply >> investigate if ZigGis already does the job. >> >> Best regards >> Paolo Corti >> http://www.paolocorti.net >> >> >> joshua.uyehara wrote: >> > >> > Hey Paolo, >> > >> > Abe isn't working on it anymore, but I have been occasionally plugging >> > away at it myself. The problem with adding the layer in ArcMap is due >> > to a minor bug. >> > >> > ZigGIS pulls the geometry column data from PostGIS in its native binary >> > format and passes it to ArcMap. Unfortunately, PostGIS' internal >> binary >> > format is not identical to the expected wkb format, so ArcMap silently >> > ignores it and basically treats the table as a feature-less object >> > class. >> > >> > One quick workaround is to create a view of the table that converts the >> > geometry column with asbinary(), and then manually add the necessary >> > entry to the geometry_columns table. >> > >> > E.g., >> > >> > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as >> > geom_column, column2, column3, FROM geom_table; >> > INSERT INTO geometry_columns (f_table_schema, f_table_name, >> > f_geometry_column, coord_dimension, srid, type) VALUES >> > ('public', 'geom_table_view', 'geom_column', 2, -1, >> > 'MULTIPOLYGON'); >> > >> > Change schema, table, column names, srid, etc. to match your table, >> then >> > specify the view as the table to be opened with ZigGIS. It's an ugly >> > kludge, but I haven't had the time to fix the problem in ZigGIS itself >> > yet. >> > >> > Many of the feature class functionality hasn't been implemented yet, so >> > you can't do much besides display the features. I'm planning to add >> > features to ZigGIS as I need them for work, but I can't give you any >> > timelines on it, as I'm swamped with other stuff at the moment. >> > >> > Hope that helped, >> > Joshua Uyehara >> > joshua.uyehara at syngenta.com >> > >> > -----Original Message----- >> > From: postgis-users-bounces at postgis.refractions.net >> > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> > Paolo Corti >> > Sent: Monday, November 27, 2006 6:46 AM >> > To: postgis-users at postgis.refractions.net >> > Subject: Re: [postgis-users] zigGIS Usage Experiences >> > >> > >> > Hello Abe >> > >> > you made a great job with your ZigGis! The ArcObjects code is amazing! >> > >> > maybe you can give me a help >> > I compiled your code for using it with ArcGis 9 (i made some little >> > modifications at the code to get this) and .NET 2.0 It compiled fine, >> > but when I start ArcMap and I add a PostGIS layer, it adds the layer on >> > the TOC but nothing is showed/drawed on the map. >> > Looks like geometries are not read from the shape column. >> > I am wondering if you are still on this project, and maybe you could >> > give me some help, or if I am on my own and must deeply >> > investigate/debug myself the code in order to find what is not going >> > properly >> > >> > best regards >> > Paolo Corti >> > GIS Developer >> > http://www.paolocorti.net >> > >> > >> > Abe Gillespie wrote: >> >> >> >> Sorry for the cross post, but the zigGIS list only has 9 subscribers >> >> with a ton more downloads than that. >> >> >> >> I'm curious about any experiences people are having using or even >> >> *trying* to use zigGIS. Is it working? Anyone need any help? Any >> >> constructive criticism? ... I haven't heard a peep yet. >> >> >> >> Thanks. >> >> -Abe >> >> _______________________________________________ >> >> postgis-users mailing list >> >> postgis-users at postgis.refractions.net >> >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> >> >> >> > >> > -- >> > View this message in context: >> > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7563276 >> > Sent from the PostGIS - User mailing list archive at Nabble.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 >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 >> Sent from the PostGIS - User mailing list archive at Nabble.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 > > -- View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585331 Sent from the PostGIS - User mailing list archive at Nabble.com. _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From joshua.uyehara at syngenta.com Tue Nov 28 12:40:55 2006 From: joshua.uyehara at syngenta.com (joshua.uyehara at syngenta.com) Date: Tue, 28 Nov 2006 15:40:55 -0500 Subject: [postgis-users] RE: zigGIS Usage Experiences Message-ID: <FC865F8C89A81F4CB8AC6ED7A033D78D37605D@usarmsxmb02.NAFTA.SYNGENTA.ORG> Of all of the approaches so far, ZigGIS is the conceptually the 'cleanest', as it is going the route of a full feature class adapter implementation (the custom layer approach), but it also requires the greatest amount of work, as you have to eventually implement the functionality exposed by about a dozen interfaces. pgArc is great for single users, but you run into problems when you need concurrent access, or relationships with other tables in your database. The same problems would plague the toolbox approach (which I assume would basically be a front-end to shp2pgsql and pgsql2shp). That's not to say that the pgArc or toolbox approaches aren't worth pursuing. They can probably meet some specific needs much faster than ZigGIS will be able to. Joshua Uyehara joshua.uyehara at syngenta.com Office: +1 808 337 1408 ext 34 Cell: +1 808 346 5185 -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Bruce Rindahl Sent: Tuesday, November 28, 2006 9:34 AM To: 'PostGIS Users Discussion' Cc: 'Shaun Kolomeitz'; 'Tyler Mitchell' Subject: RE: [postgis-users] RE: zigGIS Usage Experiences General discussion :) I am using pgArc for my PostGIS/ArcMap connection. It does both read/write with some bugs. I hope to post the changes to 9.x soon on the pgArc site. There is also another effort at: http://datashare.gis.unbc.ca/transhape/ that uses a different approach. I looked at zigGIS and passed only because I don't program in C#. Finally, Would there be any interest in a ArcToolbox version of PostGIS/ArcMap ?? I have done a lot of work on toolboxes and think I could get a proof of concept going pretty soon. Advantages would be Python as a scripting language, the GUI is drag and drop and the tools could be modular (One for read, one for append, one for update, etc). No compiling would be necessary and the scripts could be used in Model Builder. Comments?? Bruce Rindahl -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paolo Corti Sent: Tuesday, November 28, 2006 12:02 PM To: postgis-users at postgis.refractions.net Subject: Re: [postgis-users] RE: zigGIS Usage Experiences Yes Abe I have seen your 3ed at support.esri.com no one seemed to help you I am sorry Have you checked out these 3 alternatives at ArcObjects help (under extending arcobjects)? 1) Custom Layers 2) Plug in data sources 3) OGIS compliant OLE DB providers Plug in is not applicable (it is read only), but the other 2 are viable Custom Layers also from .NET I was investigating if also OGIS OLE DB could be developed in .NET (in the Help is written only VC++ realistic for implementation, but maybe this comment is obsolete now) in any case, congratulations for your great job, even if ZigGis do not write ;-) Paolo Abe Gillespie wrote: > > Sorry, zigGIS does not write. That, of course, is the "Holy Grail" of > these efforts. > > -Abe > > On 11/28/06, Paolo Corti <pcorti at gmail.com> wrote: >> >> Hello Joshua >> and thanks for the workaround, I will test it as ASAP It is very >> possibly that we could join to make some modification at ZigGis, as >> far as I would like in my spare time to write a connector for PostGis >> for ArcMap. >> First I was looking at PgArc (I also migrated that at ArcObjects 9), >> but I think the best approach is like ZigGis does, without a proxy >> shapefile, but directly reading the data. >> I have one more question, before going on. >> In this mailing list it was claimed, I think just from Abe, that >> ZigGis can read and also WRITE PostGis data. Is this correct? Because >> from what you are writing seems that ZigGis can just read and not >> write, and maybe I could be not interested in continuing using >> ZigGis. >> In fact I have decided to write in my spare time a full Read/Write >> PostGis connector for ArcMap. But before doing that I would like to >> deeply investigate if ZigGis already does the job. >> >> Best regards >> Paolo Corti >> http://www.paolocorti.net >> >> >> joshua.uyehara wrote: >> > >> > Hey Paolo, >> > >> > Abe isn't working on it anymore, but I have been occasionally >> > plugging away at it myself. The problem with adding the layer in >> > ArcMap is due to a minor bug. >> > >> > ZigGIS pulls the geometry column data from PostGIS in its native >> > binary format and passes it to ArcMap. Unfortunately, PostGIS' >> > internal >> binary >> > format is not identical to the expected wkb format, so ArcMap >> > silently ignores it and basically treats the table as a >> > feature-less object class. >> > >> > One quick workaround is to create a view of the table that converts >> > the geometry column with asbinary(), and then manually add the >> > necessary entry to the geometry_columns table. >> > >> > E.g., >> > >> > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as >> > geom_column, column2, column3, FROM geom_table; INSERT INTO >> > geometry_columns (f_table_schema, f_table_name, f_geometry_column, >> > coord_dimension, srid, type) VALUES >> > ('public', 'geom_table_view', 'geom_column', 2, -1, >> > 'MULTIPOLYGON'); >> > >> > Change schema, table, column names, srid, etc. to match your table, >> then >> > specify the view as the table to be opened with ZigGIS. It's an >> > ugly kludge, but I haven't had the time to fix the problem in >> > ZigGIS itself yet. >> > >> > Many of the feature class functionality hasn't been implemented >> > yet, so you can't do much besides display the features. I'm >> > planning to add features to ZigGIS as I need them for work, but I >> > can't give you any timelines on it, as I'm swamped with other stuff at the moment. >> > >> > Hope that helped, >> > Joshua Uyehara >> > joshua.uyehara at syngenta.com >> > >> > -----Original Message----- >> > From: postgis-users-bounces at postgis.refractions.net >> > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> > Paolo Corti >> > Sent: Monday, November 27, 2006 6:46 AM >> > To: postgis-users at postgis.refractions.net >> > Subject: Re: [postgis-users] zigGIS Usage Experiences >> > >> > >> > Hello Abe >> > >> > you made a great job with your ZigGis! The ArcObjects code is amazing! >> > >> > maybe you can give me a help >> > I compiled your code for using it with ArcGis 9 (i made some little >> > modifications at the code to get this) and .NET 2.0 It compiled >> > fine, but when I start ArcMap and I add a PostGIS layer, it adds >> > the layer on the TOC but nothing is showed/drawed on the map. >> > Looks like geometries are not read from the shape column. >> > I am wondering if you are still on this project, and maybe you >> > could give me some help, or if I am on my own and must deeply >> > investigate/debug myself the code in order to find what is not >> > going properly >> > >> > best regards >> > Paolo Corti >> > GIS Developer >> > http://www.paolocorti.net >> > >> > >> > Abe Gillespie wrote: >> >> >> >> Sorry for the cross post, but the zigGIS list only has 9 >> >> subscribers with a ton more downloads than that. >> >> >> >> I'm curious about any experiences people are having using or even >> >> *trying* to use zigGIS. Is it working? Anyone need any help? >> >> Any constructive criticism? ... I haven't heard a peep yet. >> >> >> >> Thanks. >> >> -Abe >> >> _______________________________________________ >> >> postgis-users mailing list >> >> postgis-users at postgis.refractions.net >> >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> >> >> >> > >> > -- >> > View this message in context: >> > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a75632 >> > 76 Sent from the PostGIS - User mailing list archive at Nabble.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 >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 >> Sent from the PostGIS - User mailing list archive at Nabble.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 > > -- View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585331 Sent from the PostGIS - User mailing list archive at Nabble.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 From abe.gillespie at gmail.com Tue Nov 28 12:45:53 2006 From: abe.gillespie at gmail.com (Abe Gillespie) Date: Tue, 28 Nov 2006 15:45:53 -0500 Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <FC865F8C89A81F4CB8AC6ED7A033D78D37605D@usarmsxmb02.NAFTA.SYNGENTA.ORG> References: <FC865F8C89A81F4CB8AC6ED7A033D78D37605D@usarmsxmb02.NAFTA.SYNGENTA.ORG> Message-ID: <a6d397e30611281245y748b7badyde5fee4b08acdbea@mail.gmail.com> I agree. And I even initially went down the route of a custom layer. I think it fell short right about when I started exploring editing capabilities ... IIRC it's not possible with a custom layer. I also explored the OLEDB data source and that had its restrictions somewhere too. -Abe On 11/28/06, joshua.uyehara at syngenta.com <joshua.uyehara at syngenta.com> wrote: > Of all of the approaches so far, ZigGIS is the conceptually the > 'cleanest', as it is going the route of a full feature class adapter > implementation (the custom layer approach), but it also requires the > greatest amount of work, as you have to eventually implement the > functionality exposed by about a dozen interfaces. > > pgArc is great for single users, but you run into problems when you need > concurrent access, or relationships with other tables in your database. > The same problems would plague the toolbox approach (which I assume > would basically be a front-end to shp2pgsql and pgsql2shp). > > That's not to say that the pgArc or toolbox approaches aren't worth > pursuing. They can probably meet some specific needs much faster than > ZigGIS will be able to. > > Joshua Uyehara > joshua.uyehara at syngenta.com > Office: +1 808 337 1408 ext 34 > Cell: +1 808 346 5185 > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Bruce Rindahl > Sent: Tuesday, November 28, 2006 9:34 AM > To: 'PostGIS Users Discussion' > Cc: 'Shaun Kolomeitz'; 'Tyler Mitchell' > Subject: RE: [postgis-users] RE: zigGIS Usage Experiences > > General discussion :) > > I am using pgArc for my PostGIS/ArcMap connection. It does both > read/write with some bugs. I hope to post the changes to 9.x soon on > the pgArc site. > > There is also another effort at: > http://datashare.gis.unbc.ca/transhape/ > that uses a different approach. > > I looked at zigGIS and passed only because I don't program in C#. > > Finally, Would there be any interest in a ArcToolbox version of > PostGIS/ArcMap ?? I have done a lot of work on toolboxes and think I > could get a proof of concept going pretty soon. Advantages would be > Python as a scripting language, the GUI is drag and drop and the tools > could be modular (One for read, one for append, one for update, etc). > No compiling would be necessary and the scripts could be used in Model > Builder. Comments?? > > Bruce Rindahl > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Paolo Corti > Sent: Tuesday, November 28, 2006 12:02 PM > To: postgis-users at postgis.refractions.net > Subject: Re: [postgis-users] RE: zigGIS Usage Experiences > > > Yes Abe > I have seen your 3ed at support.esri.com no one seemed to help you I am > sorry > > Have you checked out these 3 alternatives at ArcObjects help (under > extending arcobjects)? > 1) Custom Layers > 2) Plug in data sources > 3) OGIS compliant OLE DB providers > > Plug in is not applicable (it is read only), but the other 2 are viable > Custom Layers also from .NET I was investigating if also OGIS OLE DB > could be developed in .NET (in the Help is written only VC++ realistic > for implementation, but maybe this comment is obsolete now) > > in any case, > congratulations for your great job, even if ZigGis do not write ;-) > > Paolo > > > > Abe Gillespie wrote: > > > > Sorry, zigGIS does not write. That, of course, is the "Holy Grail" of > > > these efforts. > > > > -Abe > > > > On 11/28/06, Paolo Corti <pcorti at gmail.com> wrote: > >> > >> Hello Joshua > >> and thanks for the workaround, I will test it as ASAP It is very > >> possibly that we could join to make some modification at ZigGis, as > >> far as I would like in my spare time to write a connector for PostGis > > >> for ArcMap. > >> First I was looking at PgArc (I also migrated that at ArcObjects 9), > >> but I think the best approach is like ZigGis does, without a proxy > >> shapefile, but directly reading the data. > >> I have one more question, before going on. > >> In this mailing list it was claimed, I think just from Abe, that > >> ZigGis can read and also WRITE PostGis data. Is this correct? Because > > >> from what you are writing seems that ZigGis can just read and not > >> write, and maybe I could be not interested in continuing using > >> ZigGis. > >> In fact I have decided to write in my spare time a full Read/Write > >> PostGis connector for ArcMap. But before doing that I would like to > >> deeply investigate if ZigGis already does the job. > >> > >> Best regards > >> Paolo Corti > >> http://www.paolocorti.net > >> > >> > >> joshua.uyehara wrote: > >> > > >> > Hey Paolo, > >> > > >> > Abe isn't working on it anymore, but I have been occasionally > >> > plugging away at it myself. The problem with adding the layer in > >> > ArcMap is due to a minor bug. > >> > > >> > ZigGIS pulls the geometry column data from PostGIS in its native > >> > binary format and passes it to ArcMap. Unfortunately, PostGIS' > >> > internal > >> binary > >> > format is not identical to the expected wkb format, so ArcMap > >> > silently ignores it and basically treats the table as a > >> > feature-less object class. > >> > > >> > One quick workaround is to create a view of the table that converts > > >> > the geometry column with asbinary(), and then manually add the > >> > necessary entry to the geometry_columns table. > >> > > >> > E.g., > >> > > >> > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as > >> > geom_column, column2, column3, FROM geom_table; INSERT INTO > >> > geometry_columns (f_table_schema, f_table_name, f_geometry_column, > >> > coord_dimension, srid, type) VALUES > >> > ('public', 'geom_table_view', 'geom_column', 2, -1, > >> > 'MULTIPOLYGON'); > >> > > >> > Change schema, table, column names, srid, etc. to match your table, > >> then > >> > specify the view as the table to be opened with ZigGIS. It's an > >> > ugly kludge, but I haven't had the time to fix the problem in > >> > ZigGIS itself yet. > >> > > >> > Many of the feature class functionality hasn't been implemented > >> > yet, so you can't do much besides display the features. I'm > >> > planning to add features to ZigGIS as I need them for work, but I > >> > can't give you any timelines on it, as I'm swamped with other stuff > at the moment. > >> > > >> > Hope that helped, > >> > Joshua Uyehara > >> > joshua.uyehara at syngenta.com > >> > > >> > -----Original Message----- > >> > From: postgis-users-bounces at postgis.refractions.net > >> > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > > >> > Paolo Corti > >> > Sent: Monday, November 27, 2006 6:46 AM > >> > To: postgis-users at postgis.refractions.net > >> > Subject: Re: [postgis-users] zigGIS Usage Experiences > >> > > >> > > >> > Hello Abe > >> > > >> > you made a great job with your ZigGis! The ArcObjects code is > amazing! > >> > > >> > maybe you can give me a help > >> > I compiled your code for using it with ArcGis 9 (i made some little > > >> > modifications at the code to get this) and .NET 2.0 It compiled > >> > fine, but when I start ArcMap and I add a PostGIS layer, it adds > >> > the layer on the TOC but nothing is showed/drawed on the map. > >> > Looks like geometries are not read from the shape column. > >> > I am wondering if you are still on this project, and maybe you > >> > could give me some help, or if I am on my own and must deeply > >> > investigate/debug myself the code in order to find what is not > >> > going properly > >> > > >> > best regards > >> > Paolo Corti > >> > GIS Developer > >> > http://www.paolocorti.net > >> > > >> > > >> > Abe Gillespie wrote: > >> >> > >> >> Sorry for the cross post, but the zigGIS list only has 9 > >> >> subscribers with a ton more downloads than that. > >> >> > >> >> I'm curious about any experiences people are having using or even > >> >> *trying* to use zigGIS. Is it working? Anyone need any help? > >> >> Any constructive criticism? ... I haven't heard a peep yet. > >> >> > >> >> Thanks. > >> >> -Abe > >> >> _______________________________________________ > >> >> postgis-users mailing list > >> >> postgis-users at postgis.refractions.net > >> >> http://postgis.refractions.net/mailman/listinfo/postgis-users > >> >> > >> >> > >> > > >> > -- > >> > View this message in context: > >> > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a75632 > >> > 76 Sent from the PostGIS - User mailing list archive at Nabble.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 > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 > >> Sent from the PostGIS - User mailing list archive at Nabble.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 > > > > > > -- > View this message in context: > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585331 > Sent from the PostGIS - User mailing list archive at Nabble.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 > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From rindahl at lrcwe.com Tue Nov 28 13:45:41 2006 From: rindahl at lrcwe.com (Bruce Rindahl) Date: Tue, 28 Nov 2006 14:45:41 -0700 Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <a6d397e30611281245y748b7badyde5fee4b08acdbea@mail.gmail.com> Message-ID: <003f01c71336$8f91d790$1e00a8c0@Bruce> But I guess the question is what do you need the connection for? Relationships with other tables can be handled with a view or a SQL string that can be specified with Python. Concurrent editing is something I don't want to do. Even single use editing can be tricky. If you split a polygon what do you do? Delete the old and append the two new ones? Update one and append the other? This is why I think the toolbox approach is interesting. Bruce -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Abe Gillespie Sent: Tuesday, November 28, 2006 1:46 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] RE: zigGIS Usage Experiences I agree. And I even initially went down the route of a custom layer. I think it fell short right about when I started exploring editing capabilities ... IIRC it's not possible with a custom layer. I also explored the OLEDB data source and that had its restrictions somewhere too. -Abe On 11/28/06, joshua.uyehara at syngenta.com <joshua.uyehara at syngenta.com> wrote: > Of all of the approaches so far, ZigGIS is the conceptually the > 'cleanest', as it is going the route of a full feature class adapter > implementation (the custom layer approach), but it also requires the > greatest amount of work, as you have to eventually implement the > functionality exposed by about a dozen interfaces. > > pgArc is great for single users, but you run into problems when you need > concurrent access, or relationships with other tables in your database. > The same problems would plague the toolbox approach (which I assume > would basically be a front-end to shp2pgsql and pgsql2shp). > > That's not to say that the pgArc or toolbox approaches aren't worth > pursuing. They can probably meet some specific needs much faster than > ZigGIS will be able to. > > Joshua Uyehara > joshua.uyehara at syngenta.com > Office: +1 808 337 1408 ext 34 > Cell: +1 808 346 5185 > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Bruce Rindahl > Sent: Tuesday, November 28, 2006 9:34 AM > To: 'PostGIS Users Discussion' > Cc: 'Shaun Kolomeitz'; 'Tyler Mitchell' > Subject: RE: [postgis-users] RE: zigGIS Usage Experiences > > General discussion :) > > I am using pgArc for my PostGIS/ArcMap connection. It does both > read/write with some bugs. I hope to post the changes to 9.x soon on > the pgArc site. > > There is also another effort at: > http://datashare.gis.unbc.ca/transhape/ > that uses a different approach. > > I looked at zigGIS and passed only because I don't program in C#. > > Finally, Would there be any interest in a ArcToolbox version of > PostGIS/ArcMap ?? I have done a lot of work on toolboxes and think I > could get a proof of concept going pretty soon. Advantages would be > Python as a scripting language, the GUI is drag and drop and the tools > could be modular (One for read, one for append, one for update, etc). > No compiling would be necessary and the scripts could be used in Model > Builder. Comments?? > > Bruce Rindahl > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Paolo Corti > Sent: Tuesday, November 28, 2006 12:02 PM > To: postgis-users at postgis.refractions.net > Subject: Re: [postgis-users] RE: zigGIS Usage Experiences > > > Yes Abe > I have seen your 3ed at support.esri.com no one seemed to help you I am > sorry > > Have you checked out these 3 alternatives at ArcObjects help (under > extending arcobjects)? > 1) Custom Layers > 2) Plug in data sources > 3) OGIS compliant OLE DB providers > > Plug in is not applicable (it is read only), but the other 2 are viable > Custom Layers also from .NET I was investigating if also OGIS OLE DB > could be developed in .NET (in the Help is written only VC++ realistic > for implementation, but maybe this comment is obsolete now) > > in any case, > congratulations for your great job, even if ZigGis do not write ;-) > > Paolo > > > > Abe Gillespie wrote: > > > > Sorry, zigGIS does not write. That, of course, is the "Holy Grail" of > > > these efforts. > > > > -Abe > > > > On 11/28/06, Paolo Corti <pcorti at gmail.com> wrote: > >> > >> Hello Joshua > >> and thanks for the workaround, I will test it as ASAP It is very > >> possibly that we could join to make some modification at ZigGis, as > >> far as I would like in my spare time to write a connector for PostGis > > >> for ArcMap. > >> First I was looking at PgArc (I also migrated that at ArcObjects 9), > >> but I think the best approach is like ZigGis does, without a proxy > >> shapefile, but directly reading the data. > >> I have one more question, before going on. > >> In this mailing list it was claimed, I think just from Abe, that > >> ZigGis can read and also WRITE PostGis data. Is this correct? Because > > >> from what you are writing seems that ZigGis can just read and not > >> write, and maybe I could be not interested in continuing using > >> ZigGis. > >> In fact I have decided to write in my spare time a full Read/Write > >> PostGis connector for ArcMap. But before doing that I would like to > >> deeply investigate if ZigGis already does the job. > >> > >> Best regards > >> Paolo Corti > >> http://www.paolocorti.net > >> > >> > >> joshua.uyehara wrote: > >> > > >> > Hey Paolo, > >> > > >> > Abe isn't working on it anymore, but I have been occasionally > >> > plugging away at it myself. The problem with adding the layer in > >> > ArcMap is due to a minor bug. > >> > > >> > ZigGIS pulls the geometry column data from PostGIS in its native > >> > binary format and passes it to ArcMap. Unfortunately, PostGIS' > >> > internal > >> binary > >> > format is not identical to the expected wkb format, so ArcMap > >> > silently ignores it and basically treats the table as a > >> > feature-less object class. > >> > > >> > One quick workaround is to create a view of the table that converts > > >> > the geometry column with asbinary(), and then manually add the > >> > necessary entry to the geometry_columns table. > >> > > >> > E.g., > >> > > >> > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as > >> > geom_column, column2, column3, FROM geom_table; INSERT INTO > >> > geometry_columns (f_table_schema, f_table_name, f_geometry_column, > >> > coord_dimension, srid, type) VALUES > >> > ('public', 'geom_table_view', 'geom_column', 2, -1, > >> > 'MULTIPOLYGON'); > >> > > >> > Change schema, table, column names, srid, etc. to match your table, > >> then > >> > specify the view as the table to be opened with ZigGIS. It's an > >> > ugly kludge, but I haven't had the time to fix the problem in > >> > ZigGIS itself yet. > >> > > >> > Many of the feature class functionality hasn't been implemented > >> > yet, so you can't do much besides display the features. I'm > >> > planning to add features to ZigGIS as I need them for work, but I > >> > can't give you any timelines on it, as I'm swamped with other stuff > at the moment. > >> > > >> > Hope that helped, > >> > Joshua Uyehara > >> > joshua.uyehara at syngenta.com > >> > > >> > -----Original Message----- > >> > From: postgis-users-bounces at postgis.refractions.net > >> > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > > >> > Paolo Corti > >> > Sent: Monday, November 27, 2006 6:46 AM > >> > To: postgis-users at postgis.refractions.net > >> > Subject: Re: [postgis-users] zigGIS Usage Experiences > >> > > >> > > >> > Hello Abe > >> > > >> > you made a great job with your ZigGis! The ArcObjects code is > amazing! > >> > > >> > maybe you can give me a help > >> > I compiled your code for using it with ArcGis 9 (i made some little > > >> > modifications at the code to get this) and .NET 2.0 It compiled > >> > fine, but when I start ArcMap and I add a PostGIS layer, it adds > >> > the layer on the TOC but nothing is showed/drawed on the map. > >> > Looks like geometries are not read from the shape column. > >> > I am wondering if you are still on this project, and maybe you > >> > could give me some help, or if I am on my own and must deeply > >> > investigate/debug myself the code in order to find what is not > >> > going properly > >> > > >> > best regards > >> > Paolo Corti > >> > GIS Developer > >> > http://www.paolocorti.net > >> > > >> > > >> > Abe Gillespie wrote: > >> >> > >> >> Sorry for the cross post, but the zigGIS list only has 9 > >> >> subscribers with a ton more downloads than that. > >> >> > >> >> I'm curious about any experiences people are having using or even > >> >> *trying* to use zigGIS. Is it working? Anyone need any help? > >> >> Any constructive criticism? ... I haven't heard a peep yet. > >> >> > >> >> Thanks. > >> >> -Abe > >> >> _______________________________________________ > >> >> postgis-users mailing list > >> >> postgis-users at postgis.refractions.net > >> >> http://postgis.refractions.net/mailman/listinfo/postgis-users > >> >> > >> >> > >> > > >> > -- > >> > View this message in context: > >> > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a75632 > >> > 76 Sent from the PostGIS - User mailing list archive at Nabble.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 > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 > >> Sent from the PostGIS - User mailing list archive at Nabble.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 > > > > > > -- > View this message in context: > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585331 > Sent from the PostGIS - User mailing list archive at Nabble.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 > _______________________________________________ > 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 pcorti at gmail.com Wed Nov 29 01:09:17 2006 From: pcorti at gmail.com (Paolo Corti) Date: Wed, 29 Nov 2006 01:09:17 -0800 (PST) Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <a6d397e30611281245y748b7badyde5fee4b08acdbea@mail.gmail.com> References: <a6d397e30512071116t36ac22e8sd3cf313e77a2e728@mail.gmail.com> <7563276.post@talk.nabble.com> <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> <7585042.post@talk.nabble.com> <FC865F8C89A81F4CB8AC6ED7A033D78D37605D@usarmsxmb02.NAFTA.SYNGENTA.ORG> <a6d397e30611281245y748b7badyde5fee4b08acdbea@mail.gmail.com> Message-ID: <7595753.post@talk.nabble.com> Yes looks like a limit of custom layers, according to Esri docs If you want to implement edit for custom layer looks like you have to implement custom edit tool, there is a sample with xy file custom layer on ArcObjects on line for implementing custom layer editing tool. Having said that, from the other2 approaches: Plug in data source is read-only, so the only viable solution would remain OGIS OLE DB Providers, but looks like it is developable only with ATL c++ I recall the approaches here: 1) Custom Layers 2) Plug in data sources 3) OGIS compliant OLE DB providers best regards Paolo Corti http://www.paolocorti.net Abe Gillespie wrote: > > I agree. And I even initially went down the route of a custom layer. > I think it fell short right about when I started exploring editing > capabilities ... IIRC it's not possible with a custom layer. I also > explored the OLEDB data source and that had its restrictions somewhere > too. > > -Abe > > On 11/28/06, joshua.uyehara at syngenta.com <joshua.uyehara at syngenta.com> > wrote: >> Of all of the approaches so far, ZigGIS is the conceptually the >> 'cleanest', as it is going the route of a full feature class adapter >> implementation (the custom layer approach), but it also requires the >> greatest amount of work, as you have to eventually implement the >> functionality exposed by about a dozen interfaces. >> >> pgArc is great for single users, but you run into problems when you need >> concurrent access, or relationships with other tables in your database. >> The same problems would plague the toolbox approach (which I assume >> would basically be a front-end to shp2pgsql and pgsql2shp). >> >> That's not to say that the pgArc or toolbox approaches aren't worth >> pursuing. They can probably meet some specific needs much faster than >> ZigGIS will be able to. >> >> Joshua Uyehara >> joshua.uyehara at syngenta.com >> Office: +1 808 337 1408 ext 34 >> Cell: +1 808 346 5185 >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> Bruce Rindahl >> Sent: Tuesday, November 28, 2006 9:34 AM >> To: 'PostGIS Users Discussion' >> Cc: 'Shaun Kolomeitz'; 'Tyler Mitchell' >> Subject: RE: [postgis-users] RE: zigGIS Usage Experiences >> >> General discussion :) >> >> I am using pgArc for my PostGIS/ArcMap connection. It does both >> read/write with some bugs. I hope to post the changes to 9.x soon on >> the pgArc site. >> >> There is also another effort at: >> http://datashare.gis.unbc.ca/transhape/ >> that uses a different approach. >> >> I looked at zigGIS and passed only because I don't program in C#. >> >> Finally, Would there be any interest in a ArcToolbox version of >> PostGIS/ArcMap ?? I have done a lot of work on toolboxes and think I >> could get a proof of concept going pretty soon. Advantages would be >> Python as a scripting language, the GUI is drag and drop and the tools >> could be modular (One for read, one for append, one for update, etc). >> No compiling would be necessary and the scripts could be used in Model >> Builder. Comments?? >> >> Bruce Rindahl >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> Paolo Corti >> Sent: Tuesday, November 28, 2006 12:02 PM >> To: postgis-users at postgis.refractions.net >> Subject: Re: [postgis-users] RE: zigGIS Usage Experiences >> >> >> Yes Abe >> I have seen your 3ed at support.esri.com no one seemed to help you I am >> sorry >> >> Have you checked out these 3 alternatives at ArcObjects help (under >> extending arcobjects)? >> 1) Custom Layers >> 2) Plug in data sources >> 3) OGIS compliant OLE DB providers >> >> Plug in is not applicable (it is read only), but the other 2 are viable >> Custom Layers also from .NET I was investigating if also OGIS OLE DB >> could be developed in .NET (in the Help is written only VC++ realistic >> for implementation, but maybe this comment is obsolete now) >> >> in any case, >> congratulations for your great job, even if ZigGis do not write ;-) >> >> Paolo >> >> >> >> Abe Gillespie wrote: >> > >> > Sorry, zigGIS does not write. That, of course, is the "Holy Grail" of >> >> > these efforts. >> > >> > -Abe >> > >> > On 11/28/06, Paolo Corti <pcorti at gmail.com> wrote: >> >> >> >> Hello Joshua >> >> and thanks for the workaround, I will test it as ASAP It is very >> >> possibly that we could join to make some modification at ZigGis, as >> >> far as I would like in my spare time to write a connector for PostGis >> >> >> for ArcMap. >> >> First I was looking at PgArc (I also migrated that at ArcObjects 9), >> >> but I think the best approach is like ZigGis does, without a proxy >> >> shapefile, but directly reading the data. >> >> I have one more question, before going on. >> >> In this mailing list it was claimed, I think just from Abe, that >> >> ZigGis can read and also WRITE PostGis data. Is this correct? Because >> >> >> from what you are writing seems that ZigGis can just read and not >> >> write, and maybe I could be not interested in continuing using >> >> ZigGis. >> >> In fact I have decided to write in my spare time a full Read/Write >> >> PostGis connector for ArcMap. But before doing that I would like to >> >> deeply investigate if ZigGis already does the job. >> >> >> >> Best regards >> >> Paolo Corti >> >> http://www.paolocorti.net >> >> >> >> >> >> joshua.uyehara wrote: >> >> > >> >> > Hey Paolo, >> >> > >> >> > Abe isn't working on it anymore, but I have been occasionally >> >> > plugging away at it myself. The problem with adding the layer in >> >> > ArcMap is due to a minor bug. >> >> > >> >> > ZigGIS pulls the geometry column data from PostGIS in its native >> >> > binary format and passes it to ArcMap. Unfortunately, PostGIS' >> >> > internal >> >> binary >> >> > format is not identical to the expected wkb format, so ArcMap >> >> > silently ignores it and basically treats the table as a >> >> > feature-less object class. >> >> > >> >> > One quick workaround is to create a view of the table that converts >> >> >> > the geometry column with asbinary(), and then manually add the >> >> > necessary entry to the geometry_columns table. >> >> > >> >> > E.g., >> >> > >> >> > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as >> >> > geom_column, column2, column3, FROM geom_table; INSERT INTO >> >> > geometry_columns (f_table_schema, f_table_name, f_geometry_column, >> >> > coord_dimension, srid, type) VALUES >> >> > ('public', 'geom_table_view', 'geom_column', 2, -1, >> >> > 'MULTIPOLYGON'); >> >> > >> >> > Change schema, table, column names, srid, etc. to match your table, >> >> then >> >> > specify the view as the table to be opened with ZigGIS. It's an >> >> > ugly kludge, but I haven't had the time to fix the problem in >> >> > ZigGIS itself yet. >> >> > >> >> > Many of the feature class functionality hasn't been implemented >> >> > yet, so you can't do much besides display the features. I'm >> >> > planning to add features to ZigGIS as I need them for work, but I >> >> > can't give you any timelines on it, as I'm swamped with other stuff >> at the moment. >> >> > >> >> > Hope that helped, >> >> > Joshua Uyehara >> >> > joshua.uyehara at syngenta.com >> >> > >> >> > -----Original Message----- >> >> > From: postgis-users-bounces at postgis.refractions.net >> >> > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> >> >> > Paolo Corti >> >> > Sent: Monday, November 27, 2006 6:46 AM >> >> > To: postgis-users at postgis.refractions.net >> >> > Subject: Re: [postgis-users] zigGIS Usage Experiences >> >> > >> >> > >> >> > Hello Abe >> >> > >> >> > you made a great job with your ZigGis! The ArcObjects code is >> amazing! >> >> > >> >> > maybe you can give me a help >> >> > I compiled your code for using it with ArcGis 9 (i made some little >> >> >> > modifications at the code to get this) and .NET 2.0 It compiled >> >> > fine, but when I start ArcMap and I add a PostGIS layer, it adds >> >> > the layer on the TOC but nothing is showed/drawed on the map. >> >> > Looks like geometries are not read from the shape column. >> >> > I am wondering if you are still on this project, and maybe you >> >> > could give me some help, or if I am on my own and must deeply >> >> > investigate/debug myself the code in order to find what is not >> >> > going properly >> >> > >> >> > best regards >> >> > Paolo Corti >> >> > GIS Developer >> >> > http://www.paolocorti.net >> >> > >> >> > >> >> > Abe Gillespie wrote: >> >> >> >> >> >> Sorry for the cross post, but the zigGIS list only has 9 >> >> >> subscribers with a ton more downloads than that. >> >> >> >> >> >> I'm curious about any experiences people are having using or even >> >> >> *trying* to use zigGIS. Is it working? Anyone need any help? >> >> >> Any constructive criticism? ... I haven't heard a peep yet. >> >> >> >> >> >> Thanks. >> >> >> -Abe >> >> >> _______________________________________________ >> >> >> postgis-users mailing list >> >> >> postgis-users at postgis.refractions.net >> >> >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> >> >> >> >> >> >> > >> >> > -- >> >> > View this message in context: >> >> > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a75632 >> >> > 76 Sent from the PostGIS - User mailing list archive at Nabble.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 >> >> > >> >> > >> >> >> >> -- >> >> View this message in context: >> >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 >> >> Sent from the PostGIS - User mailing list archive at Nabble.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 >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585331 >> Sent from the PostGIS - User mailing list archive at Nabble.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 >> _______________________________________________ >> 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 > > -- View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7595753 Sent from the PostGIS - User mailing list archive at Nabble.com. From abe.gillespie at gmail.com Wed Nov 29 06:24:50 2006 From: abe.gillespie at gmail.com (Abe Gillespie) Date: Wed, 29 Nov 2006 09:24:50 -0500 Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <7595753.post@talk.nabble.com> References: <a6d397e30512071116t36ac22e8sd3cf313e77a2e728@mail.gmail.com> <7563276.post@talk.nabble.com> <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> <7585042.post@talk.nabble.com> <FC865F8C89A81F4CB8AC6ED7A033D78D37605D@usarmsxmb02.NAFTA.SYNGENTA.ORG> <a6d397e30611281245y748b7badyde5fee4b08acdbea@mail.gmail.com> <7595753.post@talk.nabble.com> Message-ID: <a6d397e30611290624kbae8e4dg7df552365622cee2@mail.gmail.com> Right, and one of my goals was to use the built-in ArcGIS editor since it has all the functionality needed AND is already familiar to the ESRI crowd. As far as the OLE DB provider ... I'm almost positive you can write a provider in C#. The main interop layer that ArcGIS uses is COM and C# speaks it fluently. It's just a matter of using the various .Net COM class attributes. However, there was some reason I discounted the OLE DB provider. Besides ... why not just piggy back on all the work that has already been done? -Abe On 11/29/06, Paolo Corti <pcorti at gmail.com> wrote: > > Yes looks like a limit of custom layers, according to Esri docs > > If you want to implement edit for custom layer looks like you have to > implement custom edit tool, there is a sample with xy file custom layer on > ArcObjects on line for implementing custom layer editing tool. Having said > that, from the other2 approaches: Plug in data source is read-only, so the > only viable solution would remain OGIS OLE DB Providers, but looks like it > is developable only with ATL c++ > > I recall the approaches here: > 1) Custom Layers > 2) Plug in data sources > 3) OGIS compliant OLE DB providers > > best regards > Paolo Corti > http://www.paolocorti.net > > > Abe Gillespie wrote: > > > > I agree. And I even initially went down the route of a custom layer. > > I think it fell short right about when I started exploring editing > > capabilities ... IIRC it's not possible with a custom layer. I also > > explored the OLEDB data source and that had its restrictions somewhere > > too. > > > > -Abe > > > > On 11/28/06, joshua.uyehara at syngenta.com <joshua.uyehara at syngenta.com> > > wrote: > >> Of all of the approaches so far, ZigGIS is the conceptually the > >> 'cleanest', as it is going the route of a full feature class adapter > >> implementation (the custom layer approach), but it also requires the > >> greatest amount of work, as you have to eventually implement the > >> functionality exposed by about a dozen interfaces. > >> > >> pgArc is great for single users, but you run into problems when you need > >> concurrent access, or relationships with other tables in your database. > >> The same problems would plague the toolbox approach (which I assume > >> would basically be a front-end to shp2pgsql and pgsql2shp). > >> > >> That's not to say that the pgArc or toolbox approaches aren't worth > >> pursuing. They can probably meet some specific needs much faster than > >> ZigGIS will be able to. > >> > >> Joshua Uyehara > >> joshua.uyehara at syngenta.com > >> Office: +1 808 337 1408 ext 34 > >> Cell: +1 808 346 5185 > >> > >> -----Original Message----- > >> From: postgis-users-bounces at postgis.refractions.net > >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > >> Bruce Rindahl > >> Sent: Tuesday, November 28, 2006 9:34 AM > >> To: 'PostGIS Users Discussion' > >> Cc: 'Shaun Kolomeitz'; 'Tyler Mitchell' > >> Subject: RE: [postgis-users] RE: zigGIS Usage Experiences > >> > >> General discussion :) > >> > >> I am using pgArc for my PostGIS/ArcMap connection. It does both > >> read/write with some bugs. I hope to post the changes to 9.x soon on > >> the pgArc site. > >> > >> There is also another effort at: > >> http://datashare.gis.unbc.ca/transhape/ > >> that uses a different approach. > >> > >> I looked at zigGIS and passed only because I don't program in C#. > >> > >> Finally, Would there be any interest in a ArcToolbox version of > >> PostGIS/ArcMap ?? I have done a lot of work on toolboxes and think I > >> could get a proof of concept going pretty soon. Advantages would be > >> Python as a scripting language, the GUI is drag and drop and the tools > >> could be modular (One for read, one for append, one for update, etc). > >> No compiling would be necessary and the scripts could be used in Model > >> Builder. Comments?? > >> > >> Bruce Rindahl > >> > >> -----Original Message----- > >> From: postgis-users-bounces at postgis.refractions.net > >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > >> Paolo Corti > >> Sent: Tuesday, November 28, 2006 12:02 PM > >> To: postgis-users at postgis.refractions.net > >> Subject: Re: [postgis-users] RE: zigGIS Usage Experiences > >> > >> > >> Yes Abe > >> I have seen your 3ed at support.esri.com no one seemed to help you I am > >> sorry > >> > >> Have you checked out these 3 alternatives at ArcObjects help (under > >> extending arcobjects)? > >> 1) Custom Layers > >> 2) Plug in data sources > >> 3) OGIS compliant OLE DB providers > >> > >> Plug in is not applicable (it is read only), but the other 2 are viable > >> Custom Layers also from .NET I was investigating if also OGIS OLE DB > >> could be developed in .NET (in the Help is written only VC++ realistic > >> for implementation, but maybe this comment is obsolete now) > >> > >> in any case, > >> congratulations for your great job, even if ZigGis do not write ;-) > >> > >> Paolo > >> > >> > >> > >> Abe Gillespie wrote: > >> > > >> > Sorry, zigGIS does not write. That, of course, is the "Holy Grail" of > >> > >> > these efforts. > >> > > >> > -Abe > >> > > >> > On 11/28/06, Paolo Corti <pcorti at gmail.com> wrote: > >> >> > >> >> Hello Joshua > >> >> and thanks for the workaround, I will test it as ASAP It is very > >> >> possibly that we could join to make some modification at ZigGis, as > >> >> far as I would like in my spare time to write a connector for PostGis > >> > >> >> for ArcMap. > >> >> First I was looking at PgArc (I also migrated that at ArcObjects 9), > >> >> but I think the best approach is like ZigGis does, without a proxy > >> >> shapefile, but directly reading the data. > >> >> I have one more question, before going on. > >> >> In this mailing list it was claimed, I think just from Abe, that > >> >> ZigGis can read and also WRITE PostGis data. Is this correct? Because > >> > >> >> from what you are writing seems that ZigGis can just read and not > >> >> write, and maybe I could be not interested in continuing using > >> >> ZigGis. > >> >> In fact I have decided to write in my spare time a full Read/Write > >> >> PostGis connector for ArcMap. But before doing that I would like to > >> >> deeply investigate if ZigGis already does the job. > >> >> > >> >> Best regards > >> >> Paolo Corti > >> >> http://www.paolocorti.net > >> >> > >> >> > >> >> joshua.uyehara wrote: > >> >> > > >> >> > Hey Paolo, > >> >> > > >> >> > Abe isn't working on it anymore, but I have been occasionally > >> >> > plugging away at it myself. The problem with adding the layer in > >> >> > ArcMap is due to a minor bug. > >> >> > > >> >> > ZigGIS pulls the geometry column data from PostGIS in its native > >> >> > binary format and passes it to ArcMap. Unfortunately, PostGIS' > >> >> > internal > >> >> binary > >> >> > format is not identical to the expected wkb format, so ArcMap > >> >> > silently ignores it and basically treats the table as a > >> >> > feature-less object class. > >> >> > > >> >> > One quick workaround is to create a view of the table that converts > >> > >> >> > the geometry column with asbinary(), and then manually add the > >> >> > necessary entry to the geometry_columns table. > >> >> > > >> >> > E.g., > >> >> > > >> >> > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as > >> >> > geom_column, column2, column3, FROM geom_table; INSERT INTO > >> >> > geometry_columns (f_table_schema, f_table_name, f_geometry_column, > >> >> > coord_dimension, srid, type) VALUES > >> >> > ('public', 'geom_table_view', 'geom_column', 2, -1, > >> >> > 'MULTIPOLYGON'); > >> >> > > >> >> > Change schema, table, column names, srid, etc. to match your table, > >> >> then > >> >> > specify the view as the table to be opened with ZigGIS. It's an > >> >> > ugly kludge, but I haven't had the time to fix the problem in > >> >> > ZigGIS itself yet. > >> >> > > >> >> > Many of the feature class functionality hasn't been implemented > >> >> > yet, so you can't do much besides display the features. I'm > >> >> > planning to add features to ZigGIS as I need them for work, but I > >> >> > can't give you any timelines on it, as I'm swamped with other stuff > >> at the moment. > >> >> > > >> >> > Hope that helped, > >> >> > Joshua Uyehara > >> >> > joshua.uyehara at syngenta.com > >> >> > > >> >> > -----Original Message----- > >> >> > From: postgis-users-bounces at postgis.refractions.net > >> >> > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > >> > >> >> > Paolo Corti > >> >> > Sent: Monday, November 27, 2006 6:46 AM > >> >> > To: postgis-users at postgis.refractions.net > >> >> > Subject: Re: [postgis-users] zigGIS Usage Experiences > >> >> > > >> >> > > >> >> > Hello Abe > >> >> > > >> >> > you made a great job with your ZigGis! The ArcObjects code is > >> amazing! > >> >> > > >> >> > maybe you can give me a help > >> >> > I compiled your code for using it with ArcGis 9 (i made some little > >> > >> >> > modifications at the code to get this) and .NET 2.0 It compiled > >> >> > fine, but when I start ArcMap and I add a PostGIS layer, it adds > >> >> > the layer on the TOC but nothing is showed/drawed on the map. > >> >> > Looks like geometries are not read from the shape column. > >> >> > I am wondering if you are still on this project, and maybe you > >> >> > could give me some help, or if I am on my own and must deeply > >> >> > investigate/debug myself the code in order to find what is not > >> >> > going properly > >> >> > > >> >> > best regards > >> >> > Paolo Corti > >> >> > GIS Developer > >> >> > http://www.paolocorti.net > >> >> > > >> >> > > >> >> > Abe Gillespie wrote: > >> >> >> > >> >> >> Sorry for the cross post, but the zigGIS list only has 9 > >> >> >> subscribers with a ton more downloads than that. > >> >> >> > >> >> >> I'm curious about any experiences people are having using or even > >> >> >> *trying* to use zigGIS. Is it working? Anyone need any help? > >> >> >> Any constructive criticism? ... I haven't heard a peep yet. > >> >> >> > >> >> >> Thanks. > >> >> >> -Abe > >> >> >> _______________________________________________ > >> >> >> postgis-users mailing list > >> >> >> postgis-users at postgis.refractions.net > >> >> >> http://postgis.refractions.net/mailman/listinfo/postgis-users > >> >> >> > >> >> >> > >> >> > > >> >> > -- > >> >> > View this message in context: > >> >> > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a75632 > >> >> > 76 Sent from the PostGIS - User mailing list archive at Nabble.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 > >> >> > > >> >> > > >> >> > >> >> -- > >> >> View this message in context: > >> >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 > >> >> Sent from the PostGIS - User mailing list archive at Nabble.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 > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585331 > >> Sent from the PostGIS - User mailing list archive at Nabble.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 > >> _______________________________________________ > >> 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 > > > > > > -- > View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7595753 > Sent from the PostGIS - User mailing list archive at Nabble.com. > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From pcorti at gmail.com Wed Nov 29 06:58:30 2006 From: pcorti at gmail.com (Paolo Corti) Date: Wed, 29 Nov 2006 06:58:30 -0800 (PST) Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <a6d397e30611290624kbae8e4dg7df552365622cee2@mail.gmail.com> References: <a6d397e30512071116t36ac22e8sd3cf313e77a2e728@mail.gmail.com> <7563276.post@talk.nabble.com> <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> <7585042.post@talk.nabble.com> <FC865F8C89A81F4CB8AC6ED7A033D78D37605D@usarmsxmb02.NAFTA.SYNGENTA.ORG> <a6d397e30611281245y748b7badyde5fee4b08acdbea@mail.gmail.com> <7595753.post@talk.nabble.com> <a6d397e30611290624kbae8e4dg7df552365622cee2@mail.gmail.com> Message-ID: <7600741.post@talk.nabble.com> Hello Abe I would with pleasure continue your work, but if -like it seems- there is not chance from your custom layer implementation to get access to the ArcMap editor tools (I also disagree with writing custom tools) why not to try the other approach with OLE DB that -according to Esri- should let full read/write environment (there is a sample OLE DB OGIS for personal GDB)? Another approach could be to write an hybrid ZigGis/PgArc software: read PostGis with ZigGis approach, and editing data with PgArc approach, in a proxy shapefile fashion. What I want to say i point maybe better with a sample: the user reads data as a custom layer, when he decide to edit data, on the background, a shapefile is created and the user can edit this proxy shape and then check in the edit changes to PostGis when is over. Let me know if you are interested in contributing with me to let ZigGis to also write PostGis data best regards Paolo Abe Gillespie wrote: > > Right, and one of my goals was to use the built-in ArcGIS editor since > it has all the functionality needed AND is already familiar to the > ESRI crowd. > > As far as the OLE DB provider ... I'm almost positive you can write a > provider in C#. The main interop layer that ArcGIS uses is COM and C# > speaks it fluently. It's just a matter of using the various .Net COM > class attributes. However, there was some reason I discounted the OLE > DB provider. > > Besides ... why not just piggy back on all the work that has already been > done? > > -Abe > > On 11/29/06, Paolo Corti <pcorti at gmail.com> wrote: >> >> Yes looks like a limit of custom layers, according to Esri docs >> >> If you want to implement edit for custom layer looks like you have to >> implement custom edit tool, there is a sample with xy file custom layer >> on >> ArcObjects on line for implementing custom layer editing tool. Having >> said >> that, from the other2 approaches: Plug in data source is read-only, so >> the >> only viable solution would remain OGIS OLE DB Providers, but looks like >> it >> is developable only with ATL c++ >> >> I recall the approaches here: >> 1) Custom Layers >> 2) Plug in data sources >> 3) OGIS compliant OLE DB providers >> >> best regards >> Paolo Corti >> http://www.paolocorti.net >> >> >> Abe Gillespie wrote: >> > >> > I agree. And I even initially went down the route of a custom layer. >> > I think it fell short right about when I started exploring editing >> > capabilities ... IIRC it's not possible with a custom layer. I also >> > explored the OLEDB data source and that had its restrictions somewhere >> > too. >> > >> > -Abe >> > >> > On 11/28/06, joshua.uyehara at syngenta.com <joshua.uyehara at syngenta.com> >> > wrote: >> >> Of all of the approaches so far, ZigGIS is the conceptually the >> >> 'cleanest', as it is going the route of a full feature class adapter >> >> implementation (the custom layer approach), but it also requires the >> >> greatest amount of work, as you have to eventually implement the >> >> functionality exposed by about a dozen interfaces. >> >> >> >> pgArc is great for single users, but you run into problems when you >> need >> >> concurrent access, or relationships with other tables in your >> database. >> >> The same problems would plague the toolbox approach (which I assume >> >> would basically be a front-end to shp2pgsql and pgsql2shp). >> >> >> >> That's not to say that the pgArc or toolbox approaches aren't worth >> >> pursuing. They can probably meet some specific needs much faster than >> >> ZigGIS will be able to. >> >> >> >> Joshua Uyehara >> >> joshua.uyehara at syngenta.com >> >> Office: +1 808 337 1408 ext 34 >> >> Cell: +1 808 346 5185 >> >> >> >> -----Original Message----- >> >> From: postgis-users-bounces at postgis.refractions.net >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> >> Bruce Rindahl >> >> Sent: Tuesday, November 28, 2006 9:34 AM >> >> To: 'PostGIS Users Discussion' >> >> Cc: 'Shaun Kolomeitz'; 'Tyler Mitchell' >> >> Subject: RE: [postgis-users] RE: zigGIS Usage Experiences >> >> >> >> General discussion :) >> >> >> >> I am using pgArc for my PostGIS/ArcMap connection. It does both >> >> read/write with some bugs. I hope to post the changes to 9.x soon on >> >> the pgArc site. >> >> >> >> There is also another effort at: >> >> http://datashare.gis.unbc.ca/transhape/ >> >> that uses a different approach. >> >> >> >> I looked at zigGIS and passed only because I don't program in C#. >> >> >> >> Finally, Would there be any interest in a ArcToolbox version of >> >> PostGIS/ArcMap ?? I have done a lot of work on toolboxes and think I >> >> could get a proof of concept going pretty soon. Advantages would be >> >> Python as a scripting language, the GUI is drag and drop and the tools >> >> could be modular (One for read, one for append, one for update, etc). >> >> No compiling would be necessary and the scripts could be used in Model >> >> Builder. Comments?? >> >> >> >> Bruce Rindahl >> >> >> >> -----Original Message----- >> >> From: postgis-users-bounces at postgis.refractions.net >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> >> Paolo Corti >> >> Sent: Tuesday, November 28, 2006 12:02 PM >> >> To: postgis-users at postgis.refractions.net >> >> Subject: Re: [postgis-users] RE: zigGIS Usage Experiences >> >> >> >> >> >> Yes Abe >> >> I have seen your 3ed at support.esri.com no one seemed to help you I >> am >> >> sorry >> >> >> >> Have you checked out these 3 alternatives at ArcObjects help (under >> >> extending arcobjects)? >> >> 1) Custom Layers >> >> 2) Plug in data sources >> >> 3) OGIS compliant OLE DB providers >> >> >> >> Plug in is not applicable (it is read only), but the other 2 are >> viable >> >> Custom Layers also from .NET I was investigating if also OGIS OLE DB >> >> could be developed in .NET (in the Help is written only VC++ realistic >> >> for implementation, but maybe this comment is obsolete now) >> >> >> >> in any case, >> >> congratulations for your great job, even if ZigGis do not write ;-) >> >> >> >> Paolo >> >> >> >> >> >> >> >> Abe Gillespie wrote: >> >> > >> >> > Sorry, zigGIS does not write. That, of course, is the "Holy Grail" >> of >> >> >> >> > these efforts. >> >> > >> >> > -Abe >> >> > >> >> > On 11/28/06, Paolo Corti <pcorti at gmail.com> wrote: >> >> >> >> >> >> Hello Joshua >> >> >> and thanks for the workaround, I will test it as ASAP It is very >> >> >> possibly that we could join to make some modification at ZigGis, as >> >> >> far as I would like in my spare time to write a connector for >> PostGis >> >> >> >> >> for ArcMap. >> >> >> First I was looking at PgArc (I also migrated that at ArcObjects >> 9), >> >> >> but I think the best approach is like ZigGis does, without a proxy >> >> >> shapefile, but directly reading the data. >> >> >> I have one more question, before going on. >> >> >> In this mailing list it was claimed, I think just from Abe, that >> >> >> ZigGis can read and also WRITE PostGis data. Is this correct? >> Because >> >> >> >> >> from what you are writing seems that ZigGis can just read and not >> >> >> write, and maybe I could be not interested in continuing using >> >> >> ZigGis. >> >> >> In fact I have decided to write in my spare time a full Read/Write >> >> >> PostGis connector for ArcMap. But before doing that I would like to >> >> >> deeply investigate if ZigGis already does the job. >> >> >> >> >> >> Best regards >> >> >> Paolo Corti >> >> >> http://www.paolocorti.net >> >> >> >> >> >> >> >> >> joshua.uyehara wrote: >> >> >> > >> >> >> > Hey Paolo, >> >> >> > >> >> >> > Abe isn't working on it anymore, but I have been occasionally >> >> >> > plugging away at it myself. The problem with adding the layer in >> >> >> > ArcMap is due to a minor bug. >> >> >> > >> >> >> > ZigGIS pulls the geometry column data from PostGIS in its native >> >> >> > binary format and passes it to ArcMap. Unfortunately, PostGIS' >> >> >> > internal >> >> >> binary >> >> >> > format is not identical to the expected wkb format, so ArcMap >> >> >> > silently ignores it and basically treats the table as a >> >> >> > feature-less object class. >> >> >> > >> >> >> > One quick workaround is to create a view of the table that >> converts >> >> >> >> >> > the geometry column with asbinary(), and then manually add the >> >> >> > necessary entry to the geometry_columns table. >> >> >> > >> >> >> > E.g., >> >> >> > >> >> >> > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as >> >> >> > geom_column, column2, column3, FROM geom_table; INSERT INTO >> >> >> > geometry_columns (f_table_schema, f_table_name, >> f_geometry_column, >> >> >> > coord_dimension, srid, type) VALUES >> >> >> > ('public', 'geom_table_view', 'geom_column', 2, -1, >> >> >> > 'MULTIPOLYGON'); >> >> >> > >> >> >> > Change schema, table, column names, srid, etc. to match your >> table, >> >> >> then >> >> >> > specify the view as the table to be opened with ZigGIS. It's an >> >> >> > ugly kludge, but I haven't had the time to fix the problem in >> >> >> > ZigGIS itself yet. >> >> >> > >> >> >> > Many of the feature class functionality hasn't been implemented >> >> >> > yet, so you can't do much besides display the features. I'm >> >> >> > planning to add features to ZigGIS as I need them for work, but I >> >> >> > can't give you any timelines on it, as I'm swamped with other >> stuff >> >> at the moment. >> >> >> > >> >> >> > Hope that helped, >> >> >> > Joshua Uyehara >> >> >> > joshua.uyehara at syngenta.com >> >> >> > >> >> >> > -----Original Message----- >> >> >> > From: postgis-users-bounces at postgis.refractions.net >> >> >> > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf >> Of >> >> >> >> >> > Paolo Corti >> >> >> > Sent: Monday, November 27, 2006 6:46 AM >> >> >> > To: postgis-users at postgis.refractions.net >> >> >> > Subject: Re: [postgis-users] zigGIS Usage Experiences >> >> >> > >> >> >> > >> >> >> > Hello Abe >> >> >> > >> >> >> > you made a great job with your ZigGis! The ArcObjects code is >> >> amazing! >> >> >> > >> >> >> > maybe you can give me a help >> >> >> > I compiled your code for using it with ArcGis 9 (i made some >> little >> >> >> >> >> > modifications at the code to get this) and .NET 2.0 It compiled >> >> >> > fine, but when I start ArcMap and I add a PostGIS layer, it adds >> >> >> > the layer on the TOC but nothing is showed/drawed on the map. >> >> >> > Looks like geometries are not read from the shape column. >> >> >> > I am wondering if you are still on this project, and maybe you >> >> >> > could give me some help, or if I am on my own and must deeply >> >> >> > investigate/debug myself the code in order to find what is not >> >> >> > going properly >> >> >> > >> >> >> > best regards >> >> >> > Paolo Corti >> >> >> > GIS Developer >> >> >> > http://www.paolocorti.net >> >> >> > >> >> >> > >> >> >> > Abe Gillespie wrote: >> >> >> >> >> >> >> >> Sorry for the cross post, but the zigGIS list only has 9 >> >> >> >> subscribers with a ton more downloads than that. >> >> >> >> >> >> >> >> I'm curious about any experiences people are having using or >> even >> >> >> >> *trying* to use zigGIS. Is it working? Anyone need any help? >> >> >> >> Any constructive criticism? ... I haven't heard a peep yet. >> >> >> >> >> >> >> >> Thanks. >> >> >> >> -Abe >> >> >> >> _______________________________________________ >> >> >> >> postgis-users mailing list >> >> >> >> postgis-users at postgis.refractions.net >> >> >> >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> >> >> >> >> >> >> >> >> >> > >> >> >> > -- >> >> >> > View this message in context: >> >> >> > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a75632 >> >> >> > 76 Sent from the PostGIS - User mailing list archive at >> Nabble.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 >> >> >> > >> >> >> > >> >> >> >> >> >> -- >> >> >> View this message in context: >> >> >> >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 >> >> >> Sent from the PostGIS - User mailing list archive at Nabble.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 >> >> > >> >> > >> >> >> >> -- >> >> View this message in context: >> >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585331 >> >> Sent from the PostGIS - User mailing list archive at Nabble.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 >> >> _______________________________________________ >> >> 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 >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7595753 >> Sent from the PostGIS - User mailing list archive at Nabble.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 > > -- View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7600741 Sent from the PostGIS - User mailing list archive at Nabble.com. From abe.gillespie at gmail.com Wed Nov 29 07:11:05 2006 From: abe.gillespie at gmail.com (Abe Gillespie) Date: Wed, 29 Nov 2006 10:11:05 -0500 Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <7600741.post@talk.nabble.com> References: <a6d397e30512071116t36ac22e8sd3cf313e77a2e728@mail.gmail.com> <7563276.post@talk.nabble.com> <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> <7585042.post@talk.nabble.com> <FC865F8C89A81F4CB8AC6ED7A033D78D37605D@usarmsxmb02.NAFTA.SYNGENTA.ORG> <a6d397e30611281245y748b7badyde5fee4b08acdbea@mail.gmail.com> <7595753.post@talk.nabble.com> <a6d397e30611290624kbae8e4dg7df552365622cee2@mail.gmail.com> <7600741.post@talk.nabble.com> Message-ID: <a6d397e30611290711s70a2f437j92dc7279e35f510b@mail.gmail.com> zigGIS in fact is not a custom layer. It's an entirely new FeatureClass with it's on FeatureWorkspace and all the other classes necessary to do this. This was done so that I COULD allow for editing. For whatever reason, though, ArcGIS always complains when I start an edit sessions on the PostGisWorkspace. I spent probably a month and a half trying to find what exactly it was that ArcGIS was looking for to consider my PostGisWorkspace as editable. You might even find an EDN question I posted about it and it garnered no useful feedback. Because of that problem, indeed, my intention was to do a sorta hybrid that you mention. The user would initiate a check-out of the shapes about to be edited. Those would quickly be exported as a true shapefile, shipped across the network, and stored to a temp location on the editor's machine. Once the edits were done, the shapefile would be shipped back across the network and imported in an intelligent way. The nice thing about this approach is the editing is occurring on a native shapefile with, obviously, native support. But I came on hard times and had to get a full time job and drop my consulting business. It sucks, but that's life. I would be happier than a clam if I could get zigGIS work funded! -Abe On 11/29/06, Paolo Corti <pcorti at gmail.com> wrote: > > Hello Abe > I would with pleasure continue your work, but if -like it seems- there is > not chance from your custom layer implementation to get access to the ArcMap > editor tools (I also disagree with writing custom tools) why not to try the > other approach with OLE DB that -according to Esri- should let full > read/write environment (there is a sample OLE DB OGIS for personal GDB)? > Another approach could be to write an hybrid ZigGis/PgArc software: read > PostGis with ZigGis approach, and editing data with PgArc approach, in a > proxy shapefile fashion. > What I want to say i point maybe better with a sample: the user reads data > as a custom layer, when he decide to edit data, on the background, a > shapefile is created and the user can edit this proxy shape and then check > in the edit changes to PostGis when is over. > Let me know if you are interested in contributing with me to let ZigGis to > also write PostGis data > best regards > Paolo > > > Abe Gillespie wrote: > > > > Right, and one of my goals was to use the built-in ArcGIS editor since > > it has all the functionality needed AND is already familiar to the > > ESRI crowd. > > > > As far as the OLE DB provider ... I'm almost positive you can write a > > provider in C#. The main interop layer that ArcGIS uses is COM and C# > > speaks it fluently. It's just a matter of using the various .Net COM > > class attributes. However, there was some reason I discounted the OLE > > DB provider. > > > > Besides ... why not just piggy back on all the work that has already been > > done? > > > > -Abe > > > > On 11/29/06, Paolo Corti <pcorti at gmail.com> wrote: > >> > >> Yes looks like a limit of custom layers, according to Esri docs > >> > >> If you want to implement edit for custom layer looks like you have to > >> implement custom edit tool, there is a sample with xy file custom layer > >> on > >> ArcObjects on line for implementing custom layer editing tool. Having > >> said > >> that, from the other2 approaches: Plug in data source is read-only, so > >> the > >> only viable solution would remain OGIS OLE DB Providers, but looks like > >> it > >> is developable only with ATL c++ > >> > >> I recall the approaches here: > >> 1) Custom Layers > >> 2) Plug in data sources > >> 3) OGIS compliant OLE DB providers > >> > >> best regards > >> Paolo Corti > >> http://www.paolocorti.net > >> > >> > >> Abe Gillespie wrote: > >> > > >> > I agree. And I even initially went down the route of a custom layer. > >> > I think it fell short right about when I started exploring editing > >> > capabilities ... IIRC it's not possible with a custom layer. I also > >> > explored the OLEDB data source and that had its restrictions somewhere > >> > too. > >> > > >> > -Abe > >> > > >> > On 11/28/06, joshua.uyehara at syngenta.com <joshua.uyehara at syngenta.com> > >> > wrote: > >> >> Of all of the approaches so far, ZigGIS is the conceptually the > >> >> 'cleanest', as it is going the route of a full feature class adapter > >> >> implementation (the custom layer approach), but it also requires the > >> >> greatest amount of work, as you have to eventually implement the > >> >> functionality exposed by about a dozen interfaces. > >> >> > >> >> pgArc is great for single users, but you run into problems when you > >> need > >> >> concurrent access, or relationships with other tables in your > >> database. > >> >> The same problems would plague the toolbox approach (which I assume > >> >> would basically be a front-end to shp2pgsql and pgsql2shp). > >> >> > >> >> That's not to say that the pgArc or toolbox approaches aren't worth > >> >> pursuing. They can probably meet some specific needs much faster than > >> >> ZigGIS will be able to. > >> >> > >> >> Joshua Uyehara > >> >> joshua.uyehara at syngenta.com > >> >> Office: +1 808 337 1408 ext 34 > >> >> Cell: +1 808 346 5185 > >> >> > >> >> -----Original Message----- > >> >> From: postgis-users-bounces at postgis.refractions.net > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > >> >> Bruce Rindahl > >> >> Sent: Tuesday, November 28, 2006 9:34 AM > >> >> To: 'PostGIS Users Discussion' > >> >> Cc: 'Shaun Kolomeitz'; 'Tyler Mitchell' > >> >> Subject: RE: [postgis-users] RE: zigGIS Usage Experiences > >> >> > >> >> General discussion :) > >> >> > >> >> I am using pgArc for my PostGIS/ArcMap connection. It does both > >> >> read/write with some bugs. I hope to post the changes to 9.x soon on > >> >> the pgArc site. > >> >> > >> >> There is also another effort at: > >> >> http://datashare.gis.unbc.ca/transhape/ > >> >> that uses a different approach. > >> >> > >> >> I looked at zigGIS and passed only because I don't program in C#. > >> >> > >> >> Finally, Would there be any interest in a ArcToolbox version of > >> >> PostGIS/ArcMap ?? I have done a lot of work on toolboxes and think I > >> >> could get a proof of concept going pretty soon. Advantages would be > >> >> Python as a scripting language, the GUI is drag and drop and the tools > >> >> could be modular (One for read, one for append, one for update, etc). > >> >> No compiling would be necessary and the scripts could be used in Model > >> >> Builder. Comments?? > >> >> > >> >> Bruce Rindahl > >> >> > >> >> -----Original Message----- > >> >> From: postgis-users-bounces at postgis.refractions.net > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > >> >> Paolo Corti > >> >> Sent: Tuesday, November 28, 2006 12:02 PM > >> >> To: postgis-users at postgis.refractions.net > >> >> Subject: Re: [postgis-users] RE: zigGIS Usage Experiences > >> >> > >> >> > >> >> Yes Abe > >> >> I have seen your 3ed at support.esri.com no one seemed to help you I > >> am > >> >> sorry > >> >> > >> >> Have you checked out these 3 alternatives at ArcObjects help (under > >> >> extending arcobjects)? > >> >> 1) Custom Layers > >> >> 2) Plug in data sources > >> >> 3) OGIS compliant OLE DB providers > >> >> > >> >> Plug in is not applicable (it is read only), but the other 2 are > >> viable > >> >> Custom Layers also from .NET I was investigating if also OGIS OLE DB > >> >> could be developed in .NET (in the Help is written only VC++ realistic > >> >> for implementation, but maybe this comment is obsolete now) > >> >> > >> >> in any case, > >> >> congratulations for your great job, even if ZigGis do not write ;-) > >> >> > >> >> Paolo > >> >> > >> >> > >> >> > >> >> Abe Gillespie wrote: > >> >> > > >> >> > Sorry, zigGIS does not write. That, of course, is the "Holy Grail" > >> of > >> >> > >> >> > these efforts. > >> >> > > >> >> > -Abe > >> >> > > >> >> > On 11/28/06, Paolo Corti <pcorti at gmail.com> wrote: > >> >> >> > >> >> >> Hello Joshua > >> >> >> and thanks for the workaround, I will test it as ASAP It is very > >> >> >> possibly that we could join to make some modification at ZigGis, as > >> >> >> far as I would like in my spare time to write a connector for > >> PostGis > >> >> > >> >> >> for ArcMap. > >> >> >> First I was looking at PgArc (I also migrated that at ArcObjects > >> 9), > >> >> >> but I think the best approach is like ZigGis does, without a proxy > >> >> >> shapefile, but directly reading the data. > >> >> >> I have one more question, before going on. > >> >> >> In this mailing list it was claimed, I think just from Abe, that > >> >> >> ZigGis can read and also WRITE PostGis data. Is this correct? > >> Because > >> >> > >> >> >> from what you are writing seems that ZigGis can just read and not > >> >> >> write, and maybe I could be not interested in continuing using > >> >> >> ZigGis. > >> >> >> In fact I have decided to write in my spare time a full Read/Write > >> >> >> PostGis connector for ArcMap. But before doing that I would like to > >> >> >> deeply investigate if ZigGis already does the job. > >> >> >> > >> >> >> Best regards > >> >> >> Paolo Corti > >> >> >> http://www.paolocorti.net > >> >> >> > >> >> >> > >> >> >> joshua.uyehara wrote: > >> >> >> > > >> >> >> > Hey Paolo, > >> >> >> > > >> >> >> > Abe isn't working on it anymore, but I have been occasionally > >> >> >> > plugging away at it myself. The problem with adding the layer in > >> >> >> > ArcMap is due to a minor bug. > >> >> >> > > >> >> >> > ZigGIS pulls the geometry column data from PostGIS in its native > >> >> >> > binary format and passes it to ArcMap. Unfortunately, PostGIS' > >> >> >> > internal > >> >> >> binary > >> >> >> > format is not identical to the expected wkb format, so ArcMap > >> >> >> > silently ignores it and basically treats the table as a > >> >> >> > feature-less object class. > >> >> >> > > >> >> >> > One quick workaround is to create a view of the table that > >> converts > >> >> > >> >> >> > the geometry column with asbinary(), and then manually add the > >> >> >> > necessary entry to the geometry_columns table. > >> >> >> > > >> >> >> > E.g., > >> >> >> > > >> >> >> > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as > >> >> >> > geom_column, column2, column3, FROM geom_table; INSERT INTO > >> >> >> > geometry_columns (f_table_schema, f_table_name, > >> f_geometry_column, > >> >> >> > coord_dimension, srid, type) VALUES > >> >> >> > ('public', 'geom_table_view', 'geom_column', 2, -1, > >> >> >> > 'MULTIPOLYGON'); > >> >> >> > > >> >> >> > Change schema, table, column names, srid, etc. to match your > >> table, > >> >> >> then > >> >> >> > specify the view as the table to be opened with ZigGIS. It's an > >> >> >> > ugly kludge, but I haven't had the time to fix the problem in > >> >> >> > ZigGIS itself yet. > >> >> >> > > >> >> >> > Many of the feature class functionality hasn't been implemented > >> >> >> > yet, so you can't do much besides display the features. I'm > >> >> >> > planning to add features to ZigGIS as I need them for work, but I > >> >> >> > can't give you any timelines on it, as I'm swamped with other > >> stuff > >> >> at the moment. > >> >> >> > > >> >> >> > Hope that helped, > >> >> >> > Joshua Uyehara > >> >> >> > joshua.uyehara at syngenta.com > >> >> >> > > >> >> >> > -----Original Message----- > >> >> >> > From: postgis-users-bounces at postgis.refractions.net > >> >> >> > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf > >> Of > >> >> > >> >> >> > Paolo Corti > >> >> >> > Sent: Monday, November 27, 2006 6:46 AM > >> >> >> > To: postgis-users at postgis.refractions.net > >> >> >> > Subject: Re: [postgis-users] zigGIS Usage Experiences > >> >> >> > > >> >> >> > > >> >> >> > Hello Abe > >> >> >> > > >> >> >> > you made a great job with your ZigGis! The ArcObjects code is > >> >> amazing! > >> >> >> > > >> >> >> > maybe you can give me a help > >> >> >> > I compiled your code for using it with ArcGis 9 (i made some > >> little > >> >> > >> >> >> > modifications at the code to get this) and .NET 2.0 It compiled > >> >> >> > fine, but when I start ArcMap and I add a PostGIS layer, it adds > >> >> >> > the layer on the TOC but nothing is showed/drawed on the map. > >> >> >> > Looks like geometries are not read from the shape column. > >> >> >> > I am wondering if you are still on this project, and maybe you > >> >> >> > could give me some help, or if I am on my own and must deeply > >> >> >> > investigate/debug myself the code in order to find what is not > >> >> >> > going properly > >> >> >> > > >> >> >> > best regards > >> >> >> > Paolo Corti > >> >> >> > GIS Developer > >> >> >> > http://www.paolocorti.net > >> >> >> > > >> >> >> > > >> >> >> > Abe Gillespie wrote: > >> >> >> >> > >> >> >> >> Sorry for the cross post, but the zigGIS list only has 9 > >> >> >> >> subscribers with a ton more downloads than that. > >> >> >> >> > >> >> >> >> I'm curious about any experiences people are having using or > >> even > >> >> >> >> *trying* to use zigGIS. Is it working? Anyone need any help? > >> >> >> >> Any constructive criticism? ... I haven't heard a peep yet. > >> >> >> >> > >> >> >> >> Thanks. > >> >> >> >> -Abe > >> >> >> >> _______________________________________________ > >> >> >> >> postgis-users mailing list > >> >> >> >> postgis-users at postgis.refractions.net > >> >> >> >> http://postgis.refractions.net/mailman/listinfo/postgis-users > >> >> >> >> > >> >> >> >> > >> >> >> > > >> >> >> > -- > >> >> >> > View this message in context: > >> >> >> > > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a75632 > >> >> >> > 76 Sent from the PostGIS - User mailing list archive at > >> Nabble.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 > >> >> >> > > >> >> >> > > >> >> >> > >> >> >> -- > >> >> >> View this message in context: > >> >> >> > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 > >> >> >> Sent from the PostGIS - User mailing list archive at Nabble.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 > >> >> > > >> >> > > >> >> > >> >> -- > >> >> View this message in context: > >> >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585331 > >> >> Sent from the PostGIS - User mailing list archive at Nabble.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 > >> >> _______________________________________________ > >> >> 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 > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7595753 > >> Sent from the PostGIS - User mailing list archive at Nabble.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 > > > > > > -- > View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7600741 > Sent from the PostGIS - User mailing list archive at Nabble.com. > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From rindahl at lrcwe.com Wed Nov 29 08:46:02 2006 From: rindahl at lrcwe.com (Bruce Rindahl) Date: Wed, 29 Nov 2006 09:46:02 -0700 Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <a6d397e30611290711s70a2f437j92dc7279e35f510b@mail.gmail.com> Message-ID: <001801c713d5$db62de40$1e00a8c0@Bruce> I would also be interested in testing /helping on this. I found the section on creating an OLE DB OGIS connection on ESRI's web site: http://edndoc.esri.com/arcobjects/9.1/ExtendingArcObjects/Ch07/OGISOleDbProv ider.htm I can't download the code - the link is broken. I can connect to Postgres/PostGIS and view the non-spatial tables. If an OLE DB connection could be available to at least read the data this would be a great start. Edits could then be done a suggested below - move to a shapefile then some kind of interface or toolbox to post the edits. Bruce -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Abe Gillespie Sent: Wednesday, November 29, 2006 8:11 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] RE: zigGIS Usage Experiences zigGIS in fact is not a custom layer. It's an entirely new FeatureClass with it's on FeatureWorkspace and all the other classes necessary to do this. This was done so that I COULD allow for editing. For whatever reason, though, ArcGIS always complains when I start an edit sessions on the PostGisWorkspace. I spent probably a month and a half trying to find what exactly it was that ArcGIS was looking for to consider my PostGisWorkspace as editable. You might even find an EDN question I posted about it and it garnered no useful feedback. Because of that problem, indeed, my intention was to do a sorta hybrid that you mention. The user would initiate a check-out of the shapes about to be edited. Those would quickly be exported as a true shapefile, shipped across the network, and stored to a temp location on the editor's machine. Once the edits were done, the shapefile would be shipped back across the network and imported in an intelligent way. The nice thing about this approach is the editing is occurring on a native shapefile with, obviously, native support. But I came on hard times and had to get a full time job and drop my consulting business. It sucks, but that's life. I would be happier than a clam if I could get zigGIS work funded! -Abe On 11/29/06, Paolo Corti <pcorti at gmail.com> wrote: > > Hello Abe > I would with pleasure continue your work, but if -like it seems- there is > not chance from your custom layer implementation to get access to the ArcMap > editor tools (I also disagree with writing custom tools) why not to try the > other approach with OLE DB that -according to Esri- should let full > read/write environment (there is a sample OLE DB OGIS for personal GDB)? > Another approach could be to write an hybrid ZigGis/PgArc software: read > PostGis with ZigGis approach, and editing data with PgArc approach, in a > proxy shapefile fashion. > What I want to say i point maybe better with a sample: the user reads data > as a custom layer, when he decide to edit data, on the background, a > shapefile is created and the user can edit this proxy shape and then check > in the edit changes to PostGis when is over. > Let me know if you are interested in contributing with me to let ZigGis to > also write PostGis data > best regards > Paolo > > > Abe Gillespie wrote: > > > > Right, and one of my goals was to use the built-in ArcGIS editor since > > it has all the functionality needed AND is already familiar to the > > ESRI crowd. > > > > As far as the OLE DB provider ... I'm almost positive you can write a > > provider in C#. The main interop layer that ArcGIS uses is COM and C# > > speaks it fluently. It's just a matter of using the various .Net COM > > class attributes. However, there was some reason I discounted the OLE > > DB provider. > > > > Besides ... why not just piggy back on all the work that has already been > > done? > > > > -Abe > > > > On 11/29/06, Paolo Corti <pcorti at gmail.com> wrote: > >> > >> Yes looks like a limit of custom layers, according to Esri docs > >> > >> If you want to implement edit for custom layer looks like you have to > >> implement custom edit tool, there is a sample with xy file custom layer > >> on > >> ArcObjects on line for implementing custom layer editing tool. Having > >> said > >> that, from the other2 approaches: Plug in data source is read-only, so > >> the > >> only viable solution would remain OGIS OLE DB Providers, but looks like > >> it > >> is developable only with ATL c++ > >> > >> I recall the approaches here: > >> 1) Custom Layers > >> 2) Plug in data sources > >> 3) OGIS compliant OLE DB providers > >> > >> best regards > >> Paolo Corti > >> http://www.paolocorti.net > >> > >> > >> Abe Gillespie wrote: > >> > > >> > I agree. And I even initially went down the route of a custom layer. > >> > I think it fell short right about when I started exploring editing > >> > capabilities ... IIRC it's not possible with a custom layer. I also > >> > explored the OLEDB data source and that had its restrictions somewhere > >> > too. > >> > > >> > -Abe > >> > > >> > On 11/28/06, joshua.uyehara at syngenta.com <joshua.uyehara at syngenta.com> > >> > wrote: > >> >> Of all of the approaches so far, ZigGIS is the conceptually the > >> >> 'cleanest', as it is going the route of a full feature class adapter > >> >> implementation (the custom layer approach), but it also requires the > >> >> greatest amount of work, as you have to eventually implement the > >> >> functionality exposed by about a dozen interfaces. > >> >> > >> >> pgArc is great for single users, but you run into problems when you > >> need > >> >> concurrent access, or relationships with other tables in your > >> database. > >> >> The same problems would plague the toolbox approach (which I assume > >> >> would basically be a front-end to shp2pgsql and pgsql2shp). > >> >> > >> >> That's not to say that the pgArc or toolbox approaches aren't worth > >> >> pursuing. They can probably meet some specific needs much faster than > >> >> ZigGIS will be able to. > >> >> > >> >> Joshua Uyehara > >> >> joshua.uyehara at syngenta.com > >> >> Office: +1 808 337 1408 ext 34 > >> >> Cell: +1 808 346 5185 > >> >> > >> >> -----Original Message----- > >> >> From: postgis-users-bounces at postgis.refractions.net > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > >> >> Bruce Rindahl > >> >> Sent: Tuesday, November 28, 2006 9:34 AM > >> >> To: 'PostGIS Users Discussion' > >> >> Cc: 'Shaun Kolomeitz'; 'Tyler Mitchell' > >> >> Subject: RE: [postgis-users] RE: zigGIS Usage Experiences > >> >> > >> >> General discussion :) > >> >> > >> >> I am using pgArc for my PostGIS/ArcMap connection. It does both > >> >> read/write with some bugs. I hope to post the changes to 9.x soon on > >> >> the pgArc site. > >> >> > >> >> There is also another effort at: > >> >> http://datashare.gis.unbc.ca/transhape/ > >> >> that uses a different approach. > >> >> > >> >> I looked at zigGIS and passed only because I don't program in C#. > >> >> > >> >> Finally, Would there be any interest in a ArcToolbox version of > >> >> PostGIS/ArcMap ?? I have done a lot of work on toolboxes and think I > >> >> could get a proof of concept going pretty soon. Advantages would be > >> >> Python as a scripting language, the GUI is drag and drop and the tools > >> >> could be modular (One for read, one for append, one for update, etc). > >> >> No compiling would be necessary and the scripts could be used in Model > >> >> Builder. Comments?? > >> >> > >> >> Bruce Rindahl > >> >> > >> >> -----Original Message----- > >> >> From: postgis-users-bounces at postgis.refractions.net > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > >> >> Paolo Corti > >> >> Sent: Tuesday, November 28, 2006 12:02 PM > >> >> To: postgis-users at postgis.refractions.net > >> >> Subject: Re: [postgis-users] RE: zigGIS Usage Experiences > >> >> > >> >> > >> >> Yes Abe > >> >> I have seen your 3ed at support.esri.com no one seemed to help you I > >> am > >> >> sorry > >> >> > >> >> Have you checked out these 3 alternatives at ArcObjects help (under > >> >> extending arcobjects)? > >> >> 1) Custom Layers > >> >> 2) Plug in data sources > >> >> 3) OGIS compliant OLE DB providers > >> >> > >> >> Plug in is not applicable (it is read only), but the other 2 are > >> viable > >> >> Custom Layers also from .NET I was investigating if also OGIS OLE DB > >> >> could be developed in .NET (in the Help is written only VC++ realistic > >> >> for implementation, but maybe this comment is obsolete now) > >> >> > >> >> in any case, > >> >> congratulations for your great job, even if ZigGis do not write ;-) > >> >> > >> >> Paolo > >> >> > >> >> > >> >> > >> >> Abe Gillespie wrote: > >> >> > > >> >> > Sorry, zigGIS does not write. That, of course, is the "Holy Grail" > >> of > >> >> > >> >> > these efforts. > >> >> > > >> >> > -Abe > >> >> > > >> >> > On 11/28/06, Paolo Corti <pcorti at gmail.com> wrote: > >> >> >> > >> >> >> Hello Joshua > >> >> >> and thanks for the workaround, I will test it as ASAP It is very > >> >> >> possibly that we could join to make some modification at ZigGis, as > >> >> >> far as I would like in my spare time to write a connector for > >> PostGis > >> >> > >> >> >> for ArcMap. > >> >> >> First I was looking at PgArc (I also migrated that at ArcObjects > >> 9), > >> >> >> but I think the best approach is like ZigGis does, without a proxy > >> >> >> shapefile, but directly reading the data. > >> >> >> I have one more question, before going on. > >> >> >> In this mailing list it was claimed, I think just from Abe, that > >> >> >> ZigGis can read and also WRITE PostGis data. Is this correct? > >> Because > >> >> > >> >> >> from what you are writing seems that ZigGis can just read and not > >> >> >> write, and maybe I could be not interested in continuing using > >> >> >> ZigGis. > >> >> >> In fact I have decided to write in my spare time a full Read/Write > >> >> >> PostGis connector for ArcMap. But before doing that I would like to > >> >> >> deeply investigate if ZigGis already does the job. > >> >> >> > >> >> >> Best regards > >> >> >> Paolo Corti > >> >> >> http://www.paolocorti.net > >> >> >> > >> >> >> > >> >> >> joshua.uyehara wrote: > >> >> >> > > >> >> >> > Hey Paolo, > >> >> >> > > >> >> >> > Abe isn't working on it anymore, but I have been occasionally > >> >> >> > plugging away at it myself. The problem with adding the layer in > >> >> >> > ArcMap is due to a minor bug. > >> >> >> > > >> >> >> > ZigGIS pulls the geometry column data from PostGIS in its native > >> >> >> > binary format and passes it to ArcMap. Unfortunately, PostGIS' > >> >> >> > internal > >> >> >> binary > >> >> >> > format is not identical to the expected wkb format, so ArcMap > >> >> >> > silently ignores it and basically treats the table as a > >> >> >> > feature-less object class. > >> >> >> > > >> >> >> > One quick workaround is to create a view of the table that > >> converts > >> >> > >> >> >> > the geometry column with asbinary(), and then manually add the > >> >> >> > necessary entry to the geometry_columns table. > >> >> >> > > >> >> >> > E.g., > >> >> >> > > >> >> >> > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as > >> >> >> > geom_column, column2, column3, FROM geom_table; INSERT INTO > >> >> >> > geometry_columns (f_table_schema, f_table_name, > >> f_geometry_column, > >> >> >> > coord_dimension, srid, type) VALUES > >> >> >> > ('public', 'geom_table_view', 'geom_column', 2, -1, > >> >> >> > 'MULTIPOLYGON'); > >> >> >> > > >> >> >> > Change schema, table, column names, srid, etc. to match your > >> table, > >> >> >> then > >> >> >> > specify the view as the table to be opened with ZigGIS. It's an > >> >> >> > ugly kludge, but I haven't had the time to fix the problem in > >> >> >> > ZigGIS itself yet. > >> >> >> > > >> >> >> > Many of the feature class functionality hasn't been implemented > >> >> >> > yet, so you can't do much besides display the features. I'm > >> >> >> > planning to add features to ZigGIS as I need them for work, but I > >> >> >> > can't give you any timelines on it, as I'm swamped with other > >> stuff > >> >> at the moment. > >> >> >> > > >> >> >> > Hope that helped, > >> >> >> > Joshua Uyehara > >> >> >> > joshua.uyehara at syngenta.com > >> >> >> > > >> >> >> > -----Original Message----- > >> >> >> > From: postgis-users-bounces at postgis.refractions.net > >> >> >> > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf > >> Of > >> >> > >> >> >> > Paolo Corti > >> >> >> > Sent: Monday, November 27, 2006 6:46 AM > >> >> >> > To: postgis-users at postgis.refractions.net > >> >> >> > Subject: Re: [postgis-users] zigGIS Usage Experiences > >> >> >> > > >> >> >> > > >> >> >> > Hello Abe > >> >> >> > > >> >> >> > you made a great job with your ZigGis! The ArcObjects code is > >> >> amazing! > >> >> >> > > >> >> >> > maybe you can give me a help > >> >> >> > I compiled your code for using it with ArcGis 9 (i made some > >> little > >> >> > >> >> >> > modifications at the code to get this) and .NET 2.0 It compiled > >> >> >> > fine, but when I start ArcMap and I add a PostGIS layer, it adds > >> >> >> > the layer on the TOC but nothing is showed/drawed on the map. > >> >> >> > Looks like geometries are not read from the shape column. > >> >> >> > I am wondering if you are still on this project, and maybe you > >> >> >> > could give me some help, or if I am on my own and must deeply > >> >> >> > investigate/debug myself the code in order to find what is not > >> >> >> > going properly > >> >> >> > > >> >> >> > best regards > >> >> >> > Paolo Corti > >> >> >> > GIS Developer > >> >> >> > http://www.paolocorti.net > >> >> >> > > >> >> >> > > >> >> >> > Abe Gillespie wrote: > >> >> >> >> > >> >> >> >> Sorry for the cross post, but the zigGIS list only has 9 > >> >> >> >> subscribers with a ton more downloads than that. > >> >> >> >> > >> >> >> >> I'm curious about any experiences people are having using or > >> even > >> >> >> >> *trying* to use zigGIS. Is it working? Anyone need any help? > >> >> >> >> Any constructive criticism? ... I haven't heard a peep yet. > >> >> >> >> > >> >> >> >> Thanks. > >> >> >> >> -Abe > >> >> >> >> _______________________________________________ > >> >> >> >> postgis-users mailing list > >> >> >> >> postgis-users at postgis.refractions.net > >> >> >> >> http://postgis.refractions.net/mailman/listinfo/postgis-users > >> >> >> >> > >> >> >> >> > >> >> >> > > >> >> >> > -- > >> >> >> > View this message in context: > >> >> >> > > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a75632 > >> >> >> > 76 Sent from the PostGIS - User mailing list archive at > >> Nabble.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 > >> >> >> > > >> >> >> > > >> >> >> > >> >> >> -- > >> >> >> View this message in context: > >> >> >> > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 > >> >> >> Sent from the PostGIS - User mailing list archive at Nabble.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 > >> >> > > >> >> > > >> >> > >> >> -- > >> >> View this message in context: > >> >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585331 > >> >> Sent from the PostGIS - User mailing list archive at Nabble.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 > >> >> _______________________________________________ > >> >> 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 > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7595753 > >> Sent from the PostGIS - User mailing list archive at Nabble.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 > > > > > > -- > View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7600741 > Sent from the PostGIS - User mailing list archive at Nabble.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 From abe.gillespie at gmail.com Wed Nov 29 08:59:34 2006 From: abe.gillespie at gmail.com (Abe Gillespie) Date: Wed, 29 Nov 2006 11:59:34 -0500 Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <001801c713d5$db62de40$1e00a8c0@Bruce> References: <a6d397e30611290711s70a2f437j92dc7279e35f510b@mail.gmail.com> <001801c713d5$db62de40$1e00a8c0@Bruce> Message-ID: <a6d397e30611290859i67880812y9829cf008b22d5f8@mail.gmail.com> It seems people want to throw out zigGIS; not sure why there's countless hours of good work invested in it. I've said before that nearly all read-only functionality is already there. The only work left is fixing a bug that was probably introduced in either the new Npgsql or new ArcObjects, general code clean up, and perhaps creating an installer. The current zigGIS site does not have the latest code however. The latest code targets ArcGIS 9.x and has support for saving PostGIS layers to the current project. I've handed the code off to Joshua Uyehara but I'm happy to send it to anyone who wants to *officially* manage the project. -Abe On 11/29/06, Bruce Rindahl <rindahl at lrcwe.com> wrote: > I would also be interested in testing /helping on this. I found the section > on creating an OLE DB OGIS connection on ESRI's web site: > http://edndoc.esri.com/arcobjects/9.1/ExtendingArcObjects/Ch07/OGISOleDbProv > ider.htm > > I can't download the code - the link is broken. I can connect to > Postgres/PostGIS and view the non-spatial tables. If an OLE DB connection > could be available to at least read the data this would be a great start. > Edits could then be done a suggested below - move to a shapefile then some > kind of interface or toolbox to post the edits. > > Bruce > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Abe > Gillespie > Sent: Wednesday, November 29, 2006 8:11 AM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] RE: zigGIS Usage Experiences > > zigGIS in fact is not a custom layer. It's an entirely new > FeatureClass with it's on FeatureWorkspace and all the other classes > necessary to do this. This was done so that I COULD allow for > editing. For whatever reason, though, ArcGIS always complains when I > start an edit sessions on the PostGisWorkspace. I spent probably a > month and a half trying to find what exactly it was that ArcGIS was > looking for to consider my PostGisWorkspace as editable. You might > even find an EDN question I posted about it and it garnered no useful > feedback. > > Because of that problem, indeed, my intention was to do a sorta hybrid > that you mention. The user would initiate a check-out of the shapes > about to be edited. Those would quickly be exported as a true > shapefile, shipped across the network, and stored to a temp location > on the editor's machine. Once the edits were done, the shapefile > would be shipped back across the network and imported in an > intelligent way. The nice thing about this approach is the editing is > occurring on a native shapefile with, obviously, native support. > > But I came on hard times and had to get a full time job and drop my > consulting business. It sucks, but that's life. I would be happier > than a clam if I could get zigGIS work funded! > > -Abe > > On 11/29/06, Paolo Corti <pcorti at gmail.com> wrote: > > > > Hello Abe > > I would with pleasure continue your work, but if -like it seems- there is > > not chance from your custom layer implementation to get access to the > ArcMap > > editor tools (I also disagree with writing custom tools) why not to try > the > > other approach with OLE DB that -according to Esri- should let full > > read/write environment (there is a sample OLE DB OGIS for personal GDB)? > > Another approach could be to write an hybrid ZigGis/PgArc software: read > > PostGis with ZigGis approach, and editing data with PgArc approach, in a > > proxy shapefile fashion. > > What I want to say i point maybe better with a sample: the user reads data > > as a custom layer, when he decide to edit data, on the background, a > > shapefile is created and the user can edit this proxy shape and then check > > in the edit changes to PostGis when is over. > > Let me know if you are interested in contributing with me to let ZigGis to > > also write PostGis data > > best regards > > Paolo > > > > > > Abe Gillespie wrote: > > > > > > Right, and one of my goals was to use the built-in ArcGIS editor since > > > it has all the functionality needed AND is already familiar to the > > > ESRI crowd. > > > > > > As far as the OLE DB provider ... I'm almost positive you can write a > > > provider in C#. The main interop layer that ArcGIS uses is COM and C# > > > speaks it fluently. It's just a matter of using the various .Net COM > > > class attributes. However, there was some reason I discounted the OLE > > > DB provider. > > > > > > Besides ... why not just piggy back on all the work that has already > been > > > done? > > > > > > -Abe > > > > > > On 11/29/06, Paolo Corti <pcorti at gmail.com> wrote: > > >> > > >> Yes looks like a limit of custom layers, according to Esri docs > > >> > > >> If you want to implement edit for custom layer looks like you have to > > >> implement custom edit tool, there is a sample with xy file custom layer > > >> on > > >> ArcObjects on line for implementing custom layer editing tool. Having > > >> said > > >> that, from the other2 approaches: Plug in data source is read-only, so > > >> the > > >> only viable solution would remain OGIS OLE DB Providers, but looks like > > >> it > > >> is developable only with ATL c++ > > >> > > >> I recall the approaches here: > > >> 1) Custom Layers > > >> 2) Plug in data sources > > >> 3) OGIS compliant OLE DB providers > > >> > > >> best regards > > >> Paolo Corti > > >> http://www.paolocorti.net > > >> > > >> > > >> Abe Gillespie wrote: > > >> > > > >> > I agree. And I even initially went down the route of a custom layer. > > >> > I think it fell short right about when I started exploring editing > > >> > capabilities ... IIRC it's not possible with a custom layer. I also > > >> > explored the OLEDB data source and that had its restrictions > somewhere > > >> > too. > > >> > > > >> > -Abe > > >> > > > >> > On 11/28/06, joshua.uyehara at syngenta.com > <joshua.uyehara at syngenta.com> > > >> > wrote: > > >> >> Of all of the approaches so far, ZigGIS is the conceptually the > > >> >> 'cleanest', as it is going the route of a full feature class adapter > > >> >> implementation (the custom layer approach), but it also requires the > > >> >> greatest amount of work, as you have to eventually implement the > > >> >> functionality exposed by about a dozen interfaces. > > >> >> > > >> >> pgArc is great for single users, but you run into problems when you > > >> need > > >> >> concurrent access, or relationships with other tables in your > > >> database. > > >> >> The same problems would plague the toolbox approach (which I assume > > >> >> would basically be a front-end to shp2pgsql and pgsql2shp). > > >> >> > > >> >> That's not to say that the pgArc or toolbox approaches aren't worth > > >> >> pursuing. They can probably meet some specific needs much faster > than > > >> >> ZigGIS will be able to. > > >> >> > > >> >> Joshua Uyehara > > >> >> joshua.uyehara at syngenta.com > > >> >> Office: +1 808 337 1408 ext 34 > > >> >> Cell: +1 808 346 5185 > > >> >> > > >> >> -----Original Message----- > > >> >> From: postgis-users-bounces at postgis.refractions.net > > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > > >> >> Bruce Rindahl > > >> >> Sent: Tuesday, November 28, 2006 9:34 AM > > >> >> To: 'PostGIS Users Discussion' > > >> >> Cc: 'Shaun Kolomeitz'; 'Tyler Mitchell' > > >> >> Subject: RE: [postgis-users] RE: zigGIS Usage Experiences > > >> >> > > >> >> General discussion :) > > >> >> > > >> >> I am using pgArc for my PostGIS/ArcMap connection. It does both > > >> >> read/write with some bugs. I hope to post the changes to 9.x soon > on > > >> >> the pgArc site. > > >> >> > > >> >> There is also another effort at: > > >> >> http://datashare.gis.unbc.ca/transhape/ > > >> >> that uses a different approach. > > >> >> > > >> >> I looked at zigGIS and passed only because I don't program in C#. > > >> >> > > >> >> Finally, Would there be any interest in a ArcToolbox version of > > >> >> PostGIS/ArcMap ?? I have done a lot of work on toolboxes and think > I > > >> >> could get a proof of concept going pretty soon. Advantages would be > > >> >> Python as a scripting language, the GUI is drag and drop and the > tools > > >> >> could be modular (One for read, one for append, one for update, > etc). > > >> >> No compiling would be necessary and the scripts could be used in > Model > > >> >> Builder. Comments?? > > >> >> > > >> >> Bruce Rindahl > > >> >> > > >> >> -----Original Message----- > > >> >> From: postgis-users-bounces at postgis.refractions.net > > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > > >> >> Paolo Corti > > >> >> Sent: Tuesday, November 28, 2006 12:02 PM > > >> >> To: postgis-users at postgis.refractions.net > > >> >> Subject: Re: [postgis-users] RE: zigGIS Usage Experiences > > >> >> > > >> >> > > >> >> Yes Abe > > >> >> I have seen your 3ed at support.esri.com no one seemed to help you I > > >> am > > >> >> sorry > > >> >> > > >> >> Have you checked out these 3 alternatives at ArcObjects help (under > > >> >> extending arcobjects)? > > >> >> 1) Custom Layers > > >> >> 2) Plug in data sources > > >> >> 3) OGIS compliant OLE DB providers > > >> >> > > >> >> Plug in is not applicable (it is read only), but the other 2 are > > >> viable > > >> >> Custom Layers also from .NET I was investigating if also OGIS OLE DB > > >> >> could be developed in .NET (in the Help is written only VC++ > realistic > > >> >> for implementation, but maybe this comment is obsolete now) > > >> >> > > >> >> in any case, > > >> >> congratulations for your great job, even if ZigGis do not write ;-) > > >> >> > > >> >> Paolo > > >> >> > > >> >> > > >> >> > > >> >> Abe Gillespie wrote: > > >> >> > > > >> >> > Sorry, zigGIS does not write. That, of course, is the "Holy > Grail" > > >> of > > >> >> > > >> >> > these efforts. > > >> >> > > > >> >> > -Abe > > >> >> > > > >> >> > On 11/28/06, Paolo Corti <pcorti at gmail.com> wrote: > > >> >> >> > > >> >> >> Hello Joshua > > >> >> >> and thanks for the workaround, I will test it as ASAP It is very > > >> >> >> possibly that we could join to make some modification at ZigGis, > as > > >> >> >> far as I would like in my spare time to write a connector for > > >> PostGis > > >> >> > > >> >> >> for ArcMap. > > >> >> >> First I was looking at PgArc (I also migrated that at ArcObjects > > >> 9), > > >> >> >> but I think the best approach is like ZigGis does, without a > proxy > > >> >> >> shapefile, but directly reading the data. > > >> >> >> I have one more question, before going on. > > >> >> >> In this mailing list it was claimed, I think just from Abe, that > > >> >> >> ZigGis can read and also WRITE PostGis data. Is this correct? > > >> Because > > >> >> > > >> >> >> from what you are writing seems that ZigGis can just read and not > > >> >> >> write, and maybe I could be not interested in continuing using > > >> >> >> ZigGis. > > >> >> >> In fact I have decided to write in my spare time a full > Read/Write > > >> >> >> PostGis connector for ArcMap. But before doing that I would like > to > > >> >> >> deeply investigate if ZigGis already does the job. > > >> >> >> > > >> >> >> Best regards > > >> >> >> Paolo Corti > > >> >> >> http://www.paolocorti.net > > >> >> >> > > >> >> >> > > >> >> >> joshua.uyehara wrote: > > >> >> >> > > > >> >> >> > Hey Paolo, > > >> >> >> > > > >> >> >> > Abe isn't working on it anymore, but I have been occasionally > > >> >> >> > plugging away at it myself. The problem with adding the layer > in > > >> >> >> > ArcMap is due to a minor bug. > > >> >> >> > > > >> >> >> > ZigGIS pulls the geometry column data from PostGIS in its > native > > >> >> >> > binary format and passes it to ArcMap. Unfortunately, PostGIS' > > >> >> >> > internal > > >> >> >> binary > > >> >> >> > format is not identical to the expected wkb format, so ArcMap > > >> >> >> > silently ignores it and basically treats the table as a > > >> >> >> > feature-less object class. > > >> >> >> > > > >> >> >> > One quick workaround is to create a view of the table that > > >> converts > > >> >> > > >> >> >> > the geometry column with asbinary(), and then manually add the > > >> >> >> > necessary entry to the geometry_columns table. > > >> >> >> > > > >> >> >> > E.g., > > >> >> >> > > > >> >> >> > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as > > >> >> >> > geom_column, column2, column3, FROM geom_table; INSERT INTO > > >> >> >> > geometry_columns (f_table_schema, f_table_name, > > >> f_geometry_column, > > >> >> >> > coord_dimension, srid, type) VALUES > > >> >> >> > ('public', 'geom_table_view', 'geom_column', 2, -1, > > >> >> >> > 'MULTIPOLYGON'); > > >> >> >> > > > >> >> >> > Change schema, table, column names, srid, etc. to match your > > >> table, > > >> >> >> then > > >> >> >> > specify the view as the table to be opened with ZigGIS. It's > an > > >> >> >> > ugly kludge, but I haven't had the time to fix the problem in > > >> >> >> > ZigGIS itself yet. > > >> >> >> > > > >> >> >> > Many of the feature class functionality hasn't been implemented > > >> >> >> > yet, so you can't do much besides display the features. I'm > > >> >> >> > planning to add features to ZigGIS as I need them for work, but > I > > >> >> >> > can't give you any timelines on it, as I'm swamped with other > > >> stuff > > >> >> at the moment. > > >> >> >> > > > >> >> >> > Hope that helped, > > >> >> >> > Joshua Uyehara > > >> >> >> > joshua.uyehara at syngenta.com > > >> >> >> > > > >> >> >> > -----Original Message----- > > >> >> >> > From: postgis-users-bounces at postgis.refractions.net > > >> >> >> > [mailto:postgis-users-bounces at postgis.refractions.net] On > Behalf > > >> Of > > >> >> > > >> >> >> > Paolo Corti > > >> >> >> > Sent: Monday, November 27, 2006 6:46 AM > > >> >> >> > To: postgis-users at postgis.refractions.net > > >> >> >> > Subject: Re: [postgis-users] zigGIS Usage Experiences > > >> >> >> > > > >> >> >> > > > >> >> >> > Hello Abe > > >> >> >> > > > >> >> >> > you made a great job with your ZigGis! The ArcObjects code is > > >> >> amazing! > > >> >> >> > > > >> >> >> > maybe you can give me a help > > >> >> >> > I compiled your code for using it with ArcGis 9 (i made some > > >> little > > >> >> > > >> >> >> > modifications at the code to get this) and .NET 2.0 It compiled > > >> >> >> > fine, but when I start ArcMap and I add a PostGIS layer, it > adds > > >> >> >> > the layer on the TOC but nothing is showed/drawed on the map. > > >> >> >> > Looks like geometries are not read from the shape column. > > >> >> >> > I am wondering if you are still on this project, and maybe you > > >> >> >> > could give me some help, or if I am on my own and must deeply > > >> >> >> > investigate/debug myself the code in order to find what is not > > >> >> >> > going properly > > >> >> >> > > > >> >> >> > best regards > > >> >> >> > Paolo Corti > > >> >> >> > GIS Developer > > >> >> >> > http://www.paolocorti.net > > >> >> >> > > > >> >> >> > > > >> >> >> > Abe Gillespie wrote: > > >> >> >> >> > > >> >> >> >> Sorry for the cross post, but the zigGIS list only has 9 > > >> >> >> >> subscribers with a ton more downloads than that. > > >> >> >> >> > > >> >> >> >> I'm curious about any experiences people are having using or > > >> even > > >> >> >> >> *trying* to use zigGIS. Is it working? Anyone need any help? > > >> >> >> >> Any constructive criticism? ... I haven't heard a peep yet. > > >> >> >> >> > > >> >> >> >> Thanks. > > >> >> >> >> -Abe > > >> >> >> >> _______________________________________________ > > >> >> >> >> postgis-users mailing list > > >> >> >> >> postgis-users at postgis.refractions.net > > >> >> >> >> http://postgis.refractions.net/mailman/listinfo/postgis-users > > >> >> >> >> > > >> >> >> >> > > >> >> >> > > > >> >> >> > -- > > >> >> >> > View this message in context: > > >> >> >> > > > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a75632 > > >> >> >> > 76 Sent from the PostGIS - User mailing list archive at > > >> Nabble.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 > > >> >> >> > > > >> >> >> > > > >> >> >> > > >> >> >> -- > > >> >> >> View this message in context: > > >> >> >> > > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585042 > > >> >> >> Sent from the PostGIS - User mailing list archive at Nabble.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 > > >> >> > > > >> >> > > > >> >> > > >> >> -- > > >> >> View this message in context: > > >> >> > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7585331 > > >> >> Sent from the PostGIS - User mailing list archive at Nabble.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 > > >> >> _______________________________________________ > > >> >> 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 > > >> > > > >> > > > >> > > >> -- > > >> View this message in context: > > >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7595753 > > >> Sent from the PostGIS - User mailing list archive at Nabble.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 > > > > > > > > > > -- > > View this message in context: > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7600741 > > Sent from the PostGIS - User mailing list archive at Nabble.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 > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From pcorti at gmail.com Wed Nov 29 09:20:45 2006 From: pcorti at gmail.com (Paolo Corti) Date: Wed, 29 Nov 2006 09:20:45 -0800 (PST) Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> References: <a6d397e30512071116t36ac22e8sd3cf313e77a2e728@mail.gmail.com> <7563276.post@talk.nabble.com> <FC865F8C89A81F4CB8AC6ED7A033D78D34539A@usarmsxmb02.NAFTA.SYNGENTA.ORG> Message-ID: <7601908.post@talk.nabble.com> Hello Joshua I tried what you suggested (I also added the GID field in the view, it caused an error). But ZigGis goes in error when is adding layer, specifically at this line of code: doc.AddLayer(layer); the error i get is AccessViolationExpection did you also try using ZigGis with ArcMap 9.0 ? in any case thank you for helping me, i will investigate more deeply and if i get into some resolution I will drop a note here best regards Paolo joshua.uyehara wrote: > > Hey Paolo, > > Abe isn't working on it anymore, but I have been occasionally plugging > away at it myself. The problem with adding the layer in ArcMap is due > to a minor bug. > > ZigGIS pulls the geometry column data from PostGIS in its native binary > format and passes it to ArcMap. Unfortunately, PostGIS' internal binary > format is not identical to the expected wkb format, so ArcMap silently > ignores it and basically treats the table as a feature-less object > class. > > One quick workaround is to create a view of the table that converts the > geometry column with asbinary(), and then manually add the necessary > entry to the geometry_columns table. > > E.g., > > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as > geom_column, column2, column3, FROM geom_table; > INSERT INTO geometry_columns (f_table_schema, f_table_name, > f_geometry_column, coord_dimension, srid, type) VALUES > ('public', 'geom_table_view', 'geom_column', 2, -1, > 'MULTIPOLYGON'); > > Change schema, table, column names, srid, etc. to match your table, then > specify the view as the table to be opened with ZigGIS. It's an ugly > kludge, but I haven't had the time to fix the problem in ZigGIS itself > yet. > > Many of the feature class functionality hasn't been implemented yet, so > you can't do much besides display the features. I'm planning to add > features to ZigGIS as I need them for work, but I can't give you any > timelines on it, as I'm swamped with other stuff at the moment. > > Hope that helped, > Joshua Uyehara > joshua.uyehara at syngenta.com > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Paolo Corti > Sent: Monday, November 27, 2006 6:46 AM > To: postgis-users at postgis.refractions.net > Subject: Re: [postgis-users] zigGIS Usage Experiences > > > Hello Abe > > you made a great job with your ZigGis! The ArcObjects code is amazing! > > maybe you can give me a help > I compiled your code for using it with ArcGis 9 (i made some little > modifications at the code to get this) and .NET 2.0 It compiled fine, > but when I start ArcMap and I add a PostGIS layer, it adds the layer on > the TOC but nothing is showed/drawed on the map. > Looks like geometries are not read from the shape column. > I am wondering if you are still on this project, and maybe you could > give me some help, or if I am on my own and must deeply > investigate/debug myself the code in order to find what is not going > properly > > best regards > Paolo Corti > GIS Developer > http://www.paolocorti.net > > > Abe Gillespie wrote: >> >> Sorry for the cross post, but the zigGIS list only has 9 subscribers >> with a ton more downloads than that. >> >> I'm curious about any experiences people are having using or even >> *trying* to use zigGIS. Is it working? Anyone need any help? Any >> constructive criticism? ... I haven't heard a peep yet. >> >> Thanks. >> -Abe >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> > > -- > View this message in context: > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7563276 > Sent from the PostGIS - User mailing list archive at Nabble.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 > > -- View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7601908 Sent from the PostGIS - User mailing list archive at Nabble.com. From joshua.uyehara at syngenta.com Wed Nov 29 10:22:39 2006 From: joshua.uyehara at syngenta.com (joshua.uyehara at syngenta.com) Date: Wed, 29 Nov 2006 13:22:39 -0500 Subject: [postgis-users] RE: zigGIS Usage Experiences Message-ID: <FC865F8C89A81F4CB8AC6ED7A033D78D37615C@usarmsxmb02.NAFTA.SYNGENTA.ORG> Hey Paolo, I'm using ArcGIS Desktop 9.1. As Abe mentioned, however, I'm also using a later snapshot of ZigGIS. I had also gone and updated the publicly available ZigGIS to the 9.0 ArcObjects model before receiving the latest version of ZigGIS from Abe, but I never tested that version with the workaround that I outlined. I'll email you a copy of the latest snapshot from Abe so that you can see if you have any better luck with it. Joshua Uyehara joshua.uyehara at syngenta.com -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paolo Corti Sent: Wednesday, November 29, 2006 7:21 AM To: postgis-users at postgis.refractions.net Subject: [postgis-users] RE: zigGIS Usage Experiences Hello Joshua I tried what you suggested (I also added the GID field in the view, it caused an error). But ZigGis goes in error when is adding layer, specifically at this line of code: doc.AddLayer(layer); the error i get is AccessViolationExpection did you also try using ZigGis with ArcMap 9.0 ? in any case thank you for helping me, i will investigate more deeply and if i get into some resolution I will drop a note here best regards Paolo joshua.uyehara wrote: > > Hey Paolo, > > Abe isn't working on it anymore, but I have been occasionally plugging > away at it myself. The problem with adding the layer in ArcMap is due > to a minor bug. > > ZigGIS pulls the geometry column data from PostGIS in its native > binary format and passes it to ArcMap. Unfortunately, PostGIS' > internal binary format is not identical to the expected wkb format, so > ArcMap silently ignores it and basically treats the table as a > feature-less object class. > > One quick workaround is to create a view of the table that converts > the geometry column with asbinary(), and then manually add the > necessary entry to the geometry_columns table. > > E.g., > > CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as > geom_column, column2, column3, FROM geom_table; INSERT INTO > geometry_columns (f_table_schema, f_table_name, f_geometry_column, > coord_dimension, srid, type) VALUES > ('public', 'geom_table_view', 'geom_column', 2, -1, 'MULTIPOLYGON'); > > Change schema, table, column names, srid, etc. to match your table, > then specify the view as the table to be opened with ZigGIS. It's an > ugly kludge, but I haven't had the time to fix the problem in ZigGIS > itself yet. > > Many of the feature class functionality hasn't been implemented yet, > so you can't do much besides display the features. I'm planning to > add features to ZigGIS as I need them for work, but I can't give you > any timelines on it, as I'm swamped with other stuff at the moment. > > Hope that helped, > Joshua Uyehara > joshua.uyehara at syngenta.com > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Paolo Corti > Sent: Monday, November 27, 2006 6:46 AM > To: postgis-users at postgis.refractions.net > Subject: Re: [postgis-users] zigGIS Usage Experiences > > > Hello Abe > > you made a great job with your ZigGis! The ArcObjects code is amazing! > > maybe you can give me a help > I compiled your code for using it with ArcGis 9 (i made some little > modifications at the code to get this) and .NET 2.0 It compiled fine, > but when I start ArcMap and I add a PostGIS layer, it adds the layer > on the TOC but nothing is showed/drawed on the map. > Looks like geometries are not read from the shape column. > I am wondering if you are still on this project, and maybe you could > give me some help, or if I am on my own and must deeply > investigate/debug myself the code in order to find what is not going > properly > > best regards > Paolo Corti > GIS Developer > http://www.paolocorti.net > > > Abe Gillespie wrote: >> >> Sorry for the cross post, but the zigGIS list only has 9 subscribers >> with a ton more downloads than that. >> >> I'm curious about any experiences people are having using or even >> *trying* to use zigGIS. Is it working? Anyone need any help? Any >> constructive criticism? ... I haven't heard a peep yet. >> >> Thanks. >> -Abe >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> > > -- > View this message in context: > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7563276 > Sent from the PostGIS - User mailing list archive at Nabble.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 > > -- View this message in context: http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7601908 Sent from the PostGIS - User mailing list archive at Nabble.com. _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From robtester at gmail.com Wed Nov 29 14:49:26 2006 From: robtester at gmail.com (Rob Tester) Date: Wed, 29 Nov 2006 15:49:26 -0700 Subject: [postgis-users] Intersection errors out with null directed edge Message-ID: <032201c71408$a0fbaa10$7203a8c0@susa.local> The intersection of these two polygons creates an error. NOTICE: AssertionFailedException: EdgeRing::computePoints: found null Directed Edge ERROR: GEOS Intersection() threw an error! Poly 1: "MULTIPOLYGON(((-112.237615 33.491154,-112.237614 33.490469,-112.237752 33.490529,-112.23774 33.494274,-112.235109 33.494339,-112.235109 33.494222,-112.233468 33.494258,-112.233631 33.491873,-112.236704 33.491169,-112.237615 33.491154)),((-112.237137 33.506662,-112.237111 33.505964,-112.236836 33.505292,-112.235281 33.503124,-112.23644 33.502654,-112.237714 33.502702,-112.237695 33.50665,-112.237137 33.506662)),((-112.236804 33.501624,-112.236731 33.501185,-112.234285 33.501218,-112.234295 33.499851,-112.237725 33.499804,-112.237714 33.501536,-112.236804 33.501624)))" Poly 2: "POLYGON((-112.235266 33.502267,-112.234309 33.502505,-112.234451 33.501985,-112.234479 33.501868,-112.234509 33.501141,-112.236709 33.501141,-112.236909 33.501541,-112.235687 33.502032,-112.235266 33.502267))" I have the following versions installed: "POSTGIS="1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS" I believe this may be related to creating a self intersecting poly during the intersection. Any thoughts on how to get around this? (other than nudge the point because, I am sure to find others out of the millions of polys that I am working with, that would cause a similar problem) Thanks, Rob. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061129/018b317b/attachment.html> From carl.anderson at vadose.org Wed Nov 29 15:10:31 2006 From: carl.anderson at vadose.org (Carl Anderson) Date: Wed, 29 Nov 2006 18:10:31 -0500 Subject: [postgis-users] RE: zigGIS Usage Experiences In-Reply-To: <FC865F8C89A81F4CB8AC6ED7A033D78D37615C@usarmsxmb02.NAFTA.SYNGENTA.ORG> References: <FC865F8C89A81F4CB8AC6ED7A033D78D37615C@usarmsxmb02.NAFTA.SYNGENTA.ORG> Message-ID: <456E1367.3060108@vadose.org> Joshua, would you mind send such an email to me as well. I had been very interested in ZigGIS but I could never get it to work with ArcGIS 9.1 C. carl.anderson at vadose.org joshua.uyehara at syngenta.com wrote: > Hey Paolo, > > I'm using ArcGIS Desktop 9.1. As Abe mentioned, however, I'm also using > a later snapshot of ZigGIS. > > I had also gone and updated the publicly available ZigGIS to the 9.0 > ArcObjects model before receiving the latest version of ZigGIS from Abe, > but I never tested that version with the workaround that I outlined. > > I'll email you a copy of the latest snapshot from Abe so that you can > see if you have any better luck with it. > > Joshua Uyehara > joshua.uyehara at syngenta.com > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Paolo Corti > Sent: Wednesday, November 29, 2006 7:21 AM > To: postgis-users at postgis.refractions.net > Subject: [postgis-users] RE: zigGIS Usage Experiences > > > Hello Joshua > I tried what you suggested (I also added the GID field in the view, it > caused an error). > But ZigGis goes in error when is adding layer, specifically at this line > of > code: > > doc.AddLayer(layer); > > the error i get is AccessViolationExpection > > did you also try using ZigGis with ArcMap 9.0 ? > > in any case thank you for helping me, i will investigate more deeply and > if i get into some resolution I will drop a note here > > best regards > Paolo > > > joshua.uyehara wrote: > >> Hey Paolo, >> >> Abe isn't working on it anymore, but I have been occasionally plugging >> > > >> away at it myself. The problem with adding the layer in ArcMap is due >> > > >> to a minor bug. >> >> ZigGIS pulls the geometry column data from PostGIS in its native >> binary format and passes it to ArcMap. Unfortunately, PostGIS' >> internal binary format is not identical to the expected wkb format, so >> > > >> ArcMap silently ignores it and basically treats the table as a >> feature-less object class. >> >> One quick workaround is to create a view of the table that converts >> the geometry column with asbinary(), and then manually add the >> necessary entry to the geometry_columns table. >> >> E.g., >> >> CREATE VIEW geom_table_view AS SELECT asbinary(geom_column) as >> geom_column, column2, column3, FROM geom_table; INSERT INTO >> geometry_columns (f_table_schema, f_table_name, f_geometry_column, >> coord_dimension, srid, type) VALUES >> ('public', 'geom_table_view', 'geom_column', 2, -1, >> > 'MULTIPOLYGON'); > >> Change schema, table, column names, srid, etc. to match your table, >> then specify the view as the table to be opened with ZigGIS. It's an >> ugly kludge, but I haven't had the time to fix the problem in ZigGIS >> itself yet. >> >> Many of the feature class functionality hasn't been implemented yet, >> so you can't do much besides display the features. I'm planning to >> add features to ZigGIS as I need them for work, but I can't give you >> any timelines on it, as I'm swamped with other stuff at the moment. >> >> Hope that helped, >> Joshua Uyehara >> joshua.uyehara at syngenta.com >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> Paolo Corti >> Sent: Monday, November 27, 2006 6:46 AM >> To: postgis-users at postgis.refractions.net >> Subject: Re: [postgis-users] zigGIS Usage Experiences >> >> >> Hello Abe >> >> you made a great job with your ZigGis! The ArcObjects code is amazing! >> >> maybe you can give me a help >> I compiled your code for using it with ArcGis 9 (i made some little >> modifications at the code to get this) and .NET 2.0 It compiled fine, >> but when I start ArcMap and I add a PostGIS layer, it adds the layer >> on the TOC but nothing is showed/drawed on the map. >> Looks like geometries are not read from the shape column. >> I am wondering if you are still on this project, and maybe you could >> give me some help, or if I am on my own and must deeply >> investigate/debug myself the code in order to find what is not going >> properly >> >> best regards >> Paolo Corti >> GIS Developer >> http://www.paolocorti.net >> >> >> Abe Gillespie wrote: >> >>> Sorry for the cross post, but the zigGIS list only has 9 subscribers >>> with a ton more downloads than that. >>> >>> I'm curious about any experiences people are having using or even >>> *trying* to use zigGIS. Is it working? Anyone need any help? Any >>> constructive criticism? ... I haven't heard a peep yet. >>> >>> Thanks. >>> -Abe >>> _______________________________________________ >>> postgis-users mailing list >>> postgis-users at postgis.refractions.net >>> http://postgis.refractions.net/mailman/listinfo/postgis-users >>> >>> >>> >> -- >> View this message in context: >> http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7563276 >> Sent from the PostGIS - User mailing list archive at Nabble.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 >> >> >> > > -- > View this message in context: > http://www.nabble.com/zigGIS-Usage-Experiences-tf696976.html#a7601908 > Sent from the PostGIS - User mailing list archive at Nabble.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 > From craigfeuerherdt at gmail.com Wed Nov 29 19:26:27 2006 From: craigfeuerherdt at gmail.com (Craig Feuerherdt) Date: Thu, 30 Nov 2006 14:26:27 +1100 Subject: [postgis-users] Removing Interior Rings Message-ID: <442163630611291926y24118f59mde2891780c932898@mail.gmail.com> I am attempting to simplify a series of polygons by buffering them and then unioning the buffers together (sql below). This works fine however, in some instances, there are interior rings (holes) which I would like to remove. I have tried Segmentize, but it failed to remove the interior rings. Any suggestions would be appreciated. Craig create table orienteering_test with oids as select geomunion(buffer(the_geom,0.0005)) as the_geom from orienteering_all where map_name = 'Tarrengower' -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061130/ef1d2801/attachment.html> From mike at fuhr.org Wed Nov 29 23:49:26 2006 From: mike at fuhr.org (Michael Fuhr) Date: Thu, 30 Nov 2006 00:49:26 -0700 Subject: [postgis-users] Removing Interior Rings In-Reply-To: <442163630611291926y24118f59mde2891780c932898@mail.gmail.com> References: <442163630611291926y24118f59mde2891780c932898@mail.gmail.com> Message-ID: <20061130074926.GA85377@winnie.fuhr.org> On Thu, Nov 30, 2006 at 02:26:27PM +1100, Craig Feuerherdt wrote: > I am attempting to simplify a series of polygons by buffering them and then > unioning the buffers together (sql below). > This works fine however, in some instances, there are interior rings (holes) > which I would like to remove. > I have tried Segmentize, but it failed to remove the interior rings. Have you tried exteriorring() to get the exterior ring as a LINESTRING and makepolygon() to turn it back into a POLYGON? -- Michael Fuhr From strk at refractions.net Thu Nov 30 09:51:52 2006 From: strk at refractions.net (strk at refractions.net) Date: Thu, 30 Nov 2006 18:51:52 +0100 Subject: [postgis-users] Intersection errors out with null directed edge In-Reply-To: <032201c71408$a0fbaa10$7203a8c0@susa.local> References: <032201c71408$a0fbaa10$7203a8c0@susa.local> Message-ID: <20061130175152.GN15972@keybit.net> On Wed, Nov 29, 2006 at 03:49:26PM -0700, Rob Tester wrote: > > NOTICE: AssertionFailedException: EdgeRing::computePoints: found null Directed Edge ... > I have the following versions installed: > > "POSTGIS="1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004" > USE_STATS" GEOS 3.0.0 should many such cases, it's still in release candidate, but worth a try. --strk; From sandeepkumar.jakkaraju at gmail.com Thu Nov 30 16:08:49 2006 From: sandeepkumar.jakkaraju at gmail.com (Sandeep Kumar Jakkaraju) Date: Fri, 1 Dec 2006 05:38:49 +0530 Subject: [postgis-users] Spatial Queries on Postgis Java Geometry classes Message-ID: <c653c98f0611301608w18cf33eaweffb65e50e2009b@mail.gmail.com> Hi All If i am correct !! all the spatial queries are done on the geometry objects ..in the table .. For example:- I have a table ..which has a geometry column which of type say POLYGON ...say bounds I want to write a spatial query .. select * from table where intersects (GEOMFROMTEXT('POINT(0 0)'),bounds); but if some one is using Hibernate with Postgis ... I have to run this as a native sql query .. BUT has anyone worked on Postgis ..Geometry Java CLass ..so that ..i can run a createria query like "from Tiles t where t.bounds.intersects('POINT(0 0)')"; if someone thinks it is worthwhile to work on .. i would like to work on it .. thanx ... sandeep -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061201/33011ee4/attachment.html> From robtester at gmail.com Thu Nov 30 16:12:19 2006 From: robtester at gmail.com (Rob Tester) Date: Thu, 30 Nov 2006 17:12:19 -0700 Subject: [postgis-users] Intersection errors out with null directed edge References: <032201c71408$a0fbaa10$7203a8c0@susa.local> <20061130175152.GN15972@keybit.net> Message-ID: <001501c714dd$5fa5fc70$7203a8c0@susa.local> This fixed some of the problems I still have other sets of geometries with the same problem. Will know more tomorrow on which ones are causing the problem. Also the 3.0.0rc2 would not build for windows with MingW and Msys. It fails with a link error. Building on Debian worked fine. Rob. ----- Original Message ----- From: <strk at refractions.net> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net> Sent: Thursday, November 30, 2006 10:51 AM Subject: Re: [postgis-users] Intersection errors out with null directed edge > On Wed, Nov 29, 2006 at 03:49:26PM -0700, Rob Tester wrote: >> >> NOTICE: AssertionFailedException: EdgeRing::computePoints: found null >> Directed Edge > ... > >> I have the following versions installed: >> >> "POSTGIS="1.1.5" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004" >> USE_STATS" > > GEOS 3.0.0 should many such cases, it's still in release candidate, > but worth a try. > > --strk; > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users