From nicolas.ribot at gmail.com Mon Mar 1 01:34:45 2010 From: nicolas.ribot at gmail.com (Nicolas Ribot) Date: Mon, 1 Mar 2010 10:34:45 +0100 Subject: [postgis-users] configure postgis for editing outside LAN In-Reply-To: References: Message-ID: <28de5e311003010134x7658ab4fye45f0e5decbd5ed8@mail.gmail.com> On 9 February 2010 10:59, maning sambale wrote: > Hi, > > First post, newbie. > > I was able to finally install PostGIS and can already access my dbase > via LAN. ?I want to be able access the data outside LAN. ?I played > around with the pg_hba.conf and now I cannot access postgis database > via pgadmin3 directly in the server machine! > > Current setup is: > # TYPE ?DATABASE ? ?USER ? ? ? ?CIDR-ADDRESS ? ? ? ? ?METHOD > > # "local" is for Unix domain socket connections only > local ? ?all ? ? all ? ? trust > # IPv4 local connections: > #host ? ?all ? ? all ? ? 127.168.199 ? ? trust > # IPv6 local connections: > host ? ? all ? ? all ? ? ::1/128 ? ? ? ? trust > host ? ? all ? ? all ? ? 192.168.1.0/24 trust > > Any ideas > Hi, Did you check if any firewall is present and allow traffic on PG port ? Also, did you change the "listen_addresses" parameter in postgresql.conf ? Nicolas From richard.greenwood at gmail.com Mon Mar 1 05:52:22 2010 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Mon, 1 Mar 2010 06:52:22 -0700 Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles In-Reply-To: References: <90699a8d1002261204l30f58c66j96c8bcefddc3c228@mail.gmail.com> Message-ID: On Fri, Feb 26, 2010 at 9:52 PM, Paragon Corporation wrote: > David, > > As a matter of fact we've been working on that for chapter 10 of our > upcoming book and think we have it all working. ?As a part of the example > generation process for our chapter 10, we had to come up with a way to load > the tables that works on both windows and Linux. ?Unfortunately we haven't > had a chance to test the Linux loading approach, but is pretty much a > parallel of the windows approach. I am following this steps in the ReadMe.txt in http://www.postgis.us/downloads/tiger_geocoder_2009.zip The ReadMe does not mention running tiger_loader.sql or create_geocode.sql which I assume needs to take place. When running tiger_loader.sql I get error: ERROR: relation "state_lookup" does not exist LINE 189: FROM state_lookup) As s CROSS JOIN loader_platform As platfo... When running create_geocode.sql I get error: ERROR: syntax error at or near "\" LINE 21: \i utility/utmzone.sql Thanks, -- Richard Greenwood richard.greenwood at gmail.com www.greenwoodmap.com From lr at pcorp.us Mon Mar 1 06:13:33 2010 From: lr at pcorp.us (Paragon Corporation) Date: Mon, 1 Mar 2010 09:13:33 -0500 Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles In-Reply-To: References: <90699a8d1002261204l30f58c66j96c8bcefddc3c228@mail.gmail.com> Message-ID: <98B277B354FA44879D351A1BDD5C0838@J> Richard, To answer your question. We kind of glossed over it in Step 4 when we say run the create_geocoder.bat file. As you can see we don't have a .sh equaivalent yet though writing one is fairly trivial. If you look at the file, you'll see the sequence of scripts you need to run and the order you need to run them. David, Regarding your question about roads_local.sql, we don't believe that table is used any more and got replaced with edges,addr and faces -- if you look at the tables\lookup_tables_revised.sql you'll see that we remarked out sections of the original that we deemed to be obsolete and added some new ones Let us know if you have any other questions, Leo and Regina http://www.postgis.us -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Richard Greenwood Sent: Monday, March 01, 2010 8:52 AM To: PostGIS Users Discussion Cc: PostGIS Development Discussion Subject: Re: [postgis-users] TIGER geocoder with Census 2009 shapefiles On Fri, Feb 26, 2010 at 9:52 PM, Paragon Corporation wrote: > David, > > As a matter of fact we've been working on that for chapter 10 of our > upcoming book and think we have it all working. ?As a part of the > example generation process for our chapter 10, we had to come up with > a way to load the tables that works on both windows and Linux. ? > Unfortunately we haven't had a chance to test the Linux loading > approach, but is pretty much a parallel of the windows approach. I am following this steps in the ReadMe.txt in http://www.postgis.us/downloads/tiger_geocoder_2009.zip The ReadMe does not mention running tiger_loader.sql or create_geocode.sql which I assume needs to take place. When running tiger_loader.sql I get error: ERROR: relation "state_lookup" does not exist LINE 189: FROM state_lookup) As s CROSS JOIN loader_platform As platfo... When running create_geocode.sql I get error: ERROR: syntax error at or near "\" LINE 21: \i utility/utmzone.sql Thanks, -- Richard Greenwood richard.greenwood at gmail.com www.greenwoodmap.com _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From lr at pcorp.us Mon Mar 1 06:19:59 2010 From: lr at pcorp.us (Paragon Corporation) Date: Mon, 1 Mar 2010 09:19:59 -0500 Subject: [postgis-users] postgis upgrade 1.4 to 1.5 sql file couldn't find $libdir/postgis-1.4 In-Reply-To: <4B877152.6040604@ioda-net.ch> References: <4B8052FE.4030909@ioda-net.ch> <4B84F9A1.6030600@siriusit.co.uk><366ADBAFBA5E44F1941A4AB862D56796@J> <4B877152.6040604@ioda-net.ch> Message-ID: Bruno, Hmm hadn't thought about this as a standard practice. Now you point it out, I guess I can see the thought process behind this. The main issue is that since PostGIS no longer names the .so/.dlls the same as the old name, as soon as you uninstall the old version, you have temporarily broken your databases until you upgrade them. This was not the case in the past. So really package managers should be treating these versions as being different animals. This will become more of an issue when PostGIS 2.0 comes around. The reason we changed towards this path is that it allows for two versions of PostGIS to coexist on the same server thus allowing one to slowly migrate to a newer version and also cross test behavior. In the case of PostGIS 2.0, there will be many breaking changes, so you definitely would not want to uninstall the old version when you install the new. Paul, Kevin, Mark et. Al -- any thoughts on the matter. I suspect we'll be seeing more of this issue crop up. Thanks, Regina -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Bruno Friedmann Sent: Friday, February 26, 2010 2:00 AM To: postgis-users at postgis.refractions.net Subject: Re: [postgis-users] postgis upgrade 1.4 to 1.5 sql file couldn't find $libdir/postgis-1.4 Yes you get it, but in fact it's the usual process with .deb or .rpm (which I use) the old version is removed before the new one is installed. To have success in the update process, I decide I can comment the line described in the postigs upgrade sql script those calling postgis_major_version_check(). Without this function, the process seems to goes well, in fact it ended correctly, and I have all things working. I'm also talking with Otto Dasseau ( the guy who make kindly the openSUSE rpm I use ). So what would be you recommendation for packager about the upgrade process : did they should leave the old previous version installed the time of the upgrade process ? Or could we imagine to capture the error raised by the postgis_major_version_check() and by passed it if old lib version cannot be checked ? On 02/24/2010 12:41 PM, Paragon Corporation wrote: > Bruno, > > From the error its sounds like the PostGIS 1.4 has been uninstalled > in the process of upgrading to 1.5. This is a big no no as if the > old is uninstalled before the database is upgraded, you run into this > kind of issue since they now use different file names. > > > > -----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: Wednesday, February 24, 2010 5:04 AM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] postgis upgrade 1.4 to 1.5 sql file > couldn't find $libdir/postgis-1.4 > > Bruno Friedmann wrote: > >> Doesn't know if already reported or what I'm doing wrong. >> >> In rpm (suppose to be the same with .deb) if you upgrade postgis from >> 1.4 to 1.5 the postgis-1.4 referenced in function doesn't exist after > upgrade. >> >> As the default postgis upgrade script call the select >> postgis_lib_version(); we get a fatal error >> ERROR: could not access file "$libdir/postgis-1.4": No such file or >> directory >> >> and all the process fail leaving normal user in trouble ... >> >> I've try to bypass it commenting the SELECT >> postgis_major_version_check(); and get the sql executed ... >> >> Any comments ? > > Hi Bruno, > > Sorry but I'm not really sure what's happening here - I know that > people have tested the upgrade script when upgrading from 1.4 to 1.5 > before the final release and reported that it works. > > I suspect you will need to talk to the maintainer of the .deb packages > you are using to find out why this is failing. > > > HTH, > > Mark. > -- Bruno Friedmann Ioda-Net S?rl 2830 Vellerat - Switzerland T?l : ++41 32 435 7171 Fax : ++41 32 435 7172 gsm : ++41 78 802 6760 www.ioda-net.ch Centre de Formation et de Coaching En Ligne www.cfcel.com _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From saeed.bhuta at placr.co.uk Mon Mar 1 07:35:21 2010 From: saeed.bhuta at placr.co.uk (Saeed Bhuta) Date: Mon, 01 Mar 2010 15:35:21 +0000 Subject: [postgis-users] Libpq error Message-ID: <4B8BDEB9.60009@placr.co.uk> Hi All, I am trying to install PostGIS in order to install PG Routing. However when I run the configure script, at the end I am given the following error even though I have libpq installed: "configure: error: could not find libpq" I am on Ubuntu 9.10 Karmic Koala and PostgreSQL 8.4. I would greatly appreciate it if someone can point me in the right direction. Many Thanks, Saeed. From strk at keybit.net Mon Mar 1 07:52:01 2010 From: strk at keybit.net (strk) Date: Mon, 1 Mar 2010 16:52:01 +0100 Subject: [postgis-users] Libpq error In-Reply-To: <4B8BDEB9.60009@placr.co.uk> References: <4B8BDEB9.60009@placr.co.uk> Message-ID: <20100301155201.GL33148@keybit.net> On Mon, Mar 01, 2010 at 03:35:21PM +0000, Saeed Bhuta wrote: > Hi All, > > I am trying to install PostGIS in order to install PG Routing. > > However when I run the configure script, at the end I am given the > following error even though I have libpq installed: > > "configure: error: could not find libpq" > > I am on Ubuntu 9.10 Karmic Koala and PostgreSQL 8.4. Try: sudo apt-cache search postgresql | grep dev | grep client --strk; Share. It's fair. http://iwouldntsteal.net From french30 at inwind.it Mon Mar 1 07:54:33 2010 From: french30 at inwind.it (french30 at inwind.it) Date: Mon, 1 Mar 2010 16:54:33 +0100 (CET) Subject: [postgis-users] import export file kml Message-ID: <29052752.2810251267458873305.JavaMail.defaultUser@defaultHost> Hi, use PostGIS 1.5.0, I would like to import KML files into batabase and export data in the database into a KML file. use to export fwtools 2.4.7 and operation works, to import KML files with fwtool write: ogr2ogr-f "PostgreSQL" PG: dbname = PostGIS user = postgres password = postgres host = localhost port = 5432 "roads.kml But it gives me an error: unable to find drivers 'Postgres'. how can I fix this? Can I import and export KML files directly without using fwtools but use PostGIS? Thanks for your help. From olivier.courtin at oslandia.com Mon Mar 1 08:05:02 2010 From: olivier.courtin at oslandia.com (Olivier Courtin) Date: Mon, 1 Mar 2010 17:05:02 +0100 Subject: [postgis-users] import export file kml In-Reply-To: <29052752.2810251267458873305.JavaMail.defaultUser@defaultHost> References: <29052752.2810251267458873305.JavaMail.defaultUser@defaultHost> Message-ID: <616B2F7F-8FBC-4B24-B264-036F014D6566@oslandia.com> On Mar 1, 2010, at 4:54 PM, french30 at inwind.it wrote: > Can I import and export KML files directly without using fwtools but > use > PostGIS? KML import and export are available since 1.5.0, but for geometries parts only (i.e not for the whole KML file) http://postgis.org/documentation/manual-1.5.0/ST_GeomFromKML.html http://postgis.org/documentation/manual-svn/ST_AsKML.html -- Olivier From saeed.bhuta at placr.co.uk Mon Mar 1 08:09:52 2010 From: saeed.bhuta at placr.co.uk (Saeed Bhuta) Date: Mon, 01 Mar 2010 16:09:52 +0000 Subject: [postgis-users] Libpq error In-Reply-To: <20100301155201.GL33148@keybit.net> References: <4B8BDEB9.60009@placr.co.uk> <20100301155201.GL33148@keybit.net> Message-ID: <4B8BE6D0.4090106@placr.co.uk> strk wrote: > On Mon, Mar 01, 2010 at 03:35:21PM +0000, Saeed Bhuta wrote: > >> Hi All, >> >> I am trying to install PostGIS in order to install PG Routing. >> >> However when I run the configure script, at the end I am given the >> following error even though I have libpq installed: >> >> "configure: error: could not find libpq" >> >> I am on Ubuntu 9.10 Karmic Koala and PostgreSQL 8.4. >> > > Try: > sudo apt-cache search postgresql | grep dev | grep client > > --strk; > > Share. It's fair. > http://iwouldntsteal.net > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > Thanks Strk for your reply. I ran the command and it gave the output: libpgtcl-dev - Tcl client library binding for PostgreSQL - development files. So I did sudo apt-get install libpgtcl-dev and it installed successfully, I then ran the configure script but it still gives the same error; configure: error: could not find libpq Saeed. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maelvon.hawk at laposte.net Mon Mar 1 09:15:05 2010 From: maelvon.hawk at laposte.net (Maelvon HAWK) Date: Mon, 01 Mar 2010 18:15:05 +0100 Subject: [postgis-users] Get point certain degree of another point In-Reply-To: <22f0a52d1002280811v5368b3a6nb45870a013bcce49@mail.gmail.com> References: <4B89D864.7020506@laposte.net> <22f0a52d1002280811v5368b3a6nb45870a013bcce49@mail.gmail.com> Message-ID: <4B8BF619.40007@laposte.net> Le 28/02/2010 17:11, Mike Toews a ?crit : > > Apply the same COGO trigonometry as before[1]: > > import math > > class Point: > def __init__(self, x, y): > self.x=x; self.y=y > > def TranslateBearingDistance(pt, rad, dist): > return Point(pt.x + dist*math.cos(rad), pt.y + dist*math.sin(rad)) > > pt0 = Point(100, 100) > > # 12 units away at 30 degrees CCW from x-axis > pt1 = TranslateBearingDistance(pt0, 30*2*math.pi/360, 12) > > print pt1.x, pt1.y > # 110.392304845 106.0 > > > [1] http://www.mail-archive.com/postgis-users at postgis.refractions.net/msg09702.html > > -Mike Thanks Mike for the tip. After that I've found the geopy[1] library, finally : from geopy import distance pt1 = (40.14603,0.86791) distance = distance.VincentyDistance distance = distance(kilometers=1.) distance.destination(pt1, 60, 0.5) # Point(46.148278989214596, 0.97351489536992275, 0.0) [1] http://code.google.com/p/geopy/wiki/Installation Maelvon HAWK From julien.guilloux at ecrins-parcnational.fr Mon Mar 1 10:48:40 2010 From: julien.guilloux at ecrins-parcnational.fr (ju) Date: Mon, 01 Mar 2010 19:48:40 +0100 Subject: [postgis-users] polygon to line segments Message-ID: <4B8C0C08.6000207@ecrins-parcnational.fr> hi list, i have a polygon table with a id poly i would like to obtain a line table with each record = each segment of the polygon i don't really understand if i need to use collection, dump etc... i first need to build a point collection ? and then build all segment ? thanks, Julien -------------- next part -------------- An embedded message was scrubbed... From: ju Subject: poly to line Date: Mon, 01 Mar 2010 19:37:01 +0100 Size: 1809 URL: From kneufeld at refractions.net Mon Mar 1 11:34:59 2010 From: kneufeld at refractions.net (Kevin Neufeld) Date: Mon, 01 Mar 2010 11:34:59 -0800 Subject: [postgis-users] polygon to line segments In-Reply-To: <4B8C0C08.6000207@ecrins-parcnational.fr> References: <4B8C0C08.6000207@ecrins-parcnational.fr> Message-ID: <4B8C16E3.9060302@refractions.net> You want to extract the 2-point line segments that make up a polygon? http://postgis.refractions.net/pipermail/postgis-users/2010-January/025818.html Cheers, Kevin On 3/1/2010 10:48 AM, ju wrote: > hi list, > > i have a polygon table with a id poly > > i would like to obtain a line table with each record = each segment of > the polygon > > i don't really understand if i need to use collection, dump etc... > i first need to build a point collection ? and then build all segment ? > > thanks, > > Julien > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From richard.greenwood at gmail.com Mon Mar 1 19:15:42 2010 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Mon, 1 Mar 2010 20:15:42 -0700 Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles In-Reply-To: <98B277B354FA44879D351A1BDD5C0838@J> References: <90699a8d1002261204l30f58c66j96c8bcefddc3c228@mail.gmail.com> <98B277B354FA44879D351A1BDD5C0838@J> Message-ID: On Mon, Mar 1, 2010 at 7:13 AM, Paragon Corporation wrote: > Richard, > > To answer your question. ?We kind of glossed over it in Step 4 when we say > run the create_geocoder.bat file. Ah! Got it. I didn't have enough coffee or some other lame excuse. Thanks, Rich -- Richard Greenwood richard.greenwood at gmail.com www.greenwoodmap.com From nick.zando at gmail.com Tue Mar 2 01:35:16 2010 From: nick.zando at gmail.com (=?ISO-8859-1?Q?Nicola_Zandon=E0?=) Date: Tue, 2 Mar 2010 10:35:16 +0100 Subject: [postgis-users] points to polygon Message-ID: Hi all, this is my first post and i'm a newbie. I have a set of point extracted from longitude and latitude coordinates. I'd like to circumscribe those points inside a polygon. Can I solve this problem with an aggregate function? Any hints will be greatly appreciated! tnx for reading. Nick From arnaud.listes at codata.eu Tue Mar 2 01:42:32 2010 From: arnaud.listes at codata.eu (Arnaud Lesauvage) Date: Tue, 02 Mar 2010 10:42:32 +0100 Subject: [postgis-users] points to polygon In-Reply-To: References: Message-ID: <4B8CDD88.5010605@codata.eu> Le 2/03/2010 10:35, Nicola Zandon? a ?crit : > I have a set of point extracted from longitude and latitude coordinates. > I'd like to circumscribe those points inside a polygon. > Can I solve this problem with an aggregate function? Yes, I think you are looking for ST_ConvexHull : http://postgis.refractions.net/documentation/manual-1.5/ST_ConvexHull.html This is not an aggregate function so you have to aggregate your point geometries before calling it. You can use ST_Collect for that. Regards -- Arnaud From strk at keybit.net Tue Mar 2 03:21:33 2010 From: strk at keybit.net (strk) Date: Tue, 2 Mar 2010 12:21:33 +0100 Subject: [postgis-users] points to polygon In-Reply-To: References: Message-ID: <20100302112133.GO49725@keybit.net> On Tue, Mar 02, 2010 at 10:35:16AM +0100, Nicola Zandon? wrote: > Hi all, > this is my first post and i'm a newbie. > > I have a set of point extracted from longitude and latitude coordinates. > I'd like to circumscribe those points inside a polygon. > Can I solve this problem with an aggregate function? I belive you can solve it with ST_ConvexHull, passing it a MULTIPOINT. --strk; Share. It's fair. http://iwouldntsteal.net From sebastian.marsky at ptv.de Tue Mar 2 06:26:29 2010 From: sebastian.marsky at ptv.de (Sebastian Marsky) Date: Tue, 2 Mar 2010 15:26:29 +0100 Subject: [postgis-users] Insertings quite big MULTILINESTRING fails Message-ID: <4B8D2015.3000606@ptv.de> hi, I'm trying to insert quite big MULTILINSTRING objects with about 1000 points. The INSERT-statement is in a form like: INSERT INTO MY_GEOMETRY_TABLE VALUES (1, 2, GeomFromText('MULTILINESTRING((11.5211 48.08109, [...],11.51651 48.08071))',4326)); (first column being the PK, second an attribute (roadclass)). When I execute this one, no error occurs (even in the Postgres logs), but the 'geometry' column is just empty atferwards! I experimented a bit, and noticed that to the limit of about 170 points everything works, and above that, the problem shows up. So I wonder if there is any hard limit on number of points for a MULTILINESTRING? Or could something go wrong while parsing the string cause it exceeds some char array size? -- Sebastian Marsky PTV AG Tel. : +49-(0)721-9651-8-257 Fax : +49-(0)721-9651-8-299 email: Sebastian.Marsky at ptv.de ......................................................................... PTV Planung Transport Verkehr AG Stumpfstra?e 1 76131 Karlsruhe Germany http://www.ptv.de ......................................................................... PTV Planung Transport Verkehr AG Hauptsitz / Headquarters: Karlsruhe Vorstand / Board of Directors: Dr.-Ing. Hans Hubschneider, Dr. Joachim Schmidt, Dr.-Ing. Thomas Schwerdtfeger, Harald Holberg, Thomas Haupt, Vincent Kobesen Vorsitzender des Aufsichtsrates / Chairman of the Supervisory Board: Dr. Volkmar Mair Handelsregister / Companies' Register (HRB-Nr): 109262 Amtsgericht / District Court: Mannheim From cgalpin at lhsw.com Tue Mar 2 06:40:37 2010 From: cgalpin at lhsw.com (Charles Galpin) Date: Tue, 2 Mar 2010 09:40:37 -0500 Subject: [postgis-users] Insertings quite big MULTILINESTRING fails In-Reply-To: <4B8D2015.3000606@ptv.de> References: <4B8D2015.3000606@ptv.de> Message-ID: <32B16CAE-5EB3-49C7-AA26-E8E0D9D97D83@lhsw.com> This came up the other day. It's a display limitation of spql or pgadmin. Try this select st_length(the_geom), st_asText(st_startpoint(the_geom)), st_asText(st_endpoint(the_geom)) from MY_GEOMETRY_TABLE limit 1; You should see all is well. hth charles On Mar 2, 2010, at 9:26 AM, Sebastian Marsky wrote: > hi, > > I'm trying to insert quite big MULTILINSTRING objects with about 1000 points. The INSERT-statement is in a form like: > > INSERT INTO MY_GEOMETRY_TABLE VALUES (1, 2, GeomFromText('MULTILINESTRING((11.5211 48.08109, [...],11.51651 48.08071))',4326)); > > (first column being the PK, second an attribute (roadclass)). > > When I execute this one, no error occurs (even in the Postgres logs), but the 'geometry' column is just empty atferwards! > > I experimented a bit, and noticed that to the limit of about 170 points everything works, and above that, the problem shows up. > > So I wonder if there is any hard limit on number of points for a MULTILINESTRING? Or could something go wrong while parsing the string cause it exceeds some char array size? > > > -- > > Sebastian Marsky From Ralf.Suhr at itc-halle.de Tue Mar 2 06:41:44 2010 From: Ralf.Suhr at itc-halle.de (Suhr, Ralf) Date: Tue, 2 Mar 2010 15:41:44 +0100 Subject: [postgis-users] Insertings quite big MULTILINESTRING fails In-Reply-To: <4B8D2015.3000606@ptv.de> References: <4B8D2015.3000606@ptv.de> Message-ID: <305F51E63512244D853C549502A6132454F868@VVVMAIL.vvv.vvv-konzern.net> Hi Sebastian, did you use PgAdminII for display the data? PgAdminIII do not show large columns. You can test it by "SELECT id, ST_Length(your_geom), roadclass FROM MY_GEOMETRY_TABLE". And one question. What is the reason for storing such big roads? Mit freundlichen Gr??en, gez. i.A. Ralf Suhr -- Dipl. Ing. (FH) Ralf Suhr Team Softwareentwicklung / Kompetenzzentrum Geo-Systeme Telefon: +49 345 581 7127 Telefax: +49 345 581 787127 E-Mail: Ralf.Suhr at itc-halle.de IT-Consult Halle GmbH Bornknechstra?e 5 06108 Halle (Saale) Eingetragen beim Amtsgericht Stendal Handelsregister B Nr. HRB-212984 Gesch?ftsf?hrung: Herr Axel von der Heyde Herr J?rg Siebenh?ner Internet: http://www.itc-halle.de -----Urspr?ngliche Nachricht----- Von: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] Im Auftrag von Sebastian Marsky Gesendet: Dienstag, 2. M?rz 2010 15:26 An: postgis-users at postgis.refractions.net Betreff: [postgis-users] Insertings quite big MULTILINESTRING fails hi, I'm trying to insert quite big MULTILINSTRING objects with about 1000 points. The INSERT-statement is in a form like: INSERT INTO MY_GEOMETRY_TABLE VALUES (1, 2, GeomFromText('MULTILINESTRING((11.5211 48.08109, [...],11.51651 48.08071))',4326)); (first column being the PK, second an attribute (roadclass)). When I execute this one, no error occurs (even in the Postgres logs), but the 'geometry' column is just empty atferwards! I experimented a bit, and noticed that to the limit of about 170 points everything works, and above that, the problem shows up. So I wonder if there is any hard limit on number of points for a MULTILINESTRING? Or could something go wrong while parsing the string cause it exceeds some char array size? -- Sebastian Marsky PTV AG Tel. : +49-(0)721-9651-8-257 Fax : +49-(0)721-9651-8-299 email: Sebastian.Marsky at ptv.de ......................................................................... PTV Planung Transport Verkehr AG Stumpfstra?e 1 76131 Karlsruhe Germany http://www.ptv.de ......................................................................... PTV Planung Transport Verkehr AG Hauptsitz / Headquarters: Karlsruhe Vorstand / Board of Directors: Dr.-Ing. Hans Hubschneider, Dr. Joachim Schmidt, Dr.-Ing. Thomas Schwerdtfeger, Harald Holberg, Thomas Haupt, Vincent Kobesen Vorsitzender des Aufsichtsrates / Chairman of the Supervisory Board: Dr. Volkmar Mair Handelsregister / Companies' Register (HRB-Nr): 109262 Amtsgericht / District Court: Mannheim _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From woodbri at swoodbridge.com Tue Mar 2 07:32:53 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Tue, 02 Mar 2010 10:32:53 -0500 Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles In-Reply-To: <98B277B354FA44879D351A1BDD5C0838@J> References: <90699a8d1002261204l30f58c66j96c8bcefddc3c228@mail.gmail.com> <98B277B354FA44879D351A1BDD5C0838@J> Message-ID: <4B8D2FA5.6070603@swoodbridge.com> OK, this is a silly question, what is the git command to download Stephen Frost's repository? $ git fetch http://www.snowman.net/git/ fatal: Not a git repository $ git fetch git://www.snowman.net/git/ fatal: Not a git repository I've never used git before so this is not obvious, to me. You might want to add 1-2 lines to chapter 10 to say how to do that so readers can focus on the geocoder and not on git. -Steve Paragon Corporation wrote: > Richard, > > To answer your question. We kind of glossed over it in Step 4 when we say > run the create_geocoder.bat file. > > As you can see we don't have a .sh equaivalent yet though writing one is > fairly trivial. > > If you look at the file, you'll see the sequence of scripts you need to run > and the order you need to run them. > > David, > Regarding your question about roads_local.sql, we don't believe that table > is used any more and got replaced with edges,addr and faces -- > if you look at the tables\lookup_tables_revised.sql you'll see that we > remarked out sections of the original that we deemed to be obsolete and > added some new ones > > Let us know if you have any other questions, > Leo and Regina > > http://www.postgis.us > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Richard > Greenwood > Sent: Monday, March 01, 2010 8:52 AM > To: PostGIS Users Discussion > Cc: PostGIS Development Discussion > Subject: Re: [postgis-users] TIGER geocoder with Census 2009 shapefiles > > On Fri, Feb 26, 2010 at 9:52 PM, Paragon Corporation wrote: >> David, >> >> As a matter of fact we've been working on that for chapter 10 of our >> upcoming book and think we have it all working. As a part of the >> example generation process for our chapter 10, we had to come up with >> a way to load the tables that works on both windows and Linux. >> Unfortunately we haven't had a chance to test the Linux loading >> approach, but is pretty much a parallel of the windows approach. > > I am following this steps in the ReadMe.txt in > http://www.postgis.us/downloads/tiger_geocoder_2009.zip > The ReadMe does not mention running tiger_loader.sql or create_geocode.sql > which I assume needs to take place. > > When running tiger_loader.sql I get error: > ERROR: relation "state_lookup" does not exist LINE 189: FROM state_lookup) > As s CROSS JOIN loader_platform As platfo... > > When running create_geocode.sql I get error: > ERROR: syntax error at or near "\" > LINE 21: \i utility/utmzone.sql > > Thanks, > -- > Richard Greenwood > richard.greenwood at gmail.com > www.greenwoodmap.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 woodbri at swoodbridge.com Tue Mar 2 07:41:21 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Tue, 02 Mar 2010 10:41:21 -0500 Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles In-Reply-To: <4B8D2FA5.6070603@swoodbridge.com> References: <90699a8d1002261204l30f58c66j96c8bcefddc3c228@mail.gmail.com> <98B277B354FA44879D351A1BDD5C0838@J> <4B8D2FA5.6070603@swoodbridge.com> Message-ID: <4B8D31A1.5090903@swoodbridge.com> Ok, never mind, it looks like your zip file is all inclusive so I don't need the repository. That was not clear. -Steve Stephen Woodbridge wrote: > OK, this is a silly question, what is the git command to download > Stephen Frost's repository? > > $ git fetch http://www.snowman.net/git/ > fatal: Not a git repository > > $ git fetch git://www.snowman.net/git/ > fatal: Not a git repository > > I've never used git before so this is not obvious, to me. You might want > to add 1-2 lines to chapter 10 to say how to do that so readers can > focus on the geocoder and not on git. > > -Steve > > Paragon Corporation wrote: >> Richard, >> >> To answer your question. We kind of glossed over it in Step 4 when we >> say >> run the create_geocoder.bat file. >> >> As you can see we don't have a .sh equaivalent yet though writing one is >> fairly trivial. >> >> If you look at the file, you'll see the sequence of scripts you need >> to run >> and the order you need to run them. >> >> David, >> Regarding your question about roads_local.sql, we don't believe that >> table >> is used any more and got replaced with edges,addr and faces -- >> if you look at the tables\lookup_tables_revised.sql you'll see that we >> remarked out sections of the original that we deemed to be obsolete and >> added some new ones >> >> Let us know if you have any other questions, >> Leo and Regina >> >> http://www.postgis.us >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> Richard >> Greenwood >> Sent: Monday, March 01, 2010 8:52 AM >> To: PostGIS Users Discussion >> Cc: PostGIS Development Discussion >> Subject: Re: [postgis-users] TIGER geocoder with Census 2009 shapefiles >> >> On Fri, Feb 26, 2010 at 9:52 PM, Paragon Corporation wrote: >>> David, >>> >>> As a matter of fact we've been working on that for chapter 10 of our >>> upcoming book and think we have it all working. As a part of the >>> example generation process for our chapter 10, we had to come up with >>> a way to load the tables that works on both windows and Linux. >>> Unfortunately we haven't had a chance to test the Linux loading >>> approach, but is pretty much a parallel of the windows approach. >> >> I am following this steps in the ReadMe.txt in >> http://www.postgis.us/downloads/tiger_geocoder_2009.zip >> The ReadMe does not mention running tiger_loader.sql or >> create_geocode.sql >> which I assume needs to take place. >> >> When running tiger_loader.sql I get error: >> ERROR: relation "state_lookup" does not exist LINE 189: FROM >> state_lookup) >> As s CROSS JOIN loader_platform As platfo... >> >> When running create_geocode.sql I get error: >> ERROR: syntax error at or near "\" >> LINE 21: \i utility/utmzone.sql >> >> Thanks, >> -- >> Richard Greenwood >> richard.greenwood at gmail.com >> www.greenwoodmap.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 kg at kagii.com Tue Mar 2 07:58:43 2010 From: kg at kagii.com (Kevin Galligan) Date: Tue, 2 Mar 2010 10:58:43 -0500 Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles In-Reply-To: References: <90699a8d1002261204l30f58c66j96c8bcefddc3c228@mail.gmail.com> Message-ID: I actually bought an early access copy of the book. I work in linux and have been playing around with different geocoders and the tiger files. Most recently with a ruby geocoder, for no other reason than I'm trying to find one that is fairly complete and functional. Any idea how "production quality" this particular one is? If its fairly high, I'll probably put some time in to get it working on linux. I have the full 2009 tiger dataset on an EC2 block drive, waiting to import into a different database. Right now I'm using zip+4 data to get a rough geocode, which is good enough for what we're doing, but it only gets 92% of our non-PO Box data. From my experience with the tiger data, it only adds a couple percent at most above that, but the geocoders I've used have been pretty hacky, so its possible that was the issue. Also, some of them seem to not be concerned with stuff like matching "Main St" when you're looking for "Main Ln", which is pretty terrible. On the plus side, if there is major work going on with this geocoder (or any tiger geocoder), I have a huge national data volume that will help stress test the system. Recently I've been toying with USC's free geocoder project. In some areas it actually gets about half of the data I previously could not, which is impressive. The really frustrating thing is, in general, the first 90% is cheap/free. The next 3-4% is marginally expensive. The rest is really pricey. Is there any idea how complete the tiger data is, and why there is this apparent lack of data in there? I find it strange. Some streets are just missing. Stuff like that. Rambling. Anyway, will take a look later. Thoughts on the quality of the geocoder appreciated. -Kevin On Fri, Feb 26, 2010 at 11:52 PM, Paragon Corporation wrote: > David, > > As a matter of fact we've been working on that for chapter 10 of our > upcoming book and think we have it all working. As a part of the example > generation process for our chapter 10, we had to come up with a way to load > the tables that works on both windows and Linux. Unfortunately we haven't > had a chance to test the Linux loading approach, but is pretty much a > parallel of the windows approach. > > To do so we started out with Steve's code, added some additional skeleton > tables and a database function that generates a command line script for the > respective OS. Hopefully it all makes sense from the readme file we have > packaged. > > We also changed one of the functions because there was an error in it and > revised slightly to work with Tiger 2009 data. You can dowload our > slightly > hacked version of Steve's code from our chapter 10 page. > > Steve -- if you are listening we are hoping to remerge your version with > our > loader part and bring back into the PostGIS distribution as part of PostGIS > 1.5.1 or 2.0 release. > > http://www.postgis.us/chapter_10 > > > Leo and Regina > http://www.postgis.us/ > > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Dave > Fuhry > Sent: Friday, February 26, 2010 3:04 PM > To: PostGIS Users Discussion > Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles > > I'm trying to set up the TIGER geocoder from > http://www.snowman.net/git/tiger_geocoder/ which is new and aims to work > with the new TIGER shapefiles. I'm trying with the 2009 shapefiles from > www2.census.gov/geo/tiger/TIGER2009/. > > I'm not sure how to create the roads_local table (derived closely from > completechain in the old version). A join between edges and addr? > > Wondering if anyone can offer any direction. A relevant ticket is > http://trac.osgeo.org/postgis/ticket/135. The out-of-date file which used > to create the roads_local table is tables/roads_local.sql, in the above > repository. > > -Dave > > Table "tiger.edges" > Column | Type | Modifiers > ------------+------------------------+---------------------------------- > ------------+------------------------+-------------------------- > gid | integer | not null default > nextval('public.edges_gid_seq'::regclass) > statefp | character varying(2) | > countyfp | character varying(3) | > tlid | bigint | > tfidl | bigint | > tfidr | bigint | > mtfcc | character varying(5) | > fullname | character varying(100) | > smid | character varying(22) | > lfromadd | character varying(12) | > ltoadd | character varying(12) | > rfromadd | character varying(12) | > rtoadd | character varying(12) | > zipl | character varying(5) | > zipr | character varying(5) | > featcat | character varying(1) | > hydroflg | character varying(1) | > railflg | character varying(1) | > roadflg | character varying(1) | > olfflg | character varying(1) | > passflg | character varying(1) | > divroad | character varying(1) | > exttyp | character varying(1) | > ttyp | character varying(1) | > deckedroad | character varying(1) | > artpath | character varying(1) | > persist | character varying(1) | > gcseflg | character varying(1) | > offsetl | character varying(1) | > offsetr | character varying(1) | > tnidf | bigint | > tnidt | bigint | > the_geom | public.geometry | > > > Table "tiger.addr" > Column | Type | Modifiers > -----------+-----------------------+------------------------------------ > -----------+-----------------------+----------------------- > gid | integer | not null default > nextval('public.addr_gid_seq'::regclass) > tlid | bigint | > fromhn | character varying(12) | > tohn | character varying(12) | > side | character varying(1) | > zip | character varying(5) | > plus4 | character varying(4) | > fromtyp | character varying(1) | > totyp | character varying(1) | > fromarmid | integer | > toarmid | integer | > arid | character varying(22) | > mtfcc | character varying(5) | > statefp | character varying(2) | not null > _______________________________________________ > 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: From dan.putler at sauder.ubc.ca Tue Mar 2 08:20:42 2010 From: dan.putler at sauder.ubc.ca (Dan Putler) Date: Tue, 2 Mar 2010 08:20:42 -0800 Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles In-Reply-To: References: <90699a8d1002261204l30f58c66j96c8bcefddc3c228@mail.gmail.com> Message-ID: <1267546842.6899.21.camel@whitebox> Hi Kevin, For non-disclosure reasons, the address range data has been "fuzzed-up" (i.e., if the actual range is 901 to 957 Main St, they will give the range as 901 to 961 Main St) so the match isn't exact. In addition, if there are too few housing or business units on a road segment, they do not include the address range for that segment, again for non-disclosure reasons. Dan Putler On Tue, 2010-03-02 at 10:58 -0500, Kevin Galligan wrote: > I actually bought an early access copy of the book. I work in linux > and have been playing around with different geocoders and the tiger > files. Most recently with a ruby geocoder, for no other reason than > I'm trying to find one that is fairly complete and functional. > > > Any idea how "production quality" this particular one is? If its > fairly high, I'll probably put some time in to get it working on > linux. I have the full 2009 tiger dataset on an EC2 block drive, > waiting to import into a different database. > > > Right now I'm using zip+4 data to get a rough geocode, which is good > enough for what we're doing, but it only gets 92% of our non-PO Box > data. From my experience with the tiger data, it only adds a couple > percent at most above that, but the geocoders I've used have been > pretty hacky, so its possible that was the issue. Also, some of them > seem to not be concerned with stuff like matching "Main St" when > you're looking for "Main Ln", which is pretty terrible. > > > On the plus side, if there is major work going on with this geocoder > (or any tiger geocoder), I have a huge national data volume that will > help stress test the system. > > > Recently I've been toying with USC's free geocoder project. In some > areas it actually gets about half of the data I previously could not, > which is impressive. > > > The really frustrating thing is, in general, the first 90% is > cheap/free. The next 3-4% is marginally expensive. The rest is > really pricey. > > > Is there any idea how complete the tiger data is, and why there is > this apparent lack of data in there? I find it strange. Some streets > are just missing. Stuff like that. > > > Rambling. Anyway, will take a look later. Thoughts on the quality of > the geocoder appreciated. > > > -Kevin > > On Fri, Feb 26, 2010 at 11:52 PM, Paragon Corporation > wrote: > David, > > As a matter of fact we've been working on that for chapter 10 > of our > upcoming book and think we have it all working. As a part of > the example > generation process for our chapter 10, we had to come up with > a way to load > the tables that works on both windows and Linux. > Unfortunately we haven't > had a chance to test the Linux loading approach, but is pretty > much a > parallel of the windows approach. > > To do so we started out with Steve's code, added some > additional skeleton > tables and a database function that generates a command line > script for the > respective OS. Hopefully it all makes sense from the readme > file we have > packaged. > > We also changed one of the functions because there was an > error in it and > revised slightly to work with Tiger 2009 data. You can > dowload our slightly > hacked version of Steve's code from our chapter 10 page. > > Steve -- if you are listening we are hoping to remerge your > version with our > loader part and bring back into the PostGIS distribution as > part of PostGIS > 1.5.1 or 2.0 release. > > http://www.postgis.us/chapter_10 > > > Leo and Regina > http://www.postgis.us/ > > > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On > Behalf Of Dave > Fuhry > Sent: Friday, February 26, 2010 3:04 PM > To: PostGIS Users Discussion > Subject: [postgis-users] TIGER geocoder with Census 2009 > shapefiles > > I'm trying to set up the TIGER geocoder from > http://www.snowman.net/git/tiger_geocoder/ which is new and > aims to work > with the new TIGER shapefiles. I'm trying with the 2009 > shapefiles from > www2.census.gov/geo/tiger/TIGER2009/. > > I'm not sure how to create the roads_local table (derived > closely from > completechain in the old version). A join between edges and > addr? > > Wondering if anyone can offer any direction. A relevant > ticket is > http://trac.osgeo.org/postgis/ticket/135. The out-of-date > file which used > to create the roads_local table is tables/roads_local.sql, in > the above > repository. > > -Dave > > Table "tiger.edges" > Column | Type | > Modifiers > ------------+------------------------+---------------------------------- > ------------+------------------------+-------------------------- > gid | integer | not null default > nextval('public.edges_gid_seq'::regclass) > statefp | character varying(2) | > countyfp | character varying(3) | > tlid | bigint | > tfidl | bigint | > tfidr | bigint | > mtfcc | character varying(5) | > fullname | character varying(100) | > smid | character varying(22) | > lfromadd | character varying(12) | > ltoadd | character varying(12) | > rfromadd | character varying(12) | > rtoadd | character varying(12) | > zipl | character varying(5) | > zipr | character varying(5) | > featcat | character varying(1) | > hydroflg | character varying(1) | > railflg | character varying(1) | > roadflg | character varying(1) | > olfflg | character varying(1) | > passflg | character varying(1) | > divroad | character varying(1) | > exttyp | character varying(1) | > ttyp | character varying(1) | > deckedroad | character varying(1) | > artpath | character varying(1) | > persist | character varying(1) | > gcseflg | character varying(1) | > offsetl | character varying(1) | > offsetr | character varying(1) | > tnidf | bigint | > tnidt | bigint | > the_geom | public.geometry | > > > Table "tiger.addr" > Column | Type | > Modifiers > -----------+-----------------------+------------------------------------ > -----------+-----------------------+----------------------- > gid | integer | not null default > nextval('public.addr_gid_seq'::regclass) > tlid | bigint | > fromhn | character varying(12) | > tohn | character varying(12) | > side | character varying(1) | > zip | character varying(5) | > plus4 | character varying(4) | > fromtyp | character varying(1) | > totyp | character varying(1) | > fromarmid | integer | > toarmid | integer | > arid | character varying(22) | > mtfcc | character varying(5) | > statefp | character varying(2) | not null > _______________________________________________ > 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 -- Dan Putler Sauder School of Business University of British Columbia From woodbri at swoodbridge.com Tue Mar 2 08:40:55 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Tue, 02 Mar 2010 11:40:55 -0500 Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles In-Reply-To: References: <90699a8d1002261204l30f58c66j96c8bcefddc3c228@mail.gmail.com> Message-ID: <4B8D3F97.4040005@swoodbridge.com> Hi Kevin, I have worked with the Tiger data for about 10 years now. The recent improvements in tiger are really great to see, but not without their own set of issues. Tiger has a lot of known limitations based on the rules, regs and requirements of the US Census. The recent work has georectified the street data and added lots of new streets based on digitizing high-res satellite imagery. but that does not let you read the street names so they are added after the fact. There are a lot of street segments that do not have names. We can only hope that these will be added over time. Because of non-disclosure, address ranges can be weird also. Many small streets have address ranges 1-100 encoded on them, in spite of the fact that the real address ranges only run from 1-20. This has the effect of skewing all the locations to the front end of the street. Because language is ambiguous and typos and sounds-like errors, fuzzy searching is employed. Most geocoders do some form of fuzzy searching so you often run into the Main St vs Main Ln issue or you find W Main St when you are search for E Main St. When a geocoder says "Found it!", you need to be prepared to say Found What? or be tolerant to mis-geocodes. I like geocoders the score the results and return them in ranked order. In general a geocoder can never be better than its data and can in fact be much worse than its data. Fuzzy searching lets you find possible candidates in the data that might not have been encoded correctly in either the input address or the data address, but with the uncertainty that this is the actual location wanted or not. You might also want to look at PAGC Geocoder. It is written in C and uses some statistical matching techniques which are very good, There are some change in one of the branches that let you load all the Tiger data for the US. http://www.pagcgeo.org/ -Steve Kevin Galligan wrote: > I actually bought an early access copy of the book. I work in linux and > have been playing around with different geocoders and the tiger files. > Most recently with a ruby geocoder, for no other reason than I'm trying > to find one that is fairly complete and functional. > > Any idea how "production quality" this particular one is? If its fairly > high, I'll probably put some time in to get it working on linux. I have > the full 2009 tiger dataset on an EC2 block drive, waiting to import > into a different database. > > Right now I'm using zip+4 data to get a rough geocode, which is good > enough for what we're doing, but it only gets 92% of our non-PO Box > data. From my experience with the tiger data, it only adds a couple > percent at most above that, but the geocoders I've used have been pretty > hacky, so its possible that was the issue. Also, some of them seem to > not be concerned with stuff like matching "Main St" when you're looking > for "Main Ln", which is pretty terrible. > > On the plus side, if there is major work going on with this geocoder (or > any tiger geocoder), I have a huge national data volume that will help > stress test the system. > > Recently I've been toying with USC's free geocoder project. In some > areas it actually gets about half of the data I previously could not, > which is impressive. > > The really frustrating thing is, in general, the first 90% is > cheap/free. The next 3-4% is marginally expensive. The rest is really > pricey. > > Is there any idea how complete the tiger data is, and why there is this > apparent lack of data in there? I find it strange. Some streets are > just missing. Stuff like that. > > Rambling. Anyway, will take a look later. Thoughts on the quality of > the geocoder appreciated. > > -Kevin > > On Fri, Feb 26, 2010 at 11:52 PM, Paragon Corporation > wrote: > > David, > > As a matter of fact we've been working on that for chapter 10 of our > upcoming book and think we have it all working. As a part of the > example > generation process for our chapter 10, we had to come up with a way > to load > the tables that works on both windows and Linux. Unfortunately we > haven't > had a chance to test the Linux loading approach, but is pretty much a > parallel of the windows approach. > > To do so we started out with Steve's code, added some additional > skeleton > tables and a database function that generates a command line script > for the > respective OS. Hopefully it all makes sense from the readme file we > have > packaged. > > We also changed one of the functions because there was an error in > it and > revised slightly to work with Tiger 2009 data. You can dowload our > slightly > hacked version of Steve's code from our chapter 10 page. > > Steve -- if you are listening we are hoping to remerge your version > with our > loader part and bring back into the PostGIS distribution as part of > PostGIS > 1.5.1 or 2.0 release. > > http://www.postgis.us/chapter_10 > > > Leo and Regina > http://www.postgis.us/ > > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > > [mailto:postgis-users-bounces at postgis.refractions.net > ] On Behalf Of > Dave > Fuhry > Sent: Friday, February 26, 2010 3:04 PM > To: PostGIS Users Discussion > Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles > > I'm trying to set up the TIGER geocoder from > http://www.snowman.net/git/tiger_geocoder/ which is new and aims to work > with the new TIGER shapefiles. I'm trying with the 2009 shapefiles from > www2.census.gov/geo/tiger/TIGER2009/ > . > > I'm not sure how to create the roads_local table (derived closely from > completechain in the old version). A join between edges and addr? > > Wondering if anyone can offer any direction. A relevant ticket is > http://trac.osgeo.org/postgis/ticket/135. The out-of-date file > which used > to create the roads_local table is tables/roads_local.sql, in the above > repository. > > -Dave > > Table "tiger.edges" > Column | Type | Modifiers > ------------+------------------------+---------------------------------- > ------------+------------------------+-------------------------- > gid | integer | not null default > nextval('public.edges_gid_seq'::regclass) > statefp | character varying(2) | > countyfp | character varying(3) | > tlid | bigint | > tfidl | bigint | > tfidr | bigint | > mtfcc | character varying(5) | > fullname | character varying(100) | > smid | character varying(22) | > lfromadd | character varying(12) | > ltoadd | character varying(12) | > rfromadd | character varying(12) | > rtoadd | character varying(12) | > zipl | character varying(5) | > zipr | character varying(5) | > featcat | character varying(1) | > hydroflg | character varying(1) | > railflg | character varying(1) | > roadflg | character varying(1) | > olfflg | character varying(1) | > passflg | character varying(1) | > divroad | character varying(1) | > exttyp | character varying(1) | > ttyp | character varying(1) | > deckedroad | character varying(1) | > artpath | character varying(1) | > persist | character varying(1) | > gcseflg | character varying(1) | > offsetl | character varying(1) | > offsetr | character varying(1) | > tnidf | bigint | > tnidt | bigint | > the_geom | public.geometry | > > > Table "tiger.addr" > Column | Type | Modifiers > -----------+-----------------------+------------------------------------ > -----------+-----------------------+----------------------- > gid | integer | not null default > nextval('public.addr_gid_seq'::regclass) > tlid | bigint | > fromhn | character varying(12) | > tohn | character varying(12) | > side | character varying(1) | > zip | character varying(5) | > plus4 | character varying(4) | > fromtyp | character varying(1) | > totyp | character varying(1) | > fromarmid | integer | > toarmid | integer | > arid | character varying(22) | > mtfcc | character varying(5) | > statefp | character varying(2) | not null > _______________________________________________ > 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 lr at pcorp.us Tue Mar 2 09:05:01 2010 From: lr at pcorp.us (Paragon Corporation) Date: Tue, 2 Mar 2010 12:05:01 -0500 Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles In-Reply-To: <4B8D3F97.4040005@swoodbridge.com> References: <90699a8d1002261204l30f58c66j96c8bcefddc3c228@mail.gmail.com> <4B8D3F97.4040005@swoodbridge.com> Message-ID: Kevin, To add to what Steve is saying. One thing that's nice about this tiger geocoder, is that it does provide ratings and also tells you the street that it matched against so you can visually judge. There is one thing we didn't get to and that was putting in all the necessary indexes in our variant of the loader, so its much slower than it really should be. That is one of the things that needs to be put in. Steve Frost did package in a loader script for Linux by the way which hmm we forgot to include in the download file. We'll add that in. http://www.postgis.us Leo and Regina -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Stephen Woodbridge Sent: Tuesday, March 02, 2010 11:41 AM To: PostGIS Users Discussion Cc: PostGIS Development Discussion Subject: Re: [postgis-users] TIGER geocoder with Census 2009 shapefiles Hi Kevin, I have worked with the Tiger data for about 10 years now. The recent improvements in tiger are really great to see, but not without their own set of issues. Tiger has a lot of known limitations based on the rules, regs and requirements of the US Census. The recent work has georectified the street data and added lots of new streets based on digitizing high-res satellite imagery. but that does not let you read the street names so they are added after the fact. There are a lot of street segments that do not have names. We can only hope that these will be added over time. Because of non-disclosure, address ranges can be weird also. Many small streets have address ranges 1-100 encoded on them, in spite of the fact that the real address ranges only run from 1-20. This has the effect of skewing all the locations to the front end of the street. Because language is ambiguous and typos and sounds-like errors, fuzzy searching is employed. Most geocoders do some form of fuzzy searching so you often run into the Main St vs Main Ln issue or you find W Main St when you are search for E Main St. When a geocoder says "Found it!", you need to be prepared to say Found What? or be tolerant to mis-geocodes. I like geocoders the score the results and return them in ranked order. In general a geocoder can never be better than its data and can in fact be much worse than its data. Fuzzy searching lets you find possible candidates in the data that might not have been encoded correctly in either the input address or the data address, but with the uncertainty that this is the actual location wanted or not. You might also want to look at PAGC Geocoder. It is written in C and uses some statistical matching techniques which are very good, There are some change in one of the branches that let you load all the Tiger data for the US. http://www.pagcgeo.org/ -Steve Kevin Galligan wrote: > I actually bought an early access copy of the book. I work in linux > and have been playing around with different geocoders and the tiger files. > Most recently with a ruby geocoder, for no other reason than I'm > trying to find one that is fairly complete and functional. > > Any idea how "production quality" this particular one is? If its > fairly high, I'll probably put some time in to get it working on > linux. I have the full 2009 tiger dataset on an EC2 block drive, > waiting to import into a different database. > > Right now I'm using zip+4 data to get a rough geocode, which is good > enough for what we're doing, but it only gets 92% of our non-PO Box > data. From my experience with the tiger data, it only adds a couple > percent at most above that, but the geocoders I've used have been > pretty hacky, so its possible that was the issue. Also, some of them > seem to not be concerned with stuff like matching "Main St" when > you're looking for "Main Ln", which is pretty terrible. > > On the plus side, if there is major work going on with this geocoder > (or any tiger geocoder), I have a huge national data volume that will > help stress test the system. > > Recently I've been toying with USC's free geocoder project. In some > areas it actually gets about half of the data I previously could not, > which is impressive. > > The really frustrating thing is, in general, the first 90% is > cheap/free. The next 3-4% is marginally expensive. The rest is > really pricey. > > Is there any idea how complete the tiger data is, and why there is > this apparent lack of data in there? I find it strange. Some streets > are just missing. Stuff like that. > > Rambling. Anyway, will take a look later. Thoughts on the quality of > the geocoder appreciated. > > -Kevin > > On Fri, Feb 26, 2010 at 11:52 PM, Paragon Corporation > wrote: > > David, > > As a matter of fact we've been working on that for chapter 10 of our > upcoming book and think we have it all working. As a part of the > example > generation process for our chapter 10, we had to come up with a way > to load > the tables that works on both windows and Linux. Unfortunately we > haven't > had a chance to test the Linux loading approach, but is pretty much a > parallel of the windows approach. > > To do so we started out with Steve's code, added some additional > skeleton > tables and a database function that generates a command line script > for the > respective OS. Hopefully it all makes sense from the readme file we > have > packaged. > > We also changed one of the functions because there was an error in > it and > revised slightly to work with Tiger 2009 data. You can dowload our > slightly > hacked version of Steve's code from our chapter 10 page. > > Steve -- if you are listening we are hoping to remerge your version > with our > loader part and bring back into the PostGIS distribution as part of > PostGIS > 1.5.1 or 2.0 release. > > http://www.postgis.us/chapter_10 > > > Leo and Regina > http://www.postgis.us/ > > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > > [mailto:postgis-users-bounces at postgis.refractions.net > ] On Behalf Of > Dave > Fuhry > Sent: Friday, February 26, 2010 3:04 PM > To: PostGIS Users Discussion > Subject: [postgis-users] TIGER geocoder with Census 2009 > shapefiles > > I'm trying to set up the TIGER geocoder from > http://www.snowman.net/git/tiger_geocoder/ which is new and aims to work > with the new TIGER shapefiles. I'm trying with the 2009 shapefiles from > www2.census.gov/geo/tiger/TIGER2009/ > . > > I'm not sure how to create the roads_local table (derived closely from > completechain in the old version). A join between edges and addr? > > Wondering if anyone can offer any direction. A relevant ticket is > http://trac.osgeo.org/postgis/ticket/135. The out-of-date file > which used > to create the roads_local table is tables/roads_local.sql, in the above > repository. > > -Dave > > Table "tiger.edges" > Column | Type | Modifiers > ------------+------------------------+---------------------------------- > ------------+------------------------+-------------------------- > gid | integer | not null default > nextval('public.edges_gid_seq'::regclass) > statefp | character varying(2) | > countyfp | character varying(3) | > tlid | bigint | > tfidl | bigint | > tfidr | bigint | > mtfcc | character varying(5) | > fullname | character varying(100) | > smid | character varying(22) | > lfromadd | character varying(12) | > ltoadd | character varying(12) | > rfromadd | character varying(12) | > rtoadd | character varying(12) | > zipl | character varying(5) | > zipr | character varying(5) | > featcat | character varying(1) | > hydroflg | character varying(1) | > railflg | character varying(1) | > roadflg | character varying(1) | > olfflg | character varying(1) | > passflg | character varying(1) | > divroad | character varying(1) | > exttyp | character varying(1) | > ttyp | character varying(1) | > deckedroad | character varying(1) | > artpath | character varying(1) | > persist | character varying(1) | > gcseflg | character varying(1) | > offsetl | character varying(1) | > offsetr | character varying(1) | > tnidf | bigint | > tnidt | bigint | > the_geom | public.geometry | > > > Table "tiger.addr" > Column | Type | Modifiers > -----------+-----------------------+------------------------------------ > -----------+-----------------------+----------------------- > gid | integer | not null default > nextval('public.addr_gid_seq'::regclass) > tlid | bigint | > fromhn | character varying(12) | > tohn | character varying(12) | > side | character varying(1) | > zip | character varying(5) | > plus4 | character varying(4) | > fromtyp | character varying(1) | > totyp | character varying(1) | > fromarmid | integer | > toarmid | integer | > arid | character varying(22) | > mtfcc | character varying(5) | > statefp | character varying(2) | not null > _______________________________________________ > 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 lr at pcorp.us Tue Mar 2 09:10:00 2010 From: lr at pcorp.us (Paragon Corporation) Date: Tue, 2 Mar 2010 12:10:00 -0500 Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles In-Reply-To: <4B8D31A1.5090903@swoodbridge.com> References: <90699a8d1002261204l30f58c66j96c8bcefddc3c228@mail.gmail.com> <98B277B354FA44879D351A1BDD5C0838@J><4B8D2FA5.6070603@swoodbridge.com> <4B8D31A1.5090903@swoodbridge.com> Message-ID: Steve, As mentioned, not quite completely inclusive as we forgot to include the original sh loader scripts. We being lazy windows bums, we just used TortoiseGit to download the files. But other Git download tools are listed here http://git-scm.com/tools We apologize for the confusion in the writing in the chapter summary. Originally we had planned to just have the enhancements we added for download and have people download the rest from GIT themselves, but then after writing a page or two about how to get it from GIT, we decided it was too distracting. So we cut that all out and included the original in the download. We were also thinking eventually it will be folded back into the PostGIS source code repository, so all the GIT instructions would be obsolete by the time the book was out anyway. Thanks, Leo and Regina http://www.postgis.us -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Stephen Woodbridge Sent: Tuesday, March 02, 2010 10:41 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] TIGER geocoder with Census 2009 shapefiles Ok, never mind, it looks like your zip file is all inclusive so I don't need the repository. That was not clear. -Steve Stephen Woodbridge wrote: > OK, this is a silly question, what is the git command to download > Stephen Frost's repository? > > $ git fetch http://www.snowman.net/git/ > fatal: Not a git repository > > $ git fetch git://www.snowman.net/git/ > fatal: Not a git repository > > I've never used git before so this is not obvious, to me. You might > want to add 1-2 lines to chapter 10 to say how to do that so readers > can focus on the geocoder and not on git. > > -Steve > > Paragon Corporation wrote: >> Richard, >> >> To answer your question. We kind of glossed over it in Step 4 when >> we say run the create_geocoder.bat file. >> >> As you can see we don't have a .sh equaivalent yet though writing one >> is fairly trivial. >> >> If you look at the file, you'll see the sequence of scripts you need >> to run and the order you need to run them. >> >> David, >> Regarding your question about roads_local.sql, we don't believe that >> table is used any more and got replaced with edges,addr and faces -- >> if you look at the tables\lookup_tables_revised.sql you'll see that >> we remarked out sections of the original that we deemed to be >> obsolete and added some new ones >> >> Let us know if you have any other questions, Leo and Regina >> >> http://www.postgis.us >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> Richard Greenwood >> Sent: Monday, March 01, 2010 8:52 AM >> To: PostGIS Users Discussion >> Cc: PostGIS Development Discussion >> Subject: Re: [postgis-users] TIGER geocoder with Census 2009 >> shapefiles >> >> On Fri, Feb 26, 2010 at 9:52 PM, Paragon Corporation wrote: >>> David, >>> >>> As a matter of fact we've been working on that for chapter 10 of our >>> upcoming book and think we have it all working. As a part of the >>> example generation process for our chapter 10, we had to come up >>> with a way to load the tables that works on both windows and Linux. >>> Unfortunately we haven't had a chance to test the Linux loading >>> approach, but is pretty much a parallel of the windows approach. >> >> I am following this steps in the ReadMe.txt in >> http://www.postgis.us/downloads/tiger_geocoder_2009.zip >> The ReadMe does not mention running tiger_loader.sql or >> create_geocode.sql which I assume needs to take place. >> >> When running tiger_loader.sql I get error: >> ERROR: relation "state_lookup" does not exist LINE 189: FROM >> state_lookup) >> As s CROSS JOIN loader_platform As platfo... >> >> When running create_geocode.sql I get error: >> ERROR: syntax error at or near "\" >> LINE 21: \i utility/utmzone.sql >> >> Thanks, >> -- >> Richard Greenwood >> richard.greenwood at gmail.com >> www.greenwoodmap.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 netmasters.ma at gmail.com Tue Mar 2 10:10:21 2010 From: netmasters.ma at gmail.com (Mark Vantzelfde) Date: Tue, 2 Mar 2010 13:10:21 -0500 Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles In-Reply-To: <4B8D3F97.4040005@swoodbridge.com> References: <90699a8d1002261204l30f58c66j96c8bcefddc3c228@mail.gmail.com> <4B8D3F97.4040005@swoodbridge.com> Message-ID: Can anyone comment on the accuracy of the Tiger geocoder vs MapMarker? Thanks Mark On Tue, Mar 2, 2010 at 11:40 AM, Stephen Woodbridge wrote: > Hi Kevin, > > I have worked with the Tiger data for about 10 years now. The recent > improvements in tiger are really great to see, but not without their own set > of issues. Tiger has a lot of known limitations based on the rules, regs and > requirements of the US Census. The recent work has georectified the street > data and added lots of new streets based on digitizing high-res satellite > imagery. but that does not let you read the street names so they are added > after the fact. There are a lot of street segments that do not have names. > We can only hope that these will be added over time. Because of > non-disclosure, address ranges can be weird also. Many small streets have > address ranges 1-100 encoded on them, in spite of the fact that the real > address ranges only run from 1-20. This has the effect of skewing all the > locations to the front end of the street. > > Because language is ambiguous and typos and sounds-like errors, fuzzy > searching is employed. Most geocoders do some form of fuzzy searching so you > often run into the Main St vs Main Ln issue or you find W Main St when you > are search for E Main St. > > When a geocoder says "Found it!", you need to be prepared to say Found > What? or be tolerant to mis-geocodes. I like geocoders the score the results > and return them in ranked order. > > In general a geocoder can never be better than its data and can in fact be > much worse than its data. Fuzzy searching lets you find possible candidates > in the data that might not have been encoded correctly in either the input > address or the data address, but with the uncertainty that this is the > actual location wanted or not. > > You might also want to look at PAGC Geocoder. It is written in C and uses > some statistical matching techniques which are very good, There are some > change in one of the branches that let you load all the Tiger data for the > US. > > http://www.pagcgeo.org/ > > > -Steve > > > Kevin Galligan wrote: > >> I actually bought an early access copy of the book. I work in linux and >> have been playing around with different geocoders and the tiger files. Most >> recently with a ruby geocoder, for no other reason than I'm trying to find >> one that is fairly complete and functional. >> >> Any idea how "production quality" this particular one is? If its fairly >> high, I'll probably put some time in to get it working on linux. I have the >> full 2009 tiger dataset on an EC2 block drive, waiting to import into a >> different database. >> >> Right now I'm using zip+4 data to get a rough geocode, which is good >> enough for what we're doing, but it only gets 92% of our non-PO Box data. >> From my experience with the tiger data, it only adds a couple percent at >> most above that, but the geocoders I've used have been pretty hacky, so its >> possible that was the issue. Also, some of them seem to not be concerned >> with stuff like matching "Main St" when you're looking for "Main Ln", which >> is pretty terrible. >> >> On the plus side, if there is major work going on with this geocoder (or >> any tiger geocoder), I have a huge national data volume that will help >> stress test the system. >> >> Recently I've been toying with USC's free geocoder project. In some areas >> it actually gets about half of the data I previously could not, which is >> impressive. >> >> The really frustrating thing is, in general, the first 90% is cheap/free. >> The next 3-4% is marginally expensive. The rest is really pricey. >> >> Is there any idea how complete the tiger data is, and why there is this >> apparent lack of data in there? I find it strange. Some streets are just >> missing. Stuff like that. >> >> Rambling. Anyway, will take a look later. Thoughts on the quality of the >> geocoder appreciated. >> >> -Kevin >> >> On Fri, Feb 26, 2010 at 11:52 PM, Paragon Corporation > lr at pcorp.us>> wrote: >> >> David, >> >> As a matter of fact we've been working on that for chapter 10 of our >> upcoming book and think we have it all working. As a part of the >> example >> generation process for our chapter 10, we had to come up with a way >> to load >> the tables that works on both windows and Linux. Unfortunately we >> haven't >> had a chance to test the Linux loading approach, but is pretty much a >> parallel of the windows approach. >> >> To do so we started out with Steve's code, added some additional >> skeleton >> tables and a database function that generates a command line script >> for the >> respective OS. Hopefully it all makes sense from the readme file we >> have >> packaged. >> >> We also changed one of the functions because there was an error in >> it and >> revised slightly to work with Tiger 2009 data. You can dowload our >> slightly >> hacked version of Steve's code from our chapter 10 page. >> >> Steve -- if you are listening we are hoping to remerge your version >> with our >> loader part and bring back into the PostGIS distribution as part of >> PostGIS >> 1.5.1 or 2.0 release. >> >> http://www.postgis.us/chapter_10 >> >> >> Leo and Regina >> http://www.postgis.us/ >> >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net >> >> [mailto:postgis-users-bounces at postgis.refractions.net >> ] On Behalf Of >> Dave >> Fuhry >> Sent: Friday, February 26, 2010 3:04 PM >> To: PostGIS Users Discussion >> Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles >> >> I'm trying to set up the TIGER geocoder from >> http://www.snowman.net/git/tiger_geocoder/ which is new and aims to >> work >> with the new TIGER shapefiles. I'm trying with the 2009 shapefiles >> from >> www2.census.gov/geo/tiger/TIGER2009/ >> . >> >> >> I'm not sure how to create the roads_local table (derived closely from >> completechain in the old version). A join between edges and addr? >> >> Wondering if anyone can offer any direction. A relevant ticket is >> http://trac.osgeo.org/postgis/ticket/135. The out-of-date file >> which used >> to create the roads_local table is tables/roads_local.sql, in the above >> repository. >> >> -Dave >> >> Table "tiger.edges" >> Column | Type | Modifiers >> >> ------------+------------------------+---------------------------------- >> ------------+------------------------+-------------------------- >> gid | integer | not null default >> nextval('public.edges_gid_seq'::regclass) >> statefp | character varying(2) | >> countyfp | character varying(3) | >> tlid | bigint | >> tfidl | bigint | >> tfidr | bigint | >> mtfcc | character varying(5) | >> fullname | character varying(100) | >> smid | character varying(22) | >> lfromadd | character varying(12) | >> ltoadd | character varying(12) | >> rfromadd | character varying(12) | >> rtoadd | character varying(12) | >> zipl | character varying(5) | >> zipr | character varying(5) | >> featcat | character varying(1) | >> hydroflg | character varying(1) | >> railflg | character varying(1) | >> roadflg | character varying(1) | >> olfflg | character varying(1) | >> passflg | character varying(1) | >> divroad | character varying(1) | >> exttyp | character varying(1) | >> ttyp | character varying(1) | >> deckedroad | character varying(1) | >> artpath | character varying(1) | >> persist | character varying(1) | >> gcseflg | character varying(1) | >> offsetl | character varying(1) | >> offsetr | character varying(1) | >> tnidf | bigint | >> tnidt | bigint | >> the_geom | public.geometry | >> >> >> Table "tiger.addr" >> Column | Type | Modifiers >> >> -----------+-----------------------+------------------------------------ >> -----------+-----------------------+----------------------- >> gid | integer | not null default >> nextval('public.addr_gid_seq'::regclass) >> tlid | bigint | >> fromhn | character varying(12) | >> tohn | character varying(12) | >> side | character varying(1) | >> zip | character varying(5) | >> plus4 | character varying(4) | >> fromtyp | character varying(1) | >> totyp | character varying(1) | >> fromarmid | integer | >> toarmid | integer | >> arid | character varying(22) | >> mtfcc | character varying(5) | >> statefp | character varying(2) | not null >> _______________________________________________ >> 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 > -- Mark Vantzelfde NetMasters, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From woodbri at swoodbridge.com Tue Mar 2 10:33:57 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Tue, 02 Mar 2010 13:33:57 -0500 Subject: [postgis-users] TIGER geocoder with Census 2009 shapefiles In-Reply-To: References: <90699a8d1002261204l30f58c66j96c8bcefddc3c228@mail.gmail.com> <4B8D3F97.4040005@swoodbridge.com> Message-ID: <4B8D5A15.4020903@swoodbridge.com> Mark Vantzelfde wrote: > Can anyone comment on the accuracy of the Tiger geocoder vs MapMarker? I can't comment specifically on these, but in general I have done a lot of geocoder analysis and I have found that the best way seems to be to get a large list of addresses that are typical for your needs. The typical for your needs, is the important part because address lists can be notoriously bad in my experience. So having typical addresses of what you will be feeding it are important to get reasonable measurements. Large is in 20K range for quick checks and 100-250K records for a more through test. Then run this list to make a baseline and verify the results, either via random samples, or whatever makes sense for your needs. Now you can run this list against other geocoders and get stats. One way to do this is to have each record already geocoded like: address, city, state, postalcode, lat, long When you use this record as input you can compare the distance of the result to this location and use that as a measure of accuracy. Then just compute some statistics on the results to access if the new geocoder is better or worse. You can also slice and dice the results by state or region, because I have seen that some areas have significantly more problems than other area depending on the data set being used. It is just as important to look at the failures as the successful geocodes and to understand if a success is really that and why a given address failed, bad input, bad data, algorithm limitation or bug, etc. -Steve > Thanks > Mark > > On Tue, Mar 2, 2010 at 11:40 AM, Stephen Woodbridge > > wrote: > > Hi Kevin, > > I have worked with the Tiger data for about 10 years now. The recent > improvements in tiger are really great to see, but not without their > own set of issues. Tiger has a lot of known limitations based on the > rules, regs and requirements of the US Census. The recent work has > georectified the street data and added lots of new streets based on > digitizing high-res satellite imagery. but that does not let you > read the street names so they are added after the fact. There are a > lot of street segments that do not have names. We can only hope that > these will be added over time. Because of non-disclosure, address > ranges can be weird also. Many small streets have address ranges > 1-100 encoded on them, in spite of the fact that the real address > ranges only run from 1-20. This has the effect of skewing all the > locations to the front end of the street. > > Because language is ambiguous and typos and sounds-like errors, > fuzzy searching is employed. Most geocoders do some form of fuzzy > searching so you often run into the Main St vs Main Ln issue or you > find W Main St when you are search for E Main St. > > When a geocoder says "Found it!", you need to be prepared to say > Found What? or be tolerant to mis-geocodes. I like geocoders the > score the results and return them in ranked order. > > In general a geocoder can never be better than its data and can in > fact be much worse than its data. Fuzzy searching lets you find > possible candidates in the data that might not have been encoded > correctly in either the input address or the data address, but with > the uncertainty that this is the actual location wanted or not. > > You might also want to look at PAGC Geocoder. It is written in C and > uses some statistical matching techniques which are very good, There > are some change in one of the branches that let you load all the > Tiger data for the US. > > http://www.pagcgeo.org/ > > > -Steve > > > Kevin Galligan wrote: > > I actually bought an early access copy of the book. I work in > linux and have been playing around with different geocoders and > the tiger files. Most recently with a ruby geocoder, for no > other reason than I'm trying to find one that is fairly complete > and functional. > > Any idea how "production quality" this particular one is? If > its fairly high, I'll probably put some time in to get it > working on linux. I have the full 2009 tiger dataset on an EC2 > block drive, waiting to import into a different database. > > Right now I'm using zip+4 data to get a rough geocode, which is > good enough for what we're doing, but it only gets 92% of our > non-PO Box data. From my experience with the tiger data, it > only adds a couple percent at most above that, but the geocoders > I've used have been pretty hacky, so its possible that was the > issue. Also, some of them seem to not be concerned with stuff > like matching "Main St" when you're looking for "Main Ln", which > is pretty terrible. > > On the plus side, if there is major work going on with this > geocoder (or any tiger geocoder), I have a huge national data > volume that will help stress test the system. > > Recently I've been toying with USC's free geocoder project. In > some areas it actually gets about half of the data I previously > could not, which is impressive. > > The really frustrating thing is, in general, the first 90% is > cheap/free. The next 3-4% is marginally expensive. The rest is > really pricey. > > Is there any idea how complete the tiger data is, and why there > is this apparent lack of data in there? I find it strange. > Some streets are just missing. Stuff like that. > > Rambling. Anyway, will take a look later. Thoughts on the > quality of the geocoder appreciated. > > -Kevin > > On Fri, Feb 26, 2010 at 11:52 PM, Paragon Corporation > >> wrote: > > David, > > As a matter of fact we've been working on that for chapter 10 > of our > upcoming book and think we have it all working. As a part of the > example > generation process for our chapter 10, we had to come up with > a way > to load > the tables that works on both windows and Linux. > Unfortunately we > haven't > had a chance to test the Linux loading approach, but is > pretty much a > parallel of the windows approach. > > To do so we started out with Steve's code, added some additional > skeleton > tables and a database function that generates a command line > script > for the > respective OS. Hopefully it all makes sense from the readme > file we > have > packaged. > > We also changed one of the functions because there was an > error in > it and > revised slightly to work with Tiger 2009 data. You can > dowload our > slightly > hacked version of Steve's code from our chapter 10 page. > > Steve -- if you are listening we are hoping to remerge your > version > with our > loader part and bring back into the PostGIS distribution as > part of > PostGIS > 1.5.1 or 2.0 release. > > http://www.postgis.us/chapter_10 > > > Leo and Regina > http://www.postgis.us/ > > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > > > > [mailto:postgis-users-bounces at postgis.refractions.net > > >] On > Behalf Of > Dave > Fuhry > Sent: Friday, February 26, 2010 3:04 PM > To: PostGIS Users Discussion > Subject: [postgis-users] TIGER geocoder with Census 2009 > shapefiles > > I'm trying to set up the TIGER geocoder from > http://www.snowman.net/git/tiger_geocoder/ which is new and > aims to work > with the new TIGER shapefiles. I'm trying with the 2009 > shapefiles from > www2.census.gov/geo/tiger/TIGER2009/ > > . > > > I'm not sure how to create the roads_local table (derived > closely from > completechain in the old version). A join between edges and > addr? > > Wondering if anyone can offer any direction. A relevant > ticket is > http://trac.osgeo.org/postgis/ticket/135. The out-of-date file > which used > to create the roads_local table is tables/roads_local.sql, in > the above > repository. > > -Dave > > Table "tiger.edges" > Column | Type | > Modifiers > > ------------+------------------------+---------------------------------- > ------------+------------------------+-------------------------- > gid | integer | not null default > nextval('public.edges_gid_seq'::regclass) > statefp | character varying(2) | > countyfp | character varying(3) | > tlid | bigint | > tfidl | bigint | > tfidr | bigint | > mtfcc | character varying(5) | > fullname | character varying(100) | > smid | character varying(22) | > lfromadd | character varying(12) | > ltoadd | character varying(12) | > rfromadd | character varying(12) | > rtoadd | character varying(12) | > zipl | character varying(5) | > zipr | character varying(5) | > featcat | character varying(1) | > hydroflg | character varying(1) | > railflg | character varying(1) | > roadflg | character varying(1) | > olfflg | character varying(1) | > passflg | character varying(1) | > divroad | character varying(1) | > exttyp | character varying(1) | > ttyp | character varying(1) | > deckedroad | character varying(1) | > artpath | character varying(1) | > persist | character varying(1) | > gcseflg | character varying(1) | > offsetl | character varying(1) | > offsetr | character varying(1) | > tnidf | bigint | > tnidt | bigint | > the_geom | public.geometry | > > > Table "tiger.addr" > Column | Type | > Modifiers > > -----------+-----------------------+------------------------------------ > -----------+-----------------------+----------------------- > gid | integer | not null default > nextval('public.addr_gid_seq'::regclass) > tlid | bigint | > fromhn | character varying(12) | > tohn | character varying(12) | > side | character varying(1) | > zip | character varying(5) | > plus4 | character varying(4) | > fromtyp | character varying(1) | > totyp | character varying(1) | > fromarmid | integer | > toarmid | integer | > arid | character varying(22) | > mtfcc | character varying(5) | > statefp | character varying(2) | not null > _______________________________________________ > 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 > > > > > -- > Mark Vantzelfde > NetMasters, Inc. > > > ------------------------------------------------------------------------ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From woodbri at swoodbridge.com Tue Mar 2 11:43:43 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Tue, 02 Mar 2010 14:43:43 -0500 Subject: [postgis-users] [pgrouting-users] How to join Two points (latitudes and langitudes) in postgis? In-Reply-To: <5d08242a1003021128q10baab4ci1d7e126e1edec462@mail.gmail.com> References: <5d08242a1003021128q10baab4ci1d7e126e1edec462@mail.gmail.com> Message-ID: <4B8D6A6F.3030208@swoodbridge.com> Siddhesh, This is probably more of a postGIS list query than a pgRouting query. 1) you did not say what error messages you might have gotten! 2) is the line in the database after you insert it? 3) what constraints to you have on the table for SRID? 4) you might want to ask on the QGIS list also -Steve SIDDHESH GANDHI wrote: > Hi all, > I am trying to join 2 points on earth (SRID 4326) by a line but somehow > I m not able to see that in QGIS. > > I have taken some latitudes and longitudes and created points. When I > create POINT column and load these points, I can see them on QGIS at > exact same locations. (Boston, MA will be at same position where it is > now wrt MA state shapefile) > > Now when i try to join two points (E.g. Boston and Some other place in > MA), it does not appear on QGIS. > > I tried following queries for linestring construction - > 1) insert into sridline (the_geom) values > (ST_setSRID(ST_MakeLine(ST_MakePoint(42.5667212, > -70.987212),ST_MakePoint(44.5667212, -70.987212)),4326)); > Other thing I tried is : > 2) insert into sridline (the_geom) values > (GeomFromText('Linestring(42.342305 -71.04858,42.278325 -70.874176)',4326)); > > For generating POINT : > UPDATE sridpoint > SET the_geom = ST_SetSRID(ST_Point( longitude,latitude),4326); > > I can draw linestring when SRID = -1 but with SRID, I am facing problems. > Please let me know if someone is aware of how to generate linestring > when SRID is specified. > > Thanks > Siddhesh > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pgrouting-users mailing list > Pgrouting-users at lists.postlbs.org > http://lists.postlbs.org/mailman/listinfo/pgrouting-users From jd at commandprompt.com Tue Mar 2 13:50:10 2010 From: jd at commandprompt.com (Joshua D. Drake) Date: Tue, 02 Mar 2010 13:50:10 -0800 Subject: [postgis-users] Pg Conferece East, Agenda up and Registration Open Message-ID: <1267566610.31150.308.camel@jd-desktop.unknown.charter.com> March 02, 2010 The PostgreSQL Conference, U.S. team is pleased to announce the current list of talks for PostgreSQL Conference East. Being held in Philadelphia from March 25th through March 28th, PostgreSQL Conference East is the PostgreSQL Conference for Developers, Users and Decision Makers who want to learn and network with all that is PostgreSQL. PostgreSQL Conference East is the largest PostgreSQL Conference with 45 speakers and over 50 sessions! For Postgis users we have two mini-tutorials and a speaker from the FAA. The full agenda can be found here: http://www.postgresqlconference.org/2010/east/agenda You can also register here: https://www.postgresql.us/purchase Many thanks to Gold sponsors: Command Prompt, Inc.: http://www.commandprompt.com/ EnterpriseDB : http://www.enterprisedb.com/ OmniTI : http://www.omniti.com/ OTG : http://www.otg-nc.com/ Red Hat: http://www.redhat.com/ Look forward to seeing you there! -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 Consulting, Training, Support, Custom Development, Engineering Respect is earned, not gained through arbitrary and repetitive use or Mr. or Sir. From punk.kish at gmail.com Tue Mar 2 17:14:55 2010 From: punk.kish at gmail.com (P Kishor) Date: Tue, 2 Mar 2010 19:14:55 -0600 Subject: [postgis-users] error messages upgrading to 1.5.0 Message-ID: Hi, I upgraded to Postgis 1.5.0, but in the process, encountered the following messages that might have left my install on shaky grounds. Hopefully someone can shed some light on what is going on here. Thanks -- psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:57: NOTICE: type "spheroid" is not yet defined DETAIL: Creating a shell type definition. CREATE FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:63: NOTICE: argument type spheroid is only a shell CREATE FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:68: NOTICE: return type spheroid is only a shell CREATE FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:73: NOTICE: argument type spheroid is only a shell CREATE FUNCTION CREATE TYPE psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:90: NOTICE: type "geometry" is not yet defined DETAIL: Creating a shell type definition. CREATE FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:96: NOTICE: argument type geometry is only a shell CREATE FUNCTION CREATE FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:108: NOTICE: return type geometry is only a shell CREATE FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:114: NOTICE: argument type geometry is only a shell CREATE FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:119: NOTICE: return type geometry is only a shell CREATE FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:124: NOTICE: argument type geometry is only a shell CREATE FUNCTION CREATE FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:134: NOTICE: return type geometry is only a shell CREATE FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:139: NOTICE: argument type geometry is only a shell .. psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7744: NOTICE: aggregate geomunion(geometry) does not exist, skipping DROP AGGREGATE psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7745: NOTICE: aggregate st_geomunion(geometry) does not exist, skipping DROP AGGREGATE psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7746: NOTICE: aggregate accum_old(geometry) does not exist, skipping DROP AGGREGATE psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7747: NOTICE: aggregate st_accum_old(geometry) does not exist, skipping DROP AGGREGATE psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7750: NOTICE: function box2d_overleft(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7751: NOTICE: function box2d_overright(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7752: NOTICE: function box2d_left(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7753: NOTICE: function box2d_right(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7754: NOTICE: function box2d_contain(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7755: NOTICE: function box2d_contained(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7756: NOTICE: function box2d_overlap(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7757: NOTICE: function box2d_same(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7758: NOTICE: function box2d_intersects(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7759: NOTICE: function st_box2d_overleft(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7760: NOTICE: function st_box2d_overright(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7761: NOTICE: function st_box2d_left(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7762: NOTICE: function st_box2d_right(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7763: NOTICE: function st_box2d_contain(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7764: NOTICE: function st_box2d_contained(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7765: NOTICE: function st_box2d_overlap(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7766: NOTICE: function st_box2d_same(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7767: NOTICE: function st_box2d_intersects(box2d,box2d) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7768: NOTICE: function st_addbbox(geometry) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7769: NOTICE: function st_dropbbox(geometry) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7770: NOTICE: function st_hasbbox(geometry) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7771: NOTICE: function cache_bbox() does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7772: NOTICE: function st_cache_bbox() does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7773: NOTICE: function transform_geometry(geometry,text,text,pg_catalog.int4) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7774: NOTICE: function collector(geometry,geometry) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7775: NOTICE: function st_collector(geometry,geometry) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7776: NOTICE: function geom_accum(geometry[],geometry) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7777: NOTICE: function st_geom_accum(geometry[],geometry) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7778: NOTICE: function collect_garray(geometry[]) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7779: NOTICE: function st_collect_garray(geometry[]) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7780: NOTICE: function geosnoop(geometry) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7781: NOTICE: function jtsnoop(geometry) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7782: NOTICE: function st_noop(geometry) does not exist, skipping DROP FUNCTION psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7783: NOTICE: function st_max_distance(geometry,geometry) does not exist, skipping DROP FUNCTION -- Puneet Kishor From pramsey at opengeo.org Tue Mar 2 17:19:42 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Tue, 2 Mar 2010 17:19:42 -0800 Subject: [postgis-users] error messages upgrading to 1.5.0 In-Reply-To: References: Message-ID: <30fe546d1003021719v41b47e43k7c57f0d6e7ebbfba@mail.gmail.com> All notices, non-harmful. We recognize that this amount of noise is probably counter-productive... http://trac.osgeo.org/postgis/ticket/415 On Tue, Mar 2, 2010 at 5:14 PM, P Kishor wrote: > Hi, > > I upgraded to Postgis 1.5.0, but in the process, encountered the > following messages that might have left my install on shaky grounds. > Hopefully someone can shed some light on what is going on here. Thanks > -- > > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:57: > NOTICE: ?type "spheroid" is not yet defined > DETAIL: ?Creating a shell type definition. > CREATE FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:63: > NOTICE: ?argument type spheroid is only a shell > CREATE FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:68: > NOTICE: ?return type spheroid is only a shell > CREATE FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:73: > NOTICE: ?argument type spheroid is only a shell > CREATE FUNCTION > CREATE TYPE > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:90: > NOTICE: ?type "geometry" is not yet defined > DETAIL: ?Creating a shell type definition. > CREATE FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:96: > NOTICE: ?argument type geometry is only a shell > CREATE FUNCTION > CREATE FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:108: > NOTICE: ?return type geometry is only a shell > CREATE FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:114: > NOTICE: ?argument type geometry is only a shell > CREATE FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:119: > NOTICE: ?return type geometry is only a shell > CREATE FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:124: > NOTICE: ?argument type geometry is only a shell > CREATE FUNCTION > CREATE FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:134: > NOTICE: ?return type geometry is only a shell > CREATE FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:139: > NOTICE: ?argument type geometry is only a shell > .. > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7744: > NOTICE: ?aggregate geomunion(geometry) does not exist, skipping > DROP AGGREGATE > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7745: > NOTICE: ?aggregate st_geomunion(geometry) does not exist, skipping > DROP AGGREGATE > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7746: > NOTICE: ?aggregate accum_old(geometry) does not exist, skipping > DROP AGGREGATE > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7747: > NOTICE: ?aggregate st_accum_old(geometry) does not exist, skipping > DROP AGGREGATE > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7750: > NOTICE: ?function box2d_overleft(box2d,box2d) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7751: > NOTICE: ?function box2d_overright(box2d,box2d) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7752: > NOTICE: ?function box2d_left(box2d,box2d) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7753: > NOTICE: ?function box2d_right(box2d,box2d) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7754: > NOTICE: ?function box2d_contain(box2d,box2d) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7755: > NOTICE: ?function box2d_contained(box2d,box2d) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7756: > NOTICE: ?function box2d_overlap(box2d,box2d) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7757: > NOTICE: ?function box2d_same(box2d,box2d) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7758: > NOTICE: ?function box2d_intersects(box2d,box2d) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7759: > NOTICE: ?function st_box2d_overleft(box2d,box2d) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7760: > NOTICE: ?function st_box2d_overright(box2d,box2d) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7761: > NOTICE: ?function st_box2d_left(box2d,box2d) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7762: > NOTICE: ?function st_box2d_right(box2d,box2d) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7763: > NOTICE: ?function st_box2d_contain(box2d,box2d) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7764: > NOTICE: ?function st_box2d_contained(box2d,box2d) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7765: > NOTICE: ?function st_box2d_overlap(box2d,box2d) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7766: > NOTICE: ?function st_box2d_same(box2d,box2d) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7767: > NOTICE: ?function st_box2d_intersects(box2d,box2d) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7768: > NOTICE: ?function st_addbbox(geometry) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7769: > NOTICE: ?function st_dropbbox(geometry) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7770: > NOTICE: ?function st_hasbbox(geometry) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7771: > NOTICE: ?function cache_bbox() does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7772: > NOTICE: ?function st_cache_bbox() does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7773: > NOTICE: ?function > transform_geometry(geometry,text,text,pg_catalog.int4) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7774: > NOTICE: ?function collector(geometry,geometry) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7775: > NOTICE: ?function st_collector(geometry,geometry) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7776: > NOTICE: ?function geom_accum(geometry[],geometry) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7777: > NOTICE: ?function st_geom_accum(geometry[],geometry) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7778: > NOTICE: ?function collect_garray(geometry[]) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7779: > NOTICE: ?function st_collect_garray(geometry[]) does not exist, > skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7780: > NOTICE: ?function geosnoop(geometry) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7781: > NOTICE: ?function jtsnoop(geometry) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7782: > NOTICE: ?function st_noop(geometry) does not exist, skipping > DROP FUNCTION > psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7783: > NOTICE: ?function st_max_distance(geometry,geometry) does not exist, > skipping > DROP FUNCTION > > -- > Puneet Kishor > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From ravivundavalli at yahoo.com Tue Mar 2 19:01:17 2010 From: ravivundavalli at yahoo.com (Ravi) Date: Tue, 2 Mar 2010 19:01:17 -0800 (PST) Subject: [postgis-users] Db connect Message-ID: <926293.64248.qm@web65608.mail.ac4.yahoo.com> Hi, am using OSGeo4W bundle and the apache and php there in. Apache installed OK showing as aservice and in the browser http:\\localhost issues the OSGeo4w welcome screen and phpthere on with the following wish to connect to PGSQL 8.4 and postGIS there in with the following. But it doesnt work. Where am I going wrong ? $db_handle = pg_connect(?host = localhost port = 5432 dbname = postgis user = postgres password = GrassJump?); $query = ?SELECT * FROM rjybound?; $result = pgexec($dbhandle, $query); Ravi Kumar Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/ From lists at remoteinformation.com.au Tue Mar 2 19:48:51 2010 From: lists at remoteinformation.com.au (Ben Madin) Date: Wed, 3 Mar 2010 11:48:51 +0800 Subject: [postgis-users] Db connect In-Reply-To: <926293.64248.qm@web65608.mail.ac4.yahoo.com> References: <926293.64248.qm@web65608.mail.ac4.yahoo.com> Message-ID: <9208708A-64E9-43E6-A6E4-D7F60C5C26CC@remoteinformation.com.au> Ravi, A little bit more information about what is happening would help? Do you have some output from the apache/php error log? Does the User / Password combination have access to the tables normally? cheers Ben On 03/03/2010, at 11:01 , Ravi wrote: > Hi, > am using OSGeo4W bundle and the apache and php there in. > Apache installed OK showing as aservice and in the browser > http:\\localhost > issues the OSGeo4w welcome screen and phpthere on > > with the following wish to connect to PGSQL 8.4 and postGIS there in > with the following. But it doesnt work. Where am I going wrong ? > > $db_handle = pg_connect(?host = localhost port = 5432 dbname = postgis user = postgres password = GrassJump?); $query = ?SELECT * FROM rjybound?; $result = pgexec($dbhandle, $query); > > Ravi Kumar > > > Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From pvela at uci.cu Tue Mar 2 19:52:23 2010 From: pvela at uci.cu (Pablo Velazco Villares) Date: Tue, 2 Mar 2010 22:52:23 -0500 (CST) Subject: [postgis-users] Function to calculate the half line between two LINESTRING or MULTILINESTRING In-Reply-To: <926293.64248.qm@web65608.mail.ac4.yahoo.com> Message-ID: <898303651.6492461267588343653.JavaMail.root@ucimail1.uci.cu> Hello colleagues, Some of you knows about the existence of some function developed for determining the half line between two geometries type LINE, for the solution of the classic problem of the border limit, for example. in the event of not existing, they have information him to be inside the projections of development of the project. Greetings Paul From woodbri at swoodbridge.com Tue Mar 2 20:49:45 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Tue, 02 Mar 2010 23:49:45 -0500 Subject: [postgis-users] [Fwd: Re: [pgrouting-users] How to join Two points (latitudes and langitudes) in postgis?] Message-ID: <4B8DEA69.9090106@swoodbridge.com> Please reply to the list so other can benefit from the discussion. -------- Original Message -------- Subject: Re: [pgrouting-users] How to join Two points (latitudes and langitudes) in postgis? Date: Tue, 2 Mar 2010 16:12:48 -0500 From: SIDDHESH GANDHI To: Stephen Woodbridge References: <5d08242a1003021128q10baab4ci1d7e126e1edec462 at mail.gmail.com> <4B8D6A6F.3030208 at swoodbridge.com> Thank you for your reply. Sorry I thought I am posting in postgis group. 1) I didnt get any error message but I didnt get required line when I imported required table in QGIS. E.g. Suppose I provide latitude and longitude of boston and some other city in MA and form a linestring. Now I start QGIS and import this linestring from that table. After this I add a vector layer of MA state. This should result in generation of linestring from boston to that city, but it does not show this. If I try to put Points having lattitude and longitude and superimpose it on MA state shapefile, I can see points at right location in that shapefile. So I was asking if I am wrong in drawing linestring? 2) Yes, it is there in database. 3) Contraints- CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2), CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text OR the_geom IS NULL), CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 4326) Can you tell me in short, what do constraints do? Thanks Again Siddhesh On Tue, Mar 2, 2010 at 2:43 PM, Stephen Woodbridge > wrote: Siddhesh, This is probably more of a postGIS list query than a pgRouting query. 1) you did not say what error messages you might have gotten! 2) is the line in the database after you insert it? 3) what constraints to you have on the table for SRID? 4) you might want to ask on the QGIS list also -Steve SIDDHESH GANDHI wrote: Hi all, I am trying to join 2 points on earth (SRID 4326) by a line but somehow I m not able to see that in QGIS. I have taken some latitudes and longitudes and created points. When I create POINT column and load these points, I can see them on QGIS at exact same locations. (Boston, MA will be at same position where it is now wrt MA state shapefile) Now when i try to join two points (E.g. Boston and Some other place in MA), it does not appear on QGIS. I tried following queries for linestring construction - 1) insert into sridline (the_geom) values (ST_setSRID(ST_MakeLine(ST_MakePoint(42.5667212, -70.987212),ST_MakePoint(44.5667212, -70.987212)),4326)); Other thing I tried is : 2) insert into sridline (the_geom) values (GeomFromText('Linestring(42.342305 -71.04858,42.278325 -70.874176)',4326)); For generating POINT : UPDATE sridpoint SET the_geom = ST_SetSRID(ST_Point( longitude,latitude),4326); I can draw linestring when SRID = -1 but with SRID, I am facing problems. Please let me know if someone is aware of how to generate linestring when SRID is specified. Thanks Siddhesh ------------------------------------------------------------------------ _______________________________________________ Pgrouting-users mailing list Pgrouting-users at lists.postlbs.org http://lists.postlbs.org/mailman/listinfo/pgrouting-users From woodbri at swoodbridge.com Tue Mar 2 20:52:22 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Tue, 02 Mar 2010 23:52:22 -0500 Subject: [postgis-users] [Fwd: Re: [pgrouting-users] How to join Two points (latitudes and langitudes) in postgis?] In-Reply-To: <4B8DEA69.9090106@swoodbridge.com> References: <4B8DEA69.9090106@swoodbridge.com> Message-ID: <4B8DEB06.3040509@swoodbridge.com> Your coordinates appear to be lat, lon but in postgis you should be using lon, lat. Try fixing that and see if it works. -Steve Stephen Woodbridge wrote: > Please reply to the list so other can benefit from the discussion. > > -------- Original Message -------- > Subject: Re: [pgrouting-users] How to join Two points (latitudes and > langitudes) in postgis? > Date: Tue, 2 Mar 2010 16:12:48 -0500 > From: SIDDHESH GANDHI > To: Stephen Woodbridge > References: > <5d08242a1003021128q10baab4ci1d7e126e1edec462 at mail.gmail.com> > <4B8D6A6F.3030208 at swoodbridge.com> > > > > Thank you for your reply. > > Sorry I thought I am posting in postgis group. > > 1) I didnt get any error message but I didnt get required line when I > imported required table in QGIS. > E.g. Suppose I provide latitude and longitude of boston and some other > city in MA and form a linestring. Now I start QGIS and import this > linestring from that table. After this I add a vector layer of MA state. > This should result in generation of linestring from boston to that city, > but it does not show this. > > If I try to put Points having lattitude and longitude and superimpose it > on MA state shapefile, I can see points at right location in that > shapefile. > > So I was asking if I am wrong in drawing linestring? > > 2) Yes, it is there in database. > 3) Contraints- > CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2), > CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = > 'LINESTRING'::text OR the_geom IS NULL), > CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 4326) > > Can you tell me in short, what do constraints do? > > Thanks Again > Siddhesh > > > On Tue, Mar 2, 2010 at 2:43 PM, Stephen Woodbridge > > wrote: > > Siddhesh, > > This is probably more of a postGIS list query than a pgRouting query. > > 1) you did not say what error messages you might have gotten! > 2) is the line in the database after you insert it? > 3) what constraints to you have on the table for SRID? > 4) you might want to ask on the QGIS list also > > -Steve > > SIDDHESH GANDHI wrote: > > Hi all, > I am trying to join 2 points on earth (SRID 4326) by a line but > somehow I m not able to see that in QGIS. > > I have taken some latitudes and longitudes and created points. > When I create POINT column and load these points, I can see them > on QGIS at exact same locations. (Boston, MA will be at same > position where it is now wrt MA state shapefile) > > Now when i try to join two points (E.g. Boston and Some other > place in MA), it does not appear on QGIS. > > I tried following queries for linestring construction - > 1) insert into sridline (the_geom) values > (ST_setSRID(ST_MakeLine(ST_MakePoint(42.5667212, > -70.987212),ST_MakePoint(44.5667212, -70.987212)),4326)); > Other thing I tried is : > 2) insert into sridline (the_geom) values > (GeomFromText('Linestring(42.342305 -71.04858,42.278325 > -70.874176)',4326)); > > For generating POINT : > UPDATE sridpoint > SET the_geom = ST_SetSRID(ST_Point( > longitude,latitude),4326); > > I can draw linestring when SRID = -1 but with SRID, I am facing > problems. > Please let me know if someone is aware of how to generate > linestring when SRID is specified. > > Thanks > Siddhesh > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pgrouting-users mailing list > Pgrouting-users at lists.postlbs.org > > http://lists.postlbs.org/mailman/listinfo/pgrouting-users > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From ravivundavalli at yahoo.com Tue Mar 2 22:45:59 2010 From: ravivundavalli at yahoo.com (Ravi) Date: Tue, 2 Mar 2010 22:45:59 -0800 (PST) Subject: [postgis-users] [OSGeo-Discuss] Db connect In-Reply-To: <4B8DD6F5.9020000@osgeo.org> Message-ID: <318474.47032.qm@web65601.mail.ac4.yahoo.com> Hi, am trying to learn rendering maps using browser(shapefiles) no error is given from the browser, but it just displays $db_handle = pg_connect(?host = localhost port = 5432 dbname = postgis user = postgres password = GrassJump?); $query = ?SELECT * FROM rjybound?; $result = pgexec($dbhandle, $query); Ravi Kumar --- On Wed, 3/3/10, Tyler Mitchell (OSGeo) wrote: > From: Tyler Mitchell (OSGeo) > Subject: Re: [OSGeo-Discuss] Db connect > To: "OSGeo Discussions" > Date: Wednesday, 3 March, 2010, 8:56 AM > Hi Ravi, what kind of error are you > getting? > > Tyler > Ravi wrote: > > Hi, > > am using OSGeo4W bundle and the apache and php there > in. > > Apache installed OK showing as aservice and in the > browser > > http:\\localhost > > issues the OSGeo4w welcome screen and phpthere on > > > > with the following wish to connect to PGSQL 8.4 and > postGIS there in > > with the following. But it doesnt work. Where am I > going wrong ? > > > > $db_handle = pg_connect(?host = localhost port = > 5432 dbname = postgis user = postgres password = > GrassJump?); $query = ?SELECT * FROM rjybound?; > $result = pgexec($dbhandle, $query); > > > > Ravi Kumar > > > > > >? ? ???Your Mail works best > with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/ > > > > _______________________________________________ > > Discuss mailing list > > Discuss at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/discuss > > _______________________________________________ > Discuss mailing list > Discuss at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/discuss > The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ From khurram.niaz at tpltrakker.com Tue Mar 2 22:53:38 2010 From: khurram.niaz at tpltrakker.com (Khurram Niaz Sheikh) Date: Wed, 3 Mar 2010 11:53:38 +0500 Subject: [postgis-users] Geoserver/Open Layers API & Styles' demo examples Message-ID: <3FB7831325FAA8489BCE829EE5312FF714EA1C0B2A@mail.trakker.com.pk> Hi, Can anyone help me get some geoserver/open layers APIs and Styles? Is there any resource where we can get some attractive mapping demo examples. Plz advise. Best Regards, Khuram -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at remoteinformation.com.au Tue Mar 2 23:28:51 2010 From: lists at remoteinformation.com.au (Ben Madin) Date: Wed, 3 Mar 2010 15:28:51 +0800 Subject: [postgis-users] Db connect In-Reply-To: <318474.47032.qm@web65601.mail.ac4.yahoo.com> References: <318474.47032.qm@web65601.mail.ac4.yahoo.com> Message-ID: <94AD46FC-0467-44AC-8FFE-CC9E3CB29C86@remoteinformation.com.au> Ravi, On 03/03/2010, at 14:45 , Ravi wrote: > no error is given from the browser, but it just displays > > $db_handle = pg_connect(?host = localhost port = 5432 dbname = postgis user = postgres password = GrassJump?); $query = ?SELECT * FROM rjybound?; $result = pgexec($dbhandle, $query); If you are just getting that output it makes me wonder does your script start with ... ie cheers Ben From ravivundavalli at yahoo.com Tue Mar 2 23:50:13 2010 From: ravivundavalli at yahoo.com (Ravi) Date: Tue, 2 Mar 2010 23:50:13 -0800 (PST) Subject: [postgis-users] Db connect In-Reply-To: <94AD46FC-0467-44AC-8FFE-CC9E3CB29C86@remoteinformation.com.au> Message-ID: <23121.38017.qm@web65615.mail.ac4.yahoo.com> Hi Ben, > If you are just getting that output it makes me wonder does > your script start with ... ie > > > $db_handle = pg_connect(?host = localhost port = 5432 > dbname = postgis user = postgres password = GrassJump?); > > $query = ?SELECT * FROM rjybound?; > > $result = pgexec($dbhandle, $query); > > ?> With them in place.. ERROR received Parse error: syntax error, unexpected '=' in C:\OSGeo4W\apache\htdocs\lu.php on line 2 Ravi Kumar > > Ben > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/ From m.diener at gomogi.com Wed Mar 3 00:22:14 2010 From: m.diener at gomogi.com (Michael Diener) Date: Wed, 3 Mar 2010 09:22:14 +0100 Subject: [postgis-users] How to join Two points(latitudes and langitudes) in postgis? In-Reply-To: References: Message-ID: <001501cabaaa$a3500ee0$e9f02ca0$@diener@gomogi.com> Hi Siddhesh In qGIS the SRID must be properly defined when changed from -1 to draw on screen. So you have to make sure your dataset SRID is properly defined. Use the updategeometrySRID function to update your SRID from -1 to #### here is an example --usage select updategeometrySRID('tableName','geometry_columnName','newSRID number'); select updategeometrySRID('myTableName','geom',31255); then your linestring should be drawn. Cheers michael From julien.guilloux at ecrins-parcnational.fr Wed Mar 3 02:12:11 2010 From: julien.guilloux at ecrins-parcnational.fr (ju) Date: Wed, 03 Mar 2010 11:12:11 +0100 Subject: [postgis-users] picture of geometry type Message-ID: <4B8E35FB.6070907@ecrins-parcnational.fr> Hi , on the ogc specification web site on postgis web site, i don't find some picture that represent xample of good and bad geometry type. i already see that kind of pictures on the net.... but impossible to find again... if you know where it is... thanks From pekka.hurskainen at gmail.com Wed Mar 3 04:10:58 2010 From: pekka.hurskainen at gmail.com (Pekka Hurskainen) Date: Wed, 3 Mar 2010 14:10:58 +0200 Subject: [postgis-users] Geoserver/Open Layers API & Styles' demo examples In-Reply-To: <3FB7831325FAA8489BCE829EE5312FF714EA1C0B2A@mail.trakker.com.pk> References: <3FB7831325FAA8489BCE829EE5312FF714EA1C0B2A@mail.trakker.com.pk> Message-ID: <9880bfa51003030410re5a19ebx945df930222aebba@mail.gmail.com> Though this should belong to the geoserver and/or openlayers mailing list, you can try the following: openlayers code examples: http://openlayers.org/dev/examples/ SLD style examples: http://docs.geoserver.org/2.0.x/en/user/styling/index.html - Pekka On Wed, Mar 3, 2010 at 8:53 AM, Khurram Niaz Sheikh wrote: > Hi, > > > > Can anyone help me get some geoserver/open layers APIs and Styles? Is there > any resource where we can get some attractive mapping demo examples. Plz > advise. > > > > Best Regards, > > Khuram > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > From khurram.niaz at tpltrakker.com Wed Mar 3 04:12:12 2010 From: khurram.niaz at tpltrakker.com (Khurram Niaz Sheikh) Date: Wed, 3 Mar 2010 17:12:12 +0500 Subject: [postgis-users] Geoserver/Open Layers API & Styles' demo examples In-Reply-To: <9880bfa51003030410re5a19ebx945df930222aebba@mail.gmail.com> References: <3FB7831325FAA8489BCE829EE5312FF714EA1C0B2A@mail.trakker.com.pk> <9880bfa51003030410re5a19ebx945df930222aebba@mail.gmail.com> Message-ID: <3FB7831325FAA8489BCE829EE5312FF714EA1C10AC@mail.trakker.com.pk> Thank you :) Best regards, Khuram -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Pekka Hurskainen Sent: Wednesday, March 03, 2010 5:11 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] Geoserver/Open Layers API & Styles' demo examples Though this should belong to the geoserver and/or openlayers mailing list, you can try the following: openlayers code examples: http://openlayers.org/dev/examples/ SLD style examples: http://docs.geoserver.org/2.0.x/en/user/styling/index.html - Pekka On Wed, Mar 3, 2010 at 8:53 AM, Khurram Niaz Sheikh wrote: > Hi, > > > > Can anyone help me get some geoserver/open layers APIs and Styles? Is there > any resource where we can get some attractive mapping demo examples. Plz > advise. > > > > Best Regards, > > Khuram > > _______________________________________________ > 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 keybit.net Wed Mar 3 07:22:56 2010 From: strk at keybit.net (strk) Date: Wed, 3 Mar 2010 16:22:56 +0100 Subject: [postgis-users] picture of geometry type In-Reply-To: <4B8E35FB.6070907@ecrins-parcnational.fr> References: <4B8E35FB.6070907@ecrins-parcnational.fr> Message-ID: <20100303152256.GF87723@keybit.net> On Wed, Mar 03, 2010 at 11:12:11AM +0100, ju wrote: > i don't find some picture that represent xample of good and bad geometry > type. The JTS Topology Suite developer manual should have those. --strk; Share. It's fair. http://iwouldntsteal.net From kneufeld at refractions.net Wed Mar 3 16:00:39 2010 From: kneufeld at refractions.net (Kevin Neufeld) Date: Wed, 03 Mar 2010 16:00:39 -0800 Subject: [postgis-users] picture of geometry type In-Reply-To: <4B8E35FB.6070907@ecrins-parcnational.fr> References: <4B8E35FB.6070907@ecrins-parcnational.fr> Message-ID: <4B8EF827.6050308@refractions.net> The PostGIS manual has some pictures comparing good and bad geometries. http://postgis.refractions.net/documentation/manual-1.5/ch04.html#OGC_Validity -- Kevin On 3/3/2010 2:12 AM, ju wrote: > Hi , > on the ogc specification web site > on postgis web site, > > i don't find some picture that represent xample of good and bad geometry > type. > > i already see that kind of pictures on the net.... but impossible to > find again... > > if you know where it is... > > thanks > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From bruno at ioda-net.ch Thu Mar 4 00:12:22 2010 From: bruno at ioda-net.ch (Bruno Friedmann) Date: Thu, 04 Mar 2010 09:12:22 +0100 Subject: [postgis-users] Looking for a equivalent of st_getpoint() to replace Z in a given point in a linestring Message-ID: <4B8F6B66.9030609@ioda-net.ch> Hi all, After looking around into docs & google, I've the following requirement I've a table of lines (4d). For each of them I need to replace the Z of each point. We have the st_setpoint() and the st_numpoints that I can use to loop for each point. but I've not found a st_getpoint(line_geom, index point) returning the point geom. So I can get and use the st_x,st_y,st_z,st_m of the desired point and rebuild a precise point geom with wanted Z . Any ideas or ways to search is welcome ! -- Bruno Friedmann From olivier.courtin at oslandia.com Thu Mar 4 00:15:52 2010 From: olivier.courtin at oslandia.com (Olivier Courtin) Date: Thu, 4 Mar 2010 09:15:52 +0100 Subject: [postgis-users] Looking for a equivalent of st_getpoint() to replace Z in a given point in a linestring In-Reply-To: <4B8F6B66.9030609@ioda-net.ch> References: <4B8F6B66.9030609@ioda-net.ch> Message-ID: <1A368C68-7DA4-4368-A157-C899971D573E@oslandia.com> On Mar 4, 2010, at 9:12 AM, Bruno Friedmann wrote: Bruno, > We have the st_setpoint() and the st_numpoints that I can use to > loop for each point. > but I've not found a st_getpoint(line_geom, index point) returning > the point geom. PointN is your friend http://postgis.refractions.net/documentation/manual-1.5/ST_PointN.html Have a look to the example with generate_series loop construction -- Olivier From bruno at ioda-net.ch Thu Mar 4 00:48:47 2010 From: bruno at ioda-net.ch (Bruno Friedmann) Date: Thu, 04 Mar 2010 09:48:47 +0100 Subject: [postgis-users] Looking for a equivalent of st_getpoint() to replace Z in a given point in a linestring In-Reply-To: <1A368C68-7DA4-4368-A157-C899971D573E@oslandia.com> References: <4B8F6B66.9030609@ioda-net.ch> <1A368C68-7DA4-4368-A157-C899971D573E@oslandia.com> Message-ID: <4B8F73EF.6000300@ioda-net.ch> On 03/04/2010 09:15 AM, Olivier Courtin wrote: > > On Mar 4, 2010, at 9:12 AM, Bruno Friedmann wrote: > > Bruno, > >> We have the st_setpoint() and the st_numpoints that I can use to loop >> for each point. >> but I've not found a st_getpoint(line_geom, index point) returning the >> point geom. > > PointN is your friend > http://postgis.refractions.net/documentation/manual-1.5/ST_PointN.html > > Have a look to the example with generate_series loop construction > > -- > Olivier > Thank you Olivier, I've missed it ! Perhaps in documentation we need a cross link (see also) between st_setpoint (the setter) and st_pointn (the getter). -- Bruno Friedmann From nicolas.ribot at gmail.com Thu Mar 4 01:01:59 2010 From: nicolas.ribot at gmail.com (Nicolas Ribot) Date: Thu, 4 Mar 2010 10:01:59 +0100 Subject: [postgis-users] Db connect In-Reply-To: <23121.38017.qm@web65615.mail.ac4.yahoo.com> References: <94AD46FC-0467-44AC-8FFE-CC9E3CB29C86@remoteinformation.com.au> <23121.38017.qm@web65615.mail.ac4.yahoo.com> Message-ID: <28de5e311003040101u7b31a32dnbbbfca5c4a3428d0@mail.gmail.com> > With them in place.. > ERROR received > Parse error: syntax error, unexpected '=' in C:\OSGeo4W\apache\htdocs\lu.php on line 2 > Hi, $db_handle = pg_connect(?host = localhost port = 5432 dbname = postgis user = postgres password = GrassJump?); Put this on one line, not two. Escape your '\' chars: c:\\OSGeo4W\\... Nico From olivier.courtin at oslandia.com Thu Mar 4 02:11:17 2010 From: olivier.courtin at oslandia.com (Olivier Courtin) Date: Thu, 4 Mar 2010 11:11:17 +0100 Subject: [postgis-users] Looking for a equivalent of st_getpoint() to replace Z in a given point in a linestring In-Reply-To: <4B8F73EF.6000300@ioda-net.ch> References: <4B8F6B66.9030609@ioda-net.ch> <1A368C68-7DA4-4368-A157-C899971D573E@oslandia.com> <4B8F73EF.6000300@ioda-net.ch> Message-ID: On Mar 4, 2010, at 9:48 AM, Bruno Friedmann wrote: > Perhaps in documentation we need a cross link (see also) between > st_setpoint (the setter) and st_pointn (the getter). Could be better yes, done in SVN ones: Tks for the report, -- Olivier From bruno at ioda-net.ch Thu Mar 4 04:17:42 2010 From: bruno at ioda-net.ch (Bruno Friedmann) Date: Thu, 04 Mar 2010 13:17:42 +0100 Subject: [postgis-users] Looking for a equivalent of st_getpoint() to replace Z in a given point in a linestring In-Reply-To: References: <4B8F6B66.9030609@ioda-net.ch> <1A368C68-7DA4-4368-A157-C899971D573E@oslandia.com> <4B8F73EF.6000300@ioda-net.ch> Message-ID: <4B8FA4E6.8020809@ioda-net.ch> On 03/04/2010 11:11 AM, Olivier Courtin wrote: > > On Mar 4, 2010, at 9:48 AM, Bruno Friedmann wrote: > >> Perhaps in documentation we need a cross link (see also) between >> st_setpoint (the setter) and st_pointn (the getter). > > Could be better yes, done in SVN ones: > > > > Tks for the report, > > -- > Olivier You're welcomed .... The last disturbing point I found is the following : st_setpoint is zero indexed st_pointn is 1 indexed ... So it force in loop to continually adjust index ... seems the two functions doesn't have the same history, but would be great ? for 2.x version to standardized them ? or having a st_getpoint ( kind of alias of st_pointn ) also zero based. What do you think about that ? -- Bruno Friedmann Ioda-Net S?rl 2830 Vellerat - Switzerland From dan at inlet.geol.sc.edu Thu Mar 4 06:18:54 2010 From: dan at inlet.geol.sc.edu (Dan Ramage) Date: Thu, 4 Mar 2010 09:18:54 -0500 Subject: [postgis-users] Missing postgis_config.h Message-ID: <8B3256D254D54F21B49116E1FE5855C9@D28ZYR81> I'm trying to make the latest 1.5.0 as well as the 1.4.1 release, however I am getting an error of: "liblwgeom.h:18:31: error: ../postgis_config.h: No such file or directory" I see in the archives this was an issue with a previous version and the suggestion was to pull from the archive. Should I do the same as well, or might there be another issue? Thanks, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.cave-ayland at siriusit.co.uk Thu Mar 4 06:30:59 2010 From: mark.cave-ayland at siriusit.co.uk (Mark Cave-Ayland) Date: Thu, 04 Mar 2010 14:30:59 +0000 Subject: [postgis-users] Missing postgis_config.h In-Reply-To: <8B3256D254D54F21B49116E1FE5855C9@D28ZYR81> References: <8B3256D254D54F21B49116E1FE5855C9@D28ZYR81> Message-ID: <4B8FC423.2080602@siriusit.co.uk> Dan Ramage wrote: > I?m trying to make the latest 1.5.0 as well as the 1.4.1 release, > however I am getting an error of: > > ?liblwgeom.h:18:31: error: ../postgis_config.h: No such file or directory? > > > > I see in the archives this was an issue with a previous version and the > suggestion was to pull from the archive. > > Should I do the same as well, or might there be another issue? Hi Dan, postgis_config.h is generated by running configure. What does the output of the configure command look like? ATB, Mark. -- Mark Cave-Ayland - Senior Technical Architect PostgreSQL - PostGIS Sirius Corporation plc - control through freedom http://www.siriusit.co.uk t: +44 870 608 0063 Sirius Labs: http://www.siriusit.co.uk/labs From dan at inlet.geol.sc.edu Thu Mar 4 07:42:20 2010 From: dan at inlet.geol.sc.edu (Dan Ramage) Date: Thu, 4 Mar 2010 10:42:20 -0500 Subject: [postgis-users] Missing postgis_config.h In-Reply-To: <4B8FC423.2080602@siriusit.co.uk> References: <8B3256D254D54F21B49116E1FE5855C9@D28ZYR81> <4B8FC423.2080602@siriusit.co.uk> Message-ID: Mark, Well, something odd has happened. I checked out PostGIS from svn, got it built and installed. After seeing your email just now, I tried building the 1.5 release again, untarred it, ran configure and then make and it built this time. Could something in the environment have changed when I ran the 'sh autogen.sh' before running the configure in the svn checkout version? Dan -----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: Thursday, March 04, 2010 9:31 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] Missing postgis_config.h Dan Ramage wrote: > I'm trying to make the latest 1.5.0 as well as the 1.4.1 release, > however I am getting an error of: > > "liblwgeom.h:18:31: error: ../postgis_config.h: No such file or directory" > > > > I see in the archives this was an issue with a previous version and the > suggestion was to pull from the archive. > > Should I do the same as well, or might there be another issue? Hi Dan, postgis_config.h is generated by running configure. What does the output of the configure command look like? ATB, Mark. -- Mark Cave-Ayland - Senior Technical Architect PostgreSQL - PostGIS Sirius Corporation plc - control through freedom http://www.siriusit.co.uk t: +44 870 608 0063 Sirius Labs: http://www.siriusit.co.uk/labs _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From Majid.Kazemi at teranet.ca Fri Mar 5 08:06:05 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Fri, 5 Mar 2010 11:06:05 -0500 Subject: [postgis-users] Postgis: Error Message-ID: Hi, I am trying to run postgis .sql 1.5 on Linux to create a spatial database. I am receiving the following error: Current transaction is aborted, command ignored until end of transaction block. Rollback. I am very new to postgres and postgis. Your help will highly be appreciated. Thanks, Majid -------------- next part -------------- An HTML attachment was scrubbed... URL: From emilie.laffray at gmail.com Fri Mar 5 08:16:24 2010 From: emilie.laffray at gmail.com (Emilie Laffray) Date: Fri, 5 Mar 2010 16:16:24 +0000 Subject: [postgis-users] Postgis: Error In-Reply-To: References: Message-ID: <7e9dfabf1003050816w2023c945ob25f2cea22ea2896@mail.gmail.com> On 5 March 2010 16:06, Majid Kazemi wrote: > Hi, > > I am trying to run postgis .sql 1.5 on Linux to create a spatial database. > I am receiving the following error: > > Current transaction is aborted, command ignored until end of transaction > block. Rollback. > > I am very new to postgres and postgis. Your help will highly be > appreciated. > > Thanks, Majid > > Can you provide us with the steps you are taking? The error in itself is not enough to tell us what is wrong. The message just indicates that somewhere an error occurred in a transaction and the transaction is rolled back. It doesn't give us any information on what you were trying to do and where the error is occurring. Emilie Laffray -------------- next part -------------- An HTML attachment was scrubbed... URL: From Majid.Kazemi at teranet.ca Fri Mar 5 08:34:07 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Fri, 5 Mar 2010 11:34:07 -0500 Subject: [postgis-users] Postgis: Error In-Reply-To: <7e9dfabf1003050816w2023c945ob25f2cea22ea2896@mail.gmail.com> Message-ID: Thanks for response. Here are the steps: I have installed postgres 8.3.9 on Redhat 5. Server started successfully. Postgres database was created. Since I need to create a spatial database, I have untar postgis-1.5.0.tar.gz cd postgis-1.5.0 ./configure. During the running the configure I run into a lot of issue for missing libraries. I have downloaded and installed geos, Proj4.6 and GTK+2. It all seems were okay. Then I run ./configure again. The postgis installed successfully according to screen output. Then, I have created another database. Psql createlang plpgsql . I was logged in as postgres. Then I followed the following steps: Psql -d mydb -f postgis.sql at this step I encountered these errors. "Current transaction is aborted, command ignored until end of transaction block". Rollback Please let me know if you need more information. Thanks, Majid ________________________________ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Emilie Laffray Sent: March 5, 2010 11:16 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] Postgis: Error On 5 March 2010 16:06, Majid Kazemi wrote: Hi, I am trying to run postgis .sql 1.5 on Linux to create a spatial database. I am receiving the following error: Current transaction is aborted, command ignored until end of transaction block. Rollback. I am very new to postgres and postgis. Your help will highly be appreciated. Thanks, Majid Can you provide us with the steps you are taking? The error in itself is not enough to tell us what is wrong. The message just indicates that somewhere an error occurred in a transaction and the transaction is rolled back. It doesn't give us any information on what you were trying to do and where the error is occurring. Emilie Laffray -------------- next part -------------- An HTML attachment was scrubbed... URL: From emilie.laffray at gmail.com Fri Mar 5 08:39:17 2010 From: emilie.laffray at gmail.com (Emilie Laffray) Date: Fri, 5 Mar 2010 16:39:17 +0000 Subject: [postgis-users] Postgis: Error In-Reply-To: References: <7e9dfabf1003050816w2023c945ob25f2cea22ea2896@mail.gmail.com> Message-ID: <7e9dfabf1003050839s72b42eabq1f36ea1743adae6b@mail.gmail.com> On 5 March 2010 16:34, Majid Kazemi wrote: > Thanks for response. > > Here are the steps: > > I have installed postgres 8.3.9 on Redhat 5. Server started successfully. > Postgres database was created. > > Since I need to create a spatial database, I have untar > postgis-1.5.0.tar.gz > > cd postgis-1.5.0 > > ./configure. > > During the running the configure I run into a lot of issue for missing > libraries. > > I have downloaded and installed geos, Proj4.6 and GTK+2. It all seems were > okay. Then I run > > ./configure again. > > The postgis installed successfully according to screen output. > > Then, I have created another database. > > Psql createlang plpgsql . I was logged in as postgres. > > Then I followed the following steps: > > Psql ?d mydb ?f postgis.sql at this step I encountered these errors. > > ?Current transaction is aborted, command ignored until end of transaction > block?. Rollback > > Please let me know if you need more information. > > Thanks, Majid > > > Do you have the text of the error that is occurring? Emilie Laffray -------------- next part -------------- An HTML attachment was scrubbed... URL: From pcreso at pcreso.com Fri Mar 5 09:42:43 2010 From: pcreso at pcreso.com (pcreso at pcreso.com) Date: Fri, 5 Mar 2010 09:42:43 -0800 (PST) Subject: [postgis-users] Postgis: Error In-Reply-To: Message-ID: <206768.98059.qm@web33207.mail.mud.yahoo.com> Hi Majid, What you have written here is the message from the end of the transaction saying it failed & rolled back. While the transaction was running, there will have been an error message which describes what actually failed. If you scroll further up the output messages on screen you'll see this message which should help determine what the problem is. Brent Wood --- On Sat, 3/6/10, Majid Kazemi wrote: > From: Majid Kazemi > Subject: Re: [postgis-users] Postgis: Error > To: "PostGIS Users Discussion" > Date: Saturday, March 6, 2010, 5:34 AM > > > > > > > > > > > > > > > > > Thanks for > response. > > Here are > the steps: > > I have > installed postgres 8.3.9 on Redhat > 5. Server started successfully. Postgres database was > created. > > Since I > need to create a spatial database, > I have untar postgis-1.5.0.tar.gz > > cd > postgis-1.5.0 > > ./configure. > > > During the > running the configure I run > into a lot of issue for missing libraries. > > > I have > downloaded and installed geos, > Proj4.6 and GTK+2. It all seems were okay. Then I run > > > ./configure > again. > > The postgis > installed successfully according > to screen output. > > Then, I > have created another database. > > Psql > createlang plpgsql . I was logged in > as postgres. > > Then I > followed the following steps: > > Psql > ?d mydb ?f postgis.sql? ?at > this step I encountered these errors. > > ?Current > transaction is aborted, command > ignored until end of transaction block?. > Rollback > > > > Please let > me know if you need more > information. > > Thanks, > Majid > > > ? > > > ? > > > > > > > > > > From: > postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] > On Behalf Of Emilie > Laffray > > Sent: March > 5, 2010 11:16 AM > > To: PostGIS > Users Discussion > > Subject: Re: > [postgis-users] > Postgis: Error > > > > ? > > > ? > > > > On 5 March 2010 16:06, Majid Kazemi > > wrote: > > > > > > Hi, > > > I > am trying to run postgis .sql 1.5 on Linux to create a > spatial database. I am > receiving the following error: > > Current > transaction is aborted, command ignored until end of > transaction block. > Rollback. > > I > am very new to postgres and postgis. Your help will highly > be appreciated. > > Thanks, > Majid > > ? > > > > > > > > > > Can you provide us with the steps you are taking? The error > in itself is not > enough to tell us what is wrong. > > The message just indicates that somewhere an error occurred > in a transaction > and the transaction is rolled back. It doesn't give us > any information on what > you were trying to do and where the error is occurring. > > > > Emilie Laffray > > > > > > > > -----Inline Attachment Follows----- > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From Majid.Kazemi at teranet.ca Fri Mar 5 09:47:48 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Fri, 5 Mar 2010 12:47:48 -0500 Subject: [postgis-users] Postgis: Error In-Reply-To: <206768.98059.qm@web33207.mail.mud.yahoo.com> Message-ID: Thanks guys. It was generating a lot of records. It does not fit into screen. Is there any logs created for this? Or I should put the output into a log file. Thanks, Majid -----Original Message----- From: pcreso at pcreso.com [mailto:pcreso at pcreso.com] Sent: March 5, 2010 12:43 PM To: PostGIS Users Discussion Cc: Majid Kazemi Subject: Re: [postgis-users] Postgis: Error Hi Majid, What you have written here is the message from the end of the transaction saying it failed & rolled back. While the transaction was running, there will have been an error message which describes what actually failed. If you scroll further up the output messages on screen you'll see this message which should help determine what the problem is. Brent Wood --- On Sat, 3/6/10, Majid Kazemi wrote: > From: Majid Kazemi > Subject: Re: [postgis-users] Postgis: Error > To: "PostGIS Users Discussion" > Date: Saturday, March 6, 2010, 5:34 AM > > > > > > > > > > > > > > > > > Thanks for > response. > > Here are > the steps: > > I have > installed postgres 8.3.9 on Redhat > 5. Server started successfully. Postgres database was > created. > > Since I > need to create a spatial database, > I have untar postgis-1.5.0.tar.gz > > cd > postgis-1.5.0 > > ./configure. > > > During the > running the configure I run > into a lot of issue for missing libraries. > > > I have > downloaded and installed geos, > Proj4.6 and GTK+2. It all seems were okay. Then I run > > > ./configure > again. > > The postgis > installed successfully according > to screen output. > > Then, I > have created another database. > > Psql > createlang plpgsql . I was logged in > as postgres. > > Then I > followed the following steps: > > Psql > -d mydb -f postgis.sql? ?at > this step I encountered these errors. > > "Current > transaction is aborted, command > ignored until end of transaction block". > Rollback > > > > Please let > me know if you need more > information. > > Thanks, > Majid > > > ? > > > ? > > > > > > > > > > From: > postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] > On Behalf Of Emilie > Laffray > > Sent: March > 5, 2010 11:16 AM > > To: PostGIS > Users Discussion > > Subject: Re: > [postgis-users] > Postgis: Error > > > > ? > > > ? > > > > On 5 March 2010 16:06, Majid Kazemi > > wrote: > > > > > > Hi, > > > I > am trying to run postgis .sql 1.5 on Linux to create a > spatial database. I am > receiving the following error: > > Current > transaction is aborted, command ignored until end of > transaction block. > Rollback. > > I > am very new to postgres and postgis. Your help will highly > be appreciated. > > Thanks, > Majid > > ? > > > > > > > > > > Can you provide us with the steps you are taking? The error > in itself is not > enough to tell us what is wrong. > > The message just indicates that somewhere an error occurred > in a transaction > and the transaction is rolled back. It doesn't give us > any information on what > you were trying to do and where the error is occurring. > > > > Emilie Laffray > > > > > > > > -----Inline Attachment Follows----- > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From pcreso at pcreso.com Fri Mar 5 10:09:31 2010 From: pcreso at pcreso.com (pcreso at pcreso.com) Date: Fri, 5 Mar 2010 10:09:31 -0800 (PST) Subject: [postgis-users] Postgis: Error In-Reply-To: Message-ID: <696480.38844.qm@web33205.mail.mud.yahoo.com> If you can run it in an X console, you can usually set the history to whatever value you like, or even unlimited. Not recommended for general use, but useful in such cases. Brent --- On Sat, 3/6/10, Majid Kazemi wrote: > From: Majid Kazemi > Subject: RE: [postgis-users] Postgis: Error > To: pcreso at pcreso.com, "PostGIS Users Discussion" > Date: Saturday, March 6, 2010, 6:47 AM > Thanks guys. > It was generating a lot of records. It does not fit into > screen. Is there any logs created for this? Or I should put > the output into a log file. > Thanks, Majid > > -----Original Message----- > From: pcreso at pcreso.com > [mailto:pcreso at pcreso.com] > > Sent: March 5, 2010 12:43 PM > To: PostGIS Users Discussion > Cc: Majid Kazemi > Subject: Re: [postgis-users] Postgis: Error > > > Hi Majid, > > What you have written here is the message from the end of > the transaction saying it failed & rolled back. > > While the transaction was running, there will have been an > error message which describes what actually failed. If you > scroll further up the output messages on screen you'll see > this message which should help determine what the problem > is. > > > Brent Wood > > --- On Sat, 3/6/10, Majid Kazemi > wrote: > > > From: Majid Kazemi > > Subject: Re: [postgis-users] Postgis: Error > > To: "PostGIS Users Discussion" > > Date: Saturday, March 6, 2010, 5:34 AM > > > > > > > >? > >? > > > > > > > > > > > > > > > >? > > > > > > > > Thanks for > > response. > > > > Here are > > the steps: > > > > I have > > installed postgres 8.3.9 on Redhat > > 5. Server started successfully. Postgres database was > > created.? > > > > Since I > > need to create a spatial database, > > I have untar postgis-1.5.0.tar.gz > > > > cd > > postgis-1.5.0 > > > > ./configure. > > > > > > During the > > running the configure I run > > into a lot of issue for missing libraries. > >? > > > > I have > > downloaded and installed geos, > > Proj4.6 and GTK+2. It all seems were okay. Then I run > >? > > > > ./configure > > again.? > > > > The postgis > > installed successfully according > > to screen output. > > > > Then, I > > have created another database. > > > > Psql > > createlang plpgsql . I was logged in > > as postgres. > > > > Then I > > followed the following steps: > > > > Psql > > -d mydb -f postgis.sql? ?at > > this step I encountered these errors. > > > > "Current > > transaction is aborted, command > > ignored until end of transaction block". > > Rollback > > > > > > > > Please let > > me know if you need more > > information. > > > > Thanks, > > Majid > > > > > > ? > > > > > > ? > > > > > > > > > > > > > > > > > > > > From: > > postgis-users-bounces at postgis.refractions.net > > [mailto:postgis-users-bounces at postgis.refractions.net] > > On Behalf Of Emilie > > Laffray > > > > Sent: March > > 5, 2010 11:16 AM > > > > To: PostGIS > > Users Discussion > > > > Subject: Re: > > [postgis-users] > > Postgis: Error > > > > > > > >? ? > > > > > > ? > > > > > > > > On 5 March 2010 16:06, Majid Kazemi > > > > wrote: > > > > > > > > > > > > Hi, > > > > > > I > > am trying to run postgis .sql 1.5 on Linux to create > a > > spatial database. I am > > receiving the following error: > > > > Current > > transaction is aborted, command ignored until end of > > transaction block. > > Rollback. > > > > I > > am very new to postgres and postgis. Your help will > highly > > be appreciated.? > > > > Thanks, > > Majid > > > >? ? > > > > > > > > > > > > > > > > > > > > Can you provide us with the steps you are taking? The > error > > in itself is not > > enough to tell us what is wrong. > > > > The message just indicates that somewhere an error > occurred > > in a transaction > > and the transaction is rolled back. It doesn't give > us > > any information on what > > you were trying to do and where the error is > occurring. > > > > > > > > Emilie Laffray > > > > > > > >? > > > > > > > > -----Inline Attachment Follows----- > > > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > From Majid.Kazemi at teranet.ca Fri Mar 5 13:11:25 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Fri, 5 Mar 2010 16:11:25 -0500 Subject: [postgis-users] Postgis: Error In-Reply-To: <7e9dfabf1003050839s72b42eabq1f36ea1743adae6b@mail.gmail.com> Message-ID: Hi: Sorry for the delay. Here is text file of error I am receiving. Thanks, Majid BEGIN psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:57: NOTICE: type "spheroid" is not yet defined DETAIL: Creating a shell type definition. psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:57: ERROR: could not load library "/opt/PostgreSQL/8.3/lib/postgresql/postgis-1.5.so": libgeos_c.so.1: cannot open shared object file: No such file or directory psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:63: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:68: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:73: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:80: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:90: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:96: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:102: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:108: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:114: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:119: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:124: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:129: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:134: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:139: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:150: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:161: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:167: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:174: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:180: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:187: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:193: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:200: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:206: ERROR: current transaction is aborted, commands ignored until end of transaction block psql:/opt/PostgreSQL/8.3/share/postgresql/contrib/postgis-1.5/postgis.sq l:213: ERROR: current transaction is aborted, commands ignored until end of transaction block ________________________________ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Emilie Laffray Sent: March 5, 2010 11:39 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] Postgis: Error On 5 March 2010 16:34, Majid Kazemi wrote: Thanks for response. Here are the steps: I have installed postgres 8.3.9 on Redhat 5. Server started successfully. Postgres database was created. Since I need to create a spatial database, I have untar postgis-1.5.0.tar.gz cd postgis-1.5.0 ./configure. During the running the configure I run into a lot of issue for missing libraries. I have downloaded and installed geos, Proj4.6 and GTK+2. It all seems were okay. Then I run ./configure again. The postgis installed successfully according to screen output. Then, I have created another database. Psql createlang plpgsql . I was logged in as postgres. Then I followed the following steps: Psql -d mydb -f postgis.sql at this step I encountered these errors. "Current transaction is aborted, command ignored until end of transaction block". Rollback Please let me know if you need more information. Thanks, Majid Do you have the text of the error that is occurring? Emilie Laffray -------------- next part -------------- An HTML attachment was scrubbed... URL: From strk at keybit.net Fri Mar 5 15:26:51 2010 From: strk at keybit.net (strk) Date: Sat, 6 Mar 2010 00:26:51 +0100 Subject: [postgis-users] Postgis: Error In-Reply-To: References: <7e9dfabf1003050839s72b42eabq1f36ea1743adae6b@mail.gmail.com> Message-ID: <20100305232651.GO87723@keybit.net> On Fri, Mar 05, 2010 at 04:11:25PM -0500, Majid Kazemi wrote: > l:57: ERROR: could not load library > "/opt/PostgreSQL/8.3/lib/postgresql/postgis-1.5.so": libgeos_c.so.1: > cannot open shared object file: No such file or directory Did you run ldconfig(8) after geos install ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From gdt at ir.bbn.com Fri Mar 5 16:15:17 2010 From: gdt at ir.bbn.com (Greg Troxel) Date: Fri, 05 Mar 2010 19:15:17 -0500 Subject: [postgis-users] postgis_comments.sql installation location? Message-ID: I have updated the pkgsrc package for postgis to 1.5.0 and make check passes (on NetBSD i386). (There is still considerable ickiness in the pkgsrc package because I haven't resolved the libtool integration fully.) postgis_comments.sql looks like it is installed in: comments-install: comments cp postgis_comments.sql $(PGSQL_SHAREDIR)/contrib/postgis_comments.sql which is inconsistent with the rest of the .sql files which are versioned. Currently pkgsrc installs postgis_comments.sql manually along with some other docs (to avoid depending on the doc tools) and we end up with: /usr/pkg/share/postgresql/contrib/postgis-1.5/postgis.sql /usr/pkg/share/postgresql/contrib/postgis-1.5/postgis_upgrade_13_to_15.sql /usr/pkg/share/postgresql/contrib/postgis-1.5/postgis_upgrade_14_to_15.sql /usr/pkg/share/postgresql/contrib/postgis-1.5/postgis_upgrade_15_minor.sql /usr/pkg/share/postgresql/contrib/postgis-1.5/spatial_ref_sys.sql /usr/pkg/share/postgresql/contrib/postgis-1.5/uninstall_postgis.sql /usr/pkg/share/postgresql/contrib/postgis_comments.sql Is that right? Should I put postgis_comments.sql someplace else? Should doc/Makefile.in put it someplace else? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 194 bytes Desc: not available URL: From lr at pcorp.us Fri Mar 5 23:02:34 2010 From: lr at pcorp.us (Paragon Corporation) Date: Sat, 6 Mar 2010 02:02:34 -0500 Subject: [postgis-users] postgis_comments.sql installation location? In-Reply-To: References: Message-ID: Greg, It should go under postgis-1.5 folder since its version specific. I'll put this in as a ticket item. I don't use postgis_comments install for making so probably missed it. Thanks, Regina -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Greg Troxel Sent: Friday, March 05, 2010 7:15 PM To: postgis-users at postgis.refractions.net Subject: [postgis-users] postgis_comments.sql installation location? I have updated the pkgsrc package for postgis to 1.5.0 and make check passes (on NetBSD i386). (There is still considerable ickiness in the pkgsrc package because I haven't resolved the libtool integration fully.) postgis_comments.sql looks like it is installed in: comments-install: comments cp postgis_comments.sql $(PGSQL_SHAREDIR)/contrib/postgis_comments.sql which is inconsistent with the rest of the .sql files which are versioned. Currently pkgsrc installs postgis_comments.sql manually along with some other docs (to avoid depending on the doc tools) and we end up with: /usr/pkg/share/postgresql/contrib/postgis-1.5/postgis.sql /usr/pkg/share/postgresql/contrib/postgis-1.5/postgis_upgrade_13_to_15.sql /usr/pkg/share/postgresql/contrib/postgis-1.5/postgis_upgrade_14_to_15.sql /usr/pkg/share/postgresql/contrib/postgis-1.5/postgis_upgrade_15_minor.sql /usr/pkg/share/postgresql/contrib/postgis-1.5/spatial_ref_sys.sql /usr/pkg/share/postgresql/contrib/postgis-1.5/uninstall_postgis.sql /usr/pkg/share/postgresql/contrib/postgis_comments.sql Is that right? Should I put postgis_comments.sql someplace else? Should doc/Makefile.in put it someplace else? From bluevaley at gmail.com Sat Mar 6 11:36:11 2010 From: bluevaley at gmail.com (sunpeng) Date: Sat, 6 Mar 2010 13:36:11 -0600 Subject: [postgis-users] what's the meaning of "one of any multiset of duplicate values or rows." Message-ID: <46cc57ac1003061136h23ae9da7g178484806ac837f5@mail.gmail.com> In section 3.1.3 at SQL 99, There is a notion: redundant duplicates: All except one of any multiset of duplicate values or rows. what's the meaning of it? -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.antoniou at ucl.ac.uk Sat Mar 6 12:02:05 2010 From: v.antoniou at ucl.ac.uk (Vyron Antoniou) Date: Sat, 6 Mar 2010 20:02:05 -0000 Subject: [postgis-users] Postgis functions returning hidden weird characters! (?) Message-ID: Hi, This is a weird one! If you run the following sql: select ST_AsSVG(ST_Difference( ST_LineFromText('LINESTRING(528085.304556059 182402.75252444,528057.189235888 182383.627714979,528078.925527415 182348.523254458,528110.016845328 182367.72322892,528119.206862483 182351.764509452,528065.429111811 182316.692226383,528019.682277422 182382.682354742,528076.562322635 182418.577931056,528085.304556059 182402.75252444)'), ST_Difference(ST_LineFromText('LINESTRING(528085.304556059 182402.75252444,528057.189235888 182383.627714979,528078.925527415 182348.523254458,528110.016845328 182367.72322892,528119.206862483 182351.764509452,528065.429111811 182316.692226383,528019.682277422 182382.682354742,528076.562322635 182418.577931056,528085.304556059 182402.75252444)'), ST_LineFromText('LINESTRING(528609 182468,528009 182468)')) ),0,5) It sees like that you are getting nothing as a response (which is geometrically correct!) If you run this sql: select ST_AsSVG(ST_Difference( ST_LineFromText('LINESTRING(528930.958778316 181668,528945.758383221 181621.10086763,528907.323783 181609.420947433,528915.910261821 181576.356315477,528917.004045659 181556.777339062,528910.734095004 181545.323813335,528902.462041152 181542.732665401,528889.242540907 181547.159913121,528878.071632731 181564.70288216,528866.478880465 181598.881969597,528848.921015863 181656.67822709,528885.788489116 181668,528930.958778316 181668)'), ST_Difference(ST_LineFromText('LINESTRING(528930.958778316 181668,528945.758383221 181621.10086763,528907.323783 181609.420947433,528915.910261821 181576.356315477,528917.004045659 181556.777339062,528910.734095004 181545.323813335,528902.462041152 181542.732665401,528889.242540907 181547.159913121,528878.071632731 181564.70288216,528866.478880465 181598.881969597,528848.921015863 181656.67822709,528885.788489116 181668,528930.958778316 181668)'), ST_LineFromText('LINESTRING(529209 181668,528609 181668)')) ),0,5) You get: "M 528885.78849 -181668 L 528930.95878 -181668" which is also geometrically correct. The problem is that if you try to parse the responses at the server (say with PHP) in order to determine if you have any data returned or not, you would be surprised to realize that the first response is not a completely empty response (!) but instead there is something hidden there which looks like: h??□□, while with the second one you get exactly what you see. Someone could argue that this problem is caused by other factors not related to postgis but the thing is that this combination of postgis queries and PHP parsing didn?t used to cause any problems in previous versions. I?m running PostgreSQL 8.4 with Postgis 1.5 for 8.4 on Windows XP Any suggestions? Thanks Byron From pramsey at cleverelephant.ca Sat Mar 6 13:02:24 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Sat, 6 Mar 2010 13:02:24 -0800 Subject: [postgis-users] Postgis functions returning hidden weird characters! (?) In-Reply-To: References: Message-ID: <30fe546d1003061302o61a7eae7rc9124c9c6dfd3c8c@mail.gmail.com> Does select ST_AsSVG('GEOMETRYCOLLECTION EMPTY'::geometry,0,5); give the same odd result? (Should, it's the same fundamental input...) I'm not sure what you're seeing though, as all attempts in the database to find anything odd in the input fail for me: geog=# select length(ST_AsSVG('GEOMETRYCOLLECTION EMPTY'::geometry,0,5)); length -------- 0 (1 row) geog=# select '|' || ST_AsSVG('GEOMETRYCOLLECTION EMPTY'::geometry,0,5) || '|'; ?column? ---------- || (1 row) Could be a windows platform only thing... ? P On Sat, Mar 6, 2010 at 12:02 PM, Vyron Antoniou wrote: > Hi, > > This is a weird one! > > If you run the following sql: > > select ST_AsSVG(ST_Difference( > ST_LineFromText('LINESTRING(528085.304556059 > 182402.75252444,528057.189235888 182383.627714979,528078.925527415 > 182348.523254458,528110.016845328 182367.72322892,528119.206862483 > 182351.764509452,528065.429111811 182316.692226383,528019.682277422 > 182382.682354742,528076.562322635 182418.577931056,528085.304556059 > 182402.75252444)'), > ST_Difference(ST_LineFromText('LINESTRING(528085.304556059 > 182402.75252444,528057.189235888 182383.627714979,528078.925527415 > 182348.523254458,528110.016845328 182367.72322892,528119.206862483 > 182351.764509452,528065.429111811 182316.692226383,528019.682277422 > 182382.682354742,528076.562322635 182418.577931056,528085.304556059 > 182402.75252444)'), ST_LineFromText('LINESTRING(528609 182468,528009 > 182468)')) > ),0,5) > > It sees like that you are getting nothing as a response (which is > geometrically correct!) > > If you run this sql: > select ST_AsSVG(ST_Difference( > ST_LineFromText('LINESTRING(528930.958778316 181668,528945.758383221 > 181621.10086763,528907.323783 181609.420947433,528915.910261821 > 181576.356315477,528917.004045659 181556.777339062,528910.734095004 > 181545.323813335,528902.462041152 181542.732665401,528889.242540907 > 181547.159913121,528878.071632731 181564.70288216,528866.478880465 > 181598.881969597,528848.921015863 181656.67822709,528885.788489116 > 181668,528930.958778316 181668)'), > ST_Difference(ST_LineFromText('LINESTRING(528930.958778316 > 181668,528945.758383221 181621.10086763,528907.323783 > 181609.420947433,528915.910261821 181576.356315477,528917.004045659 > 181556.777339062,528910.734095004 181545.323813335,528902.462041152 > 181542.732665401,528889.242540907 181547.159913121,528878.071632731 > 181564.70288216,528866.478880465 181598.881969597,528848.921015863 > 181656.67822709,528885.788489116 181668,528930.958778316 181668)'), > ST_LineFromText('LINESTRING(529209 181668,528609 181668)')) > ),0,5) > > You get: "M 528885.78849 -181668 L 528930.95878 -181668" which is also > geometrically correct. > > The problem is that if you try to parse the responses at the server (say > with PHP) in order to determine if you have any data returned or not, you > would be surprised to realize that the first response is not a completely > empty response (!) but instead there is something hidden there which looks > like: h??□□, while with the second one you get exactly what > you see. > > Someone could argue that this problem is caused by other factors not > related to postgis but the thing is that this combination of postgis > queries and PHP parsing didn?t used to cause any problems in previous > versions. > > I?m running PostgreSQL 8.4 with Postgis 1.5 for 8.4 on Windows XP > > Any suggestions? > > Thanks > Byron > > > > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From v.antoniou at ucl.ac.uk Sat Mar 6 13:37:42 2010 From: v.antoniou at ucl.ac.uk (Vyron Antoniou) Date: Sat, 6 Mar 2010 21:37:42 -0000 Subject: [postgis-users] Postgis functions returning hidden weird characters! (?) Message-ID: <0c996456e7be317e19d2fd3837a06f7d.squirrel@www.squirrelmail.ucl.ac.uk> Hi Paul, Thanks for the response. Well, this one: select ST_AsSVG('GEOMETRYCOLLECTION EMPTY'::geometry,0,5); returns a clean result, no weird characters. Here is my test PHP code (just to save some typing): ";} ///////////////////////////////////////////////////////////////////// $sql0 = "select ST_AsSVG('GEOMETRYCOLLECTION EMPTY'::geometry,0,5);"; $stat0 = pg_exec($db0,$sql0); $rows0 = pg_numrows($stat0); $data0 = pg_fetch_array($stat0, 0); $handle0 = fopen("result_0.txt", "a+"); $text0 = "|".$data0 [0]."|\n"; fwrite($handle0, $text0); fclose($handle0); //////////////////////////////////////////////////////////////////////// $sql1 = "select ST_AsSVG(ST_Difference( ST_LineFromText('LINESTRING(528085.304556059 182402.75252444,528057.189235888 182383.627714979,528078.925527415 182348.523254458,528110.016845328 182367.72322892,528119.206862483 182351.764509452,528065.429111811 182316.692226383,528019.682277422 182382.682354742,528076.562322635 182418.577931056,528085.304556059 182402.75252444)'), ST_Difference(ST_LineFromText('LINESTRING(528085.304556059 182402.75252444,528057.189235888 182383.627714979,528078.925527415 182348.523254458,528110.016845328 182367.72322892,528119.206862483 182351.764509452,528065.429111811 182316.692226383,528019.682277422 182382.682354742,528076.562322635 182418.577931056,528085.304556059 182402.75252444)'), ST_LineFromText('LINESTRING(528609 182468,528009 182468)')) ),0,5)"; $stat1 = pg_exec($db0,$sql1); $rows1 = pg_numrows($stat1); $data1 = pg_fetch_array($stat1, 0); $handle1 = fopen("result_1.txt", "a+"); $text1 = "|".$data1 [0]."|\n"; fwrite($handle1, $text1); fclose($handle1); ?> The first one writes || while the second one writes unrecognizable characters (probably something binary?) Byron From mweinelt at planiglobe.com Mon Mar 8 00:38:47 2010 From: mweinelt at planiglobe.com (Martin Weinelt) Date: Mon, 8 Mar 2010 09:38:47 +0100 Subject: [postgis-users] Finding polygons outside other polygons Message-ID: <201003080938.47150.mweinelt@planiglobe.com> Hello to all, in a current project, I am trying to do a bit more serious stuff with PostGIS, apart from using it as as a backend for web mapping. I could use some tips or guidelines for the follwing - not very complicated - task. I have two tables, one holding some 3000 polygons describing city limits, another with some 100000 polygons describing individual houses. What I would like to have is another table with all houses outside any city limits. The following function seem to be candidates for this ST_Disjoint ST_Covers (not) ST_Within (not) ST_Intersects (not) ST_Distance First thing I did was to put the city polygons into one MultiPolygon (table with one row, 'my_cities_multi' ). Then , for the sake of testing this, I ran : select count(a.the_geom) from my_houses as a , my_cities_multi as f where ST_Disjoint( a.the_geom , f.the_geom ) This took some 30 minutes on a 3 GHz, two core machine and ended with: "NOTICE: IllegalArgumentException: Points of LinearRing do not form a closed linestring" I've checked with ST_IsClosed on both tables, no complains. I guess my task is a rather common application. But I am not that SQL-savvy. May be some one can point me to a best practice with this, also in terms of performance. Thanks, Martin From nicklas.aven at jordogskog.no Mon Mar 8 00:55:23 2010 From: nicklas.aven at jordogskog.no (=?iso-8859-1?Q?Nicklas_Av=E9n?=) Date: Mon, 8 Mar 2010 09:55:23 +0100 Subject: [postgis-users] Finding polygons outside other polygons Message-ID: <201003080855.o288tNgs001141@mail-core.space2u.com> Hallo Martin I guess I just try to answer a part of your question. I don't know what your exception comes from. If I understand things right your approach won't work because what you are doing is joining your houses with every city exept the one it eventually is intersecting. You have do get it from the other side. Get all intersections in a subquery and then ask for all houses not in that subquery. If you have a column gid with unique values in houses table you could do something like: select count(*) from my_houses where gid not in (Select a.gid from my_houses as a , my_cities_multi as f where ST_Intersects( a.the_geom , f.the_geom ) The indexes is important here. Both the spatial indexes and an index on the gid column. Hope that helps Nicklas 2010-03-08 Martin Weinelt wrote: Hello to all, > >in a current project, I am trying to do a bit more serious stuff with PostGIS, >apart from using it as as a backend for web mapping. > >I could use some tips or guidelines for the follwing - not very complicated - >task. > >I have two tables, one holding some 3000 polygons describing city limits, >another with some 100000 polygons describing individual houses. > >What I would like to have is another table with all houses outside any city >limits. > >The following function seem to be candidates for this > ST_Disjoint > ST_Covers (not) > ST_Within (not) > ST_Intersects (not) > ST_Distance > >First thing I did was to put the city polygons into one MultiPolygon (table >with one row, 'my_cities_multi' ). Then , for the sake of testing this, I >ran : > >select count(a.the_geom) from my_houses as a , my_cities_multi as f > where ST_Disjoint( a.the_geom , f.the_geom ) > >This took some 30 minutes on a 3 GHz, two core machine and ended with: > >"NOTICE: IllegalArgumentException: Points of LinearRing do not form a closed >linestring" > >I've checked with ST_IsClosed on both tables, no complains. > >I guess my task is a rather common application. But I am not that SQL-savvy. >May be some one can point me to a best practice with this, also in terms of >performance. > >Thanks, > >Martin >_______________________________________________ >postgis-users mailing list >postgis-users at postgis.refractions.net >http://postgis.refractions.net/mailman/listinfo/postgis-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mweinelt at planiglobe.com Mon Mar 8 03:44:47 2010 From: mweinelt at planiglobe.com (Martin Weinelt) Date: Mon, 8 Mar 2010 12:44:47 +0100 Subject: [postgis-users] Finding polygons outside other polygons In-Reply-To: <201003080855.o288tNgs001141@mail-core.space2u.com> References: <201003080855.o288tNgs001141@mail-core.space2u.com> Message-ID: <201003081244.48145.mweinelt@planiglobe.com> Hi Nicklas, thanks a lot, especially for the tip with the subquery. Of course I started up you code and , again: > NOTICE: IllegalArgumentException: Points of LinearRing do not form a closed linestring > ERROR: POSTGIS2GEOS conversion failed i will try and check again, if I have any invalid geomatries in the tables. Cheers, Martin On Monday 08 March 2010 09:55:23 Nicklas Av?n wrote: > Hallo Martin > > I guess I just try to answer a part of your question. I don't know what > your exception comes from. > > If I understand things right your approach won't work because what you are > doing is joining your houses with every city exept the one it eventually is > intersecting. You have do get it from the other side. > > Get all intersections in a subquery and then ask for all houses not in that > subquery. If you have a column gid with unique values in houses table you > could do something like: > > select count(*) from my_houses where gid not in > (Select a.gid from my_houses as a , my_cities_multi as f > where ST_Intersects( a.the_geom , f.the_geom ) > > The indexes is important here. Both the spatial indexes and an index on the > gid column. > > Hope that helps > Nicklas > > > > > 2010-03-08 Martin Weinelt wrote: > > Hello to all, > > >in a current project, I am trying to do a bit more serious stuff with > > PostGIS, apart from using it as as a backend for web mapping. > > > >I could use some tips or guidelines for the follwing - not very > > complicated - task. > > > >I have two tables, one holding some 3000 polygons describing city limits, > >another with some 100000 polygons describing individual houses. > > > >What I would like to have is another table with all houses outside any > > city limits. > > > >The following function seem to be candidates for this > > ST_Disjoint > > ST_Covers (not) > > ST_Within (not) > > ST_Intersects (not) > > ST_Distance > > > >First thing I did was to put the city polygons into one MultiPolygon > > (table with one row, 'my_cities_multi' ). Then , for the sake of testing > > this, I ran : > > > >select count(a.the_geom) from my_houses as a , my_cities_multi as f > > where ST_Disjoint( a.the_geom , f.the_geom ) > > > >This took some 30 minutes on a 3 GHz, two core machine and ended with: > > > >"NOTICE: IllegalArgumentException: Points of LinearRing do not form a > > closed linestring" > > > >I've checked with ST_IsClosed on both tables, no complains. > > > >I guess my task is a rather common application. But I am not that > > SQL-savvy. May be some one can point me to a best practice with this, > > also in terms of performance. > > > >Thanks, > > > >Martin > >_______________________________________________ > >postgis-users mailing list > >postgis-users at postgis.refractions.net > >http://postgis.refractions.net/mailman/listinfo/postgis-users -- --- Martin Weinelt --- kk+w - digital cartography --- Kiel, Germany --- Tel: +49.431.5791165 --- http://kkw.planiglobe.com From ravivundavalli at yahoo.com Mon Mar 8 04:26:15 2010 From: ravivundavalli at yahoo.com (Ravi) Date: Mon, 8 Mar 2010 04:26:15 -0800 (PST) Subject: [postgis-users] Projection Message-ID: <106693.79928.qm@web65606.mail.ac4.yahoo.com> Hi, Pl provide some pointers or simple exercises to show how a square with long,lat corners can be projected to WGS-84 projection resulting easting and northings for the corners. Long,Lat ---> WGS-84 Ravi Kumar Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/ From dolson at glifwc.org Mon Mar 8 06:45:31 2010 From: dolson at glifwc.org (Dara Olson) Date: Mon, 8 Mar 2010 08:45:31 -0600 Subject: [postgis-users] Query using st_contains for points within polygons Message-ID: Greetings. I am trying to make a query which builds a table that has a 'present' or a NULL in each column of whether or not a point is within that polygon. I have a polygon file of waterbodies and a point file of invasive species data. I want to make a table that shows which invasive species are known to be present in the waterbody. So far I have come up with the following: SELECT DISTINCT wi_ogaa_harvest_waterbodies.mwbc, wi_ogaa_harvest_waterbodies.county, wi_ogaa_harvest_waterbodies.lake, (CASE WHEN invspp_occurrence_data.tsn_char = '81339' then 'present' else NULL end) AS "Zebra_Mussel", (CASE WHEN invspp_occurrence_data.tsn_char = '684624' then 'present' else NULL end) AS "Spiny_Waterflea", (CASE WHEN invspp_occurrence_data.genus = 'Myriophyllum' then 'present' else NULL end) AS "Eurasian_Water_Milfoil", (CASE WHEN invspp_occurrence_data.tsn_char = '39007' then 'present' else NULL end) AS "Curly_Leaf_Pondweed", (CASE WHEN invspp_occurrence_data.genus = 'Heterosporis' then 'present' else NULL end) AS "Heterosporis" FROM inland.wi_ogaa_harvest_waterbodies JOIN invasive_species.invspp_occurrence_data ON ST_Contains (wi_ogaa_harvest_waterbodies.the_geom, invspp_occurrence_data.the_geom) ORDER BY county, lake This seems to work correctly, but for each record (lake) that has a species present a new line is formed. For example, if a lake had all five species listed, the lake would be listed 6 times in the table (one line for each species present and one line for all NULLs). If I use GROUP BY, it returns errors unless I include all columns including "invspp_occurrence_data.tsn_char" and "invspp_occurrence_data.genus" which puts me in the same spot I was without using GROUP BY. Does anyone know what I am doing wrong or how to fix? Any help would be greatly appreciated. Miigwech! Dara -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at georgherdt.de Mon Mar 8 06:49:15 2010 From: info at georgherdt.de (info at georgherdt.de) Date: Mon, 08 Mar 2010 15:49:15 +0100 Subject: [postgis-users] st_within operation not considering spherical distortion Message-ID: <20100308154915.15744ic0xd30i9wk@webmail.df.eu> Hi, yet I'm quite new to the list, I'm using postigis for some time. For now I discovered the following behaviour for this query: select st_within(st_geomfromtext('POINT (-40 44.1)',4326),st_geomfromtext('POLYGON((0 44, -90 44, -90 46, 0 46, 0 44))',4326)) Stating that the point (-40,44.1) is within the given polygon. But when considering the spherical "distortion" (the connect between the points are arcs not straight lines) on the described polygon this point cannot be within. I've seen that there are some functions for calculating spherical distances but, nothing similar for the st_within function. Can anybody help me whats wrong with that. Maybe its my thinking ;-) Best regards Georg Herdt From Ralf.Suhr at itc-halle.de Mon Mar 8 07:00:42 2010 From: Ralf.Suhr at itc-halle.de (Suhr, Ralf) Date: Mon, 8 Mar 2010 16:00:42 +0100 Subject: [postgis-users] st_within operation not considering sphericaldistortion In-Reply-To: <20100308154915.15744ic0xd30i9wk@webmail.df.eu> References: <20100308154915.15744ic0xd30i9wk@webmail.df.eu> Message-ID: <305F51E63512244D853C549502A6132454F8CB@VVVMAIL.vvv.vvv-konzern.net> Yes it's only thinking, select st_within(ST_Transform(st_geomfromtext('POINT (-40 44.1)',4326),3035),ST_Transform(st_geomfromtext('POLYGON((0 44, -90 44, -90 46, 0 46, 0 44))',4326),3035)); st_within ----------- F If you use only EPSG:4326 all coordinates are plain orthogonal and your query is true. Gr Ralf -----Urspr?ngliche Nachricht----- Von: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] Im Auftrag von info at georgherdt.de Gesendet: Montag, 8. M?rz 2010 15:49 An: postgis-users at postgis.refractions.net Betreff: [postgis-users] st_within operation not considering sphericaldistortion Hi, yet I'm quite new to the list, I'm using postigis for some time. For now I discovered the following behaviour for this query: select st_within(st_geomfromtext('POINT (-40 44.1)',4326),st_geomfromtext('POLYGON((0 44, -90 44, -90 46, 0 46, 0 44))',4326)) Stating that the point (-40,44.1) is within the given polygon. But when considering the spherical "distortion" (the connect between the points are arcs not straight lines) on the described polygon this point cannot be within. I've seen that there are some functions for calculating spherical distances but, nothing similar for the st_within function. Can anybody help me whats wrong with that. Maybe its my thinking ;-) Best regards Georg Herdt _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From info at georgherdt.de Mon Mar 8 07:06:10 2010 From: info at georgherdt.de (info at georgherdt.de) Date: Mon, 08 Mar 2010 16:06:10 +0100 Subject: [postgis-users] st_within operation not considering sphericaldistortion In-Reply-To: <305F51E63512244D853C549502A6132454F8CB@VVVMAIL.vvv.vvv-konzern.net> References: <20100308154915.15744ic0xd30i9wk@webmail.df.eu> <305F51E63512244D853C549502A6132454F8CB@VVVMAIL.vvv.vvv-konzern.net> Message-ID: <20100308160610.11806czfp18m2sg0@webmail.df.eu> Hi Ralf, thanks for your quick response. I've been looking at 3035 (ETRS89). The problem for me with this spatial reference system is, that my geometries are spanning over the whole world. Maybe you know a srs which covers -180 to 180 and -90 up to 90 ??? Cheers Georg Zitat von "Suhr, Ralf" : > Yes it's only thinking, > > select st_within(ST_Transform(st_geomfromtext('POINT (-40 > 44.1)',4326),3035),ST_Transform(st_geomfromtext('POLYGON((0 44, -90 > 44, -90 46, 0 46, 0 > 44))',4326),3035)); > > st_within > ----------- > F > > If you use only EPSG:4326 all coordinates are plain orthogonal and > your query is true. > > Gr Ralf > > -----Urspr?ngliche Nachricht----- > Von: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] Im Auftrag > von info at georgherdt.de > Gesendet: Montag, 8. M?rz 2010 15:49 > An: postgis-users at postgis.refractions.net > Betreff: [postgis-users] st_within operation not considering > sphericaldistortion > > Hi, > > yet I'm quite new to the list, I'm using postigis for some time. > For now I discovered the following behaviour for this query: > > select st_within(st_geomfromtext('POINT (-40 > 44.1)',4326),st_geomfromtext('POLYGON((0 44, -90 44, -90 46, 0 46, 0 > 44))',4326)) > > Stating that the point (-40,44.1) is within the given polygon. But > when considering the spherical "distortion" (the connect between the > points are arcs not straight lines) on the described polygon this > point cannot be within. > I've seen that there are some functions for calculating spherical > distances but, nothing similar for the st_within function. > > Can anybody help me whats wrong with that. Maybe its my thinking ;-) > > > Best regards > > Georg Herdt > > > _______________________________________________ > 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 mweinelt at planiglobe.com Mon Mar 8 08:07:01 2010 From: mweinelt at planiglobe.com (Martin Weinelt) Date: Mon, 8 Mar 2010 17:07:01 +0100 Subject: [postgis-users] Finding polygons outside other polygons In-Reply-To: <201003081244.48145.mweinelt@planiglobe.com> References: <201003080855.o288tNgs001141@mail-core.space2u.com> <201003081244.48145.mweinelt@planiglobe.com> Message-ID: <201003081707.01587.mweinelt@planiglobe.com> Dear Nicklas, your solution works like charme, thanks indeed. The ST_IsClosed was not enough for excluding broken geometries from the input tables. I put an ST_IsValid-test into the WHERE-clause: insert into houses_offlimits (select * from houses where gid not in (Select a.gid from houses as a , my_cities as f where ST_IsValid(a.the_geom) AND ST_Intersects( a.the_geom , f.the_geom ) ) ); Taking care of the broken ones is another question. Cheers, Martin On Monday 08 March 2010 12:44:47 Martin Weinelt wrote: > Hi Nicklas, > > thanks a lot, especially for the tip with the subquery. Of course I started > up > > you code and , again: > > NOTICE: IllegalArgumentException: Points of LinearRing do not form a > > closed > > linestring > > > ERROR: POSTGIS2GEOS conversion failed > > i will try and check again, if I have any invalid geomatries in the tables. > > Cheers, > > Martin > > On Monday 08 March 2010 09:55:23 Nicklas Av?n wrote: > > Hallo Martin > > > > I guess I just try to answer a part of your question. I don't know what > > your exception comes from. > > > > If I understand things right your approach won't work because what you > > are doing is joining your houses with every city exept the one it > > eventually is intersecting. You have do get it from the other side. > > > > Get all intersections in a subquery and then ask for all houses not in > > that subquery. If you have a column gid with unique values in houses > > table you could do something like: > > > > select count(*) from my_houses where gid not in > > (Select a.gid from my_houses as a , my_cities_multi as f > > where ST_Intersects( a.the_geom , f.the_geom ) > > > > The indexes is important here. Both the spatial indexes and an index on > > the gid column. > > > > Hope that helps > > Nicklas > > > > > > > > > > 2010-03-08 Martin Weinelt wrote: > > > > Hello to all, > > > > >in a current project, I am trying to do a bit more serious stuff with > > > PostGIS, apart from using it as as a backend for web mapping. > > > > > >I could use some tips or guidelines for the follwing - not very > > > complicated - task. > > > > > >I have two tables, one holding some 3000 polygons describing city > > > limits, another with some 100000 polygons describing individual houses. > > > > > >What I would like to have is another table with all houses outside any > > > city limits. > > > > > >The following function seem to be candidates for this > > > ST_Disjoint > > > ST_Covers (not) > > > ST_Within (not) > > > ST_Intersects (not) > > > ST_Distance > > > > > >First thing I did was to put the city polygons into one MultiPolygon > > > (table with one row, 'my_cities_multi' ). Then , for the sake of > > > testing this, I ran : > > > > > >select count(a.the_geom) from my_houses as a , my_cities_multi as f > > > where ST_Disjoint( a.the_geom , f.the_geom ) > > > > > >This took some 30 minutes on a 3 GHz, two core machine and ended with: > > > > > >"NOTICE: IllegalArgumentException: Points of LinearRing do not form a > > > closed linestring" > > > > > >I've checked with ST_IsClosed on both tables, no complains. > > > > > >I guess my task is a rather common application. But I am not that > > > SQL-savvy. May be some one can point me to a best practice with this, > > > also in terms of performance. > > > > > >Thanks, > > > > > >Martin > > >_______________________________________________ > > >postgis-users mailing list > > >postgis-users at postgis.refractions.net > > >http://postgis.refractions.net/mailman/listinfo/postgis-users -- --- Martin Weinelt --- kk+w - digital cartography --- Kiel, Germany --- Tel: +49.431.5791165 --- http://kkw.planiglobe.com From pramsey at opengeo.org Mon Mar 8 08:23:31 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Mon, 8 Mar 2010 08:23:31 -0800 Subject: [postgis-users] st_within operation not considering sphericaldistortion In-Reply-To: <20100308160610.11806czfp18m2sg0@webmail.df.eu> References: <20100308154915.15744ic0xd30i9wk@webmail.df.eu> <305F51E63512244D853C549502A6132454F8CB@VVVMAIL.vvv.vvv-konzern.net> <20100308160610.11806czfp18m2sg0@webmail.df.eu> Message-ID: <30fe546d1003080823j1c596e2cs31376c5632c8b0c9@mail.gmail.com> You'll find that ST_Covers() is available for the geography type in PostGIS 1.5 and should meet your needs... select st_covers(st_geogfromtext('POLYGON((0 44, -90 44, -90 46, 0 46, 0 44))'),st_geogfromtext('POINT (-40 44.1)')) st_covers ----------- f (1 row) On Mon, Mar 8, 2010 at 7:06 AM, wrote: > Hi Ralf, > thanks for your quick response. I've been looking at 3035 (ETRS89). The > problem for me with this spatial reference system is, that my geometries are > spanning over the whole world. > Maybe you know a srs which covers -180 to 180 and -90 up to 90 ??? > > > Cheers > > Georg > > > > Zitat von "Suhr, Ralf" : > >> Yes it's only thinking, >> >> select st_within(ST_Transform(st_geomfromtext('POINT (-40 >> 44.1)',4326),3035),ST_Transform(st_geomfromtext('POLYGON((0 44, -90 44, -90 >> 46, 0 46, 0 >> 44))',4326),3035)); >> >> ?st_within >> ----------- >> ?F >> >> If you use only EPSG:4326 all coordinates are plain orthogonal and your >> query is true. >> >> Gr Ralf >> >> -----Urspr?ngliche Nachricht----- >> Von: postgis-users-bounces at postgis.refractions.net >> [mailto:postgis-users-bounces at postgis.refractions.net] Im Auftrag von >> info at georgherdt.de >> Gesendet: Montag, 8. M?rz 2010 15:49 >> An: postgis-users at postgis.refractions.net >> Betreff: [postgis-users] st_within operation not considering >> sphericaldistortion >> >> Hi, >> >> yet I'm quite new to the list, I'm using postigis for some time. >> For now I discovered the following behaviour for this query: >> >> select st_within(st_geomfromtext('POINT (-40 >> 44.1)',4326),st_geomfromtext('POLYGON((0 44, -90 44, -90 46, 0 46, 0 >> 44))',4326)) >> >> Stating that the point (-40,44.1) is within the given polygon. But >> when considering the spherical "distortion" (the connect between the >> points are arcs not straight lines) on the described polygon this >> point cannot be within. >> I've seen that there are some functions for calculating spherical >> distances but, nothing similar for the st_within function. >> >> Can anybody help me whats wrong with that. Maybe its my thinking ;-) >> >> >> Best regards >> >> Georg Herdt >> >> >> _______________________________________________ >> 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 mwtoews at gmail.com Mon Mar 8 08:29:51 2010 From: mwtoews at gmail.com (Mike Toews) Date: Mon, 8 Mar 2010 08:29:51 -0800 Subject: [postgis-users] Query using st_contains for points within polygons In-Reply-To: References: Message-ID: <22f0a52d1003080829meb6fb5atef7d119de4b5ab84@mail.gmail.com> Hi Dara, You are close by using "GROUP BY". This needs to be turned into an aggregate query for your needs. It is possibly easier and more informative to show counts (rather than "present"). Here is my rewrite, which may or may not work: SELECT DISTINCT wi_ogaa_harvest_waterbodies.mwbc, wi_ogaa_harvest_waterbodies.county, wi_ogaa_harvest_waterbodies.lake, nullif(sum(CASE WHEN invspp_occurrence_data.tsn_char = '81339' then 1 end), 0) AS "Zebra_Mussel", nullif(sum(CASE WHEN invspp_occurrence_data.tsn_char = '684624' then 1 end), 0) AS "Spiny_Waterflea", nullif(sum(CASE WHEN invspp_occurrence_data.genus = 'Myriophyllum' then 1 end), 0) AS "Eurasian_Water_Milfoil", nullif(sum(CASE WHEN invspp_occurrence_data.tsn_char = '39007' then 1 end), 0) AS "Curly_Leaf_Pondweed", nullif(sum(CASE WHEN invspp_occurrence_data.genus = 'Heterosporis' then 1 end), 0) AS "Heterosporis" FROM inland.wi_ogaa_harvest_waterbodies JOIN invasive_species.invspp_occurrence_data ON ST_Contains (wi_ogaa_harvest_waterbodies.the_geom, invspp_occurrence_data.the_geom) GROUP BY wi_ogaa_harvest_waterbodies.mwbc, wi_ogaa_harvest_waterbodies.county, wi_ogaa_harvest_waterbodies.lake ORDER BY county, lake; The nullif() function suppresses showing zeros if there are not any present, otherwise the numbers speak for themselves. If you do want to show "present" or null, you could easily edit it to another CASE statement. -Mike On 8 March 2010 06:45, Dara Olson wrote: > Greetings. > I am trying to make a query which builds a table that has a 'present' or > a?NULL in?each?column of whether or not a point is within that polygon.? I > have a polygon file of waterbodies and a point file of invasive species > data.? I want to make a table that shows which invasive species are known to > be?present?in the?waterbody.? So far I have come up with the following: > > SELECT DISTINCT > wi_ogaa_harvest_waterbodies.mwbc, > wi_ogaa_harvest_waterbodies.county, > wi_ogaa_harvest_waterbodies.lake, > (CASE WHEN invspp_occurrence_data.tsn_char = '81339' then 'present' else > NULL end) AS "Zebra_Mussel", > (CASE WHEN invspp_occurrence_data.tsn_char = '684624' then 'present' else > NULL end) AS "Spiny_Waterflea", > (CASE WHEN invspp_occurrence_data.genus = 'Myriophyllum' then 'present' else > NULL end) AS "Eurasian_Water_Milfoil", > (CASE WHEN invspp_occurrence_data.tsn_char = '39007' then 'present' else > NULL end) AS "Curly_Leaf_Pondweed", > (CASE WHEN invspp_occurrence_data.genus = 'Heterosporis' then 'present' else > NULL end) AS "Heterosporis" > FROM inland.wi_ogaa_harvest_waterbodies > JOIN invasive_species.invspp_occurrence_data ON ST_Contains > (wi_ogaa_harvest_waterbodies.the_geom, invspp_occurrence_data.the_geom) > ORDER BY county, lake > > This seems to work correctly, but for each record (lake) that has a species > present a new line is formed.?For example,?if a lake had all five species > listed, the lake would be listed 6 times in the table (one line for each > species present and one line for all NULLs).? If I use GROUP BY, it returns > errors unless I include all columns including > "invspp_occurrence_data.tsn_char" and "invspp_occurrence_data.genus" which > puts me in the same spot I was without using GROUP BY. > > Does anyone know what I am doing wrong or how to fix?? Any help would be > greatly appreciated. > Miigwech! > Dara > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > From Majid.Kazemi at teranet.ca Mon Mar 8 08:37:01 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Mon, 8 Mar 2010 11:37:01 -0500 Subject: [postgis-users] Postgis: Error In-Reply-To: <20100305232651.GO87723@keybit.net> Message-ID: Thanks very much for all updates. I found the libgeos_c.so.1 in /usr/local/lib. I exported LD_LIBRARY_PATH=/usr/local/lib but I am still having the same issue. Yes, I run ldconfig as root. It did not see any update or error. What this suppose to do? Thanks, Majid -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of strk Sent: March 5, 2010 6:27 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] Postgis: Error On Fri, Mar 05, 2010 at 04:11:25PM -0500, Majid Kazemi wrote: > l:57: ERROR: could not load library > "/opt/PostgreSQL/8.3/lib/postgresql/postgis-1.5.so": libgeos_c.so.1: > cannot open shared object file: No such file or directory Did you run ldconfig(8) after geos install ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From khaylov.stud at fsr.tu-darmstadt.de Tue Mar 9 03:50:09 2010 From: khaylov.stud at fsr.tu-darmstadt.de (Leonid Khaylov) Date: Tue, 9 Mar 2010 12:50:09 +0100 Subject: [postgis-users] st_intersects threw an error Message-ID: Hello! I'm experiencing a problem with function st_intersects (currently installed PostGIS 1.4). Our software makes a lot of db queries which are using st_intersects (actually it should be running a week or more) and after some number of queries we get "st_intersects threw an error" problem. We were able to get around this problem as after the error is thrown we disconnect from the db and connect to it again retrying the same query. It works. But the problem we're experiencing now is more difficult - we get these errors more often with time. Apparently, on the 4th day of simulation we get those errors each 3 minutes and it is almost not possible to finish the simulation. Any ideas on how can we get around it? Any patches? Thanks in advance! Leonid Khaylov -------------- next part -------------- An HTML attachment was scrubbed... URL: From strk at keybit.net Tue Mar 9 04:01:00 2010 From: strk at keybit.net (strk) Date: Tue, 9 Mar 2010 13:01:00 +0100 Subject: [postgis-users] st_intersects threw an error In-Reply-To: References: Message-ID: <20100309120100.GB36677@keybit.net> On Tue, Mar 09, 2010 at 12:50:09PM +0100, Leonid Khaylov wrote: > Hello! > > > > I'm experiencing a problem with function st_intersects (currently > installed PostGIS 1.4). Our software makes a lot of db queries which are > using st_intersects (actually it should be running a week or more) and > after some number of queries we get "st_intersects threw an error" > problem. We were able to get around this problem as after the error is > thrown we disconnect from the db and connect to it again retrying the > same query. It works. But the problem we're experiencing now is more > difficult - we get these errors more often with time. Apparently, on the > 4th day of simulation we get those errors each 3 minutes and it is > almost not possible to finish the simulation. > > Any ideas on how can we get around it? Any patches? Most of the times that error is due to topologicall-invalid geometries being passed to st_intersects. You may first of all check that (ST_isValid). Now, a separate issue is that ST_isValid may give you false positive (sic) unless you install current development version of GEOS. So my advice is: install GEOS development version, check your geometries with ST_isValid, clean them up if any invalidity is found. Also note that upgrading GEOS will give you improved robustness and speed. Finally, consider also upgrading postgis (1.5.1 is about to be released). --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From jd at commandprompt.com Tue Mar 9 12:03:24 2010 From: jd at commandprompt.com (Joshua D. Drake) Date: Tue, 09 Mar 2010 12:03:24 -0800 Subject: [postgis-users] PostgreSQL Conference East, Hotel Deadline Message-ID: <1268165004.31596.82.camel@jd-desktop.unknown.charter.com> Hey guys, If you are attending on of the PostGIS talks or PostgreSQL Conference East in general, you are going to want to get your registrations in for the hotel. The discount closes down after the 11th... Regular price for the hotel is ~ 199 versus 132.00. http://www.postgresqlconference.org/ will get you where you need to be. Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 Consulting, Training, Support, Custom Development, Engineering Respect is earned, not gained through arbitrary and repetitive use or Mr. or Sir. From oruiz_27 at hotmail.com Tue Mar 9 13:51:17 2010 From: oruiz_27 at hotmail.com (OLIVIA RUIZ) Date: Tue, 9 Mar 2010 16:51:17 -0500 Subject: [postgis-users] postgis-users Digest, Vol 93, Issue 8 In-Reply-To: References: Message-ID: Hello Quisiera que me ayuden con algun foro en espa?ol, ademas del idioma soy nueva en postgis y necesito muchisima ayuda Gracias _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.mueller76 at arcor.de Wed Mar 10 02:33:30 2010 From: s.mueller76 at arcor.de (=?ISO-8859-15?Q?Sascha_M=FCller?=) Date: Wed, 10 Mar 2010 11:33:30 +0100 Subject: [postgis-users] Copying parallel line features Message-ID: <4B97757A.9060804@arcor.de> Hi all, How can I copying parallel line features with postgis? I search for something like the function "copay parallel" in ESRI ArcGIS. Is there a way to do this? Thanks Sascha From Ralf.Suhr at itc-halle.de Wed Mar 10 02:42:17 2010 From: Ralf.Suhr at itc-halle.de (Ralf Suhr) Date: Wed, 10 Mar 2010 11:42:17 +0100 Subject: [postgis-users] Copying parallel line features In-Reply-To: <4B97757A.9060804@arcor.de> References: <4B97757A.9060804@arcor.de> Message-ID: <201003101142.17847.Ralf.Suhr@itc-halle.de> Hi Sascha, there is no function "copy parallel" in postgis. Gr Ralf Am Mittwoch 10 M?rz 2010 11:33:30 schrieb Sascha M?ller: > Hi all, > > How can I copying parallel line features with postgis? > > I search for something like the function "copay parallel" in ESRI ArcGIS. > > Is there a way to do this? > > Thanks > > Sascha > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From a.neumann at carto.net Wed Mar 10 04:15:16 2010 From: a.neumann at carto.net (Andreas Neumann) Date: Wed, 10 Mar 2010 13:15:16 +0100 (CET) Subject: [postgis-users] Copying parallel line features In-Reply-To: <4B97757A.9060804@arcor.de> References: <4B97757A.9060804@arcor.de> Message-ID: <38268.193.246.86.39.1268223316.squirrel@webmail.carto.net> Hi, The closest you can get is the buffer. But currently this will create a symmetric polygon around the line, with control of joins and caps. A parallel line, or open buffer, or asymmetric buffer would still have to be developed. Andreas On Wed, March 10, 2010 11:33 am, Sascha M?ller wrote: > Hi all, > > How can I copying parallel line features with postgis? > > I search for something like the function "copay parallel" in ESRI ArcGIS. > > Is there a way to do this? > > Thanks > > Sascha > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Andreas Neumann http://www.carto.net/neumann/ http://www.svgopen.org/ From strk at keybit.net Wed Mar 10 04:51:09 2010 From: strk at keybit.net (strk) Date: Wed, 10 Mar 2010 13:51:09 +0100 Subject: [postgis-users] Copying parallel line features In-Reply-To: <38268.193.246.86.39.1268223316.squirrel@webmail.carto.net> References: <4B97757A.9060804@arcor.de> <38268.193.246.86.39.1268223316.squirrel@webmail.carto.net> Message-ID: <20100310125109.GA62719@keybit.net> On Wed, Mar 10, 2010 at 01:15:16PM +0100, Andreas Neumann wrote: > Hi, > > The closest you can get is the buffer. But currently this will create a > symmetric polygon around the line, with control of joins and caps. > > A parallel line, or open buffer, or asymmetric buffer would still have to > be developed. See ST_OffsetCurve: http://trac.osgeo.org/postgis/ticket/413 Your use case may help defining the final interface. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From ERandall at eriecountygov.org Wed Mar 10 05:35:39 2010 From: ERandall at eriecountygov.org (Randall, Eric) Date: Wed, 10 Mar 2010 08:35:39 -0500 Subject: [postgis-users] Copying parallel line features In-Reply-To: <4B97757A.9060804@arcor.de> Message-ID: Couldn't you ST_translate to move your line to a 0,0 based on ST_startpoint, make a new paraallel using +/-X of vertices, then translate it back? Eric -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of Sascha M?ller Sent: Wednesday, March 10, 2010 5:34 AM To: postgis-users at postgis.refractions.net Subject: [postgis-users] Copying parallel line features Hi all, How can I copying parallel line features with postgis? I search for something like the function "copay parallel" in ESRI ArcGIS. Is there a way to do this? Thanks Sascha _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From ERandall at eriecountygov.org Wed Mar 10 05:37:42 2010 From: ERandall at eriecountygov.org (Randall, Eric) Date: Wed, 10 Mar 2010 08:37:42 -0500 Subject: [postgis-users] Copying parallel line features In-Reply-To: Message-ID: Oops, I should have said "ST_translate and ST_rotate" I think. Eric -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of Randall, Eric Sent: Wednesday, March 10, 2010 8:36 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] Copying parallel line features Couldn't you ST_translate to move your line to a 0,0 based on ST_startpoint, make a new paraallel using +/-X of vertices, then translate it back? Eric -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of Sascha M?ller Sent: Wednesday, March 10, 2010 5:34 AM To: postgis-users at postgis.refractions.net Subject: [postgis-users] Copying parallel line features Hi all, How can I copying parallel line features with postgis? I search for something like the function "copay parallel" in ESRI ArcGIS. Is there a way to do this? Thanks Sascha _______________________________________________ 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 cgalpin at lhsw.com Wed Mar 10 06:07:15 2010 From: cgalpin at lhsw.com (Charles Galpin) Date: Wed, 10 Mar 2010 09:07:15 -0500 Subject: [postgis-users] Copying parallel line features In-Reply-To: References: Message-ID: I am not sure I understand the requirement, but I recently used upgis_lineshift to create lines parallel to other lines (to show bidirectional links as 2 lines) http://trac.osgeo.org/postgis/wiki/UsersWikiplpgsqlfunctions hth charles > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of > Sascha M?ller > Sent: Wednesday, March 10, 2010 5:34 AM > To: postgis-users at postgis.refractions.net > Subject: [postgis-users] Copying parallel line features > > > Hi all, > > How can I copying parallel line features with postgis? > From sachin.srivastava1984 at gmail.com Wed Mar 10 06:21:34 2010 From: sachin.srivastava1984 at gmail.com (Sachin Srivastava) Date: Wed, 10 Mar 2010 19:51:34 +0530 Subject: [postgis-users] PostGIS 1.5.0 build failure Message-ID: <4B97AAEE.5060203@gmail.com> Hi all, I am building postgis-1.5.0 with proj-4.7.0, geos-3.2.0, libxml2-2.7.6, postgresql-9.0alpha4 on Windows7 (MinGW) lwgeom_accum.c: In function `pgis_geometry_accum_transfn': lwgeom_accum.c:110: error: structure has no member named `wincontext' make[1]: Leaving directory `/c/pginstaller.sachin1-repo/postgis.windows/postgis' make[1]: *** [lwgeom_accum.o] Error 1 make: *** [postgis] Error 2 Any suggestions what i am missing would be really helpful. Thanks. -- Regards, Sachin Srivastava EnterpriseDB, India www.enterprisedb.com From pramsey at opengeo.org Wed Mar 10 07:14:46 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Wed, 10 Mar 2010 07:14:46 -0800 Subject: [postgis-users] PostGIS 1.5.0 build failure In-Reply-To: <4B97AAEE.5060203@gmail.com> References: <4B97AAEE.5060203@gmail.com> Message-ID: <30fe546d1003100714n7b7699c9g79d4913461f1d256@mail.gmail.com> Wrong PostgreSQL version? We only support 8.3+ on PostGIS 1.5. On Wed, Mar 10, 2010 at 6:21 AM, Sachin Srivastava wrote: > Hi all, > > I am building postgis-1.5.0 with proj-4.7.0, geos-3.2.0, libxml2-2.7.6, > postgresql-9.0alpha4 on Windows7 (MinGW) > > lwgeom_accum.c: In function `pgis_geometry_accum_transfn': > lwgeom_accum.c:110: error: structure has no member named `wincontext' > make[1]: Leaving directory > `/c/pginstaller.sachin1-repo/postgis.windows/postgis' > make[1]: *** [lwgeom_accum.o] Error 1 > make: *** [postgis] Error 2 > > > Any suggestions what i am missing would be really helpful. > > Thanks. > > -- > Regards, > Sachin Srivastava > EnterpriseDB, India > www.enterprisedb.com > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From s.mueller76 at arcor.de Wed Mar 10 07:15:11 2010 From: s.mueller76 at arcor.de (=?ISO-8859-15?Q?Sascha_M=FCller?=) Date: Wed, 10 Mar 2010 16:15:11 +0100 Subject: [postgis-users] Copying parallel line features Message-ID: <4B97B77F.2040301@arcor.de> Hi, Thanks for all the responses. I will check this options: 1) http://trac.osgeo.org/postgis/ticket/413 2) http://trac.osgeo.org/postgis/wiki/UsersWikiplpgsqlfunctions 3) Something similar to the above options Sascha From sachin.srivastava1984 at gmail.com Wed Mar 10 07:25:36 2010 From: sachin.srivastava1984 at gmail.com (Sachin Srivastava) Date: Wed, 10 Mar 2010 20:55:36 +0530 Subject: [postgis-users] PostGIS 1.5.0 build failure In-Reply-To: <30fe546d1003100714n7b7699c9g79d4913461f1d256@mail.gmail.com> References: <4B97AAEE.5060203@gmail.com> <30fe546d1003100714n7b7699c9g79d4913461f1d256@mail.gmail.com> Message-ID: <4B97B9F0.4030409@gmail.com> 9.0alpha4 is 8.3+ or i am missing something?? On 3/10/10 8:44 PM, Paul Ramsey wrote: > Wrong PostgreSQL version? We only support 8.3+ on PostGIS 1.5. > > On Wed, Mar 10, 2010 at 6:21 AM, Sachin Srivastava > wrote: > >> Hi all, >> >> I am building postgis-1.5.0 with proj-4.7.0, geos-3.2.0, libxml2-2.7.6, >> postgresql-9.0alpha4 on Windows7 (MinGW) >> >> lwgeom_accum.c: In function `pgis_geometry_accum_transfn': >> lwgeom_accum.c:110: error: structure has no member named `wincontext' >> make[1]: Leaving directory >> `/c/pginstaller.sachin1-repo/postgis.windows/postgis' >> make[1]: *** [lwgeom_accum.o] Error 1 >> make: *** [postgis] Error 2 >> >> >> Any suggestions what i am missing would be really helpful. >> >> Thanks. >> >> -- >> Regards, >> Sachin Srivastava >> EnterpriseDB, India >> www.enterprisedb.com >> >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> -- Regards, Sachin Srivastava EnterpriseDB, India www.enterprisedb.com From pramsey at opengeo.org Wed Mar 10 07:28:17 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Wed, 10 Mar 2010 07:28:17 -0800 Subject: [postgis-users] PostGIS 1.5.0 build failure In-Reply-To: <4B97B9F0.4030409@gmail.com> References: <4B97AAEE.5060203@gmail.com> <30fe546d1003100714n7b7699c9g79d4913461f1d256@mail.gmail.com> <4B97B9F0.4030409@gmail.com> Message-ID: <30fe546d1003100728n4a84e787j25f5e8562022d853@mail.gmail.com> No, it was me missing something. Perhaps something has changed since our last compatibility patch for the upcoming release. I'm compiling the CVS version now, will see if I can fix this up for 1.5.1. P. On Wed, Mar 10, 2010 at 7:25 AM, Sachin Srivastava wrote: > 9.0alpha4 is 8.3+ or i am missing something?? > > On 3/10/10 8:44 PM, Paul Ramsey wrote: >> >> Wrong PostgreSQL version? We only support 8.3+ on PostGIS 1.5. >> >> On Wed, Mar 10, 2010 at 6:21 AM, Sachin Srivastava >> ?wrote: >> >>> >>> Hi all, >>> >>> I am building postgis-1.5.0 with proj-4.7.0, geos-3.2.0, libxml2-2.7.6, >>> postgresql-9.0alpha4 on Windows7 (MinGW) >>> >>> lwgeom_accum.c: In function `pgis_geometry_accum_transfn': >>> lwgeom_accum.c:110: error: structure has no member named `wincontext' >>> make[1]: Leaving directory >>> `/c/pginstaller.sachin1-repo/postgis.windows/postgis' >>> make[1]: *** [lwgeom_accum.o] Error 1 >>> make: *** [postgis] Error 2 >>> >>> >>> Any suggestions what i am missing would be really helpful. >>> >>> Thanks. >>> >>> -- >>> Regards, >>> Sachin Srivastava >>> EnterpriseDB, India >>> www.enterprisedb.com >>> >>> _______________________________________________ >>> postgis-users mailing list >>> postgis-users at postgis.refractions.net >>> http://postgis.refractions.net/mailman/listinfo/postgis-users >>> >>> > > > -- > Regards, > Sachin Srivastava > EnterpriseDB, India > www.enterprisedb.com > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From pramsey at opengeo.org Wed Mar 10 07:39:14 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Wed, 10 Mar 2010 07:39:14 -0800 Subject: [postgis-users] PostGIS 1.5.0 build failure In-Reply-To: <30fe546d1003100728n4a84e787j25f5e8562022d853@mail.gmail.com> References: <4B97AAEE.5060203@gmail.com> <30fe546d1003100714n7b7699c9g79d4913461f1d256@mail.gmail.com> <4B97B9F0.4030409@gmail.com> <30fe546d1003100728n4a84e787j25f5e8562022d853@mail.gmail.com> Message-ID: <30fe546d1003100739w74f944b5p43fd1eacf1c6966d@mail.gmail.com> OK, patched in the 1.5 branch http://svn.osgeo.org/postgis/branches/1.5 another release to push 1.5.1 out... P On Wed, Mar 10, 2010 at 7:28 AM, Paul Ramsey wrote: > No, it was me missing something. Perhaps something has changed since > our last compatibility patch for the upcoming release. I'm compiling > the CVS version now, will see if I can fix this up for 1.5.1. > > P. > > On Wed, Mar 10, 2010 at 7:25 AM, Sachin Srivastava > wrote: >> 9.0alpha4 is 8.3+ or i am missing something?? >> >> On 3/10/10 8:44 PM, Paul Ramsey wrote: >>> >>> Wrong PostgreSQL version? We only support 8.3+ on PostGIS 1.5. >>> >>> On Wed, Mar 10, 2010 at 6:21 AM, Sachin Srivastava >>> ?wrote: >>> >>>> >>>> Hi all, >>>> >>>> I am building postgis-1.5.0 with proj-4.7.0, geos-3.2.0, libxml2-2.7.6, >>>> postgresql-9.0alpha4 on Windows7 (MinGW) >>>> >>>> lwgeom_accum.c: In function `pgis_geometry_accum_transfn': >>>> lwgeom_accum.c:110: error: structure has no member named `wincontext' >>>> make[1]: Leaving directory >>>> `/c/pginstaller.sachin1-repo/postgis.windows/postgis' >>>> make[1]: *** [lwgeom_accum.o] Error 1 >>>> make: *** [postgis] Error 2 >>>> >>>> >>>> Any suggestions what i am missing would be really helpful. >>>> >>>> Thanks. >>>> >>>> -- >>>> Regards, >>>> Sachin Srivastava >>>> EnterpriseDB, India >>>> www.enterprisedb.com >>>> >>>> _______________________________________________ >>>> postgis-users mailing list >>>> postgis-users at postgis.refractions.net >>>> http://postgis.refractions.net/mailman/listinfo/postgis-users >>>> >>>> >> >> >> -- >> Regards, >> Sachin Srivastava >> EnterpriseDB, India >> www.enterprisedb.com >> >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> > From Majid.Kazemi at teranet.ca Wed Mar 10 08:29:45 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Wed, 10 Mar 2010 11:29:45 -0500 Subject: [postgis-users] FW: Inserting value into geometry column error: Array value must start with "{" or dimension. Message-ID: From: Majid Kazemi Sent: March 10, 2010 11:02 AM To: 'postgis-users-bounces at postgis.refractions.net' Subject: Inserting value into geometry column error: Array value must start with "{" or dimension. Hello all; Thanks for everyone help. I finally managed to install and configure Postgis. Now, I am trying to insert the following into a table with Geom column. INSERT INTO guest(ID, NAME, GEOM) VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 8)', -1)); I am receiving the following error: Array value must start with "{" or dimension. your help will highly be appreciated. Thanks, Majid -------------- next part -------------- An HTML attachment was scrubbed... URL: From kneufeld at refractions.net Wed Mar 10 08:47:50 2010 From: kneufeld at refractions.net (Kevin Neufeld) Date: Wed, 10 Mar 2010 08:47:50 -0800 Subject: [postgis-users] FW: Inserting value into geometry column error: Array value must start with "{" or dimension. In-Reply-To: References: Message-ID: <4B97CD36.1000804@refractions.net> What's the DDL for your guest table? On 3/10/2010 8:29 AM, Majid Kazemi wrote: > *From:* Majid Kazemi > *Sent:* March 10, 2010 11:02 AM > *To:* 'postgis-users-bounces at postgis.refractions.net' > *Subject:* Inserting value into geometry column error: Array value must > start with "{" or dimension. > > Hello all; > Thanks for everyone help. I finally managed to install and configure > Postgis. > Now, I am trying to insert the following into a table with Geom column. > > INSERT INTO guest(ID, NAME, GEOM) > > VALUES (1,?First Geometry?,ST_GeomFromText(?LINESTRING(2 3,4 5,6 5,7 > 8)?, -1)); > > I am receiving the following error: > > Array value must start with "{" or dimension. > > your help will highly be appreciated. > > Thanks, Majid > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From Majid.Kazemi at teranet.ca Wed Mar 10 09:18:10 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Wed, 10 Mar 2010 12:18:10 -0500 Subject: [postgis-users] FW: Inserting value into geometry column error: Array value must start with "{" or dimension. In-Reply-To: <4B97CD36.1000804@refractions.net> Message-ID: Here is the DDL for Table creation: CREATE TABLE gtest ( ID int4, NAME varchar(20) ); SELECT AddGeometryColumn('', 'gtest','geom',-1,'LINESTRING',2); Thanks, Majid -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Kevin Neufeld Sent: March 10, 2010 11:48 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] FW: Inserting value into geometry column error: Array value must start with "{" or dimension. What's the DDL for your guest table? On 3/10/2010 8:29 AM, Majid Kazemi wrote: > *From:* Majid Kazemi > *Sent:* March 10, 2010 11:02 AM > *To:* 'postgis-users-bounces at postgis.refractions.net' > *Subject:* Inserting value into geometry column error: Array value > must start with "{" or dimension. > > Hello all; > Thanks for everyone help. I finally managed to install and configure > Postgis. > Now, I am trying to insert the following into a table with Geom column. > > INSERT INTO guest(ID, NAME, GEOM) > > VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 > 8)', -1)); > > I am receiving the following error: > > Array value must start with "{" or dimension. > > your help will highly be appreciated. > > Thanks, Majid > > > > _______________________________________________ > 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 kneufeld at refractions.net Wed Mar 10 09:33:22 2010 From: kneufeld at refractions.net (Kevin Neufeld) Date: Wed, 10 Mar 2010 09:33:22 -0800 Subject: [postgis-users] FW: Inserting value into geometry column error: Array value must start with "{" or dimension. In-Reply-To: References: Message-ID: <4B97D7E2.7030808@refractions.net> This is DDL for a table named "gtest", but you're inserting into a table named "guest". I suspect you're accidentally inserting into a different table, one where the "GEOM" column is not of type "geometry". In any case, your posted DDL is correct - so is this: CREATE TABLE gtest (ID int4, NAME varchar(20), GEOM geometry); Your insert statement then should work correctly: INSERT INTO gtest(ID, NAME, GEOM) VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 8)', -1)); Cheers, Kevin On 3/10/2010 9:18 AM, Majid Kazemi wrote: > Here is the DDL for Table creation: > CREATE TABLE gtest ( ID int4, NAME varchar(20) ); > SELECT AddGeometryColumn('', 'gtest','geom',-1,'LINESTRING',2); > Thanks, Majid > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Kevin Neufeld > Sent: March 10, 2010 11:48 AM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] FW: Inserting value into geometry column > error: Array value must start with "{" or dimension. > > What's the DDL for your guest table? > > On 3/10/2010 8:29 AM, Majid Kazemi wrote: >> *From:* Majid Kazemi >> *Sent:* March 10, 2010 11:02 AM >> *To:* 'postgis-users-bounces at postgis.refractions.net' >> *Subject:* Inserting value into geometry column error: Array value >> must start with "{" or dimension. >> >> Hello all; >> Thanks for everyone help. I finally managed to install and configure >> Postgis. >> Now, I am trying to insert the following into a table with Geom > column. >> >> INSERT INTO guest(ID, NAME, GEOM) >> >> VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 >> 8)', -1)); >> >> I am receiving the following error: >> >> Array value must start with "{" or dimension. >> >> your help will highly be appreciated. >> >> Thanks, Majid >> >> >> >> _______________________________________________ >> 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 Majid.Kazemi at teranet.ca Wed Mar 10 09:43:07 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Wed, 10 Mar 2010 12:43:07 -0500 Subject: [postgis-users] FW: Inserting value into geometry column error: Array value must start with "{" or dimension. In-Reply-To: <4B97D7E2.7030808@refractions.net> Message-ID: Kevin: That was the cut and paste error: The error is still the same: INSERT INTO guest(ID, NAME, GEOM) VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 8)', -1)); ERROR: array value must start with "{" or dimension information ********** Error ********** ERROR: array value must start with "{" or dimension information SQL state: 22P02 Thanks -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Kevin Neufeld Sent: March 10, 2010 12:33 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] FW: Inserting value into geometry column error: Array value must start with "{" or dimension. This is DDL for a table named "gtest", but you're inserting into a table named "guest". I suspect you're accidentally inserting into a different table, one where the "GEOM" column is not of type "geometry". In any case, your posted DDL is correct - so is this: CREATE TABLE gtest (ID int4, NAME varchar(20), GEOM geometry); Your insert statement then should work correctly: INSERT INTO gtest(ID, NAME, GEOM) VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 8)', -1)); Cheers, Kevin On 3/10/2010 9:18 AM, Majid Kazemi wrote: > Here is the DDL for Table creation: > CREATE TABLE gtest ( ID int4, NAME varchar(20) ); SELECT > AddGeometryColumn('', 'gtest','geom',-1,'LINESTRING',2); > Thanks, Majid > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Kevin Neufeld > Sent: March 10, 2010 11:48 AM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] FW: Inserting value into geometry column > error: Array value must start with "{" or dimension. > > What's the DDL for your guest table? > > On 3/10/2010 8:29 AM, Majid Kazemi wrote: >> *From:* Majid Kazemi >> *Sent:* March 10, 2010 11:02 AM >> *To:* 'postgis-users-bounces at postgis.refractions.net' >> *Subject:* Inserting value into geometry column error: Array value >> must start with "{" or dimension. >> >> Hello all; >> Thanks for everyone help. I finally managed to install and configure >> Postgis. >> Now, I am trying to insert the following into a table with Geom > column. >> >> INSERT INTO guest(ID, NAME, GEOM) >> >> VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 >> 8)', -1)); >> >> I am receiving the following error: >> >> Array value must start with "{" or dimension. >> >> your help will highly be appreciated. >> >> Thanks, Majid >> >> >> >> _______________________________________________ >> 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 Majid.Kazemi at teranet.ca Wed Mar 10 10:07:53 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Wed, 10 Mar 2010 13:07:53 -0500 Subject: [postgis-users] FW: Inserting value into geometry column error: Array value must start with "{" or dimension. In-Reply-To: <4B97D7E2.7030808@refractions.net> Message-ID: Thanks kevin; It is working now. I have to add "{" INSERT INTO guest(ID, NAME, GEOM) VALUES (1,'{First Geometry}',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 8)', -1)); I have another question: Any ideas how can I export Oracle spatial to Postgres (postgis)? I saw there is a perl script called ora2pg.pl. Is there any other tools available to perform this migration? Thanks, Majid -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Kevin Neufeld Sent: March 10, 2010 12:33 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] FW: Inserting value into geometry column error: Array value must start with "{" or dimension. This is DDL for a table named "gtest", but you're inserting into a table named "guest". I suspect you're accidentally inserting into a different table, one where the "GEOM" column is not of type "geometry". In any case, your posted DDL is correct - so is this: CREATE TABLE gtest (ID int4, NAME varchar(20), GEOM geometry); Your insert statement then should work correctly: INSERT INTO gtest(ID, NAME, GEOM) VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 8)', -1)); Cheers, Kevin On 3/10/2010 9:18 AM, Majid Kazemi wrote: > Here is the DDL for Table creation: > CREATE TABLE gtest ( ID int4, NAME varchar(20) ); SELECT > AddGeometryColumn('', 'gtest','geom',-1,'LINESTRING',2); > Thanks, Majid > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Kevin Neufeld > Sent: March 10, 2010 11:48 AM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] FW: Inserting value into geometry column > error: Array value must start with "{" or dimension. > > What's the DDL for your guest table? > > On 3/10/2010 8:29 AM, Majid Kazemi wrote: >> *From:* Majid Kazemi >> *Sent:* March 10, 2010 11:02 AM >> *To:* 'postgis-users-bounces at postgis.refractions.net' >> *Subject:* Inserting value into geometry column error: Array value >> must start with "{" or dimension. >> >> Hello all; >> Thanks for everyone help. I finally managed to install and configure >> Postgis. >> Now, I am trying to insert the following into a table with Geom > column. >> >> INSERT INTO guest(ID, NAME, GEOM) >> >> VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 >> 8)', -1)); >> >> I am receiving the following error: >> >> Array value must start with "{" or dimension. >> >> your help will highly be appreciated. >> >> Thanks, Majid >> >> >> >> _______________________________________________ >> 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 pramsey at cleverelephant.ca Wed Mar 10 10:14:35 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Wed, 10 Mar 2010 10:14:35 -0800 Subject: [postgis-users] FW: Inserting value into geometry column error: Array value must start with "{" or dimension. In-Reply-To: References: <4B97D7E2.7030808@refractions.net> Message-ID: <30fe546d1003101014j2982bc97h238315a158293694@mail.gmail.com> ogr2ogr http://www.gdal.org/ogr2ogr.html On Wed, Mar 10, 2010 at 10:07 AM, Majid Kazemi wrote: > ?Thanks kevin; > It is working now. > I have to add "{" > INSERT INTO guest(ID, NAME, GEOM) > VALUES (1,'{First Geometry}',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 > 8)', -1)); > > I have another question: > Any ideas how can I export Oracle spatial to Postgres (postgis)? > I saw there is a perl script called ora2pg.pl. Is there any other tools > available to perform this migration? > Thanks, Majid > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Kevin Neufeld > Sent: March 10, 2010 12:33 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] FW: Inserting value into geometry column > error: Array value must start with "{" or dimension. > > This is DDL for a table named "gtest", but you're inserting into a table > named "guest". ?I suspect you're accidentally inserting into a different > table, one where the "GEOM" column is not of type "geometry". > > In any case, your posted DDL is correct - so is this: > CREATE TABLE gtest (ID int4, NAME varchar(20), GEOM geometry); > > Your insert statement then should work correctly: > INSERT INTO gtest(ID, NAME, GEOM) > VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 > 8)', -1)); > > Cheers, > Kevin > > > On 3/10/2010 9:18 AM, Majid Kazemi wrote: >> ? Here is the DDL for Table creation: >> CREATE TABLE gtest ( ID int4, NAME varchar(20) ); SELECT >> AddGeometryColumn('', 'gtest','geom',-1,'LINESTRING',2); >> Thanks, Majid >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> Kevin Neufeld >> Sent: March 10, 2010 11:48 AM >> To: PostGIS Users Discussion >> Subject: Re: [postgis-users] FW: Inserting value into geometry column >> error: Array value must start with "{" or dimension. >> >> What's the DDL for your guest table? >> >> On 3/10/2010 8:29 AM, Majid Kazemi wrote: >>> *From:* Majid Kazemi >>> *Sent:* March 10, 2010 11:02 AM >>> *To:* 'postgis-users-bounces at postgis.refractions.net' >>> *Subject:* Inserting value into geometry column error: Array value >>> must start with "{" or dimension. >>> >>> Hello all; >>> Thanks for everyone help. I finally managed to install and configure >>> Postgis. >>> Now, I am trying to insert the following into a table with Geom >> column. >>> >>> INSERT INTO guest(ID, NAME, GEOM) >>> >>> VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 >>> 8)', -1)); >>> >>> I am receiving the following error: >>> >>> Array value must start with "{" or dimension. >>> >>> your help will highly be appreciated. >>> >>> Thanks, Majid >>> >>> >>> >>> _______________________________________________ >>> 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 > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From Majid.Kazemi at teranet.ca Wed Mar 10 11:37:40 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Wed, 10 Mar 2010 14:37:40 -0500 Subject: [postgis-users] FW: Inserting value into geometry column error:Array value must start with "{" or dimension. In-Reply-To: <30fe546d1003101014j2982bc97h238315a158293694@mail.gmail.com> Message-ID: Thanks Paul. I am looking for utility that help us to export table definitions and data from an Oracle spatial schema and import them into Postgres (Postgis) database. Thanks, Majid -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey Sent: March 10, 2010 1:15 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] FW: Inserting value into geometry column error:Array value must start with "{" or dimension. ogr2ogr http://www.gdal.org/ogr2ogr.html On Wed, Mar 10, 2010 at 10:07 AM, Majid Kazemi wrote: > ?Thanks kevin; > It is working now. > I have to add "{" > INSERT INTO guest(ID, NAME, GEOM) > VALUES (1,'{First Geometry}',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 > 8)', -1)); > > I have another question: > Any ideas how can I export Oracle spatial to Postgres (postgis)? > I saw there is a perl script called ora2pg.pl. Is there any other > tools available to perform this migration? > Thanks, Majid > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Kevin Neufeld > Sent: March 10, 2010 12:33 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] FW: Inserting value into geometry column > error: Array value must start with "{" or dimension. > > This is DDL for a table named "gtest", but you're inserting into a > table named "guest". ?I suspect you're accidentally inserting into a > different table, one where the "GEOM" column is not of type "geometry". > > In any case, your posted DDL is correct - so is this: > CREATE TABLE gtest (ID int4, NAME varchar(20), GEOM geometry); > > Your insert statement then should work correctly: > INSERT INTO gtest(ID, NAME, GEOM) > VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 > 8)', -1)); > > Cheers, > Kevin > > > On 3/10/2010 9:18 AM, Majid Kazemi wrote: >> ? Here is the DDL for Table creation: >> CREATE TABLE gtest ( ID int4, NAME varchar(20) ); SELECT >> AddGeometryColumn('', 'gtest','geom',-1,'LINESTRING',2); >> Thanks, Majid >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> Kevin Neufeld >> Sent: March 10, 2010 11:48 AM >> To: PostGIS Users Discussion >> Subject: Re: [postgis-users] FW: Inserting value into geometry column >> error: Array value must start with "{" or dimension. >> >> What's the DDL for your guest table? >> >> On 3/10/2010 8:29 AM, Majid Kazemi wrote: >>> *From:* Majid Kazemi >>> *Sent:* March 10, 2010 11:02 AM >>> *To:* 'postgis-users-bounces at postgis.refractions.net' >>> *Subject:* Inserting value into geometry column error: Array value >>> must start with "{" or dimension. >>> >>> Hello all; >>> Thanks for everyone help. I finally managed to install and configure >>> Postgis. >>> Now, I am trying to insert the following into a table with Geom >> column. >>> >>> INSERT INTO guest(ID, NAME, GEOM) >>> >>> VALUES (1,'First Geometry',ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 >>> 8)', -1)); >>> >>> I am receiving the following error: >>> >>> Array value must start with "{" or dimension. >>> >>> your help will highly be appreciated. >>> >>> Thanks, Majid >>> >>> >>> >>> _______________________________________________ >>> 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 > _______________________________________________ > 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 scientific1quash at gmail.com Thu Mar 11 00:29:26 2010 From: scientific1quash at gmail.com (Linnet Kwamboka) Date: Thu, 11 Mar 2010 00:29:26 -0800 Subject: [postgis-users] php/postgresql trouble Message-ID: hey guys, i dont know is anyone can help me i have been having trouble. i am using the follonwing code to do an INSERT query
Country code:

Country name:

President's name:

but i am getting the following error this was okay *Warning*: pg_query() [function.pg-query]: Query failed: ERROR: column "countryid" of relation "countries" does not exist LINE 1: INSERT INTO countries (CountryID, CountryName, President) VA... ^ in *C:\xampp\htdocs\bongamate\weka.php* on line *25* Error in SQL query: ERROR: column "countryid" of relation "countries" does not exist LINE 1: INSERT INTO countries (CountryID, CountryName, President) VA... ^ can anyone help me on this? thank you with regards geekmate! -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicklas.aven at jordogskog.no Thu Mar 11 00:50:54 2010 From: nicklas.aven at jordogskog.no (=?ISO-8859-1?Q?Nicklas_Av=E9n?=) Date: Thu, 11 Mar 2010 09:50:54 +0100 Subject: [postgis-users] php/postgresql trouble Message-ID: <201003110850.o2B8oseo030498@mail-core.space2u.com> Hi when you are using capitals in column name you have to use " around column name: I am not good in php so I don't remember if it is ok to just double the " sign inside a string like $sql = "INSERT INTO countries (""CountryID"", ""CountryName"", ""President"") VALUES ..... What I use to do is avoiding capitals in column names :-) /Nicklas 2010-03-11 Linnet Kwamboka wrote: hey guys, >i dont know is anyone can help me i have been having trouble. >i am using the follonwing code to do an INSERT query > > > > > > > > > > > if ($_POST['submit']) { > // attempt a connection > $dbh = pg_connect("host=localhost dbname=postgres user=postgres password=quash"); > if (!$dbh) { > die("Error in connection: " . pg_last_error()); > } > else{ > echo "this was okay"; > } > //exit; > > // escape strings in input data > // $code = pg_escape_string($_POST['code']); >//$name = pg_escape_string($_POST['name']); > //$president = pg_escape_string($_POST['president']); > > // execute query > $sql = "INSERT INTO countries (CountryID, CountryName, President) VALUES('{$_POST['code']}', '{$_POST['name']}', '{$_POST['president']}')"; > $result = pg_query($dbh, $sql); > if (!$result) { > die("Error in SQL query: " . pg_last_error()); > } > > echo "Data successfully inserted!"; > > // free memory > pg_free_result($result); > > // close connection > pg_close($dbh); > } > ?> > > > Country code: > > Country name: > > President's name: > > > > > > > > > > >but i am getting the following error > > this was okay >Warning: pg_query() [function.pg-query]: Query failed: ERROR: column "countryid" of relation "countries" does not exist LINE 1: INSERT INTO countries (CountryID, CountryName, President) VA... ^ in C:\xampp\htdocs\bongamate\weka.php on line 25 > Error in SQL query: ERROR: column "countryid" of relation "countries" does not exist LINE 1: INSERT INTO countries (CountryID, CountryName, President) VA... ^ > > >can anyone help me on this? thank you > with regards geekmate! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scientific1quash at gmail.com Thu Mar 11 01:03:45 2010 From: scientific1quash at gmail.com (Linnet Kwamboka) Date: Thu, 11 Mar 2010 01:03:45 -0800 Subject: [postgis-users] php/postgresql trouble In-Reply-To: <201003110850.o2B8oseo030498@mail-core.space2u.com> References: <201003110850.o2B8oseo030498@mail-core.space2u.com> Message-ID: Hey i managed to solve the problem, the simple solution was to just use lowercase in both cases both in db and in PHP code. my other question is now that i have successfully inserted into the db, where is that data stored i cant seem to see it(am very new to postgresql), i know the daa is there since when i run a retrieve SELECT query, i can see the data in a form, so where in the db is it, thanks for responding, cheers geekmate -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicklas.aven at jordogskog.no Thu Mar 11 01:12:13 2010 From: nicklas.aven at jordogskog.no (=?ISO-8859-1?Q?Nicklas_Av=E9n?=) Date: Thu, 11 Mar 2010 10:12:13 +0100 Subject: [postgis-users] php/postgresql trouble Message-ID: <201003110912.o2B9CDO3014728@mail-core.space2u.com> What do you mean by "seeing" the data. Fysically it is stored where you have your tablespace. The default is the data-folder in your postgresql-installation. But there is nothing to see. You see your data through some application with sql or you can in pgAdmin choose to get the table presented by rightclicking the table and choose "view data".I use to handle the data with the sql window in pgAdmin but you can also use psql in linux terminal or dos-propt in windows. or phppgadmin if you want it in web-interface. /Nicklas 2010-03-11 Linnet Kwamboka wrote: Hey i managed to solve the problem, the simple solution was to just use lowercase in both cases both in db and in PHP code. >my other question is now that i have successfully inserted into the db, where is that data stored i cant seem to see it(am very new to postgresql), i know the daa is there since when i run a retrieve SELECT query, i can see the data in a form, so where in the db is it, > thanks for responding, cheers >geekmate > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scientific1quash at gmail.com Thu Mar 11 01:37:46 2010 From: scientific1quash at gmail.com (Linnet Kwamboka) Date: Thu, 11 Mar 2010 01:37:46 -0800 Subject: [postgis-users] php/postgresql trouble In-Reply-To: <201003110912.o2B9CDO3014728@mail-core.space2u.com> References: <201003110912.o2B9CDO3014728@mail-core.space2u.com> Message-ID: the right click and view data is exactly what i needed, :) thank you very much, could i please ask if i can consult you any other time i have any other problems?, thank you very much, cheers -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.antoniou at ucl.ac.uk Thu Mar 11 06:36:43 2010 From: v.antoniou at ucl.ac.uk (Vyron Antoniou) Date: Thu, 11 Mar 2010 14:36:43 -0000 Subject: [postgis-users] Postgis functions returning hidden weird characters! (?) Message-ID: Hi, Check this out: select assvg(difference( LineFromText('LINESTRING(535568 198842,535549 198802,535505 198820,535524 198862,535568 198842)'), difference(LineFromText('LINESTRING(535568 198842,535549 198802,535505 198820,535524 198862,535568 198842)'), LineFromText('LINESTRING(535900 198600,535900 199100)')) ),0,5) Returns: empty row But select length(assvg(difference( LineFromText('LINESTRING(535568 198842,535549 198802,535505 198820,535524 198862,535568 198842)'), difference(LineFromText('LINESTRING(535568 198842,535549 198802,535505 198820,535524 198862,535568 198842)'), LineFromText('LINESTRING(535900 198600,535900 199100)')) ),0,5)) Returns: 5 Any ideas? Cheers, Byron From pramsey at opengeo.org Thu Mar 11 06:46:25 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Thu, 11 Mar 2010 06:46:25 -0800 Subject: [postgis-users] Postgis functions returning hidden weird characters! (?) In-Reply-To: References: Message-ID: <30fe546d1003110646t5165d2dbp4a264a83d3201ed2@mail.gmail.com> It looks to me like ST_AsSVG doesn't very carefully handle empty geometry inputs, so you're getting a non-terminated "string" back. http://trac.osgeo.org/postgis/ticket/463 On Thu, Mar 11, 2010 at 6:36 AM, Vyron Antoniou wrote: > Hi, > > Check this out: > > select assvg(difference( > LineFromText('LINESTRING(535568 198842,535549 198802,535505 198820,535524 > 198862,535568 198842)'), > difference(LineFromText('LINESTRING(535568 198842,535549 198802,535505 > 198820,535524 198862,535568 198842)'), LineFromText('LINESTRING(535900 > 198600,535900 199100)')) > ),0,5) > > Returns: empty row > > But > > select length(assvg(difference( > LineFromText('LINESTRING(535568 198842,535549 198802,535505 198820,535524 > 198862,535568 198842)'), > difference(LineFromText('LINESTRING(535568 198842,535549 198802,535505 > 198820,535524 198862,535568 198842)'), LineFromText('LINESTRING(535900 > 198600,535900 199100)')) > ),0,5)) > > Returns: 5 > > Any ideas? > > Cheers, > Byron > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From olivier.courtin at oslandia.com Thu Mar 11 08:54:15 2010 From: olivier.courtin at oslandia.com (Olivier Courtin) Date: Thu, 11 Mar 2010 17:54:15 +0100 Subject: [postgis-users] Postgis functions returning hidden weird characters! (?) In-Reply-To: <30fe546d1003110646t5165d2dbp4a264a83d3201ed2@mail.gmail.com> References: <30fe546d1003110646t5165d2dbp4a264a83d3201ed2@mail.gmail.com> Message-ID: <5E60BBB4-53A1-42A9-B117-66CB0F8DAF4D@oslandia.com> On Mar 11, 2010, at 3:46 PM, Paul Ramsey wrote: > It looks to me like ST_AsSVG doesn't very carefully handle empty > geometry inputs, so you're getting a non-terminated "string" back. > > http://trac.osgeo.org/postgis/ticket/463 This bug was previously fixed as http://trac.osgeo.org/postgis/ticket/409 So i suggest to upgrade to (very) new 1.5.1 as soon as a Win32 version will be available. -- Olivier From Majid.Kazemi at teranet.ca Thu Mar 11 09:17:00 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Thu, 11 Mar 2010 12:17:00 -0500 Subject: [postgis-users] database and schema in Postgres/Postgis Message-ID: Hello all; I have created a database called mydb in postgresSQL. I run postgis and sys_ref_spatial scripts to populate spatial objects. All spatial objects are stored in a schema called PUBLIC. I have created another schema called myschema under the same database. I can not see any of spatial objects generated under mydb in my new schema. Any ideas what I should do to see spatail functions and tables in this new schema? Thanks, Majid -------------- next part -------------- An HTML attachment was scrubbed... URL: From iacovlev.pavel at gmail.com Thu Mar 11 09:26:17 2010 From: iacovlev.pavel at gmail.com (Pavel Iacovlev) Date: Thu, 11 Mar 2010 19:26:17 +0200 Subject: [postgis-users] database and schema in Postgres/Postgis In-Reply-To: References: Message-ID: <2a37f67a1003110926w1116f6a1y72536bb15263271e@mail.gmail.com> Add your schema to the search path SET search_path TO myschema,public; On Thu, Mar 11, 2010 at 7:17 PM, Majid Kazemi wrote: > Hello all; > I have created a database called mydb in postgresSQL. I run postgis and > sys_ref_spatial scripts to populate spatial objects. All spatial objects are > ?stored in a schema called PUBLIC. I have created another??schema called > myschema under the same database.? I can not see any of spatial objects > generated under mydb ?in my new schema. Any ideas?what I should do?to > see?spatail functions and tables in this new schema? > Thanks, Majid > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > -- http://iap.md, The future is open From pramsey at opengeo.org Thu Mar 11 09:38:18 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Thu, 11 Mar 2010 09:38:18 -0800 Subject: [postgis-users] PostGIS 1.4.2 and 1.5.1 Released Message-ID: <30fe546d1003110938w645251e4m5b6d7eb96794f048@mail.gmail.com> Patch releases of the 1.5 and 1.4 PostGIS series are now available! http://postgis.org/download Fixes in 1.5.1: * #333, remove unnecessary VACUUM from install file (Kevin Neufeld) * #410, update embedded bbox when applying ST_SetPoint, ST_AddPoint ST_RemovePoint to a linestring (Paul Ramsey) * #411, allow dumping tables with invalid geometries (Sandro Santilli, for Regione Toscana-SIGTA) * #414, include geography_columns view when running upgrade scripts (Paul Ramsey) * #419, allow support for multilinestring in ST_Line_Substring (Paul Ramsey, for Lidwala Consulting Engineers) * #421, fix computed string length in ST_AsGML() (Olivier Courtin) * #441, fix GML generation with heterogeneous collections (Olivier Courtin) * #443, incorrect coordinate reversal in GML 3 generation (Olivier Courtin) * #450, wrong area calculation for geography features that cross the date line (Paul Ramsey) * Ensure support for upcoming 9.0 PgSQL release (Paul Ramsey) Fixes in 1.4.2: * #327, fix up the uninstall functions (Paul Ramsey) * #355, build improvements for shp2pgsql-gui (Paul Ramsey) * #387, add towgs84 arguments for SRID 28992 (Paul Ramsey) * #409, fix ST_AsSVG with empty geometrycollection input (Olivier Courtin) * #410, update embedded bbox when applying ST_SetPoint, ST_AddPoint, ST_RemovePoint to a linestring (Paul Ramsey) * #411, allow dumping tables with invalid geometries (Sandro Santilli - work done for Regione Toscana-SIGTA) * #421, fix computed string length in ST_AsGML() (Olivier Courtin) * #441, fix GML generation with heterogeneous collections (Olivier Courtin) Thanks! The PostGIS Cabal From pramsey at opengeo.org Thu Mar 11 09:38:18 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Thu, 11 Mar 2010 09:38:18 -0800 Subject: [postgis-users] [ANNOUNCE] PostGIS 1.4.2 and 1.5.1 Released - Found word(s) remove list in the Text body [Keyword] Message-ID: <30fe546d1003110938w645251e4m5b6d7eb96794f048@mail.gmail.com> Patch releases of the 1.5 and 1.4 PostGIS series are now available! http://postgis.org/download Fixes in 1.5.1: * #333, remove unnecessary VACUUM from install file (Kevin Neufeld) * #410, update embedded bbox when applying ST_SetPoint, ST_AddPoint ST_RemovePoint to a linestring (Paul Ramsey) * #411, allow dumping tables with invalid geometries (Sandro Santilli, for Regione Toscana-SIGTA) * #414, include geography_columns view when running upgrade scripts (Paul Ramsey) * #419, allow support for multilinestring in ST_Line_Substring (Paul Ramsey, for Lidwala Consulting Engineers) * #421, fix computed string length in ST_AsGML() (Olivier Courtin) * #441, fix GML generation with heterogeneous collections (Olivier Courtin) * #443, incorrect coordinate reversal in GML 3 generation (Olivier Courtin) * #450, wrong area calculation for geography features that cross the date line (Paul Ramsey) * Ensure support for upcoming 9.0 PgSQL release (Paul Ramsey) Fixes in 1.4.2: * #327, fix up the uninstall functions (Paul Ramsey) * #355, build improvements for shp2pgsql-gui (Paul Ramsey) * #387, add towgs84 arguments for SRID 28992 (Paul Ramsey) * #409, fix ST_AsSVG with empty geometrycollection input (Olivier Courtin) * #410, update embedded bbox when applying ST_SetPoint, ST_AddPoint, ST_RemovePoint to a linestring (Paul Ramsey) * #411, allow dumping tables with invalid geometries (Sandro Santilli - work done for Regione Toscana-SIGTA) * #421, fix computed string length in ST_AsGML() (Olivier Courtin) * #441, fix GML generation with heterogeneous collections (Olivier Courtin) Thanks! The PostGIS Cabal ---------------------------(end of broadcast)--------------------------- -To unsubscribe from this list, send an email to: pgsql-announce-unsubscribe at postgresql.org From Majid.Kazemi at teranet.ca Thu Mar 11 10:32:05 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Thu, 11 Mar 2010 13:32:05 -0500 Subject: [postgis-users] database and schema in Postgres/Postgis In-Reply-To: <2a37f67a1003110926w1116f6a1y72536bb15263271e@mail.gmail.com> Message-ID: Thanks for your help. -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Pavel Iacovlev Sent: March 11, 2010 12:26 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] database and schema in Postgres/Postgis Add your schema to the search path SET search_path TO myschema,public; On Thu, Mar 11, 2010 at 7:17 PM, Majid Kazemi wrote: > Hello all; > I have created a database called mydb in postgresSQL. I run postgis > and sys_ref_spatial scripts to populate spatial objects. All spatial > objects are > ?stored in a schema called PUBLIC. I have created another??schema > called myschema under the same database.? I can not see any of spatial > objects generated under mydb ?in my new schema. Any ideas?what I > should do?to see?spatail functions and tables in this new schema? > Thanks, Majid > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > -- http://iap.md, The future is open _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From sachin.srivastava1984 at gmail.com Fri Mar 12 01:58:01 2010 From: sachin.srivastava1984 at gmail.com (Sachin Srivastava) Date: Fri, 12 Mar 2010 15:28:01 +0530 Subject: [postgis-users] Make install failure in PostGIS-1.5.1 Message-ID: <4B9A1029.1010009@gmail.com> Hi all, I am building postgis-1.5.1 with (proj 4.7.0, geos-3.2.0 and pg9.0alpha4) on linux (centos5 32 bit). make is successful, however in make install i am getting this error: /bin/sh /home/sachin/pgsql/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/home/sachin/pgsql/lib/postgresql' '/home/sachin/pgsql/share/postgresql/contrib/postgis-1.5' make[1]: /home/sachin/pgsql/share/postgresql/contrib/postgis-1.5: No such file or directory make[1]: *** [installdirs] Error 1 make: *** [postgis-install] Error 2 Anything i am missing? -- Regards, Sachin Srivastava EnterpriseDB, India www.enterprisedb.com From mark.cave-ayland at siriusit.co.uk Fri Mar 12 05:32:10 2010 From: mark.cave-ayland at siriusit.co.uk (Mark Cave-Ayland) Date: Fri, 12 Mar 2010 13:32:10 +0000 Subject: [postgis-users] Make install failure in PostGIS-1.5.1 In-Reply-To: <4B9A1029.1010009@gmail.com> References: <4B9A1029.1010009@gmail.com> Message-ID: <4B9A425A.4060107@siriusit.co.uk> Sachin Srivastava wrote: > Hi all, > > I am building postgis-1.5.1 with (proj 4.7.0, geos-3.2.0 and > pg9.0alpha4) on linux (centos5 32 bit). > > make is successful, however in make install i am getting this error: > > /bin/sh > /home/sachin/pgsql/lib/postgresql/pgxs/src/makefiles/../../config/install-sh > -c -d '/home/sachin/pgsql/lib/postgresql' > '/home/sachin/pgsql/share/postgresql/contrib/postgis-1.5' > make[1]: /home/sachin/pgsql/share/postgresql/contrib/postgis-1.5: No > such file or directory > make[1]: *** [installdirs] Error 1 > make: *** [postgis-install] Error 2 > > Anything i am missing? Hi Sachin, No, it's a bug :( The PGXSOVERRIDE code to support versioned directory installation under older versions of PostgreSQL had not been updated to check for version 9.0 rather than 8.5. I've fixed this in SVN for both 1.5 branch and trunk, but you should be able to apply the attached patch and then re-run "autoconf" to generate a new configure file that should work correctly. HTH, Mark. -- Mark Cave-Ayland - Senior Technical Architect PostgreSQL - PostGIS Sirius Corporation plc - control through freedom http://www.siriusit.co.uk t: +44 870 608 0063 Sirius Labs: http://www.siriusit.co.uk/labs -------------- next part -------------- A non-text attachment was scrubbed... Name: postgis-postgresql-9.0.patch Type: text/x-diff Size: 628 bytes Desc: not available URL: From gissur at loftmyndir.is Fri Mar 12 05:34:31 2010 From: gissur at loftmyndir.is (=?ISO-8859-1?Q?Gissur_=DE=F3rhallsson?=) Date: Fri, 12 Mar 2010 13:34:31 +0000 Subject: [postgis-users] "ERROR: could not access file "$libdir/postgis-1.5": No such file or directory" Message-ID: <497c70db1003120534ndd207f0tbb825a5078fe508c@mail.gmail.com> Hi, I'm setting up postgis on a Ubuntu 8.0.4 LTS Server that I'm setting up. I decided that it would be best for me build Postgis 1.5 from source so that's what I did - starting with Postgres 8.4.2 from trunk through GEOS and PROJ and everything went fine. I've now also compiled postgis 1.5 and was preparing to run new_postgis_restore.pl to restore my database (migrated from windows postgresql 8.2). When I try to run psql postgis.sql on the database I intend to restore into (as stipulated inside new_postgis_restore.pl) I get the following: http://postgis.pastebin.com/TCC0yk35 Running $ldd /absolute/path/to/postgis-1.5.so returns this: http://postgis.pastebin.com/yERz1HeY (which looks normal enough) For further reference I enclose my pg_config output: http://postgis.pastebin.com/6u3zfTyc LIBDIR is set to /usr/lib in there, and my postgis-1.5.so is located at /usr/lib/postgresql/8.4/lib/ postgis-1.5.so Does anybody have any ideas? Kind regards from Iceland, Gissur ??rhallsson Loftmyndir ehf. Laugavegur 13 IS 101 Reykjav?k - Iceland s?mi (tel): (+354) 540 2500 t?lvup?stur (email): gissur at loftmyndir.is -------------- next part -------------- An HTML attachment was scrubbed... URL: From cavallini at faunalia.it Fri Mar 12 08:30:13 2010 From: cavallini at faunalia.it (Paolo Cavallini) Date: Fri, 12 Mar 2010 17:30:13 +0100 Subject: [postgis-users] PostGIS manager: importing multilinestring Message-ID: <4B9A6C15.7060706@faunalia.it> Hi all. While importing a shapefile into postgis, I see that the command contains 2 "u" that I do not understand: ['shp2pgsql', '-c', '-s', '3003', u'/home/paolo/Desktop/Dati_corso_QGIS/strade_regionali.shp', u'public.strade'] Furthermore, importing a linear vector throws an error: Something's wrong: ['Shapefile type: Arc\n', 'Postgis type: MULTILINESTRING[2]\n'] If I select "Create single-part geometries instead of multi-part", I get instead: syntax error at or near "''" RIGA 2: ...','0','0','0','0.00000','0','0',NULL,NULL,NULL,NULL,NULL'') I suspect this is due to some special character in the dbf; the same command crashes shp2pgsql from the command line: ... INSERT INTO "public"."strade" ("fnode_","tnode_","lpoly_","rpoly_","length","statali_","statali_id","codice","nome","tipo","codifica",the_geom) VALUES ('0','0','0','0','0.00000','0','0',NULL,NULL,NULL,NULL,NULL?9 ??9 '); Segmentation fault On another machine, I get a more explicit error: Something's wrong: ['Shapefile type: Arc\n', 'Postgis type: MULTILINESTRING[2]\n', '*** glibc detected *** shp2pgsql: free(): invalid pointer: 0x00007fce65fc7e60 ***\n', '======= Backtrace: =========\n', '/lib/libc.so.6[0x7fce65ce8d16]\n', '/lib/libc.so.6(cfree+0x6c)[0x7fce65ced9bc]\n', 'shp2pgsql[0x40ab82]\n', 'shp2pgsql[0x40b77e]\n', '/lib/libc.so.6(__libc_start_main+0xfd)[0x7fce65c96abd]\n', 'shp2pgsql[0x402969]\n', '======= Memory map: ========\n', '00400000-00436000 r-xp 00000000 08:01 1190782 /usr/bin/shp2pgsql\n', '00635000-00636000 rw-p 00035000 08:01 1190782 /usr/bin/shp2pgsql\n', '01767000-01788000 rw-p 00000000 00:00 0 [heap]\n', '7fce60000000-7fce60021000 rw-p 00000000 00:00 0 \n', '7fce60021000-7fce64000000 ---p 00000000 00:00 0 \n', '7fce655dd000-7fce655f3000 r-xp 00000000 08:01 1042654 /lib/libgcc_s.so.1\n', '7fce655f3000-7fce657f2000 ---p 00016000 08:01 1042654 /lib/libgcc_s.so.1\n', '7fce657f2000-7fce657f3000 rw-p 00015000 08:01 1042654 /lib/libgcc_s.so.1\n', '7fce657f3000-7fce657f5000 r-xp 00000000 08:01 100246 /usr/lib/gconv/CP1252.so\n', '7fce657f5000-7fce659f4000 ---p 00002000 08:01 100246 /usr/lib/gconv/CP1252.so\n', '7fce659f4000-7fce659f5000 r--p 00001000 08:01 100246 /usr/lib/gconv/CP1252.so\n', '7fce659f5000-7fce659f6000 rw-p 00002000 08:01 100246 /usr/lib/gconv/CP1252.so\n', '7fce659f6000-7fce65a77000 r-xp 00000000 08:01 1043745 /lib/libm-2.10.2.so\n', '7fce65a77000-7fce65c76000 ---p 00081000 08:01 1043745 /lib/libm-2.10.2.so\n', '7fce65c76000-7fce65c77000 r--p 00080000 08:01 1043745 /lib/libm-2.10.2.so\n', '7fce65c77000-7fce65c78000 rw-p 00081000 08:01 1043745 /lib/libm-2.10.2.so\n', '7fce65c78000-7fce65dc2000 r-xp 00000000 08:01 1043738 /lib/libc-2.10.2.so\n', '7fce65dc2000-7fce65fc2000 ---p 0014a000 08:01 1043738 /lib/libc-2.10.2.so\n', '7fce65fc2000-7fce65fc6000 r--p 0014a000 08:01 1043738 /lib/libc-2.10.2.so\n', '7fce65fc6000-7fce65fc7000 rw-p 0014e000 08:01 1043738 /lib/libc-2.10.2.so\n', '7fce65fc7000-7fce65fcc000 rw-p 00000000 00:00 0 \n', '7fce65fcc000-7fce65fe9000 r-xp 00000000 08:01 1043115 /lib/ld-2.10.2.so\n', '7fce661ab000-7fce661ac000 rw-p 00000000 00:00 0 \n', '7fce661ac000-7fce661b3000 r--s 00000000 08:01 98890 /usr/lib/gconv/gconv-modules.cache\n', '7fce661b3000-7fce661d5000 rw-p 00000000 00:00 0 \n', '7fce661d5000-7fce661e8000 rw-p 00000000 00:00 0 \n', '7fce661e8000-7fce661e9000 r--p 0001c000 08:01 1043115 /lib/ld-2.10.2.so\n', '7fce661e9000-7fce661ea000 rw-p 0001d000 08:01 1043115 /lib/ld-2.10.2.so\n', '7fffe2c34000-7fffe2c49000 rw-p 00000000 00:00 0 [stack]\n', '7fffe2dd7000-7fffe2dd8000 r-xp 00000000 00:00 0 [vdso]\n', 'ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]\n'] So it must be a PostGIS problem. I can make the shp available for testing if necessary. It has a wrong record. All the best. -- Paolo Cavallini: http://www.faunalia.it/pc From pramsey at opengeo.org Fri Mar 12 08:33:22 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Fri, 12 Mar 2010 08:33:22 -0800 Subject: [postgis-users] PostGIS manager: importing multilinestring In-Reply-To: <4B9A6C15.7060706@faunalia.it> References: <4B9A6C15.7060706@faunalia.it> Message-ID: <30fe546d1003120833x3b90fb07u4a3aca9eef18cfed@mail.gmail.com> Paolo, Put the shapefile somewhere I can pull it and I'll see if I can replicate. You haven't specified your PostGIS version, which is important. P On Fri, Mar 12, 2010 at 8:30 AM, Paolo Cavallini wrote: > Hi all. > While importing a shapefile into postgis, I see that the command contains 2 "u" that > I do not understand: > > ['shp2pgsql', '-c', '-s', '3003', > u'/home/paolo/Desktop/Dati_corso_QGIS/strade_regionali.shp', u'public.strade'] > > Furthermore, importing a linear vector throws an error: > > Something's wrong: > ['Shapefile type: Arc\n', 'Postgis type: MULTILINESTRING[2]\n'] > > If I select "Create single-part geometries instead of multi-part", I get instead: > > syntax error at or near "' '" > RIGA 2: ...','0','0','0','0.00000','0','0',NULL,NULL,NULL,NULL,NULL' ') > > I suspect this is due to some special character in the dbf; the same command crashes > shp2pgsql from the command line: > > ... > INSERT INTO "public"."strade" > ("fnode_","tnode_","lpoly_","rpoly_","length","statali_","statali_id","codice","nome","tipo","codifica",the_geom) > VALUES ('0','0','0','0','0.00000','0','0',NULL,NULL,NULL,NULL,NULL?9 ? ? ???9 ? ? '); > Segmentation fault > > On another machine, I get a more explicit error: > > Something's wrong: > ['Shapefile type: Arc\n', 'Postgis type: MULTILINESTRING[2]\n', '*** glibc detected > *** shp2pgsql: free(): invalid pointer: 0x00007fce65fc7e60 ***\n', '======= > Backtrace: =========\n', '/lib/libc.so.6[0x7fce65ce8d16]\n', > '/lib/libc.so.6(cfree+0x6c)[0x7fce65ced9bc]\n', 'shp2pgsql[0x40ab82]\n', > 'shp2pgsql[0x40b77e]\n', '/lib/libc.so.6(__libc_start_main+0xfd)[0x7fce65c96abd]\n', > 'shp2pgsql[0x402969]\n', '======= Memory map: ========\n', '00400000-00436000 r-xp > 00000000 08:01 1190782 ? ? ? ? ? ? ? ? ? ? ? ? ? ?/usr/bin/shp2pgsql\n', > '00635000-00636000 rw-p 00035000 08:01 1190782 > /usr/bin/shp2pgsql\n', '01767000-01788000 rw-p 00000000 00:00 0 > ? ? ? ? ? ?[heap]\n', '7fce60000000-7fce60021000 rw-p 00000000 00:00 0 \n', > '7fce60021000-7fce64000000 ---p 00000000 00:00 0 \n', '7fce655dd000-7fce655f3000 r-xp > 00000000 08:01 1042654 ? ? ? ? ? ? ? ? ? ?/lib/libgcc_s.so.1\n', > '7fce655f3000-7fce657f2000 ---p 00016000 08:01 1042654 > /lib/libgcc_s.so.1\n', '7fce657f2000-7fce657f3000 rw-p 00015000 08:01 1042654 > ? ? ? ? ? ?/lib/libgcc_s.so.1\n', '7fce657f3000-7fce657f5000 r-xp 00000000 08:01 > 100246 ? ? ? ? ? ? ? ? ? ? /usr/lib/gconv/CP1252.so\n', '7fce657f5000-7fce659f4000 > ---p 00002000 08:01 100246 ? ? ? ? ? ? ? ? ? ? /usr/lib/gconv/CP1252.so\n', > '7fce659f4000-7fce659f5000 r--p 00001000 08:01 100246 > /usr/lib/gconv/CP1252.so\n', '7fce659f5000-7fce659f6000 rw-p 00002000 08:01 100246 > ? ? ? ? ? ? ? ? ?/usr/lib/gconv/CP1252.so\n', '7fce659f6000-7fce65a77000 r-xp > 00000000 08:01 1043745 ? ? ? ? ? ? ? ? ? ?/lib/libm-2.10.2.so\n', > '7fce65a77000-7fce65c76000 ---p 00081000 08:01 1043745 > /lib/libm-2.10.2.so\n', '7fce65c76000-7fce65c77000 r--p 00080000 08:01 1043745 > ? ? ? ? ? ? /lib/libm-2.10.2.so\n', '7fce65c77000-7fce65c78000 rw-p 00081000 08:01 > 1043745 ? ? ? ? ? ? ? ? ? ?/lib/libm-2.10.2.so\n', '7fce65c78000-7fce65dc2000 r-xp > 00000000 08:01 1043738 ? ? ? ? ? ? ? ? ? ?/lib/libc-2.10.2.so\n', > '7fce65dc2000-7fce65fc2000 ---p 0014a000 08:01 1043738 > /lib/libc-2.10.2.so\n', '7fce65fc2000-7fce65fc6000 r--p 0014a000 08:01 1043738 > ? ? ? ? ? ? /lib/libc-2.10.2.so\n', '7fce65fc6000-7fce65fc7000 rw-p 0014e000 08:01 > 1043738 ? ? ? ? ? ? ? ? ? ?/lib/libc-2.10.2.so\n', '7fce65fc7000-7fce65fcc000 rw-p > 00000000 00:00 0 \n', '7fce65fcc000-7fce65fe9000 r-xp 00000000 08:01 1043115 > ? ? ? ? ? /lib/ld-2.10.2.so\n', '7fce661ab000-7fce661ac000 rw-p 00000000 00:00 0 > \n', '7fce661ac000-7fce661b3000 r--s 00000000 08:01 98890 > /usr/lib/gconv/gconv-modules.cache\n', '7fce661b3000-7fce661d5000 rw-p 00000000 00:00 > 0 \n', '7fce661d5000-7fce661e8000 rw-p 00000000 00:00 0 \n', > '7fce661e8000-7fce661e9000 r--p 0001c000 08:01 1043115 > /lib/ld-2.10.2.so\n', '7fce661e9000-7fce661ea000 rw-p 0001d000 08:01 1043115 > ? ? ? ? ? /lib/ld-2.10.2.so\n', '7fffe2c34000-7fffe2c49000 rw-p 00000000 00:00 0 > ? ? ? ? ? ? ? ? ? ? ?[stack]\n', '7fffe2dd7000-7fffe2dd8000 r-xp 00000000 00:00 0 > ? ? ? ? ? ? ? ? ? ? ? [vdso]\n', 'ffffffffff600000-ffffffffff601000 r-xp 00000000 > 00:00 0 ? ? ? ? ? ? ? ? ?[vsyscall]\n'] > > So it must be a PostGIS problem. > I can make the shp available for testing if necessary. It has a wrong record. > > All the best. > -- > Paolo Cavallini: http://www.faunalia.it/pc > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From strk at keybit.net Fri Mar 12 08:35:54 2010 From: strk at keybit.net (Sandro Santilli(strk)) Date: Fri, 12 Mar 2010 17:35:54 +0100 Subject: [postgis-users] PostGIS manager: importing multilinestring In-Reply-To: <4B9A6C15.7060706@faunalia.it> References: <4B9A6C15.7060706@faunalia.it> Message-ID: <20100312163554.GT62719@keybit.net> On Fri, Mar 12, 2010 at 05:30:13PM +0100, Paolo Cavallini wrote: > Hi all. > While importing a shapefile into postgis, I see that the command contains 2 "u" that > I do not understand: [...] > I can make the shp available for testing if necessary. It has a wrong record. Feel free to send the shapefile to me. Thanks for finding a new bug! --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From strk at keybit.net Fri Mar 12 10:49:35 2010 From: strk at keybit.net (Sandro Santilli(strk)) Date: Fri, 12 Mar 2010 19:49:35 +0100 Subject: [postgis-users] PostGIS manager: importing multilinestring In-Reply-To: <20100312163554.GT62719@keybit.net> References: <4B9A6C15.7060706@faunalia.it> <20100312163554.GT62719@keybit.net> Message-ID: <20100312184935.GV62719@keybit.net> I found memory errors in the loader, and fixed in trunk with commit 5430. Please test again with the new version. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html On Fri, Mar 12, 2010 at 05:35:54PM +0100, Sandro Santilli(strk) wrote: > On Fri, Mar 12, 2010 at 05:30:13PM +0100, Paolo Cavallini wrote: > > Hi all. > > While importing a shapefile into postgis, I see that the command contains 2 "u" that > > I do not understand: > [...] > > I can make the shp available for testing if necessary. It has a wrong record. > > Feel free to send the shapefile to me. > Thanks for finding a new bug! From pramsey at cleverelephant.ca Fri Mar 12 10:52:30 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Fri, 12 Mar 2010 10:52:30 -0800 Subject: [postgis-users] PostGIS manager: importing multilinestring In-Reply-To: <20100312184935.GV62719@keybit.net> References: <4B9A6C15.7060706@faunalia.it> <20100312163554.GT62719@keybit.net> <20100312184935.GV62719@keybit.net> Message-ID: <30fe546d1003121052ob362d29j4a08a53295152ad8@mail.gmail.com> That appears to have fixed things on OS/X. Can you port back into 1.5 branch? P On Fri, Mar 12, 2010 at 10:49 AM, Sandro Santilli(strk) wrote: > I found memory errors in the loader, and fixed in trunk > with commit 5430. > > Please test again with the new version. > > --strk; > > ?() ? Free GIS & Flash consultant/developer > ?/\ ? http://strk.keybit.net/services.html > > On Fri, Mar 12, 2010 at 05:35:54PM +0100, Sandro Santilli(strk) wrote: >> On Fri, Mar 12, 2010 at 05:30:13PM +0100, Paolo Cavallini wrote: >> > Hi all. >> > While importing a shapefile into postgis, I see that the command contains 2 "u" that >> > I do not understand: >> [...] >> > I can make the shp available for testing if necessary. It has a wrong record. >> >> Feel free to send the shapefile to me. >> Thanks for finding a new bug! > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From strk at keybit.net Fri Mar 12 10:56:53 2010 From: strk at keybit.net (strk) Date: Fri, 12 Mar 2010 19:56:53 +0100 Subject: [postgis-users] PostGIS manager: importing multilinestring In-Reply-To: <30fe546d1003121052ob362d29j4a08a53295152ad8@mail.gmail.com> References: <4B9A6C15.7060706@faunalia.it> <20100312163554.GT62719@keybit.net> <20100312184935.GV62719@keybit.net> <30fe546d1003121052ob362d29j4a08a53295152ad8@mail.gmail.com> Message-ID: <20100312185653.GX62719@keybit.net> On Fri, Mar 12, 2010 at 10:52:30AM -0800, Paul Ramsey wrote: > That appears to have fixed things on OS/X. Can you port back into 1.5 branch? Done: http://trac.osgeo.org/postgis/changeset/5431 --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From jorgearevalo at gis4free.org Fri Mar 12 11:13:22 2010 From: jorgearevalo at gis4free.org (Jorge Arevalo) Date: Fri, 12 Mar 2010 20:13:22 +0100 Subject: [postgis-users] "ERROR: could not access file "$libdir/postgis-1.5": No such file or directory" In-Reply-To: <497c70db1003120534ndd207f0tbb825a5078fe508c@mail.gmail.com> References: <497c70db1003120534ndd207f0tbb825a5078fe508c@mail.gmail.com> Message-ID: 2010/3/12 Gissur ??rhallsson : > Hi, > I'm setting up postgis on a Ubuntu 8.0.4 LTS Server that I'm setting up. > I decided that it would be best for me build Postgis 1.5 from source so > that's what I did - starting with Postgres 8.4.2 from trunk through GEOS and > PROJ and everything went fine.?I've now also compiled postgis 1.5 and was > preparing to run new_postgis_restore.pl to restore my database (migrated > from windows postgresql 8.2). > When I try to run psql postgis.sql on the database I intend to restore into > (as stipulated inside new_postgis_restore.pl) I get the > following:?http://postgis.pastebin.com/TCC0yk35 > Running?$ldd /absolute/path/to/postgis-1.5.so returns > this:?http://postgis.pastebin.com/yERz1HeY?(which looks normal enough) > > For further reference I enclose my pg_config > output:?http://postgis.pastebin.com/6u3zfTyc > LIBDIR is set to /usr/lib in there, and my postgis-1.5.so is located > at??/usr/lib/postgresql/8.4/lib/ postgis-1.5.so > Does anybody have any ideas? > Kind regards from Iceland, > Gissur ??rhallsson > > Loftmyndir ehf. > Laugavegur 13 > IS 101 Reykjav?k - Iceland > s?mi (tel): (+354) 540 2500 > t?lvup?stur (email): gissur at loftmyndir.is > Hi, Try adding /usr/lib/postgresql/8.4/lib/postgis-1.5.so to /etc/ld.so.conf and then executing "sudo ldconfig" Hope this helps... Best regards, Jorge > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > From gissur at loftmyndir.is Sat Mar 13 07:15:21 2010 From: gissur at loftmyndir.is (=?ISO-8859-1?Q?Gissur_=DE=F3rhallsson?=) Date: Sat, 13 Mar 2010 15:15:21 +0000 Subject: [postgis-users] "ERROR: could not access file "$libdir/postgis-1.5": No such file or directory" In-Reply-To: References: <497c70db1003120534ndd207f0tbb825a5078fe508c@mail.gmail.com> Message-ID: <497c70db1003130715i13b46658i35c6f494e73d8ad3@mail.gmail.com> Hi there pramsey solved this for me on irc: I had installed and then removed postgresql 8.3 via apt previously - but some of it was still hanging about, to wit: [120310 16:52:30] the problem is you have a system pg_config in /usr/bin, but I imagine the postgresql you are running is the one from /usr/local/pgsql [120310 16:53:04] export PATH=/usr/local/pgsql/bin:$PATH and the reconfigure, rebuild, reinstall your postgis This did the trick Thanks anyway, and kind regards from Iceland, Gissur On Fri, Mar 12, 2010 at 7:13 PM, Jorge Arevalo wrote: > 2010/3/12 Gissur ??rhallsson : > > Hi, > > I'm setting up postgis on a Ubuntu 8.0.4 LTS Server that I'm setting up. > > I decided that it would be best for me build Postgis 1.5 from source so > > that's what I did - starting with Postgres 8.4.2 from trunk through GEOS > and > > PROJ and everything went fine. I've now also compiled postgis 1.5 and was > > preparing to run new_postgis_restore.pl to restore my database (migrated > > from windows postgresql 8.2). > > When I try to run psql postgis.sql on the database I intend to restore > into > > (as stipulated inside new_postgis_restore.pl) I get the > > following: http://postgis.pastebin.com/TCC0yk35 > > Running $ldd /absolute/path/to/postgis-1.5.so returns > > this: http://postgis.pastebin.com/yERz1HeY (which looks normal enough) > > > > For further reference I enclose my pg_config > > output: http://postgis.pastebin.com/6u3zfTyc > > LIBDIR is set to /usr/lib in there, and my postgis-1.5.so is located > > at /usr/lib/postgresql/8.4/lib/ postgis-1.5.so > > Does anybody have any ideas? > > Kind regards from Iceland, > > Gissur ??rhallsson > > > > Loftmyndir ehf. > > Laugavegur 13 > > IS 101 Reykjav?k - Iceland > > s?mi (tel): (+354) 540 2500 > > t?lvup?stur (email): gissur at loftmyndir.is > > > > Hi, > > Try adding /usr/lib/postgresql/8.4/lib/postgis-1.5.so to > /etc/ld.so.conf and then executing "sudo ldconfig" > > Hope this helps... > > Best regards, > Jorge > > > > _______________________________________________ > > 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 > -- Gissur ??rhallsson Loftmyndir ehf. Laugavegur 13 IS 101 Reykjav?k - Iceland s?mi (tel): (+354) 540 2500 t?lvup?stur (email): gissur at loftmyndir.is -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.hopfgartner at r3-gis.com Sat Mar 13 12:11:50 2010 From: peter.hopfgartner at r3-gis.com (Peter Hopfgartner) Date: Sat, 13 Mar 2010 21:11:50 +0100 Subject: [postgis-users] Read file encoding from from shape file In-Reply-To: <30fe546d1002260600l6f22afeav82704a5941ad632c@mail.gmail.com> References: <4B87D2EC.8070601@r3-gis.com> <30fe546d1002260600l6f22afeav82704a5941ad632c@mail.gmail.com> Message-ID: <4B9BF186.4050308@r3-gis.com> Paul Ramsey wrote: > I was never certain that ESRI software actually respected the DBF code > page flags, but your reference indicates they do, so this seems > reasonable. Some investigation of the current state of shapelib WRT > encoding would be wise, as I think we should update our shapelib to > the current version when we release 2.0. > > P. > > Indeed, shapelib supports from some time, now: Citing the change log in dbfopen.c: * Revision 1.77 2007/12/15 20:25:21 bram * dbfopen.c now reads the Code Page information from the DBF file, and exports * this information as a string through the DBFGetCodePage function. This is * either the number from the LDID header field ("LDID/") or as the * content of an accompanying .CPG file. When creating a DBF file, the code can * be set using DBFCreateEx. Regards, Peter > On Fri, Feb 26, 2010 at 5:55 AM, Peter Hopfgartner > wrote: > >> Hi >> >> Looking into the sources of shp2pgsql, [0], it seems that the loader assumes >> that the encoding of the dbf file is "WINDOWS-1252", if not specified >> differently by the -W command line option. >> >> From [1], shape files carry some information about their encoding, either in >> the dbf file header at byte position 29, [2], or in a separate file with >> extension CPG. >> >> Would it make sense to change the default behaviour of shp2pgsql into: >> >> 1) try to get file encoding from dbf file or cpg file >> 2) if 1) fails, take WINDOWS-1252 as default >> 3) if -W is given, take this option >> >> And then, is the information about the encoding set by pgsql2shp? It would >> be smooth, if shapes generated by pgsql2shp could be imported by shp2pgsql >> without specifying any encoding during import ("just works"). >> >> Regards, >> >> Peter >> >> [0] http://trac.osgeo.org/postgis/browser/trunk/loader/ >> [1] >> http://support.esri.com/index.cfm?fa=knowledgebase.techArticles.articleShow&d=21106 >> [2] http://www.dbase.com/knowledgebase/int/db7_file_fmt.htm >> >> -- >> >> Dott. Peter Hopfgartner >> >> R3 GIS Srl - GmbH >> Via Johann Kravogl-Str. 2 >> I-39012 Meran/Merano (BZ) >> Email: peter.hopfgartner at r3-gis.com >> Tel. : +39 0473 494949 >> Fax : +39 0473 069902 >> www : http://www.r3-gis.com >> >> XING : http://www.xing.com/go/invita/8917535 >> _______________________________________________ >> 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 > > -- Dott. Peter Hopfgartner R3 GIS Srl - GmbH Via Johann Kravogl-Str. 2 I-39012 Meran/Merano (BZ) Email: peter.hopfgartner at r3-gis.com Tel. : +39 0473 494949 Fax : +39 0473 069902 www : http://www.r3-gis.com XING : http://www.xing.com/go/invita/8917535 From lists at remoteinformation.com.au Sun Mar 14 01:58:02 2010 From: lists at remoteinformation.com.au (Ben Madin) Date: Sun, 14 Mar 2010 16:58:02 +0700 Subject: [postgis-users] Changing transaction behaviour in shp2pgsql Message-ID: G'day all, I'm using shp2pgsql to import a road network, of which the fine detail is not so important. Mac OS X 10.6.2 POSTGIS="1.4.1" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.7.1, 23 September 2009" USE_STATS (thanks William K) $ shp2pgsql -s 28350 /Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp gis.mrwa_gda94 | psql australia During the import a number of times (4) I get the ERROR: invalid byte sequence for encoding "UTF8": 0xec5343 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". ERROR: current transaction is aborted, commands ignored until end of transaction block and the next several hundred records are skipped. When I put the -W UTF8 flag in , I miss the errors but die when I get to about 101000 (out of 150000) records in : INSERT 0 1 INSERT 0 1 INSERT 0 1 INSERT 0 1 ERROR: syntax error at end of input LINE 1: ...e_geom) VALUES ('1.15574000000e+005','GILMORE ST (SCADDAN)', in the event I can't work out the encoding, is there any way to turn off the transaction behaviour, ie I'm happy to miss 4 records, but not 1000 as a result of the transactions being aborted. (short of putting it all into a text file and removing all the begin and commit commands...) cheers Ben From woodbri at swoodbridge.com Sun Mar 14 09:21:28 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Sun, 14 Mar 2010 11:21:28 -0500 Subject: [postgis-users] Changing transaction behaviour in shp2pgsql In-Reply-To: References: Message-ID: <4B9D0D08.8010904@swoodbridge.com> Ben, You can probably just strip the BEGIN and COMMIT lines like shp2pgsql ... | grep -v BEGIN | grep -v COMMIT | psql australia You might also want to look at the file: shp2pgsql ... > data.sql vi data.sql HTH, -Steve Ben Madin wrote: > G'day all, > > I'm using shp2pgsql to import a road network, of which the fine detail is not so important. > > Mac OS X 10.6.2 POSTGIS="1.4.1" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.7.1, 23 September 2009" USE_STATS (thanks William K) > > > $ shp2pgsql -s 28350 /Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp gis.mrwa_gda94 | psql australia > > During the import a number of times (4) I get the > > ERROR: invalid byte sequence for encoding "UTF8": 0xec5343 > HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". > ERROR: current transaction is aborted, commands ignored until end of transaction block > > and the next several hundred records are skipped. > > When I put the -W UTF8 flag in , I miss the errors but die when I get to about 101000 (out of 150000) records in : > > INSERT 0 1 > INSERT 0 1 > INSERT 0 1 > INSERT 0 1 > ERROR: syntax error at end of input > LINE 1: ...e_geom) VALUES ('1.15574000000e+005','GILMORE ST (SCADDAN)', > > > in the event I can't work out the encoding, is there any way to turn off the transaction behaviour, ie I'm happy to miss 4 records, but not 1000 as a result of the transactions being aborted. (short of putting it all into a text file and removing all the begin and commit commands...) > > cheers > > Ben > > > > > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From scientific1quash at gmail.com Sun Mar 14 10:27:36 2010 From: scientific1quash at gmail.com (Linnet Kwamboka) Date: Sun, 14 Mar 2010 10:27:36 -0700 Subject: [postgis-users] date/time format Message-ID: hey guys, when making a table column with date, the date type is chosen, what is the exact date format that can be input? is it DMY or YMD and how can i change this format to be DMY for ease of use?thanks -- With regards, Linnet Kwamboka -------------- next part -------------- An HTML attachment was scrubbed... URL: From pcreso at pcreso.com Sun Mar 14 10:39:16 2010 From: pcreso at pcreso.com (pcreso at pcreso.com) Date: Sun, 14 Mar 2010 10:39:16 -0700 (PDT) Subject: [postgis-users] Changing transaction behaviour in shp2pgsql In-Reply-To: Message-ID: <530019.33243.qm@web33204.mail.mud.yahoo.com> Hi Ben You might remove the begin & commit commands via your command line with sed, or see if ogr2ogr gives you a more robust conversion. For the first, something like: shp2pgsql -s 28350 -W UTF8 \ /Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp \ gis.mrwa_gda94 | sed 's/BEGIN//' | sed 's/COMMIT//' psql australia If this fails, or you want to try ogr2ogr, ask again :-) Cheers, Brent --- On Sun, 3/14/10, Ben Madin wrote: > From: Ben Madin > Subject: [postgis-users] Changing transaction behaviour in shp2pgsql > To: "PostGIS Users Discussion" > Date: Sunday, March 14, 2010, 10:58 PM > G'day all, > > I'm using shp2pgsql to import a road network, of which the > fine detail is not so important. > > Mac OS X 10.6.2? POSTGIS="1.4.1" > GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.7.1, 23 September 2009" > USE_STATS (thanks William K) > > > $ shp2pgsql -s 28350 > /Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp > gis.mrwa_gda94 | psql australia > > During the import a number of times (4) I get the > > ??? ERROR:? invalid byte sequence for > encoding "UTF8": 0xec5343 > ??? HINT:? This error can also happen > if the byte sequence does not match the encoding expected by > the server, which is controlled by ??? > "client_encoding". > ??? ERROR:? current transaction is > aborted, commands ignored until end of transaction block > > and the next several hundred records are skipped. > > When I put the -W UTF8 flag in , I miss the errors but die > when I get to about 101000 (out of 150000) records in : > > INSERT 0 1 > INSERT 0 1 > INSERT 0 1 > INSERT 0 1 > ERROR:? syntax error at end of input > LINE 1: ...e_geom) VALUES ('1.15574000000e+005','GILMORE ST > (SCADDAN)', > > > in the event I can't work out the encoding, is there any > way to turn off the transaction behaviour, ie I'm happy to > miss 4 records, but not 1000 as a result of the transactions > being aborted. (short of putting it all into a text file and > removing all the begin and commit commands...) > > cheers > > Ben > > > > > > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From strk at keybit.net Sun Mar 14 14:35:44 2010 From: strk at keybit.net (strk) Date: Sun, 14 Mar 2010 22:35:44 +0100 Subject: [postgis-users] Changing transaction behaviour in shp2pgsql In-Reply-To: References: Message-ID: <20100314213544.GL62719@keybit.net> On Sun, Mar 14, 2010 at 04:58:02PM +0700, Ben Madin wrote: > in the event I can't work out the encoding, is there any way to turn off the transaction behaviour, ie I'm happy to miss 4 records, but not 1000 as a result of the transactions being aborted. (short of putting it all into a text file and removing all the begin and commit commands...) Feel like working on a patch to make "transaction policy" selectable with a switch ? -T transaction policy (single*,none) Current policy is chunked, dunno for what rationale.. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From mwtoews at gmail.com Sun Mar 14 15:54:02 2010 From: mwtoews at gmail.com (Mike Toews) Date: Sun, 14 Mar 2010 15:54:02 -0700 Subject: [postgis-users] date/time format In-Reply-To: References: Message-ID: <22f0a52d1003141554x7ce4ea4ft5fa6095c2f9cd85c@mail.gmail.com> It depends on your database settings. You can see what it is from either psql or PgAdmin: show DateStyle; (Mine shows?"ISO, DMY") If you want to?temporary?change it for an SQL session, try: set?DateStyle=SQL, DMY; select current_timestamp; And if you like it and want to make a global change for the database: ALTER DATABASE mydb SET DateStyle=SQL, DMY; More info: http://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-DATETIME-OUTPUT -Mike On 14 March 2010 10:27, Linnet Kwamboka wrote: > > hey guys, > ?when making a table column with date, the date type is chosen, what is the > ? ?exact date format that can be input? is it DMY or YMD and how can i change > ? ?this format to be DMY for ease of use?thanks > > -- > With regards, > Linnet Kwamboka > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From Stephen.Salathiel at dse.vic.gov.au Sun Mar 14 16:02:48 2010 From: Stephen.Salathiel at dse.vic.gov.au (Stephen.Salathiel at dse.vic.gov.au) Date: Mon, 15 Mar 2010 10:02:48 +1100 Subject: [postgis-users] Stephen Salathiel is out of the office on fire duties. Message-ID: I will be out of the office starting 15/03/2010 and will not return until 22/03/2010. For all urgent enquiries, please contact Brett Miller on (03) 9637 9008. Notice: This email and any attachments may contain information that is personal, confidential, legally privileged and/or copyright.No part of it should be reproduced, adapted or communicated without the prior written consent of the copyright owner. It is the responsibility of the recipient to check for and remove viruses. If you have received this email in error, please notify the sender by return email, delete it from your system and destroy any copies. You are not authorised to use, communicate or rely on the information contained in this email. Please consider the environment before printing this email. From lists at remoteinformation.com.au Sun Mar 14 16:51:00 2010 From: lists at remoteinformation.com.au (Ben Madin) Date: Mon, 15 Mar 2010 06:51:00 +0700 Subject: [postgis-users] Changing transaction behaviour in shp2pgsql - summary In-Reply-To: <20100314213544.GL62719@keybit.net> References: <20100314213544.GL62719@keybit.net> Message-ID: <210366A7-5164-4BF5-8A8A-B5242BB05C58@remoteinformation.com.au> Thanks all for the feedback - to summarise : shp2pgsql - Currently, all output is 'chunked' transactions - changing this behaviour not currently supported. - A patch could be provided to shp2pgsql to do this. - The suggestion is a -T switch with options such as single, chunked, no transactions. - I'm happy to look at submitting a patch... but it won't be until after I've submitted my thesis ... The text editor approach is to direct output into a file and find / replace the BEGIN / COMMIT lines. The on-the-fly alternative is to use a pattern matching program, with two solutions offered : Using sed (thanks Brent) shp2pgsql -s 28350 -W UTF8 \ /Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp \ gis.mrwa_gda94 | sed 's/BEGIN//' | sed 's/COMMIT//' psql australia Using grep (thanks Steve) shp2pgsql ... | grep -v BEGIN | grep -v COMMIT | psql australia cheers Ben On 15/03/2010, at 4:35 , strk wrote: > On Sun, Mar 14, 2010 at 04:58:02PM +0700, Ben Madin wrote: > >> in the event I can't work out the encoding, is there any way to turn off the transaction behaviour, ie I'm happy to miss 4 records, but not 1000 as a result of the transactions being aborted. (short of putting it all into a text file and removing all the begin and commit commands...) > > Feel like working on a patch to make "transaction policy" selectable > with a switch ? > > -T transaction policy (single*,none) > > Current policy is chunked, dunno for what rationale.. > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From monteiro.s.pedro at gmail.com Sun Mar 14 18:54:33 2010 From: monteiro.s.pedro at gmail.com (Pedro Monteiro) Date: Mon, 15 Mar 2010 00:54:33 -0100 Subject: [postgis-users] ERROR after geos install Message-ID: Hi, I'm writing to ask for help with some misbehaviour of my postgis database, after installing geos from EPEL on a Centos 5.2 server, getting this error. "ERROR: could not load library "/usr/local/lib/liblwgeom.so": libgeos_c.so.1: cannot open shared object file: No such file or directory" I have already removed geos, and confirmed that the file exists with Thank you in advance. Pedro Monteiro -------------- next part -------------- An HTML attachment was scrubbed... URL: From scientific1quash at gmail.com Mon Mar 15 00:30:13 2010 From: scientific1quash at gmail.com (Linnet Kwamboka) Date: Mon, 15 Mar 2010 00:30:13 -0700 Subject: [postgis-users] date/time format In-Reply-To: <22f0a52d1003141554x7ce4ea4ft5fa6095c2f9cd85c@mail.gmail.com> References: <22f0a52d1003141554x7ce4ea4ft5fa6095c2f9cd85c@mail.gmail.com> Message-ID: hey, thanks so much that really helped now i have the normal DMY format, cheers On Sun, Mar 14, 2010 at 3:54 PM, Mike Toews wrote: > It depends on your database settings. You can see what it is from > either psql or PgAdmin: > > show DateStyle; > > (Mine shows "ISO, DMY") > > If you want to temporary change it for an SQL session, try: > > set DateStyle=SQL, DMY; > select current_timestamp; > > And if you like it and want to make a global change for the database: > > ALTER DATABASE mydb SET DateStyle=SQL, DMY; > > More info: > > http://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-DATETIME-OUTPUT > > -Mike > > On 14 March 2010 10:27, Linnet Kwamboka > wrote: > > > > hey guys, > > when making a table column with date, the date type is chosen, what is > the > > exact date format that can be input? is it DMY or YMD and how can i > change > > this format to be DMY for ease of use?thanks > > > > -- > > With regards, > > Linnet Kwamboka > > > > _______________________________________________ > > 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 > -- With regards, Linnet Kwamboka +254733229041 site: geekmates.ning.com blog: one-kenya.blogspot.com facebook: mckenzie quamboka skype: geekmate -------------- next part -------------- An HTML attachment was scrubbed... URL: From lr at pcorp.us Mon Mar 15 00:33:15 2010 From: lr at pcorp.us (Paragon Corporation) Date: Mon, 15 Mar 2010 03:33:15 -0400 Subject: [postgis-users] ERROR after geos install In-Reply-To: References: Message-ID: <56282FC3F3274296B44D2A0B34DC2BFB@J> Pedro, I think this is a fairly common problem. Most likely your liblwgeom.so is looking for geos in the wrong place or is pointing at an older version of geos. Do a ldd -d /usr/local/lib/liblwgeom.so or just to show the geos bindings ldd -d /usr/local/lib/liblwgeom.so | grep libgeos This will give you a clue where liblwgeom is looking. Most likely it will give a missing or something like that Then you can symlink to the right location something like: #To remove existing rm /usr/lib/libgeos_c.so.1 #to link to right one -- change this accordingly to where you have geos installed ln -s /usr/local/lib/libgeos_c.so.1.6.0 /usr/lib/libgeos_c.so.1 Hope that helps, Leo and Regina http://www.postgis.us ________________________________ From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Pedro Monteiro Sent: Sunday, March 14, 2010 9:55 PM To: postgis-users at postgis.refractions.net Subject: [postgis-users] ERROR after geos install Hi, I'm writing to ask for help with some misbehaviour of my postgis database, after installing geos from EPEL on a Centos 5.2 server, getting this error. "ERROR: could not load library "/usr/local/lib/liblwgeom.so": libgeos_c.so.1: cannot open shared object file: No such file or directory" I have already removed geos, and confirmed that the file exists with Thank you in advance. Pedro Monteiro From strk at keybit.net Mon Mar 15 01:05:18 2010 From: strk at keybit.net (strk) Date: Mon, 15 Mar 2010 09:05:18 +0100 Subject: [postgis-users] ERROR after geos install In-Reply-To: References: Message-ID: <20100315080518.GR62719@keybit.net> On Mon, Mar 15, 2010 at 12:54:33AM -0100, Pedro Monteiro wrote: > Hi, I'm writing to ask for help with some misbehaviour of my postgis > database, after installing geos from EPEL on a Centos 5.2 server, getting > this error. > > "ERROR: could not load library "/usr/local/lib/liblwgeom.so": > libgeos_c.so.1: cannot open shared object file: No such file or directory" Try running ldconfig, as root. Make sure /usr/local/lib is in your /etc/ld.so.conf --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From Ralf.Suhr at itc-halle.de Mon Mar 15 01:38:12 2010 From: Ralf.Suhr at itc-halle.de (Ralf Suhr) Date: Mon, 15 Mar 2010 09:38:12 +0100 Subject: [postgis-users] Changing transaction behaviour in shp2pgsql - summary In-Reply-To: <210366A7-5164-4BF5-8A8A-B5242BB05C58@remoteinformation.com.au> References: <20100314213544.GL62719@keybit.net> <210366A7-5164-4BF5-8A8A-B5242BB05C58@remoteinformation.com.au> Message-ID: <201003150938.12700.Ralf.Suhr@itc-halle.de> Hello Ben, I'm doing recoding of shapefiles without postgres when postgres can not do so. shp2pgsql [...] | recode shapefile_encoding..utf8 | psql database. Gr Ralf Am Montag 15 M?rz 2010 00:51:00 schrieb Ben Madin: > Thanks all for the feedback - to summarise : > > shp2pgsql - Currently, all output is 'chunked' transactions - changing this > behaviour not currently supported. - A patch could be provided to > shp2pgsql to do this. > - The suggestion is a -T switch with options such as single, chunked, no > transactions. - I'm happy to look at submitting a patch... but it won't be > until after I've submitted my thesis ... > > The text editor approach is to direct output into a file and find / replace > the BEGIN / COMMIT lines. > > The on-the-fly alternative is to use a pattern matching program, with two > solutions offered : > > Using sed (thanks Brent) > > shp2pgsql -s 28350 -W UTF8 \ > /Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp \ > gis.mrwa_gda94 | sed 's/BEGIN//' | sed 's/COMMIT//' psql australia > > > Using grep (thanks Steve) > > shp2pgsql ... | grep -v BEGIN | grep -v COMMIT | psql australia > > cheers > > Ben > > On 15/03/2010, at 4:35 , strk wrote: > > On Sun, Mar 14, 2010 at 04:58:02PM +0700, Ben Madin wrote: > >> in the event I can't work out the encoding, is there any way to turn off > >> the transaction behaviour, ie I'm happy to miss 4 records, but not 1000 > >> as a result of the transactions being aborted. (short of putting it all > >> into a text file and removing all the begin and commit commands...) > > > > Feel like working on a patch to make "transaction policy" selectable > > with a switch ? > > > > -T transaction policy (single*,none) > > > > Current policy is chunked, dunno for what rationale.. > > > > --strk; > > > > () Free GIS & Flash consultant/developer > > /\ http://strk.keybit.net/services.html > > > > _______________________________________________ > > 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 lr at pcorp.us Mon Mar 15 02:02:13 2010 From: lr at pcorp.us (Paragon Corporation) Date: Mon, 15 Mar 2010 05:02:13 -0400 Subject: [postgis-users] Changing transaction behaviour in shp2pgsql -summary In-Reply-To: <201003150938.12700.Ralf.Suhr@itc-halle.de> References: <20100314213544.GL62719@keybit.net><210366A7-5164-4BF5-8A8A-B5242BB05C58@remoteinformation.com.au> <201003150938.12700.Ralf.Suhr@itc-halle.de> Message-ID: Ralf, Apologize if you tried this already since we are entering the conversation late. Are you sure your shapefiles are in UTF-8. The -W switch you give to shp2pgsql has to be the encoding of the shapefile not the encoding of the database. The reason is that shp2pgsql converts from the source encoding -W to the UTF-8 and then does a SET client_encoding UTF-8 during load as I recall. So I would assume your shapefile are in LATIN-1 or WIN something or other in which case shp2pgsql -s 28350 -W "latin1" Might work better. Hope that helps, Leo and Regina http://www.postgis.us -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Ralf Suhr Sent: Monday, March 15, 2010 4:38 AM To: postgis-users at postgis.refractions.net Subject: Re: [postgis-users] Changing transaction behaviour in shp2pgsql -summary Hello Ben, I'm doing recoding of shapefiles without postgres when postgres can not do so. shp2pgsql [...] | recode shapefile_encoding..utf8 | psql database. Gr Ralf Am Montag 15 M?rz 2010 00:51:00 schrieb Ben Madin: > Thanks all for the feedback - to summarise : > > shp2pgsql - Currently, all output is 'chunked' transactions - changing > this behaviour not currently supported. - A patch could be provided to > shp2pgsql to do this. > - The suggestion is a -T switch with options such as single, chunked, > no transactions. - I'm happy to look at submitting a patch... but it > won't be until after I've submitted my thesis ... > > The text editor approach is to direct output into a file and find / > replace the BEGIN / COMMIT lines. > > The on-the-fly alternative is to use a pattern matching program, with > two solutions offered : > > Using sed (thanks Brent) > > shp2pgsql -s 28350 -W UTF8 \ > /Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp \ > gis.mrwa_gda94 | sed 's/BEGIN//' | sed 's/COMMIT//' psql australia > > > Using grep (thanks Steve) > > shp2pgsql ... | grep -v BEGIN | grep -v COMMIT | psql australia > > cheers > > Ben > > On 15/03/2010, at 4:35 , strk wrote: > > On Sun, Mar 14, 2010 at 04:58:02PM +0700, Ben Madin wrote: > >> in the event I can't work out the encoding, is there any way to > >> turn off the transaction behaviour, ie I'm happy to miss 4 records, > >> but not 1000 as a result of the transactions being aborted. (short > >> of putting it all into a text file and removing all the begin and > >> commit commands...) > > > > Feel like working on a patch to make "transaction policy" selectable > > with a switch ? > > > > -T transaction policy (single*,none) > > > > Current policy is chunked, dunno for what rationale.. > > > > --strk; > > > > () Free GIS & Flash consultant/developer > > /\ http://strk.keybit.net/services.html > > > > _______________________________________________ > > 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 wenbert at gmail.com Mon Mar 15 02:26:27 2010 From: wenbert at gmail.com (Wenbert Del Rosario) Date: Mon, 15 Mar 2010 10:26:27 +0100 Subject: [postgis-users] PostGIS with ArcGIS Desktop Message-ID: <485674d61003150226q750940e6g99d6a0aaef9f4321@mail.gmail.com> Hello, I am new comer to the GIS world. I hope you will be able to help me with my problem. But first, I have some questions: Will ArcMap work directly with PostGIS? If yes, what kind of data are stored in PostGIS? Will it store all my map files(mao file containing rasters, contours, etc) in the server? (No more editing local files? I am thinking of 1) Connect to database 2) load data in ArcMap/AutoCAD 3) Save data ) Right now, my problem is that I have too many files on one machine. I want everything stored in a server so that when I travel, I can just login and retrieve/view my files. Is PostGIS the answer? Can anyone lead me to the right direction for a solution? Thank you very much. Sincerely, Wenbert -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ralf.Suhr at itc-halle.de Mon Mar 15 02:54:25 2010 From: Ralf.Suhr at itc-halle.de (Ralf Suhr) Date: Mon, 15 Mar 2010 10:54:25 +0100 Subject: [postgis-users] PostGIS with ArcGIS Desktop In-Reply-To: <485674d61003150226q750940e6g99d6a0aaef9f4321@mail.gmail.com> References: <485674d61003150226q750940e6g99d6a0aaef9f4321@mail.gmail.com> Message-ID: <201003151054.25683.Ralf.Suhr@itc-halle.de> Hello Wenbert, ArcMap 9.x can not use PostGIS without overlaying ArcSDE. Gr Ralf Am Montag 15 M?rz 2010 10:26:27 schrieb Wenbert Del Rosario: > Hello, > > I am new comer to the GIS world. I hope you will be able to help me with my > problem. > > But first, I have some questions: > Will ArcMap work directly with PostGIS? If yes, what kind of data are > stored in PostGIS? > > Will it store all my map files(mao file containing rasters, contours, etc) > in the server? (No more editing local files? I am thinking of 1) Connect to > database 2) load data in ArcMap/AutoCAD 3) Save data ) > > Right now, my problem is that I have too many files on one machine. I want > everything stored in a server so that when I travel, I can just login > and retrieve/view my files. Is PostGIS the answer? Can anyone lead me to > the right direction for a solution? > > Thank you very much. > > Sincerely, > Wenbert From Ralf.Suhr at itc-halle.de Mon Mar 15 02:55:00 2010 From: Ralf.Suhr at itc-halle.de (Ralf Suhr) Date: Mon, 15 Mar 2010 10:55:00 +0100 Subject: [postgis-users] Changing transaction behaviour in shp2pgsql -summary In-Reply-To: References: <201003150938.12700.Ralf.Suhr@itc-halle.de> Message-ID: <201003151055.00675.Ralf.Suhr@itc-halle.de> I use the external recoding for shapefiles and other sql files witch are in LATIN9. The postgres recoding to utf-8 sometimes fail. The external program "recode" do a lazy recoding and that output is accepted by postgres. Maybe the problem occurs only f?r me. Gr Ralf Am Montag 15 M?rz 2010 10:02:13 schrieb Paragon Corporation: > Ralf, > > Apologize if you tried this already since we are entering the conversation > late. > > Are you sure your shapefiles are in UTF-8. The -W switch you give to > shp2pgsql has to be the encoding of the shapefile not the encoding of the > database. > The reason is that shp2pgsql converts from the source encoding -W to the > UTF-8 and then does a SET client_encoding UTF-8 during load as I recall. > > So I would assume your shapefile are in LATIN-1 or WIN something or other > in which case > > shp2pgsql -s 28350 -W "latin1" > > Might work better. > > Hope that helps, > Leo and Regina > http://www.postgis.us > > > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Ralf > Suhr > Sent: Monday, March 15, 2010 4:38 AM > To: postgis-users at postgis.refractions.net > Subject: Re: [postgis-users] Changing transaction behaviour in shp2pgsql > -summary > > Hello Ben, > > I'm doing recoding of shapefiles without postgres when postgres can not do > so. > > shp2pgsql [...] | recode shapefile_encoding..utf8 | psql database. > > Gr Ralf > > Am Montag 15 M?rz 2010 00:51:00 schrieb Ben Madin: > > Thanks all for the feedback - to summarise : > > > > shp2pgsql - Currently, all output is 'chunked' transactions - changing > > this behaviour not currently supported. - A patch could be provided to > > shp2pgsql to do this. > > > > - The suggestion is a -T switch with options such as single, chunked, > > > > no transactions. - I'm happy to look at submitting a patch... but it > > won't be until after I've submitted my thesis ... > > > > The text editor approach is to direct output into a file and find / > > replace the BEGIN / COMMIT lines. > > > > The on-the-fly alternative is to use a pattern matching program, with > > two solutions offered : > > > > Using sed (thanks Brent) > > > > shp2pgsql -s 28350 -W UTF8 \ > > /Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp \ > > gis.mrwa_gda94 | sed 's/BEGIN//' | sed 's/COMMIT//' psql australia > > > > Using grep (thanks Steve) > > > > shp2pgsql ... | grep -v BEGIN | grep -v COMMIT | psql australia > > > > cheers > > > > Ben > > > > On 15/03/2010, at 4:35 , strk wrote: > > > On Sun, Mar 14, 2010 at 04:58:02PM +0700, Ben Madin wrote: > > >> in the event I can't work out the encoding, is there any way to > > >> turn off the transaction behaviour, ie I'm happy to miss 4 records, > > >> but not 1000 as a result of the transactions being aborted. (short > > >> of putting it all into a text file and removing all the begin and > > >> commit commands...) > > > > > > Feel like working on a patch to make "transaction policy" selectable > > > with a switch ? > > > > > > -T transaction policy (single*,none) > > > > > > Current policy is chunked, dunno for what rationale.. > > > > > > --strk; > > > > > > () Free GIS & Flash consultant/developer > > > /\ http://strk.keybit.net/services.html > > > > > > _______________________________________________ > > > 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 monteiro.s.pedro at gmail.com Mon Mar 15 04:51:37 2010 From: monteiro.s.pedro at gmail.com (Pedro Monteiro) Date: Mon, 15 Mar 2010 10:51:37 -0100 Subject: [postgis-users] ERROR after geos install In-Reply-To: <20100315080518.GR62719@keybit.net> References: <20100315080518.GR62719@keybit.net> Message-ID: Thank you all. I've solved the problem creating the biddings on ld.so.conf (don't know why they desapeared) echo '/usr/local/lib' >> /etc/ld.so.conf.d/local-lib.conf ldconfig And my postgis instance is working again. 2010/3/15 strk > On Mon, Mar 15, 2010 at 12:54:33AM -0100, Pedro Monteiro wrote: > > Hi, I'm writing to ask for help with some misbehaviour of my postgis > > database, after installing geos from EPEL on a Centos 5.2 server, getting > > this error. > > > > "ERROR: could not load library "/usr/local/lib/liblwgeom.so": > > libgeos_c.so.1: cannot open shared object file: No such file or > directory" > > Try running ldconfig, as root. > Make sure /usr/local/lib is in your /etc/ld.so.conf > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From khurram.niaz at tpltrakker.com Mon Mar 15 05:39:08 2010 From: khurram.niaz at tpltrakker.com (Khurram Niaz Sheikh) Date: Mon, 15 Mar 2010 17:39:08 +0500 Subject: [postgis-users] PostGIS with ArcGIS Desktop In-Reply-To: <201003151054.25683.Ralf.Suhr@itc-halle.de> References: <485674d61003150226q750940e6g99d6a0aaef9f4321@mail.gmail.com> <201003151054.25683.Ralf.Suhr@itc-halle.de> Message-ID: <3FB7831325FAA8489BCE829EE5312FF714EA40BF0B@mail.trakker.com.pk> Hi, Arcgis data interoperability extension has support for postgis connection, did anyone had a try? Regards, Khuram -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Ralf Suhr Sent: Monday, March 15, 2010 2:54 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] PostGIS with ArcGIS Desktop Hello Wenbert, ArcMap 9.x can not use PostGIS without overlaying ArcSDE. Gr Ralf Am Montag 15 M?rz 2010 10:26:27 schrieb Wenbert Del Rosario: > Hello, > > I am new comer to the GIS world. I hope you will be able to help me with my > problem. > > But first, I have some questions: > Will ArcMap work directly with PostGIS? If yes, what kind of data are > stored in PostGIS? > > Will it store all my map files(mao file containing rasters, contours, etc) > in the server? (No more editing local files? I am thinking of 1) Connect to > database 2) load data in ArcMap/AutoCAD 3) Save data ) > > Right now, my problem is that I have too many files on one machine. I want > everything stored in a server so that when I travel, I can just login > and retrieve/view my files. Is PostGIS the answer? Can anyone lead me to > the right direction for a solution? > > Thank you very much. > > Sincerely, > Wenbert _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From pmoen at offroadsoftware.com Mon Mar 15 06:02:16 2010 From: pmoen at offroadsoftware.com (Paul moen) Date: Mon, 15 Mar 2010 08:02:16 -0500 Subject: [postgis-users] How to edit one point in multipolygon given dump path Message-ID: <181E8184-F0F1-407A-8129-DCA993278D2F@offroadsoftware.com> Is there an easy quick way to edit a single point in a multipolygon given the path from a st_dump using sql? It seem fast to parse the text string into arrays, splice the new point in deleting the old point and rebuilding the text for the multipolygon. There has to be a better way using PostGIS and SQL, right? Thanks, Paul From strk at keybit.net Mon Mar 15 06:40:16 2010 From: strk at keybit.net (strk) Date: Mon, 15 Mar 2010 14:40:16 +0100 Subject: [postgis-users] How to edit one point in multipolygon given dump path In-Reply-To: <181E8184-F0F1-407A-8129-DCA993278D2F@offroadsoftware.com> References: <181E8184-F0F1-407A-8129-DCA993278D2F@offroadsoftware.com> Message-ID: <20100315134016.GT62719@keybit.net> On Mon, Mar 15, 2010 at 08:02:16AM -0500, Paul moen wrote: > Is there an easy quick way to edit a single point in a multipolygon > given the path from a st_dump using sql? > > It seem fast to parse the text string into arrays, splice the new > point in deleting the old point and rebuilding the text for the > multipolygon. > > There has to be a better way using PostGIS and SQL, right? Right, you can code your function and submit a patch ! --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From pmoen at offroadsoftware.com Mon Mar 15 06:52:43 2010 From: pmoen at offroadsoftware.com (Paul moen) Date: Mon, 15 Mar 2010 08:52:43 -0500 Subject: [postgis-users] How to edit one point in multipolygon given dump path In-Reply-To: <20100315134016.GT62719@keybit.net> References: <181E8184-F0F1-407A-8129-DCA993278D2F@offroadsoftware.com> <20100315134016.GT62719@keybit.net> Message-ID: <7B4940F1-A50A-455F-BE24-6D1C3F57ECF6@offroadsoftware.com> So there isn't a better way to do it? So if I write my code to do this in php it can be submitted as a patch? Or are you saying, learn how to program in plpgsql then submit a patch. Paul On Mar 15, 2010, at 8:40 AM, strk wrote: > On Mon, Mar 15, 2010 at 08:02:16AM -0500, Paul moen wrote: >> Is there an easy quick way to edit a single point in a multipolygon >> given the path from a st_dump using sql? >> >> It seem fast to parse the text string into arrays, splice the new >> point in deleting the old point and rebuilding the text for the >> multipolygon. >> >> There has to be a better way using PostGIS and SQL, right? > > Right, you can code your function and submit a patch ! > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From strk at keybit.net Mon Mar 15 07:06:45 2010 From: strk at keybit.net (strk) Date: Mon, 15 Mar 2010 15:06:45 +0100 Subject: [postgis-users] How to edit one point in multipolygon given dump path In-Reply-To: <7B4940F1-A50A-455F-BE24-6D1C3F57ECF6@offroadsoftware.com> References: <181E8184-F0F1-407A-8129-DCA993278D2F@offroadsoftware.com> <20100315134016.GT62719@keybit.net> <7B4940F1-A50A-455F-BE24-6D1C3F57ECF6@offroadsoftware.com> Message-ID: <20100315140645.GU62719@keybit.net> On Mon, Mar 15, 2010 at 08:52:43AM -0500, Paul moen wrote: > So there isn't a better way to do it? > > So if I write my code to do this in php it can be submitted as a > patch? Or are you saying, learn how to program in plpgsql then submit > a patch. A scripting language code won't be applied to core postgis. A C function might. Both versions you can share (the postgis wiki contains a fair amount of scripting language functions). --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From JimLug at co.clackamas.or.us Mon Mar 15 07:37:57 2010 From: JimLug at co.clackamas.or.us (Lugosi, Jim) Date: Mon, 15 Mar 2010 07:37:57 -0700 Subject: [postgis-users] PostGIS with ArcGIS Desktop In-Reply-To: <3FB7831325FAA8489BCE829EE5312FF714EA40BF0B@mail.trakker.com.pk> References: <485674d61003150226q750940e6g99d6a0aaef9f4321@mail.gmail.com> <201003151054.25683.Ralf.Suhr@itc-halle.de> <3FB7831325FAA8489BCE829EE5312FF714EA40BF0B@mail.trakker.com.pk> Message-ID: <62C5A1BD5328C14AAAF6B755CEC720461A30B9FAB6@DRAGON.county.ds.clackamas.us> We use the extension and it works great. -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Khurram Niaz Sheikh Sent: Monday, March 15, 2010 5:39 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] PostGIS with ArcGIS Desktop Hi, Arcgis data interoperability extension has support for postgis connection, did anyone had a try? Regards, Khuram -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Ralf Suhr Sent: Monday, March 15, 2010 2:54 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] PostGIS with ArcGIS Desktop Hello Wenbert, ArcMap 9.x can not use PostGIS without overlaying ArcSDE. Gr Ralf Am Montag 15 M?rz 2010 10:26:27 schrieb Wenbert Del Rosario: > Hello, > > I am new comer to the GIS world. I hope you will be able to help me with my > problem. > > But first, I have some questions: > Will ArcMap work directly with PostGIS? If yes, what kind of data are > stored in PostGIS? > > Will it store all my map files(mao file containing rasters, contours, etc) > in the server? (No more editing local files? I am thinking of 1) Connect to > database 2) load data in ArcMap/AutoCAD 3) Save data ) > > Right now, my problem is that I have too many files on one machine. I want > everything stored in a server so that when I travel, I can just login > and retrieve/view my files. Is PostGIS the answer? Can anyone lead me to > the right direction for a solution? > > Thank you very much. > > Sincerely, > Wenbert _______________________________________________ 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 pramsey at cleverelephant.ca Mon Mar 15 08:17:05 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Mon, 15 Mar 2010 08:17:05 -0700 Subject: [postgis-users] PostGIS with ArcGIS Desktop In-Reply-To: <485674d61003150226q750940e6g99d6a0aaef9f4321@mail.gmail.com> References: <485674d61003150226q750940e6g99d6a0aaef9f4321@mail.gmail.com> Message-ID: <30fe546d1003150817w295e9e56iae37416048e06a52@mail.gmail.com> Put your files in a dropbox folder. http://dropbox.com On Mon, Mar 15, 2010 at 2:26 AM, Wenbert Del Rosario wrote: > Hello, > I am new comer to the GIS world. I hope you will be able to help me with my > problem. > But first, I have some questions: > Will ArcMap work directly with PostGIS? If yes, what kind of data are stored > in PostGIS? > Will it store all my map files(mao file containing rasters, contours, etc) > in the server? (No more editing local files? I am thinking of 1) Connect to > database 2) load data in ArcMap/AutoCAD 3) Save data ) > Right now, my problem is that I have too many files on one machine. I want > everything stored in a server so that when I travel, I can just login > and?retrieve/view?my files. Is PostGIS the answer? Can anyone lead me to the > right direction for a solution? > Thank you very much. > Sincerely, > Wenbert > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > From khaylov.stud at fsr.tu-darmstadt.de Mon Mar 15 08:20:57 2010 From: khaylov.stud at fsr.tu-darmstadt.de (Leonid Khaylov) Date: Mon, 15 Mar 2010 16:20:57 +0100 Subject: [postgis-users] st_intersects threw an error Message-ID: Thank you for your professional reply, strk! Just for your information, we updated our PostGIS installation to version 1.5.0 and checked all the geometries for validity (all of them are valid). New simulation at the moment shows less "st_intersects() threw an error" issues, but they are still there. In a couple of days will be able to say whether this becomes a fatal issue for the running simulation. Thanks again! Leonid Khaylov -----Urspr?ngliche Nachricht----- Von: strk [mailto:strk at keybit.net] Gesendet: Dienstag, 9. M?rz 2010 13:01 An: PostGIS Users Discussion Betreff: Re: [postgis-users] st_intersects threw an error On Tue, Mar 09, 2010 at 12:50:09PM +0100, Leonid Khaylov wrote: > Hello! > > > > I'm experiencing a problem with function st_intersects (currently > installed PostGIS 1.4). Our software makes a lot of db queries which are > using st_intersects (actually it should be running a week or more) and > after some number of queries we get "st_intersects threw an error" > problem. We were able to get around this problem as after the error is > thrown we disconnect from the db and connect to it again retrying the > same query. It works. But the problem we're experiencing now is more > difficult - we get these errors more often with time. Apparently, on the > 4th day of simulation we get those errors each 3 minutes and it is > almost not possible to finish the simulation. > > Any ideas on how can we get around it? Any patches? Most of the times that error is due to topologicall-invalid geometries being passed to st_intersects. You may first of all check that (ST_isValid). Now, a separate issue is that ST_isValid may give you false positive (sic) unless you install current development version of GEOS. So my advice is: install GEOS development version, check your geometries with ST_isValid, clean them up if any invalidity is found. Also note that upgrading GEOS will give you improved robustness and speed. Finally, consider also upgrading postgis (1.5.1 is about to be released). --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From strk at keybit.net Mon Mar 15 08:24:46 2010 From: strk at keybit.net (strk) Date: Mon, 15 Mar 2010 16:24:46 +0100 Subject: [postgis-users] st_intersects threw an error In-Reply-To: References: Message-ID: <20100315152446.GV62719@keybit.net> On Mon, Mar 15, 2010 at 04:20:57PM +0100, Leonid Khaylov wrote: > Thank you for your professional reply, strk! > > Just for your information, we updated our PostGIS installation to version 1.5.0 and checked all the geometries for validity (all of them are valid). Did you get the "false positive" part of my professional message ? :P --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From nasoblu5 at yahoo.it Mon Mar 15 09:33:02 2010 From: nasoblu5 at yahoo.it (marcello marcellone) Date: Mon, 15 Mar 2010 16:33:02 +0000 (GMT) Subject: [postgis-users] ST_INTERSECTS crazy bad performances Message-ID: <91339.88396.qm@web23401.mail.ird.yahoo.com> I have four tables: grids contains grid of polygon, routes contains gps point survey ? and segment between a point and the next, rank_type, and parameters_queries. I try to intersect a grid from grids with some segments of routes thru ST_INTERSECTS. This is the first query i tried: SELECT grd.coordinates_system ???? , polygon ???? , parameter ???? , lon_index ???? , lat_index ???? , quota_index ???? , lon_south_west ???? , lat_south_west ???? , quota_south_west ???? , lon_south_east ???? , lat_south_east ???? , quota_south_east ???? , lon_north_east ???? , lat_north_east ???? , quota_north_east ???? , lon_north_west ???? , lat_north_west ???? , quota_north_west ???? , cell ???? , COALESCE(SUM(ST_length3d(ST_INTERSECTION(segment,cell))),0)????? AS effort ???? , COALESCE(AVG(ST_length3d(ST_INTERSECTION(segment,cell))),0)????? AS effort_mean ???? , COALESCE(STDDEV(ST_length3d(ST_INTERSECTION(segment,cell))),0)?? AS effort_devstd ???? , COALESCE(VARIANCE(ST_length3d(ST_INTERSECTION(segment,cell))),0) AS effort_var from ( SELECT pq1.legenda ???? , pq2.min??????????????????????????????????? AS period_date_min ???? , pq2.max??????????????????????????????????? AS period_date_max ???? , pq3.min??????????????????????????????????? AS workstation_time_min ???? , pq3.max??????????????????????????????????? AS workstation_time_max ???? , pq4.min??????????????????????????????????? AS week_date_min ???? , pq4.max??????????????????????????????????? AS week_date_max ???? , pq5.min??????????????????????????????????? AS rank_min ???? , pq5.max??????????????????????????????????? AS rank_max ???? , pq6.min??????????????????????????????????? AS speed_min ???? , pq6.max??????????????????????????????????? AS speed_max ???? , pq7.min??????????????????????????????????? AS gps_time_min ???? , pq7.max??????????????????????????????????? AS gps_time_max ???? , pq8.min??????????????????????????????????? AS rank_type_min ???? , pq8.max??????????????????????????????????? AS rank_type_max FROM?? parameters_queries??????????????????????????? pq1 ???? , parameters_queries??????????????????????????? pq2 ???? , parameters_queries??????????????????????????? pq3 ???? , parameters_queries??????????????????????????? pq4 ???? , parameters_queries??????????????????????????? pq5 ???? , parameters_queries??????????????????????????? pq6 ???? , parameters_queries??????????????????????????? pq7 ???? , parameters_queries??????????????????????????? pq8 WHERE? pq1.tag::text?????????????????????????????? = 'COORDSYS'::text AND??? pq2.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq2.legenda::text?????????????????????????? = 'PERIOD'::text AND??? pq3.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq3.legenda::text?????????????????????????? = 'WORKSTATIONTIME'::text AND??? pq4.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq4.legenda::text?????????????????????????? = 'WEEK'::text AND??? pq5.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq5.legenda::text?????????????????????????? = 'RANK'::text AND??? pq6.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq6.legenda::text?????????????????????????? = 'SPEED'::text AND??? pq7.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq7.legenda::text?????????????????????????? = 'GPSTIME'::text AND??? pq8.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq8.legenda::text?????????????????????????? = 'RANKTYPE'::text )????? pq,??? ( SELECT routes.rank ???? , routes.period_date ???? , routes.workstation_time ???? , routes.gps_time ???? , routes.week_date ???? , routes.survey_date ???? , routes.geo_point ???? , routes.lon ???? , routes.lat ???? , routes.quota ???? , routes.y ???? , routes.x ???? , routes.z ???? , routes.speed ???? , routes.direction ???? , routes.segment_utm_wgs84??? AS segment??? FROM?? routes WHERE? geo_point??????????????????? > 90000000 )????? rou right outer join ( SELECT pq1.legenda???????????????? AS coordinates_system ???? , polygon ???? , cell_length ???? , cells_side ???? , grd.parameter?????????????? AS parameter ???? , lon_index ???? , lat_index ???? , quota_index ???? , lon_south_west ???? , lat_south_west ???? , quota_south_west ???? , lon_south_east ???? , lat_south_east ???? , quota_south_east ???? , lon_north_east ???? , lat_north_east ???? , quota_north_east ???? , lon_north_west ???? , lat_north_west ???? , quota_north_west ???? , grd.polygon_utm_wgs84?????? AS cell? FROM?? delphis.grids????????????????? grd???? ???? , delphis.parameters_grid??????? pgr ???? , delphis.parameters_queries???? pq1 ???? , delphis.parameters_queries???? pq2 ???? , delphis.parameters_queries???? pq3 ???? , delphis.parameters_queries???? pq4 WHERE? pq1.tag::text?????????????? = 'COORDSYS'::text AND??? pq2.tag::text?????????????? = 'GRID02'::text AND??? pq2.legenda::text?????????? = 'CELL_LENGTH'::text AND??? pq3.tag::text?????????????? = 'GRID02'::text AND??? pq3.legenda::text?????????? = 'LOW_LEFT_CORNER'::text AND??? pq4.tag::text?????????????? = 'GRID02'::text AND??? pq4.legenda::text?????????? = 'HIGH_RIGHT_CORNER'::text AND??? pgr.cell_length???????????? = pq2.min AND??? grd.parameter?????????????? = pgr.parameter AND??? grd.polygon_utm_wgs84?????? && ST_MAKEBOX3D(ST_SETSRID(ST_MAKEPOINT(pq3.min,pq3.max,pq3.factor),32633) ????????????????????????????????????????????????? ,ST_SETSRID(ST_MAKEPOINT(pq4.min,pq4.max,pq4.factor),32633) ????????????????????????????????????????????????? )??????????????????????????????? )????? grd ON???? ST_INTERSECTS(segment,cell) GROUP BY???? grd.coordinates_system ???? , polygon ???? , cell_length ???? , cells_side ???? , parameter ???? , lon_index ???? , lat_index ???? , quota_index ???? , lon_south_west ???? , lat_south_west ???? , quota_south_west ???? , lon_south_east ???? , lat_south_east ???? , quota_south_east ???? , lon_north_east ???? , lat_north_east ???? , quota_north_east ???? , lon_north_west ???? , lat_north_west ???? , quota_north_west ???? , cell ORDER BY???? polygon; subquery named? pq returns 1 row subquery named? rou returns 17274 rows subquery named? grd returns 8281 rows of course we have spatial index on segment and cell, and pk on polygon, geo_point this is explain plan: "GroupAggregate? (cost=33.02..34.12 rows=1 width=1054) (actual time=27339.441..35239.856 rows=8281 loops=1)" "? ->? Sort? (cost=33.02..33.03 rows=1 width=1054) (actual time=27339.387..27412.462 rows=30857 loops=1)" "??????? Sort Key: grd.polygon, pq1.legenda, pgr.cell_length, pgr.cells_side, grd.parameter, grd.lon_index, grd.lat_index, grd.quota_index, grd.lon_south_west, grd.lat_south_west, grd.quota_south_west, grd.lon_south_east, grd.lat_south_east, grd.quota_south_east, grd.lon_north_east, grd.lat_north_east, grd.quota_north_east, grd.lon_north_west, grd.lat_north_west, grd.quota_north_west, grd.polygon_utm_wgs84" "??????? Sort Method:? external merge? Disk: 10824kB" "??????? ->? Nested Loop? (cost=0.02..33.01 rows=1 width=1054) (actual time=98.144..26683.853 rows=30857 loops=1)" "????????????? Join Filter: (pq2.min = (pgr.cell_length)::double precision)" "????????????? ->? Nested Loop? (cost=0.02..32.73 rows=1 width=1054) (actual time=2.358..25125.270 rows=184769 loops=1)" "??????????????????? ->? Nested Loop Left Join? (cost=0.02..30.76 rows=1 width=1046) (actual time=2.328..21115.637 rows=184769 loops=1)" "????????????????????????? Join Filter: _st_intersects(routes.segment_utm_wgs84, grd.polygon_utm_wgs84)" "????????????????????????? ->? Nested Loop? (cost=0.02..29.74 rows=1 width=738) (actual time=2.011..456.911 rows=81964 loops=1)" "??????????????????????????????? ->? Nested Loop? (cost=0.00..21.34 rows=1 width=58) (actual time=0.362..0.494 rows=1 loops=1)" "????????????????????????????????????? ->? Nested Loop? (cost=0.00..19.37 rows=1 width=34) (actual time=0.342..0.457 rows=1 loops=1)" "??????????????????????????????????????????? ->? Nested Loop? (cost=0.00..17.40 rows=1 width=10) (actual time=0.301..0.408 rows=1 loops=1)" "????????????????????????????????????????????????? ->? Nested Loop? (cost=0.00..15.59 rows=1 width=0) (actual time=0.280..0.373 rows=1 loops=1)" "??????????????????????????????????????????????????????? ->? Nested Loop? (cost=0.00..13.78 rows=1 width=0) (actual time=0.260..0.338 rows=1 loops=1)" "????????????????????????????????????????????????????????????? ->? Nested Loop? (cost=0.00..11.81 rows=1 width=0) (actual time=0.235..0.299 rows=1 loops=1)" "??????????????????????????????????????????????????????????????????? ->? Nested Loop? (cost=0.00..9.84 rows=1 width=0) (actual time=0.218..0.263 rows=1 loops=1)" "????????????????????????????????????????????????????????????????????????? ->? Nested Loop? (cost=0.00..7.87 rows=1 width=0) (actual time=0.176..0.216 rows=1 loops=1)" "??????????????????????????????????????????????????????????????????????????????? ->? Nested Loop? (cost=0.00..5.90 rows=1 width=0) (actual time=0.148..0.176 rows=1 loops=1)" "????????????????????????????????????????????????????????????????????????????????????? ->? Nested Loop? (cost=0.00..3.93 rows=1 width=0) (actual time=0.106..0.126 rows=1 loops=1)" "??????????????????????????????????????????????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq2? (cost=0.00..1.96 rows=1 width=0) (actual time=0.071..0.078 rows=1 loops=1)" "????????????????????????????????????????????????????????????????????????????????????????????????? Filter: (((tag)::text = 'ROUTES'::text) AND ((legenda)::text = 'PERIOD'::text))" "??????????????????????????????????????????????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq8? (cost=0.00..1.96 rows=1 width=0) (actual time=0.023..0.033 rows=1 loops=1)" "????????????????????????????????????????????????????????????????????????????????????????????????? Filter: (((pq8.tag)::text = 'ROUTES'::text) AND ((pq8.legenda)::text = 'RANKTYPE'::text))" "????????????????????????????????????????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq7? (cost=0.00..1.96 rows=1 width=0) (actual time=0.037..0.039 rows=1 loops=1)" "??????????????????????????????????????????????????????????????????????????????????????????? Filter: (((pq7.tag)::text = 'ROUTES'::text) AND ((pq7.legenda)::text = 'GPSTIME'::text))" "??????????????????????????????????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq6? (cost=0.00..1.96 rows=1 width=0) (actual time=0.022..0.032 rows=1 loops=1)" "????????????????????????????????????????????????????????????????????????????????????? Filter: (((pq6.tag)::text = 'ROUTES'::text) AND ((pq6.legenda)::text = 'SPEED'::text))" "????????????????????????????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq5? (cost=0.00..1.96 rows=1 width=0) (actual time=0.037..0.038 rows=1 loops=1)" "??????????????????????????????????????????????????????????????????????????????? Filter: (((pq5.tag)::text = 'ROUTES'::text) AND ((pq5.legenda)::text = 'RANK'::text))" "??????????????????????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq4? (cost=0.00..1.96 rows=1 width=0) (actual time=0.011..0.025 rows=1 loops=1)" "????????????????????????????????????????????????????????????????????????? Filter: (((pq4.tag)::text = 'ROUTES'::text) AND ((pq4.legenda)::text = 'WEEK'::text))" "????????????????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq3? (cost=0.00..1.96 rows=1 width=0) (actual time=0.020..0.030 rows=1 loops=1)" "??????????????????????????????????????????????????????????????????? Filter: (((pq3.tag)::text = 'ROUTES'::text) AND ((pq3.legenda)::text = 'WORKSTATIONTIME'::text))" "??????????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq1? (cost=0.00..1.80 rows=1 width=0) (actual time=0.014..0.025 rows=1 loops=1)" "????????????????????????????????????????????????????????????? Filter: ((pq1.tag)::text = 'COORDSYS'::text)" "????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq1? (cost=0.00..1.80 rows=1 width=10) (actual time=0.015..0.025 rows=1 loops=1)" "??????????????????????????????????????????????????????? Filter: ((pq1.tag)::text = 'COORDSYS'::text)" "??????????????????????????????????????????? ->? Seq Scan on parameters_queries pq4? (cost=0.00..1.96 rows=1 width=24) (actual time=0.034..0.038 rows=1 loops=1)" "????????????????????????????????????????????????? Filter: (((pq4.tag)::text = 'GRID02'::text) AND ((pq4.legenda)::text = 'HIGH_RIGHT_CORNER'::text))" "????????????????????????????????????? ->? Seq Scan on parameters_queries pq3? (cost=0.00..1.96 rows=1 width=24) (actual time=0.013..0.026 rows=1 loops=1)" "??????????????????????????????????????????? Filter: (((pq3.tag)::text = 'GRID02'::text) AND ((pq3.legenda)::text = 'LOW_LEFT_CORNER'::text))" "??????????????????????????????? ->? Index Scan using polygon_utm_wgs84_idx on grids grd? (cost=0.02..8.37 rows=1 width=728) (actual time=1.560..259.897 rows=81964 loops=1)" "????????????????????????????????????? Index Cond: (grd.polygon_utm_wgs84 && (st_makebox3d(st_setsrid(st_makepoint(pq3.min, pq3.max, pq3.factor), 32633), st_setsrid(st_makepoint(pq4.min, pq4.max, pq4.factor), 32633)))::geometry)" "????????????????????????? ->? Index Scan using idx_segment_utm_wgs84 on routes? (cost=0.00..0.75 rows=1 width=308) (actual time=0.149..0.227 rows=3 loops=81964)" "??????????????????????????????? Index Cond: (routes.segment_utm_wgs84 && grd.polygon_utm_wgs84)" "??????????????????????????????? Filter: (routes.geo_point > 90000000)" "??????????????????? ->? Seq Scan on parameters_queries pq2? (cost=0.00..1.96 rows=1 width=8) (actual time=0.004..0.016 rows=1 loops=184769)" "????????????????????????? Filter: (((pq2.tag)::text = 'GRID02'::text) AND ((pq2.legenda)::text = 'CELL_LENGTH'::text))" "????????????? ->? Index Scan using parameters_grid_pkey on parameters_grid pgr? (cost=0.00..0.27 rows=1 width=12) (actual time=0.003..0.004 rows=1 loops=184769)" "??????????????????? Index Cond: (pgr.parameter = grd.parameter)" "Total runtime: 35254.012 ms" 35s not so fast but is still human time to wait..... Now? i want add a natural join to subquery named rou on other table rank_type that it has only 26 rows..... SELECT grd.coordinates_system ???? , polygon ???? , parameter ???? , lon_index ???? , lat_index ???? , quota_index ???? , lon_south_west ???? , lat_south_west ???? , quota_south_west ???? , lon_south_east ???? , lat_south_east ???? , quota_south_east ???? , lon_north_east ???? , lat_north_east ???? , quota_north_east ???? , lon_north_west ???? , lat_north_west ???? , quota_north_west ???? , cell ???? , COALESCE(SUM(ST_length3d(ST_INTERSECTION(segment,cell))),0)????? AS effort ???? , COALESCE(AVG(ST_length3d(ST_INTERSECTION(segment,cell))),0)????? AS effort_mean ???? , COALESCE(STDDEV(ST_length3d(ST_INTERSECTION(segment,cell))),0)?? AS effort_devstd ???? , COALESCE(VARIANCE(ST_length3d(ST_INTERSECTION(segment,cell))),0) AS effort_var from ( SELECT pq1.legenda ???? , pq2.min??????????????????????????????????? AS period_date_min ???? , pq2.max??????????????????????????????????? AS period_date_max ???? , pq3.min??????????????????????????????????? AS workstation_time_min ???? , pq3.max??????????????????????????????????? AS workstation_time_max ???? , pq4.min??????????????????????????????????? AS week_date_min ???? , pq4.max??????????????????????????????????? AS week_date_max ???? , pq5.min??????????????????????????????????? AS rank_min ???? , pq5.max??????????????????????????????????? AS rank_max ???? , pq6.min??????????????????????????????????? AS speed_min ???? , pq6.max??????????????????????????????????? AS speed_max ???? , pq7.min??????????????????????????????????? AS gps_time_min ???? , pq7.max??????????????????????????????????? AS gps_time_max ???? , pq8.min??????????????????????????????????? AS rank_type_min ???? , pq8.max??????????????????????????????????? AS rank_type_max FROM?? parameters_queries??????????????????????????? pq1 ???? , parameters_queries??????????????????????????? pq2 ???? , parameters_queries??????????????????????????? pq3 ???? , parameters_queries??????????????????????????? pq4 ???? , parameters_queries??????????????????????????? pq5 ???? , parameters_queries??????????????????????????? pq6 ???? , parameters_queries??????????????????????????? pq7 ???? , parameters_queries??????????????????????????? pq8 WHERE? pq1.tag::text?????????????????????????????? = 'COORDSYS'::text AND??? pq2.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq2.legenda::text?????????????????????????? = 'PERIOD'::text AND??? pq3.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq3.legenda::text?????????????????????????? = 'WORKSTATIONTIME'::text AND??? pq4.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq4.legenda::text?????????????????????????? = 'WEEK'::text AND??? pq5.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq5.legenda::text?????????????????????????? = 'RANK'::text AND??? pq6.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq6.legenda::text?????????????????????????? = 'SPEED'::text AND??? pq7.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq7.legenda::text?????????????????????????? = 'GPSTIME'::text AND??? pq8.tag::text?????????????????????????????? = 'ROUTES'::text AND??? pq8.legenda::text?????????????????????????? = 'RANKTYPE'::text )????? pq,??? ( SELECT routes.rank ???? , routes.period_date ???? , routes.workstation_time ???? , routes.gps_time ???? , routes.week_date ???? , routes.survey_date ???? , routes.geo_point ???? , routes.lon ???? , routes.lat ???? , routes.quota ???? , routes.y ???? , routes.x ???? , routes.z ???? , routes.speed ???? , routes.direction ???? , routes.segment_utm_wgs84??? AS segment??? FROM?? routes ???? , rank_type???????????????????????????? WHERE? routes.rank_type???????????? = rank_type.rank_type AND??? geo_point??????????????????? > 90000000 )????? rou right outer join ( SELECT pq1.legenda???????????????? AS coordinates_system ???? , polygon ???? , cell_length ???? , cells_side ???? , grd.parameter?????????????? AS parameter ???? , lon_index ???? , lat_index ???? , quota_index ???? , lon_south_west ???? , lat_south_west ???? , quota_south_west ???? , lon_south_east ???? , lat_south_east ???? , quota_south_east ???? , lon_north_east ???? , lat_north_east ???? , quota_north_east ???? , lon_north_west ???? , lat_north_west ???? , quota_north_west ???? , grd.polygon_utm_wgs84?????? AS cell? FROM?? delphis.grids????????????????? grd???? ???? , delphis.parameters_grid??????? pgr ???? , delphis.parameters_queries???? pq1 ???? , delphis.parameters_queries???? pq2 ???? , delphis.parameters_queries???? pq3 ???? , delphis.parameters_queries???? pq4 WHERE? pq1.tag::text?????????????? = 'COORDSYS'::text AND??? pq2.tag::text?????????????? = 'GRID02'::text AND??? pq2.legenda::text?????????? = 'CELL_LENGTH'::text AND??? pq3.tag::text?????????????? = 'GRID02'::text AND??? pq3.legenda::text?????????? = 'LOW_LEFT_CORNER'::text AND??? pq4.tag::text?????????????? = 'GRID02'::text AND??? pq4.legenda::text?????????? = 'HIGH_RIGHT_CORNER'::text AND??? pgr.cell_length???????????? = pq2.min AND??? grd.parameter?????????????? = pgr.parameter AND??? grd.polygon_utm_wgs84?????? && ST_MAKEBOX3D(ST_SETSRID(ST_MAKEPOINT(pq3.min,pq3.max,pq3.factor),32633) ????????????????????????????????????????????????? ,ST_SETSRID(ST_MAKEPOINT(pq4.min,pq4.max,pq4.factor),32633) ????????????????????????????????????????????????? )??????????????????????????????? )????? grd ON???? ST_INTERSECTS(segment,cell) GROUP BY???? grd.coordinates_system ???? , polygon ???? , cell_length ???? , cells_side ???? , parameter ???? , lon_index ???? , lat_index ???? , quota_index ???? , lon_south_west ???? , lat_south_west ???? , quota_south_west ???? , lon_south_east ???? , lat_south_east ???? , quota_south_east ???? , lon_north_east ???? , lat_north_east ???? , quota_north_east ???? , lon_north_west ???? , lat_north_west ???? , quota_north_west ???? , cell ORDER BY???? polygon; ? So this is the explain plan: "GroupAggregate? (cost=14064.20..14065.30 rows=1 width=1054) (actual time=8239531.621..8247508.994 rows=8281 loops=1)" "? ->? Sort? (cost=14064.20..14064.21 rows=1 width=1054) (actual time=8239531.566..8239600.772 rows=30857 loops=1)" "??????? Sort Key: grd.polygon, pq1.legenda, pgr.cell_length, pgr.cells_side, grd.parameter, grd.lon_index, grd.lat_index, grd.quota_index, grd.lon_south_west, grd.lat_south_west, grd.quota_south_west, grd.lon_south_east, grd.lat_south_east, grd.quota_south_east, grd.lon_north_east, grd.lat_north_east, grd.quota_north_east, grd.lon_north_west, grd.lat_north_west, grd.quota_north_west, grd.polygon_utm_wgs84" "??????? Sort Method:? external merge? Disk: 10824kB" "??????? ->? Nested Loop? (cost=683.79..14064.19 rows=1 width=1054) (actual time=48511.602..8238741.620 rows=30857 loops=1)" "????????????? ->? Nested Loop? (cost=0.00..15.59 rows=1 width=0) (actual time=0.254..0.346 rows=1 loops=1)" "??????????????????? ->? Nested Loop? (cost=0.00..13.78 rows=1 width=0) (actual time=0.234..0.312 rows=1 loops=1)" "????????????????????????? ->? Nested Loop? (cost=0.00..11.81 rows=1 width=0) (actual time=0.209..0.273 rows=1 loops=1)" "??????????????????????????????? ->? Nested Loop? (cost=0.00..9.84 rows=1 width=0) (actual time=0.193..0.239 rows=1 loops=1)" "????????????????????????????????????? ->? Nested Loop? (cost=0.00..7.87 rows=1 width=0) (actual time=0.152..0.193 rows=1 loops=1)" "??????????????????????????????????????????? ->? Nested Loop? (cost=0.00..5.90 rows=1 width=0) (actual time=0.127..0.154 rows=1 loops=1)" "????????????????????????????????????????????????? ->? Nested Loop? (cost=0.00..3.93 rows=1 width=0) (actual time=0.086..0.106 rows=1 loops=1)" "??????????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq2? (cost=0.00..1.96 rows=1 width=0) (actual time=0.056..0.063 rows=1 loops=1)" "????????????????????????????????????????????????????????????? Filter: (((tag)::text = 'ROUTES'::text) AND ((legenda)::text = 'PERIOD'::text))" "??????????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq8? (cost=0.00..1.96 rows=1 width=0) (actual time=0.021..0.031 rows=1 loops=1)" "????????????????????????????????????????????????????????????? Filter: (((pq8.tag)::text = 'ROUTES'::text) AND ((pq8.legenda)::text = 'RANKTYPE'::text))" "????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq7? (cost=0.00..1.96 rows=1 width=0) (actual time=0.036..0.039 rows=1 loops=1)" "??????????????????????????????????????????????????????? Filter: (((pq7.tag)::text = 'ROUTES'::text) AND ((pq7.legenda)::text = 'GPSTIME'::text))" "??????????????????????????????????????????? ->? Seq Scan on parameters_queries pq6? (cost=0.00..1.96 rows=1 width=0) (actual time=0.021..0.030 rows=1 loops=1)" "????????????????????????????????????????????????? Filter: (((pq6.tag)::text = 'ROUTES'::text) AND ((pq6.legenda)::text = 'SPEED'::text))" "????????????????????????????????????? ->? Seq Scan on parameters_queries pq5? (cost=0.00..1.96 rows=1 width=0) (actual time=0.037..0.039 rows=1 loops=1)" "??????????????????????????????????????????? Filter: (((pq5.tag)::text = 'ROUTES'::text) AND ((pq5.legenda)::text = 'RANK'::text))" "??????????????????????????????? ->? Seq Scan on parameters_queries pq4? (cost=0.00..1.96 rows=1 width=0) (actual time=0.011..0.026 rows=1 loops=1)" "????????????????????????????????????? Filter: (((pq4.tag)::text = 'ROUTES'::text) AND ((pq4.legenda)::text = 'WEEK'::text))" "????????????????????????? ->? Seq Scan on parameters_queries pq3? (cost=0.00..1.96 rows=1 width=0) (actual time=0.019..0.029 rows=1 loops=1)" "??????????????????????????????? Filter: (((pq3.tag)::text = 'ROUTES'::text) AND ((pq3.legenda)::text = 'WORKSTATIONTIME'::text))" "??????????????????? ->? Seq Scan on parameters_queries pq1? (cost=0.00..1.80 rows=1 width=0) (actual time=0.015..0.025 rows=1 loops=1)" "????????????????????????? Filter: ((pq1.tag)::text = 'COORDSYS'::text)" "????????????? ->? Nested Loop? (cost=683.79..14048.59 rows=1 width=1054) (actual time=48511.340..8238655.685 rows=30857 loops=1)" "??????????????????? ->? Nested Loop? (cost=683.79..14046.78 rows=1 width=1044) (actual time=48511.320..8238030.935 rows=30857 loops=1)" "????????????????????????? Join Filter: (pq2.min = (pgr.cell_length)::double precision)" "????????????????????????? ->? Nested Loop? (cost=683.79..14046.50 rows=1 width=1044) (actual time=159.018..8235211.657 rows=184769 loops=1)" "??????????????????????????????? ->? Nested Loop Left Join? (cost=683.79..14044.53 rows=1 width=1036) (actual time=158.985..8229965.137 rows=184769 loops=1)" "????????????????????????????????????? Join Filter: ((routes.segment_utm_wgs84 && grd.polygon_utm_wgs84) AND _st_intersects(routes.segment_utm_wgs84, grd.polygon_utm_wgs84))" "????????????????????????????????????? ->? Nested Loop? (cost=0.02..12.33 rows=1 width=728) (actual time=0.359..849.907 rows=81964 loops=1)" "??????????????????????????????????????????? ->? Nested Loop? (cost=0.00..3.93 rows=1 width=48) (actual time=0.071..0.093 rows=1 loops=1)" "????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq3? (cost=0.00..1.96 rows=1 width=24) (actual time=0.013..0.026 rows=1 loops=1)" "??????????????????????????????????????????????????????? Filter: (((tag)::text = 'GRID02'::text) AND ((legenda)::text = 'LOW_LEFT_CORNER'::text))" "????????????????????????????????????????????????? ->? Seq Scan on parameters_queries pq4? (cost=0.00..1.96 rows=1 width=24) (actual time=0.052..0.056 rows=1 loops=1)" "??????????????????????????????????????????????????????? Filter: (((pq4.tag)::text = 'GRID02'::text) AND ((pq4.legenda)::text = 'HIGH_RIGHT_CORNER'::text))" "??????????????????????????????????????????? ->? Index Scan using polygon_utm_wgs84_idx on grids grd? (cost=0.02..8.37 rows=1 width=728) (actual time=0.233..604.400 rows=81964 loops=1)" "????????????????????????????????????????????????? Index Cond: (grd.polygon_utm_wgs84 && (st_makebox3d(st_setsrid(st_makepoint(pq3.min, pq3.max, pq3.factor), 32633), st_setsrid(st_makepoint(pq4.min, pq4.max, pq4.factor), 32633)))::geometry)" "????????????????????????????????????? ->? Hash Join? (cost=683.78..9633.75 rows=16756 width=308) (actual time=2.583..77.226 rows=17274 loops=81964)" "??????????????????????????????????????????? Hash Cond: (routes.rank_type = rank_type.rank_type)" "??????????????????????????????????????????? ->? Bitmap Heap Scan on routes? (cost=682.15..9401.72 rows=16756 width=312) (actual time=2.578..25.357 rows=17274 loops=81964)" "????????????????????????????????????????????????? Recheck Cond: (geo_point > 90000000)" "????????????????????????????????????????????????? ->? Bitmap Index Scan on routes_pkey? (cost=0.00..677.96 rows=16756 width=0) (actual time=2.388..2.388 rows=17274 loops=81964)" "??????????????????????????????????????????????????????? Index Cond: (geo_point > 90000000)" "??????????????????????????????????????????? ->? Hash? (cost=1.28..1.28 rows=28 width=4) (actual time=0.119..0.119 rows=26 loops=1)" "????????????????????????????????????????????????? ->? Seq Scan on rank_type? (cost=0.00..1.28 rows=28 width=4) (actual time=0.029..0.067 rows=26 loops=1)" "??????????????????????????????? ->? Seq Scan on parameters_queries pq2? (cost=0.00..1.96 rows=1 width=8) (actual time=0.007..0.020 rows=1 loops=184769)" "????????????????????????????????????? Filter: (((pq2.tag)::text = 'GRID02'::text) AND ((pq2.legenda)::text = 'CELL_LENGTH'::text))" "????????????????????????? ->? Index Scan using parameters_grid_pkey on parameters_grid pgr? (cost=0.00..0.27 rows=1 width=12) (actual time=0.007..0.009 rows=1 loops=184769)" "??????????????????????????????? Index Cond: (pgr.parameter = grd.parameter)" "??????????????????? ->? Seq Scan on parameters_queries pq1? (cost=0.00..1.80 rows=1 width=10) (actual time=0.006..0.015 rows=1 loops=30857)" "????????????????????????? Filter: ((pq1.tag)::text = 'COORDSYS'::text)" "Total runtime: 8247522.985 ms" ?2 hours and twenty minutes to add a simple natural join in a subquery..... Am i make a some stupid mistaken or is there some bugs ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From monteiro.s.pedro at gmail.com Mon Mar 15 10:50:20 2010 From: monteiro.s.pedro at gmail.com (Pedro Monteiro) Date: Mon, 15 Mar 2010 16:50:20 -0100 Subject: [postgis-users] Proj on centos 5.2 Message-ID: Hi, I've installed Postgis from the base repositories and when I try to run ST_Transform queries it returns this ERROR: ERROR: PostGIS transform() called, but support not compiled in. Modify your makefile to add proj support, remake and re-install Proj rpm is installed,version 4.4.8 Does anyone know the solution for this errors? Thak you in advance. Pedro -------------- next part -------------- An HTML attachment was scrubbed... URL: From pramsey at opengeo.org Mon Mar 15 10:57:54 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Mon, 15 Mar 2010 10:57:54 -0700 Subject: [postgis-users] Proj on centos 5.2 In-Reply-To: References: Message-ID: <30fe546d1003151057u1e1e332cib71bca804707b34b@mail.gmail.com> What does "from base repositories" mean? If you compiled from source, and you had proj-devel installed, it would pick up your system proj library. Perhaps you haven't installed proj-devel? P On Mon, Mar 15, 2010 at 10:50 AM, Pedro Monteiro wrote: > Hi, I've installed Postgis from the base repositories and when I try to run > ST_Transform queries it returns this ERROR: > > ERROR: PostGIS transform() called, but support not compiled in. Modify your > makefile to add proj support, remake and re-install > > Proj rpm is installed,version 4.4.8 > > Does anyone know the solution for this errors? > > Thak you in advance. > > Pedro > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > From pmoen at offroadsoftware.com Mon Mar 15 11:10:31 2010 From: pmoen at offroadsoftware.com (Paul moen) Date: Mon, 15 Mar 2010 13:10:31 -0500 Subject: [postgis-users] How to edit one point in multipolygon given dump path In-Reply-To: <20100315140645.GU62719@keybit.net> References: <181E8184-F0F1-407A-8129-DCA993278D2F@offroadsoftware.com> <20100315134016.GT62719@keybit.net> <7B4940F1-A50A-455F-BE24-6D1C3F57ECF6@offroadsoftware.com> <20100315140645.GU62719@keybit.net> Message-ID: <740D6176-0C4B-4A8A-B39B-32F9190356FD@offroadsoftware.com> If one was to try to learn how to write a c function that could eventually make it into postgis, where would one start? Are there any good books on the subject? Is it best to look at the source code? Also, how do I submit a scripting language function that I think may be useful? On Mar 15, 2010, at 9:06 AM, strk wrote: > On Mon, Mar 15, 2010 at 08:52:43AM -0500, Paul moen wrote: >> So there isn't a better way to do it? >> >> So if I write my code to do this in php it can be submitted as a >> patch? Or are you saying, learn how to program in plpgsql then >> submit >> a patch. > > A scripting language code won't be applied to core postgis. > A C function might. > Both versions you can share (the postgis wiki contains > a fair amount of scripting language functions). > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From monteiro.s.pedro at gmail.com Mon Mar 15 11:11:54 2010 From: monteiro.s.pedro at gmail.com (Pedro Monteiro) Date: Mon, 15 Mar 2010 17:11:54 -0100 Subject: [postgis-users] Proj on centos 5.2 In-Reply-To: <30fe546d1003151057u1e1e332cib71bca804707b34b@mail.gmail.com> References: <30fe546d1003151057u1e1e332cib71bca804707b34b@mail.gmail.com> Message-ID: I've not compiled it from source, Postgis it's working except functions related to proj.I 've been checking my installation and postgis was installed via yum from EPEL repositories and proj from centos base repositories. Pedro 2010/3/15 Paul Ramsey > What does "from base repositories" mean? If you compiled from source, > and you had proj-devel installed, it would pick up your system proj > library. Perhaps you haven't installed proj-devel? > > P > > On Mon, Mar 15, 2010 at 10:50 AM, Pedro Monteiro > wrote: > > Hi, I've installed Postgis from the base repositories and when I try to > run > > ST_Transform queries it returns this ERROR: > > > > ERROR: PostGIS transform() called, but support not compiled in. Modify > your > > makefile to add proj support, remake and re-install > > > > Proj rpm is installed,version 4.4.8 > > > > Does anyone know the solution for this errors? > > > > Thak you in advance. > > > > Pedro > > > > _______________________________________________ > > 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: From strk at keybit.net Mon Mar 15 11:17:11 2010 From: strk at keybit.net (strk) Date: Mon, 15 Mar 2010 19:17:11 +0100 Subject: [postgis-users] How to edit one point in multipolygon given dump path In-Reply-To: <740D6176-0C4B-4A8A-B39B-32F9190356FD@offroadsoftware.com> References: <181E8184-F0F1-407A-8129-DCA993278D2F@offroadsoftware.com> <20100315134016.GT62719@keybit.net> <7B4940F1-A50A-455F-BE24-6D1C3F57ECF6@offroadsoftware.com> <20100315140645.GU62719@keybit.net> <740D6176-0C4B-4A8A-B39B-32F9190356FD@offroadsoftware.com> Message-ID: <20100315181711.GY62719@keybit.net> On Mon, Mar 15, 2010 at 01:10:31PM -0500, Paul moen wrote: > If one was to try to learn how to write a c function that could > eventually make it into postgis, where would one start? Are there any > good books on the subject? Is it best to look at the source code? Looking at the source code is always a wonderful experience, you may want to do that. As for books there are many out there for C. A good start is this: http://en.wikipedia.org/wiki/The_C_Programming_Language_(book) > Also, how do I submit a scripting language function that I think may > be useful? Some people just add the code (when simple) on the wiki: http://trac.osgeo.org/postgis/wiki/UsersWikiMain --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From pramsey at opengeo.org Mon Mar 15 11:18:19 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Mon, 15 Mar 2010 11:18:19 -0700 Subject: [postgis-users] Proj on centos 5.2 In-Reply-To: References: <30fe546d1003151057u1e1e332cib71bca804707b34b@mail.gmail.com> Message-ID: <30fe546d1003151118m444c0961qdce234ab0343c89c@mail.gmail.com> Then the answer is as simple as the error message: whoever packaged those postgis RPMs did so without including support for proj. The RPMS from the PGDG include proj support. http://yum.pgsqlrpms.org/8.4/ On Mon, Mar 15, 2010 at 11:11 AM, Pedro Monteiro wrote: > I've not compiled it from source, Postgis it's working except functions > related to proj.I > 've been checking my installation and postgis was installed via yum from > EPEL repositories and proj from centos base repositories. > > Pedro > > 2010/3/15 Paul Ramsey >> >> What does "from base repositories" mean? If you compiled from source, >> and you had proj-devel installed, it would pick up your system proj >> library. Perhaps you haven't installed proj-devel? >> >> P >> >> On Mon, Mar 15, 2010 at 10:50 AM, Pedro Monteiro >> wrote: >> > Hi, I've installed Postgis from the base repositories and when I try to >> > run >> > ST_Transform queries it returns this ERROR: >> > >> > ERROR: PostGIS transform() called, but support not compiled in. Modify >> > your >> > makefile to add proj support, remake and re-install >> > >> > Proj rpm is installed,version 4.4.8 >> > >> > Does anyone know the solution for this errors? >> > >> > Thak you in advance. >> > >> > Pedro >> > >> > _______________________________________________ >> > 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 schmuryk at icisociety.ca Mon Mar 15 11:50:45 2010 From: schmuryk at icisociety.ca (Steffan Chmuryk) Date: Mon, 15 Mar 2010 11:50:45 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration References: <4B9A6C15.7060706@faunalia.it> <20100312163554.GT62719@keybit.net><20100312184935.GV62719@keybit.net> <30fe546d1003121052ob362d29j4a08a53295152ad8@mail.gmail.com> Message-ID: <0F5B056B5F432F4C9BF46C97DD7C161C073EC0@Suzuki.icisociety.ca> Hello, This is my first post, so please go easy ;) I have built a PostGIS/PostGres spatial database, and have successfully imported a shapefile. Now when I try to connect to the database via Udig, OpenJump, or Qgis, I the following error: Fatal: no pg_hba.conf entry for host "192.168.x.xxx", user "postgres", database "postgis1', SSL off (PSQL Exception) Now I have tried every combination of the following: * Edit pg_hba.conf so that the default 127.0.0.1/32 is replaced by the 192... ip * Add another access configuration to the file, so that the 192... ip, the postgres user, and the database are all included * Enable the SSL off configuration in the postgres.conf file, and restart the machine * I have even explored the JDBC stuff... argh! The error message in the application (Udig, OpenJump, or Qgis) does not change. But upon changing the files to reflect any of the above configurations, I am then unable to connect to the db within pgadminIII, due to an error in loading the pg_hba.conf file. Regarding the environment: * Server used to host MSSQL and SDE; * Server is Windows Server 2003 (not R2); Steffan Chmuryk Technical Services Coordinator, ICIS www.icisociety.ca Office: (250) 381-9295 Cell: (250) 516-2481 From pramsey at cleverelephant.ca Mon Mar 15 12:14:57 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Mon, 15 Mar 2010 12:14:57 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration In-Reply-To: <0F5B056B5F432F4C9BF46C97DD7C161C073EC0@Suzuki.icisociety.ca> References: <4B9A6C15.7060706@faunalia.it> <20100312163554.GT62719@keybit.net> <20100312184935.GV62719@keybit.net> <30fe546d1003121052ob362d29j4a08a53295152ad8@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073EC0@Suzuki.icisociety.ca> Message-ID: <30fe546d1003151214o6d3b7e92mb316c6fe1d3a22fa@mail.gmail.com> Steffan, Leave your localhost entry in place, it's useful. Make a copy of the line and edit the copy. Change localhost to 192.168.0.0 and change 32 to 16. Ensure that listen_addresses = '*' in your postgresql.conf file. Restart the database Try again. P On Mon, Mar 15, 2010 at 11:50 AM, Steffan Chmuryk wrote: > Hello, > > This is my first post, so please go easy ;) > > I have built a PostGIS/PostGres spatial database, and have successfully > imported a shapefile. Now when I try to connect to the database via > Udig, OpenJump, or Qgis, I the following error: > > Fatal: no pg_hba.conf entry for host "192.168.x.xxx", user "postgres", > database "postgis1', SSL off (PSQL Exception) > > Now I have tried every combination of the following: > > * Edit pg_hba.conf so that the default 127.0.0.1/32 is replaced by the > 192... ip > * Add another access configuration to the file, so that the 192... ip, > the postgres user, and the database are all included > * Enable the SSL off configuration in the postgres.conf file, and > restart the machine > * I have even explored the JDBC stuff... argh! > > The error message in the application (Udig, OpenJump, or Qgis) does not > change. But upon changing the files to reflect any of the above > configurations, I am then unable to connect to the db within pgadminIII, > due to an error in loading the pg_hba.conf file. > > > Regarding the environment: > * Server used to host MSSQL and SDE; > * Server is Windows Server 2003 (not R2); > > > Steffan Chmuryk > Technical Services Coordinator, ICIS > www.icisociety.ca > > Office: ? (250) 381-9295 > Cell: ? ? (250) 516-2481 > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From devrim at gunduz.org Mon Mar 15 12:57:02 2010 From: devrim at gunduz.org (Devrim =?ISO-8859-1?Q?G=DCND=DCZ?=) Date: Mon, 15 Mar 2010 21:57:02 +0200 Subject: [postgis-users] Proj on centos 5.2 In-Reply-To: References: Message-ID: <1268683022.2277.4.camel@hp-laptop2.gunduz.org> On Mon, 2010-03-15 at 16:50 -0100, Pedro Monteiro wrote: > Hi, I've installed Postgis from the base repositories and when I try > to run > ST_Transform queries it returns this ERROR: > > ERROR: PostGIS transform() called, but support not compiled in. Modify > your > makefile to add proj support, remake and re-install > > Proj rpm is installed,version 4.4.8 Umm, IIRC proj 4.4.8 is not shipped in any CentOS or EPEL repositories You may want to switch using http://yum.pgrpms.org -- it has better integration, and has more up2date packages. Regards, -- Devrim G?ND?Z PostgreSQL Dan??man?/Consultant, Red Hat Certified Engineer PostgreSQL RPM Repository: http://yum.pgrpms.org Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: From schmuryk at icisociety.ca Mon Mar 15 17:30:58 2010 From: schmuryk at icisociety.ca (Steffan Chmuryk) Date: Mon, 15 Mar 2010 17:30:58 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration References: <4B9A6C15.7060706@faunalia.it> <20100312163554.GT62719@keybit.net><20100312184935.GV62719@keybit.net><30fe546d1003121052ob362d29j4a08a53295152ad8@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073EC0@Suzuki.icisociety.ca> <30fe546d1003151214o6d3b7e92mb316c6fe1d3a22fa@mail.gmail.com> Message-ID: <0F5B056B5F432F4C9BF46C97DD7C161C073ED9@Suzuki.icisociety.ca> Thanks, So now, I have set up the connection, and have tried to connect via all three applications. Here are the errors: * Udig will connect, and seems to load the data, but then gives this message: RenderingException(s) occurred during rendering: Must call hasNext before calling next *Seems to be a java error. * OpenJump connects to the db, but gives this message: Error: syntax error at or near "ST_GeomFromText" (PSQL Exception) *Seems to require a plugin. * QGIS seems to work fine. More to come... Steffan Chmuryk Technical Services Coordinator, ICIS www.icisociety.ca Office: (250) 381-9295 Cell: (250) 516-2481 -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey Sent: Monday, March 15, 2010 12:15 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] PostGIS/PostGres Configuration Steffan, Leave your localhost entry in place, it's useful. Make a copy of the line and edit the copy. Change localhost to 192.168.0.0 and change 32 to 16. Ensure that listen_addresses = '*' in your postgresql.conf file. Restart the database Try again. P On Mon, Mar 15, 2010 at 11:50 AM, Steffan Chmuryk wrote: > Hello, > > This is my first post, so please go easy ;) > > I have built a PostGIS/PostGres spatial database, and have successfully > imported a shapefile. Now when I try to connect to the database via > Udig, OpenJump, or Qgis, I the following error: > > Fatal: no pg_hba.conf entry for host "192.168.x.xxx", user "postgres", > database "postgis1', SSL off (PSQL Exception) > > Now I have tried every combination of the following: > > * Edit pg_hba.conf so that the default 127.0.0.1/32 is replaced by the > 192... ip > * Add another access configuration to the file, so that the 192... ip, > the postgres user, and the database are all included > * Enable the SSL off configuration in the postgres.conf file, and > restart the machine > * I have even explored the JDBC stuff... argh! > > The error message in the application (Udig, OpenJump, or Qgis) does not > change. But upon changing the files to reflect any of the above > configurations, I am then unable to connect to the db within pgadminIII, > due to an error in loading the pg_hba.conf file. > > > Regarding the environment: > * Server used to host MSSQL and SDE; > * Server is Windows Server 2003 (not R2); > > > Steffan Chmuryk > Technical Services Coordinator, ICIS > www.icisociety.ca > > Office: ? (250) 381-9295 > Cell: ? ? (250) 516-2481 > _______________________________________________ > 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 00:33:00 From pramsey at cleverelephant.ca Mon Mar 15 20:38:29 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Mon, 15 Mar 2010 20:38:29 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration In-Reply-To: <0F5B056B5F432F4C9BF46C97DD7C161C073ED9@Suzuki.icisociety.ca> References: <4B9A6C15.7060706@faunalia.it> <20100312163554.GT62719@keybit.net> <20100312184935.GV62719@keybit.net> <30fe546d1003121052ob362d29j4a08a53295152ad8@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073EC0@Suzuki.icisociety.ca> <30fe546d1003151214o6d3b7e92mb316c6fe1d3a22fa@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073ED9@Suzuki.icisociety.ca> Message-ID: <30fe546d1003152038t4758a210o716e394529587a43@mail.gmail.com> >From an unrelated post on udig-devel it looks like the error you are seeing is common to the most recent 1.2M release... try backing up to the last 1.1 release and using that for PostGIS access. Also, if you're doing general desktop tests, you could try gvSIG, CadCorp SIS and (!!) MapInfo's latest release. P. On Mon, Mar 15, 2010 at 5:30 PM, Steffan Chmuryk wrote: > Thanks, > > So now, I have set up the connection, and have tried to connect via all three applications. Here are the errors: > > * Udig will connect, and seems to load the data, but then gives this message: RenderingException(s) occurred during rendering: Must call hasNext before calling next > ? ? ? ?*Seems to be a java error. > * OpenJump connects to the db, but gives this message: Error: syntax error at or near "ST_GeomFromText" (PSQL Exception) > ? ? ? ?*Seems to require a plugin. > * QGIS seems to work fine. > > More to come... > > Steffan Chmuryk > Technical Services Coordinator, ICIS > www.icisociety.ca > > Office: (250) 381-9295 > Cell: ? ? (250) 516-2481 > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey > Sent: Monday, March 15, 2010 12:15 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] PostGIS/PostGres Configuration > > Steffan, > Leave your localhost entry in place, it's useful. Make a copy of the > line and edit the copy. > Change localhost to 192.168.0.0 and change 32 to 16. > Ensure that listen_addresses = '*' in your postgresql.conf file. > Restart the database > Try again. > P > > On Mon, Mar 15, 2010 at 11:50 AM, Steffan Chmuryk > wrote: >> Hello, >> >> This is my first post, so please go easy ;) >> >> I have built a PostGIS/PostGres spatial database, and have successfully >> imported a shapefile. Now when I try to connect to the database via >> Udig, OpenJump, or Qgis, I the following error: >> >> Fatal: no pg_hba.conf entry for host "192.168.x.xxx", user "postgres", >> database "postgis1', SSL off (PSQL Exception) >> >> Now I have tried every combination of the following: >> >> * Edit pg_hba.conf so that the default 127.0.0.1/32 is replaced by the >> 192... ip >> * Add another access configuration to the file, so that the 192... ip, >> the postgres user, and the database are all included >> * Enable the SSL off configuration in the postgres.conf file, and >> restart the machine >> * I have even explored the JDBC stuff... argh! >> >> The error message in the application (Udig, OpenJump, or Qgis) does not >> change. But upon changing the files to reflect any of the above >> configurations, I am then unable to connect to the db within pgadminIII, >> due to an error in loading the pg_hba.conf file. >> >> >> Regarding the environment: >> * Server used to host MSSQL and SDE; >> * Server is Windows Server 2003 (not R2); >> >> >> Steffan Chmuryk >> Technical Services Coordinator, ICIS >> www.icisociety.ca >> >> Office: ? (250) 381-9295 >> Cell: ? ? (250) 516-2481 >> _______________________________________________ >> 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 > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 00:33:00 > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From mulone at rome.com Tue Mar 16 03:20:13 2010 From: mulone at rome.com (Mulone1) Date: Tue, 16 Mar 2010 03:20:13 -0700 (PDT) Subject: [postgis-users] OSM2pgsql, OpenStreetMap, MapServer, EPSG:900913, OpenLayers: issue Message-ID: <27915684.post@talk.nabble.com> (apologies for cross-posting) Hi everybody, I'm trying to render openstreetmap data on a WMS on MapServer. The system used to work with epsg:4326 but in our project we need a GoogleMaps like projection and we chose epsg:900913. These are the steps I followed to reimport everything for the new projection: 1) download osm xml file from Cloudmade (e.g. Italy.osm.bz2) 2) Run 900913.sql on my PostGIS 3) import that file into PostGIS with command: ./osm2pgsql -U userid -W -H host -d maps -p myprefix -S default.style -c -m italy.osm.bz2 4) At this point everything seems ok. The geometry columns have 900913 as SRID. 5) update MapFile with: WEB METADATA wms_srs "epsg:900913" ... PROJECTION "init=epsg:900913" END Then in each layer I put: PROJECTION "init=epsg:900913" END and all of the queries have: using srid=900913 6) load the wms layer into OpenLayers with var wms = new OpenLayers.Layer.WMS("OpenStreetMap", mainurl, { ... units : 'm', projection:new OpenLayers.Projection("EPSG:900913"), ... Unfortunately all I get is a grey empty image. Looking at the map server log I noticed that it's full of: [Mon Mar 15 17:49:44 2010].517000 msPostGISLayerWhichShapes query status: 2 [Mon Mar 15 17:49:44 2010].517000 msPostGISLayerWhichShapes got 0 records in result. [Mon Mar 15 17:49:44 2010].517000 msPostGISLayerNextShape called. With the other projection I was getting the records. Do you have any idea about what could be wrong in my set up? I tried to debug it in several ways but I couldn't find anything wrong. Cheers, Mulone -- View this message in context: http://old.nabble.com/OSM2pgsql%2C-OpenStreetMap%2C-MapServer%2C-EPSG%3A900913%2C-OpenLayers%3A-issue-tp27915684p27915684.html Sent from the PostGIS - User mailing list archive at Nabble.com. From monteiro.s.pedro at gmail.com Tue Mar 16 04:09:18 2010 From: monteiro.s.pedro at gmail.com (Pedro Monteiro) Date: Tue, 16 Mar 2010 10:09:18 -0100 Subject: [postgis-users] Proj on centos 5.2 In-Reply-To: <1268683022.2277.4.camel@hp-laptop2.gunduz.org> References: <1268683022.2277.4.camel@hp-laptop2.gunduz.org> Message-ID: Yes, you are right, I've been digging around and my proj is installed via rpm from remotesensing.org. Is there any tutorial that I can follow to move to http://yum.pgrpms.org/and upgrade my postgres databases. Thank you all. 2010/3/15 Devrim G?ND?Z > On Mon, 2010-03-15 at 16:50 -0100, Pedro Monteiro wrote: > > Hi, I've installed Postgis from the base repositories and when I try > > to run > > ST_Transform queries it returns this ERROR: > > > > ERROR: PostGIS transform() called, but support not compiled in. Modify > > your > > makefile to add proj support, remake and re-install > > > > Proj rpm is installed,version 4.4.8 > > Umm, IIRC proj 4.4.8 is not shipped in any CentOS or EPEL repositories > You may want to switch using http://yum.pgrpms.org -- it has better > integration, and has more up2date packages. > > Regards, > -- > Devrim G?ND?Z > PostgreSQL Dan??man?/Consultant, Red Hat Certified Engineer > PostgreSQL RPM Repository: http://yum.pgrpms.org > Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr > http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scientific1quash at gmail.com Tue Mar 16 05:31:14 2010 From: scientific1quash at gmail.com (Linnet Kwamboka) Date: Tue, 16 Mar 2010 05:31:14 -0700 Subject: [postgis-users] PostGIS with ArcGIS Desktop In-Reply-To: <30fe546d1003150817w295e9e56iae37416048e06a52@mail.gmail.com> References: <485674d61003150226q750940e6g99d6a0aaef9f4321@mail.gmail.com> <30fe546d1003150817w295e9e56iae37416048e06a52@mail.gmail.com> Message-ID: great idea on dropbox, easy solution On Mon, Mar 15, 2010 at 8:17 AM, Paul Ramsey wrote: > Put your files in a dropbox folder. > > http://dropbox.com > > On Mon, Mar 15, 2010 at 2:26 AM, Wenbert Del Rosario > wrote: > > Hello, > > I am new comer to the GIS world. I hope you will be able to help me with > my > > problem. > > But first, I have some questions: > > Will ArcMap work directly with PostGIS? If yes, what kind of data are > stored > > in PostGIS? > > Will it store all my map files(mao file containing rasters, contours, > etc) > > in the server? (No more editing local files? I am thinking of 1) Connect > to > > database 2) load data in ArcMap/AutoCAD 3) Save data ) > > Right now, my problem is that I have too many files on one machine. I > want > > everything stored in a server so that when I travel, I can just login > > and retrieve/view my files. Is PostGIS the answer? Can anyone lead me to > the > > right direction for a solution? > > Thank you very much. > > Sincerely, > > Wenbert > > _______________________________________________ > > 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 > -- With regards, Linnet Kwamboka +254733229041 site: geekmates.ning.com blog: one-kenya.blogspot.com facebook: mckenzie quamboka skype: geekmate -------------- next part -------------- An HTML attachment was scrubbed... URL: From devrim at gunduz.org Tue Mar 16 06:43:37 2010 From: devrim at gunduz.org (Devrim =?ISO-8859-1?Q?G=DCND=DCZ?=) Date: Tue, 16 Mar 2010 15:43:37 +0200 Subject: [postgis-users] Proj on centos 5.2 In-Reply-To: References: <1268683022.2277.4.camel@hp-laptop2.gunduz.org> Message-ID: <1268747017.9285.38.camel@hp-laptop2.gunduz.org> On Tue, 2010-03-16 at 10:09 -0100, Pedro Monteiro wrote: > Yes, you are right, I've been digging around and my proj is installed > via rpm from remotesensing.org. It is old, really old. > Is there any tutorial that I can follow to move to > http://yum.pgrpms.org/and upgrade my postgres databases. http://yum.pgrpms.org/howtoyum.php -HTH Regards, -- Devrim G?ND?Z PostgreSQL Dan??man?/Consultant, Red Hat Certified Engineer PostgreSQL RPM Repository: http://yum.pgrpms.org Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: From ibrahimsaricicek at gmail.com Tue Mar 16 06:44:23 2010 From: ibrahimsaricicek at gmail.com (ibrahim saricicek) Date: Tue, 16 Mar 2010 15:44:23 +0200 Subject: [postgis-users] OSM2pgsql, OpenStreetMap, MapServer, EPSG:900913, OpenLayers: issue In-Reply-To: <27915684.post@talk.nabble.com> References: <27915684.post@talk.nabble.com> Message-ID: <10c070ab1003160644i2c1a00e8t1740630202c555bc@mail.gmail.com> Hi; 1) is your osm data table in Epsg:4326 projection? if so use; "init=epsg:4326" for each layer.. 2) 'grey empty image'?? so you can get map from mapserver? right click on a tile and copy image location. Try the copied url, is there an error? Regards.. On Tue, Mar 16, 2010 at 12:20 PM, Mulone1 wrote: > > (apologies for cross-posting) > > Hi everybody, > I'm trying to render openstreetmap data on a WMS on MapServer. > The system used to work with epsg:4326 but in our project we need a > GoogleMaps like projection and we chose epsg:900913. > > These are the steps I followed to reimport everything for the new > projection: > > 1) download osm xml file from Cloudmade (e.g. Italy.osm.bz2) > 2) Run 900913.sql on my PostGIS > 3) import that file into PostGIS with command: > > ./osm2pgsql -U userid -W -H host -d maps -p myprefix -S default.style -c -m > italy.osm.bz2 > > 4) At this point everything seems ok. The geometry columns have 900913 as > SRID. > 5) update MapFile with: > > WEB > METADATA > wms_srs "epsg:900913" > ... > > PROJECTION > "init=epsg:900913" > END > > Then in each layer I put: > > PROJECTION "init=epsg:900913" END > > and all of the queries have: using srid=900913 > > 6) load the wms layer into OpenLayers > with > > var wms = new OpenLayers.Layer.WMS("OpenStreetMap", mainurl, { > ... > units : 'm', > projection:new OpenLayers.Projection("EPSG:900913"), > ... > > > > Unfortunately all I get is a grey empty image. Looking at the map server > log > I noticed that it's full of: > > [Mon Mar 15 17:49:44 2010].517000 msPostGISLayerWhichShapes query status: 2 > [Mon Mar 15 17:49:44 2010].517000 msPostGISLayerWhichShapes got 0 records > in > result. > [Mon Mar 15 17:49:44 2010].517000 msPostGISLayerNextShape called. > > > With the other projection I was getting the records. > > Do you have any idea about what could be wrong in my set up? I tried to > debug it in several ways but I couldn't find anything wrong. > > Cheers, > Mulone > -- > View this message in context: > http://old.nabble.com/OSM2pgsql%2C-OpenStreetMap%2C-MapServer%2C-EPSG%3A900913%2C-OpenLayers%3A-issue-tp27915684p27915684.html > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From loldrup at diku.dk Tue Mar 16 10:46:58 2010 From: loldrup at diku.dk (loldrup2) Date: Tue, 16 Mar 2010 10:46:58 -0700 (PDT) Subject: [postgis-users] Problem installing postgis Message-ID: <27921005.post@talk.nabble.com> Hi I just installed postgresql-8.3-postgis and postgis .DEB-packages in Ubuntu 9.10 following this guide: http://trac.osgeo.org/postgis/wiki/UsersWikiPostgisOnUbuntu Now I'm following the 'Using PostGIS'-part. Step 2 tells me to set up the PostGIS libs by entering this: psql -d mytestdb -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql It gives me a load of error messages, all like this: psql:/usr/share/postgresql-8.3-postgis/lwpostgis.sql:6531: ERROR: current transaction is aborted, commands ignored until end of transaction block finishing off with: ROLLBACK In the Linux-shell I am logged into the postgres-account. What could I be doing wrong? kind regards Jon Loldrup -- View this message in context: http://old.nabble.com/Problem-installing-postgis-tp27921005p27921005.html Sent from the PostGIS - User mailing list archive at Nabble.com. From strk at keybit.net Tue Mar 16 13:14:43 2010 From: strk at keybit.net (strk) Date: Tue, 16 Mar 2010 21:14:43 +0100 Subject: [postgis-users] Problem installing postgis In-Reply-To: <27921005.post@talk.nabble.com> References: <27921005.post@talk.nabble.com> Message-ID: <20100316201443.GF8802@keybit.net> On Tue, Mar 16, 2010 at 10:46:58AM -0700, loldrup2 wrote: > > Hi > > I just installed postgresql-8.3-postgis and postgis .DEB-packages in Ubuntu > 9.10 following this guide: > http://trac.osgeo.org/postgis/wiki/UsersWikiPostgisOnUbuntu > > Now I'm following the 'Using PostGIS'-part. Step 2 tells me to set up the > PostGIS libs by entering this: > psql -d mytestdb -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql > > It gives me a load of error messages, all like this: > psql:/usr/share/postgresql-8.3-postgis/lwpostgis.sql:6531: ERROR: current > transaction is aborted, commands ignored until end of transaction block > > finishing off with: ROLLBACK > > In the Linux-shell I am logged into the postgres-account. > What could I be doing wrong? Redirect output and error to a file and you'll see what went wrong by reading that file (first ERROR line). --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From monteiro.s.pedro at gmail.com Tue Mar 16 14:36:57 2010 From: monteiro.s.pedro at gmail.com (Pedro Monteiro) Date: Tue, 16 Mar 2010 20:36:57 -0100 Subject: [postgis-users] Proj on centos 5.2 In-Reply-To: <1268747017.9285.38.camel@hp-laptop2.gunduz.org> References: <1268683022.2277.4.camel@hp-laptop2.gunduz.org> <1268747017.9285.38.camel@hp-laptop2.gunduz.org> Message-ID: Thank you again. I've find this link, witch should be the most suited for me. :) An Almost Idiot's Guide to PostgreSQL YUM 2010/3/16 Devrim G?ND?Z > On Tue, 2010-03-16 at 10:09 -0100, Pedro Monteiro wrote: > > Yes, you are right, I've been digging around and my proj is installed > > via rpm from remotesensing.org. > > It is old, really old. > > > Is there any tutorial that I can follow to move to > > http://yum.pgrpms.org/and upgrade my postgres databases. > > http://yum.pgrpms.org/howtoyum.php > > -HTH > > Regards, > -- > Devrim G?ND?Z > PostgreSQL Dan??man?/Consultant, Red Hat Certified Engineer > PostgreSQL RPM Repository: http://yum.pgrpms.org > Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr > http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zachc1980 at gmail.com Tue Mar 16 15:16:02 2010 From: zachc1980 at gmail.com (zach cruise) Date: Tue, 16 Mar 2010 18:16:02 -0400 Subject: [postgis-users] how to contribute to development? Message-ID: i want to contribute to the development of mapserver (maybe postgis later :)). can someone break it down in simple steps? preferably what's the best way to check-out outstanding dev/bug issues, work at them, and then check them back-in for approval (without tripping over ego ;))? From schmuryk at icisociety.ca Tue Mar 16 17:15:21 2010 From: schmuryk at icisociety.ca (Steffan Chmuryk) Date: Tue, 16 Mar 2010 17:15:21 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration References: <4B9A6C15.7060706@faunalia.it> <20100312163554.GT62719@keybit.net><20100312184935.GV62719@keybit.net><30fe546d1003121052ob362d29j4a08a53295152ad8@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073EC0@Suzuki.icisociety.ca><30fe546d1003151214o6d3b7e92mb316c6fe1d3a22fa@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073ED9@Suzuki.icisociety.ca> <30fe546d1003152038t4758a210o716e394529587a43@mail.gmail.com> Message-ID: <0F5B056B5F432F4C9BF46C97DD7C161C073F04@Suzuki.icisociety.ca> Thank you for your help Paul; I have successfully loaded a dataset, a 30mb administrative boundaries file. I have also viewed this information successfully. Now I am trying to load a larger, 2gb, file. Using the shp2pgsql tool, I have encountered an error: An unhandled win32 exception occurred in shp2pgsql-gui.exe [3996]. Just-in-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. So I installed a new debugger, the WinDbg debugger, and executed it; however, now I am not getting an error message, and my data is still not being loaded to postgis/postgre. I then modified the data execution prevention to work only for windows programs. Still haven't gotten anywhere. I am using the shp2pgsql tool by itself, am I missing a step? Steffan Chmuryk Technical Services Coordinator, ICIS www.icisociety.ca Office: (250) 381-9295 Cell: (250) 516-2481 -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey Sent: Monday, March 15, 2010 8:38 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] PostGIS/PostGres Configuration >From an unrelated post on udig-devel it looks like the error you are seeing is common to the most recent 1.2M release... try backing up to the last 1.1 release and using that for PostGIS access. Also, if you're doing general desktop tests, you could try gvSIG, CadCorp SIS and (!!) MapInfo's latest release. P. On Mon, Mar 15, 2010 at 5:30 PM, Steffan Chmuryk wrote: > Thanks, > > So now, I have set up the connection, and have tried to connect via all three applications. Here are the errors: > > * Udig will connect, and seems to load the data, but then gives this message: RenderingException(s) occurred during rendering: Must call hasNext before calling next > ? ? ? ?*Seems to be a java error. > * OpenJump connects to the db, but gives this message: Error: syntax error at or near "ST_GeomFromText" (PSQL Exception) > ? ? ? ?*Seems to require a plugin. > * QGIS seems to work fine. > > More to come... > > Steffan Chmuryk > Technical Services Coordinator, ICIS > www.icisociety.ca > > Office: (250) 381-9295 > Cell: ? ? (250) 516-2481 > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey > Sent: Monday, March 15, 2010 12:15 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] PostGIS/PostGres Configuration > > Steffan, > Leave your localhost entry in place, it's useful. Make a copy of the > line and edit the copy. > Change localhost to 192.168.0.0 and change 32 to 16. > Ensure that listen_addresses = '*' in your postgresql.conf file. > Restart the database > Try again. > P > > On Mon, Mar 15, 2010 at 11:50 AM, Steffan Chmuryk > wrote: >> Hello, >> >> This is my first post, so please go easy ;) >> >> I have built a PostGIS/PostGres spatial database, and have successfully >> imported a shapefile. Now when I try to connect to the database via >> Udig, OpenJump, or Qgis, I the following error: >> >> Fatal: no pg_hba.conf entry for host "192.168.x.xxx", user "postgres", >> database "postgis1', SSL off (PSQL Exception) >> >> Now I have tried every combination of the following: >> >> * Edit pg_hba.conf so that the default 127.0.0.1/32 is replaced by the >> 192... ip >> * Add another access configuration to the file, so that the 192... ip, >> the postgres user, and the database are all included >> * Enable the SSL off configuration in the postgres.conf file, and >> restart the machine >> * I have even explored the JDBC stuff... argh! >> >> The error message in the application (Udig, OpenJump, or Qgis) does not >> change. But upon changing the files to reflect any of the above >> configurations, I am then unable to connect to the db within pgadminIII, >> due to an error in loading the pg_hba.conf file. >> >> >> Regarding the environment: >> * Server used to host MSSQL and SDE; >> * Server is Windows Server 2003 (not R2); >> >> >> Steffan Chmuryk >> Technical Services Coordinator, ICIS >> www.icisociety.ca >> >> Office: ? (250) 381-9295 >> Cell: ? ? (250) 516-2481 >> _______________________________________________ >> 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 > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 00:33:00 > _______________________________________________ > 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 From pramsey at cleverelephant.ca Tue Mar 16 17:30:36 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Tue, 16 Mar 2010 17:30:36 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration In-Reply-To: <0F5B056B5F432F4C9BF46C97DD7C161C073F04@Suzuki.icisociety.ca> References: <4B9A6C15.7060706@faunalia.it> <20100312163554.GT62719@keybit.net> <20100312184935.GV62719@keybit.net> <30fe546d1003121052ob362d29j4a08a53295152ad8@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073EC0@Suzuki.icisociety.ca> <30fe546d1003151214o6d3b7e92mb316c6fe1d3a22fa@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073ED9@Suzuki.icisociety.ca> <30fe546d1003152038t4758a210o716e394529587a43@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F04@Suzuki.icisociety.ca> Message-ID: <30fe546d1003161730n76101559pd2b222e7b280c327@mail.gmail.com> Steffan, Is your bigger file by any chance actually bigger than 2GB in any of its components? Large (>2GB) files are not currently supported in release, though we do have a patch on the issue in the tracker. P On Tue, Mar 16, 2010 at 5:15 PM, Steffan Chmuryk wrote: > Thank you for your help Paul; > > I have successfully loaded a dataset, a 30mb administrative boundaries file. I have also viewed this information successfully. Now I am trying to load a larger, 2gb, file. Using the shp2pgsql tool, I have encountered an error: > > An unhandled win32 exception occurred in shp2pgsql-gui.exe [3996]. Just-in-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. > > So I installed a new debugger, the WinDbg debugger, and executed it; however, now I am not getting an error message, and my data is still not being loaded to postgis/postgre. I then modified the data execution prevention to work only for windows programs. Still haven't gotten anywhere. > > I am using the shp2pgsql tool by itself, am I missing a step? > > Steffan Chmuryk > Technical Services Coordinator, ICIS > www.icisociety.ca > > Office: (250) 381-9295 > Cell: ? ? (250) 516-2481 > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey > Sent: Monday, March 15, 2010 8:38 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] PostGIS/PostGres Configuration > > From an unrelated post on udig-devel it looks like the error you are > seeing is common to the most recent 1.2M release... try backing up to > the last 1.1 release and using that for PostGIS access. > > Also, if you're doing general desktop tests, you could try gvSIG, > CadCorp SIS and (!!) MapInfo's latest release. > > P. > > On Mon, Mar 15, 2010 at 5:30 PM, Steffan Chmuryk wrote: >> Thanks, >> >> So now, I have set up the connection, and have tried to connect via all three applications. Here are the errors: >> >> * Udig will connect, and seems to load the data, but then gives this message: RenderingException(s) occurred during rendering: Must call hasNext before calling next >> ? ? ? ?*Seems to be a java error. >> * OpenJump connects to the db, but gives this message: Error: syntax error at or near "ST_GeomFromText" (PSQL Exception) >> ? ? ? ?*Seems to require a plugin. >> * QGIS seems to work fine. >> >> More to come... >> >> Steffan Chmuryk >> Technical Services Coordinator, ICIS >> www.icisociety.ca >> >> Office: (250) 381-9295 >> Cell: ? ? (250) 516-2481 >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >> Sent: Monday, March 15, 2010 12:15 PM >> To: PostGIS Users Discussion >> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >> >> Steffan, >> Leave your localhost entry in place, it's useful. Make a copy of the >> line and edit the copy. >> Change localhost to 192.168.0.0 and change 32 to 16. >> Ensure that listen_addresses = '*' in your postgresql.conf file. >> Restart the database >> Try again. >> P >> >> On Mon, Mar 15, 2010 at 11:50 AM, Steffan Chmuryk >> wrote: >>> Hello, >>> >>> This is my first post, so please go easy ;) >>> >>> I have built a PostGIS/PostGres spatial database, and have successfully >>> imported a shapefile. Now when I try to connect to the database via >>> Udig, OpenJump, or Qgis, I the following error: >>> >>> Fatal: no pg_hba.conf entry for host "192.168.x.xxx", user "postgres", >>> database "postgis1', SSL off (PSQL Exception) >>> >>> Now I have tried every combination of the following: >>> >>> * Edit pg_hba.conf so that the default 127.0.0.1/32 is replaced by the >>> 192... ip >>> * Add another access configuration to the file, so that the 192... ip, >>> the postgres user, and the database are all included >>> * Enable the SSL off configuration in the postgres.conf file, and >>> restart the machine >>> * I have even explored the JDBC stuff... argh! >>> >>> The error message in the application (Udig, OpenJump, or Qgis) does not >>> change. But upon changing the files to reflect any of the above >>> configurations, I am then unable to connect to the db within pgadminIII, >>> due to an error in loading the pg_hba.conf file. >>> >>> >>> Regarding the environment: >>> * Server used to host MSSQL and SDE; >>> * Server is Windows Server 2003 (not R2); >>> >>> >>> Steffan Chmuryk >>> Technical Services Coordinator, ICIS >>> www.icisociety.ca >>> >>> Office: ? (250) 381-9295 >>> Cell: ? ? (250) 516-2481 >>> _______________________________________________ >>> 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 >> >> No virus found in this incoming message. >> Checked by AVG - www.avg.com >> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 00:33:00 >> _______________________________________________ >> 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 > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From schmuryk at icisociety.ca Tue Mar 16 17:21:11 2010 From: schmuryk at icisociety.ca (Steffan Chmuryk) Date: Tue, 16 Mar 2010 17:21:11 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration References: <4B9A6C15.7060706@faunalia.it> <20100312163554.GT62719@keybit.net><20100312184935.GV62719@keybit.net><30fe546d1003121052ob362d29j4a08a53295152ad8@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073EC0@Suzuki.icisociety.ca><30fe546d1003151214o6d3b7e92mb316c6fe1d3a22fa@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073ED9@Suzuki.icisociety.ca><30fe546d1003152038t4758a210o716e394529587a43@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073F04@Suzuki.icisociety.ca> <30fe546d1003161730n76101559pd2b222e7b280c327@mail.gmail.com> Message-ID: <0F5B056B5F432F4C9BF46C97DD7C161C073F06@Suzuki.icisociety.ca> Thanks, Actually, I have been working with two datasets. One of which is 470mb total, and the other is 2.27gb total; however, both of these shapefiles encounter the same issues. The 470mb data is an addressing dataset, point based, and the 2.27gb file is a cadastre dataset, polygon based. Steffan Chmuryk Technical Services Coordinator, ICIS www.icisociety.ca Office: (250) 381-9295 Cell: (250) 516-2481 -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey Sent: Tuesday, March 16, 2010 5:31 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] PostGIS/PostGres Configuration Steffan, Is your bigger file by any chance actually bigger than 2GB in any of its components? Large (>2GB) files are not currently supported in release, though we do have a patch on the issue in the tracker. P On Tue, Mar 16, 2010 at 5:15 PM, Steffan Chmuryk wrote: > Thank you for your help Paul; > > I have successfully loaded a dataset, a 30mb administrative boundaries file. I have also viewed this information successfully. Now I am trying to load a larger, 2gb, file. Using the shp2pgsql tool, I have encountered an error: > > An unhandled win32 exception occurred in shp2pgsql-gui.exe [3996]. Just-in-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. > > So I installed a new debugger, the WinDbg debugger, and executed it; however, now I am not getting an error message, and my data is still not being loaded to postgis/postgre. I then modified the data execution prevention to work only for windows programs. Still haven't gotten anywhere. > > I am using the shp2pgsql tool by itself, am I missing a step? > > Steffan Chmuryk > Technical Services Coordinator, ICIS > www.icisociety.ca > > Office: (250) 381-9295 > Cell: ? ? (250) 516-2481 > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey > Sent: Monday, March 15, 2010 8:38 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] PostGIS/PostGres Configuration > > From an unrelated post on udig-devel it looks like the error you are > seeing is common to the most recent 1.2M release... try backing up to > the last 1.1 release and using that for PostGIS access. > > Also, if you're doing general desktop tests, you could try gvSIG, > CadCorp SIS and (!!) MapInfo's latest release. > > P. > > On Mon, Mar 15, 2010 at 5:30 PM, Steffan Chmuryk wrote: >> Thanks, >> >> So now, I have set up the connection, and have tried to connect via all three applications. Here are the errors: >> >> * Udig will connect, and seems to load the data, but then gives this message: RenderingException(s) occurred during rendering: Must call hasNext before calling next >> ? ? ? ?*Seems to be a java error. >> * OpenJump connects to the db, but gives this message: Error: syntax error at or near "ST_GeomFromText" (PSQL Exception) >> ? ? ? ?*Seems to require a plugin. >> * QGIS seems to work fine. >> >> More to come... >> >> Steffan Chmuryk >> Technical Services Coordinator, ICIS >> www.icisociety.ca >> >> Office: (250) 381-9295 >> Cell: ? ? (250) 516-2481 >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >> Sent: Monday, March 15, 2010 12:15 PM >> To: PostGIS Users Discussion >> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >> >> Steffan, >> Leave your localhost entry in place, it's useful. Make a copy of the >> line and edit the copy. >> Change localhost to 192.168.0.0 and change 32 to 16. >> Ensure that listen_addresses = '*' in your postgresql.conf file. >> Restart the database >> Try again. >> P >> >> On Mon, Mar 15, 2010 at 11:50 AM, Steffan Chmuryk >> wrote: >>> Hello, >>> >>> This is my first post, so please go easy ;) >>> >>> I have built a PostGIS/PostGres spatial database, and have successfully >>> imported a shapefile. Now when I try to connect to the database via >>> Udig, OpenJump, or Qgis, I the following error: >>> >>> Fatal: no pg_hba.conf entry for host "192.168.x.xxx", user "postgres", >>> database "postgis1', SSL off (PSQL Exception) >>> >>> Now I have tried every combination of the following: >>> >>> * Edit pg_hba.conf so that the default 127.0.0.1/32 is replaced by the >>> 192... ip >>> * Add another access configuration to the file, so that the 192... ip, >>> the postgres user, and the database are all included >>> * Enable the SSL off configuration in the postgres.conf file, and >>> restart the machine >>> * I have even explored the JDBC stuff... argh! >>> >>> The error message in the application (Udig, OpenJump, or Qgis) does not >>> change. But upon changing the files to reflect any of the above >>> configurations, I am then unable to connect to the db within pgadminIII, >>> due to an error in loading the pg_hba.conf file. >>> >>> >>> Regarding the environment: >>> * Server used to host MSSQL and SDE; >>> * Server is Windows Server 2003 (not R2); >>> >>> >>> Steffan Chmuryk >>> Technical Services Coordinator, ICIS >>> www.icisociety.ca >>> >>> Office: ? (250) 381-9295 >>> Cell: ? ? (250) 516-2481 >>> _______________________________________________ >>> 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 >> >> No virus found in this incoming message. >> Checked by AVG - www.avg.com >> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 00:33:00 >> _______________________________________________ >> 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 > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 > _______________________________________________ > 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 From pramsey at cleverelephant.ca Tue Mar 16 17:38:35 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Tue, 16 Mar 2010 17:38:35 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration In-Reply-To: <0F5B056B5F432F4C9BF46C97DD7C161C073F06@Suzuki.icisociety.ca> References: <4B9A6C15.7060706@faunalia.it> <20100312184935.GV62719@keybit.net> <30fe546d1003121052ob362d29j4a08a53295152ad8@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073EC0@Suzuki.icisociety.ca> <30fe546d1003151214o6d3b7e92mb316c6fe1d3a22fa@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073ED9@Suzuki.icisociety.ca> <30fe546d1003152038t4758a210o716e394529587a43@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F04@Suzuki.icisociety.ca> <30fe546d1003161730n76101559pd2b222e7b280c327@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F06@Suzuki.icisociety.ca> Message-ID: <30fe546d1003161738x49905149ua7a4e431d16e632b@mail.gmail.com> Steffan, could you try passing the smaller of the two datasets through the commandline shp2pgsql tool? shp2pgsql -s 3005 -D thefile.shp thetable > thefile.sql See if it goes boom... P On Tue, Mar 16, 2010 at 5:21 PM, Steffan Chmuryk wrote: > Thanks, > > Actually, I have been working with two datasets. One of which is 470mb total, and the other is 2.27gb total; however, both of these shapefiles encounter the same issues. The 470mb data is an addressing dataset, point based, and the 2.27gb file is a cadastre dataset, polygon based. > > Steffan Chmuryk > Technical Services Coordinator, ICIS > www.icisociety.ca > > Office: (250) 381-9295 > Cell: ? ? (250) 516-2481 > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey > Sent: Tuesday, March 16, 2010 5:31 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] PostGIS/PostGres Configuration > > Steffan, > Is your bigger file by any chance actually bigger than 2GB in any of > its components? Large (>2GB) files are not currently supported in > release, though we do have a patch on the issue in the tracker. > P > > On Tue, Mar 16, 2010 at 5:15 PM, Steffan Chmuryk wrote: >> Thank you for your help Paul; >> >> I have successfully loaded a dataset, a 30mb administrative boundaries file. I have also viewed this information successfully. Now I am trying to load a larger, 2gb, file. Using the shp2pgsql tool, I have encountered an error: >> >> An unhandled win32 exception occurred in shp2pgsql-gui.exe [3996]. Just-in-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. >> >> So I installed a new debugger, the WinDbg debugger, and executed it; however, now I am not getting an error message, and my data is still not being loaded to postgis/postgre. I then modified the data execution prevention to work only for windows programs. Still haven't gotten anywhere. >> >> I am using the shp2pgsql tool by itself, am I missing a step? >> >> Steffan Chmuryk >> Technical Services Coordinator, ICIS >> www.icisociety.ca >> >> Office: (250) 381-9295 >> Cell: ? ? (250) 516-2481 >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >> Sent: Monday, March 15, 2010 8:38 PM >> To: PostGIS Users Discussion >> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >> >> From an unrelated post on udig-devel it looks like the error you are >> seeing is common to the most recent 1.2M release... try backing up to >> the last 1.1 release and using that for PostGIS access. >> >> Also, if you're doing general desktop tests, you could try gvSIG, >> CadCorp SIS and (!!) MapInfo's latest release. >> >> P. >> >> On Mon, Mar 15, 2010 at 5:30 PM, Steffan Chmuryk wrote: >>> Thanks, >>> >>> So now, I have set up the connection, and have tried to connect via all three applications. Here are the errors: >>> >>> * Udig will connect, and seems to load the data, but then gives this message: RenderingException(s) occurred during rendering: Must call hasNext before calling next >>> ? ? ? ?*Seems to be a java error. >>> * OpenJump connects to the db, but gives this message: Error: syntax error at or near "ST_GeomFromText" (PSQL Exception) >>> ? ? ? ?*Seems to require a plugin. >>> * QGIS seems to work fine. >>> >>> More to come... >>> >>> Steffan Chmuryk >>> Technical Services Coordinator, ICIS >>> www.icisociety.ca >>> >>> Office: (250) 381-9295 >>> Cell: ? ? (250) 516-2481 >>> -----Original Message----- >>> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >>> Sent: Monday, March 15, 2010 12:15 PM >>> To: PostGIS Users Discussion >>> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >>> >>> Steffan, >>> Leave your localhost entry in place, it's useful. Make a copy of the >>> line and edit the copy. >>> Change localhost to 192.168.0.0 and change 32 to 16. >>> Ensure that listen_addresses = '*' in your postgresql.conf file. >>> Restart the database >>> Try again. >>> P >>> >>> On Mon, Mar 15, 2010 at 11:50 AM, Steffan Chmuryk >>> wrote: >>>> Hello, >>>> >>>> This is my first post, so please go easy ;) >>>> >>>> I have built a PostGIS/PostGres spatial database, and have successfully >>>> imported a shapefile. Now when I try to connect to the database via >>>> Udig, OpenJump, or Qgis, I the following error: >>>> >>>> Fatal: no pg_hba.conf entry for host "192.168.x.xxx", user "postgres", >>>> database "postgis1', SSL off (PSQL Exception) >>>> >>>> Now I have tried every combination of the following: >>>> >>>> * Edit pg_hba.conf so that the default 127.0.0.1/32 is replaced by the >>>> 192... ip >>>> * Add another access configuration to the file, so that the 192... ip, >>>> the postgres user, and the database are all included >>>> * Enable the SSL off configuration in the postgres.conf file, and >>>> restart the machine >>>> * I have even explored the JDBC stuff... argh! >>>> >>>> The error message in the application (Udig, OpenJump, or Qgis) does not >>>> change. But upon changing the files to reflect any of the above >>>> configurations, I am then unable to connect to the db within pgadminIII, >>>> due to an error in loading the pg_hba.conf file. >>>> >>>> >>>> Regarding the environment: >>>> * Server used to host MSSQL and SDE; >>>> * Server is Windows Server 2003 (not R2); >>>> >>>> >>>> Steffan Chmuryk >>>> Technical Services Coordinator, ICIS >>>> www.icisociety.ca >>>> >>>> Office: ? (250) 381-9295 >>>> Cell: ? ? (250) 516-2481 >>>> _______________________________________________ >>>> 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 >>> >>> No virus found in this incoming message. >>> Checked by AVG - www.avg.com >>> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 00:33:00 >>> _______________________________________________ >>> 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 >> >> No virus found in this incoming message. >> Checked by AVG - www.avg.com >> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 >> _______________________________________________ >> 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 > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From schmuryk at icisociety.ca Tue Mar 16 17:36:56 2010 From: schmuryk at icisociety.ca (Steffan Chmuryk) Date: Tue, 16 Mar 2010 17:36:56 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration References: <4B9A6C15.7060706@faunalia.it> <20100312184935.GV62719@keybit.net><30fe546d1003121052ob362d29j4a08a53295152ad8@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073EC0@Suzuki.icisociety.ca><30fe546d1003151214o6d3b7e92mb316c6fe1d3a22fa@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073ED9@Suzuki.icisociety.ca><30fe546d1003152038t4758a210o716e394529587a43@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073F04@Suzuki.icisociety.ca><30fe546d1003161730n76101559pd2b222e7b280c327@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073F06@Suzuki.icisociety.ca> <30fe546d1003161738x49905149ua7a4e431d16e632b@mail.gmail.com> Message-ID: <0F5B056B5F432F4C9BF46C97DD7C161C073F07@Suzuki.icisociety.ca> OK, not sure if I did this correctly. I used the psql console, under plugins in pgAdmin III. This is my command: Shp2pgsql -s 3005 -D CIVIC_ADDRESS.shp CIVIC_ADDRESS.dbf > CIVIC_ADDRESS.sql ... now this is where it gets amateurish... I haven't specified a directory, and I haven't created a table in pgAdmin. Steffan Chmuryk Technical Services Coordinator, ICIS www.icisociety.ca Office: (250) 381-9295 Cell: (250) 516-2481 -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey Sent: Tuesday, March 16, 2010 5:39 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] PostGIS/PostGres Configuration Steffan, could you try passing the smaller of the two datasets through the commandline shp2pgsql tool? shp2pgsql -s 3005 -D thefile.shp thetable > thefile.sql See if it goes boom... P On Tue, Mar 16, 2010 at 5:21 PM, Steffan Chmuryk wrote: > Thanks, > > Actually, I have been working with two datasets. One of which is 470mb total, and the other is 2.27gb total; however, both of these shapefiles encounter the same issues. The 470mb data is an addressing dataset, point based, and the 2.27gb file is a cadastre dataset, polygon based. > > Steffan Chmuryk > Technical Services Coordinator, ICIS > www.icisociety.ca > > Office: (250) 381-9295 > Cell: ? ? (250) 516-2481 > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey > Sent: Tuesday, March 16, 2010 5:31 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] PostGIS/PostGres Configuration > > Steffan, > Is your bigger file by any chance actually bigger than 2GB in any of > its components? Large (>2GB) files are not currently supported in > release, though we do have a patch on the issue in the tracker. > P > > On Tue, Mar 16, 2010 at 5:15 PM, Steffan Chmuryk wrote: >> Thank you for your help Paul; >> >> I have successfully loaded a dataset, a 30mb administrative boundaries file. I have also viewed this information successfully. Now I am trying to load a larger, 2gb, file. Using the shp2pgsql tool, I have encountered an error: >> >> An unhandled win32 exception occurred in shp2pgsql-gui.exe [3996]. Just-in-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. >> >> So I installed a new debugger, the WinDbg debugger, and executed it; however, now I am not getting an error message, and my data is still not being loaded to postgis/postgre. I then modified the data execution prevention to work only for windows programs. Still haven't gotten anywhere. >> >> I am using the shp2pgsql tool by itself, am I missing a step? >> >> Steffan Chmuryk >> Technical Services Coordinator, ICIS >> www.icisociety.ca >> >> Office: (250) 381-9295 >> Cell: ? ? (250) 516-2481 >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >> Sent: Monday, March 15, 2010 8:38 PM >> To: PostGIS Users Discussion >> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >> >> From an unrelated post on udig-devel it looks like the error you are >> seeing is common to the most recent 1.2M release... try backing up to >> the last 1.1 release and using that for PostGIS access. >> >> Also, if you're doing general desktop tests, you could try gvSIG, >> CadCorp SIS and (!!) MapInfo's latest release. >> >> P. >> >> On Mon, Mar 15, 2010 at 5:30 PM, Steffan Chmuryk wrote: >>> Thanks, >>> >>> So now, I have set up the connection, and have tried to connect via all three applications. Here are the errors: >>> >>> * Udig will connect, and seems to load the data, but then gives this message: RenderingException(s) occurred during rendering: Must call hasNext before calling next >>> ? ? ? ?*Seems to be a java error. >>> * OpenJump connects to the db, but gives this message: Error: syntax error at or near "ST_GeomFromText" (PSQL Exception) >>> ? ? ? ?*Seems to require a plugin. >>> * QGIS seems to work fine. >>> >>> More to come... >>> >>> Steffan Chmuryk >>> Technical Services Coordinator, ICIS >>> www.icisociety.ca >>> >>> Office: (250) 381-9295 >>> Cell: ? ? (250) 516-2481 >>> -----Original Message----- >>> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >>> Sent: Monday, March 15, 2010 12:15 PM >>> To: PostGIS Users Discussion >>> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >>> >>> Steffan, >>> Leave your localhost entry in place, it's useful. Make a copy of the >>> line and edit the copy. >>> Change localhost to 192.168.0.0 and change 32 to 16. >>> Ensure that listen_addresses = '*' in your postgresql.conf file. >>> Restart the database >>> Try again. >>> P >>> >>> On Mon, Mar 15, 2010 at 11:50 AM, Steffan Chmuryk >>> wrote: >>>> Hello, >>>> >>>> This is my first post, so please go easy ;) >>>> >>>> I have built a PostGIS/PostGres spatial database, and have successfully >>>> imported a shapefile. Now when I try to connect to the database via >>>> Udig, OpenJump, or Qgis, I the following error: >>>> >>>> Fatal: no pg_hba.conf entry for host "192.168.x.xxx", user "postgres", >>>> database "postgis1', SSL off (PSQL Exception) >>>> >>>> Now I have tried every combination of the following: >>>> >>>> * Edit pg_hba.conf so that the default 127.0.0.1/32 is replaced by the >>>> 192... ip >>>> * Add another access configuration to the file, so that the 192... ip, >>>> the postgres user, and the database are all included >>>> * Enable the SSL off configuration in the postgres.conf file, and >>>> restart the machine >>>> * I have even explored the JDBC stuff... argh! >>>> >>>> The error message in the application (Udig, OpenJump, or Qgis) does not >>>> change. But upon changing the files to reflect any of the above >>>> configurations, I am then unable to connect to the db within pgadminIII, >>>> due to an error in loading the pg_hba.conf file. >>>> >>>> >>>> Regarding the environment: >>>> * Server used to host MSSQL and SDE; >>>> * Server is Windows Server 2003 (not R2); >>>> >>>> >>>> Steffan Chmuryk >>>> Technical Services Coordinator, ICIS >>>> www.icisociety.ca >>>> >>>> Office: ? (250) 381-9295 >>>> Cell: ? ? (250) 516-2481 >>>> _______________________________________________ >>>> 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 >>> >>> No virus found in this incoming message. >>> Checked by AVG - www.avg.com >>> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 00:33:00 >>> _______________________________________________ >>> 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 >> >> No virus found in this incoming message. >> Checked by AVG - www.avg.com >> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 >> _______________________________________________ >> 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 > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 > _______________________________________________ > 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 From pramsey at cleverelephant.ca Tue Mar 16 18:25:24 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Tue, 16 Mar 2010 18:25:24 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration In-Reply-To: <0F5B056B5F432F4C9BF46C97DD7C161C073F07@Suzuki.icisociety.ca> References: <4B9A6C15.7060706@faunalia.it> <0F5B056B5F432F4C9BF46C97DD7C161C073EC0@Suzuki.icisociety.ca> <30fe546d1003151214o6d3b7e92mb316c6fe1d3a22fa@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073ED9@Suzuki.icisociety.ca> <30fe546d1003152038t4758a210o716e394529587a43@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F04@Suzuki.icisociety.ca> <30fe546d1003161730n76101559pd2b222e7b280c327@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F06@Suzuki.icisociety.ca> <30fe546d1003161738x49905149ua7a4e431d16e632b@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F07@Suzuki.icisociety.ca> Message-ID: <30fe546d1003161825k24c699c9tf859c504035e913d@mail.gmail.com> Don't need to... run this command: Shp2pgsql -s 3005 -D CIVIC_ADDRESS.shp civic_address > CIVIC_ADDRESS.sql Then run psql -d mydatabase -f CIVIC_ADDRESS.sql Hopefully something useful happens. P On Tue, Mar 16, 2010 at 5:36 PM, Steffan Chmuryk wrote: > OK, not sure if I did this correctly. I used the psql console, under plugins in pgAdmin III. This is my command: > > Shp2pgsql -s 3005 -D CIVIC_ADDRESS.shp CIVIC_ADDRESS.dbf > CIVIC_ADDRESS.sql > > ... now this is where it gets amateurish... > > I haven't specified a directory, and I haven't created a table in pgAdmin. > > Steffan Chmuryk > Technical Services Coordinator, ICIS > www.icisociety.ca > > Office: ? (250) 381-9295 > Cell: ? ? (250) 516-2481 > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey > Sent: Tuesday, March 16, 2010 5:39 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] PostGIS/PostGres Configuration > > Steffan, could you try passing the smaller of the two datasets through > the commandline shp2pgsql tool? > > shp2pgsql -s 3005 -D thefile.shp thetable > thefile.sql > > See if it goes boom... > > P > > On Tue, Mar 16, 2010 at 5:21 PM, Steffan Chmuryk wrote: >> Thanks, >> >> Actually, I have been working with two datasets. One of which is 470mb total, and the other is 2.27gb total; however, both of these shapefiles encounter the same issues. The 470mb data is an addressing dataset, point based, and the 2.27gb file is a cadastre dataset, polygon based. >> >> Steffan Chmuryk >> Technical Services Coordinator, ICIS >> www.icisociety.ca >> >> Office: (250) 381-9295 >> Cell: ? ? (250) 516-2481 >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >> Sent: Tuesday, March 16, 2010 5:31 PM >> To: PostGIS Users Discussion >> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >> >> Steffan, >> Is your bigger file by any chance actually bigger than 2GB in any of >> its components? Large (>2GB) files are not currently supported in >> release, though we do have a patch on the issue in the tracker. >> P >> >> On Tue, Mar 16, 2010 at 5:15 PM, Steffan Chmuryk wrote: >>> Thank you for your help Paul; >>> >>> I have successfully loaded a dataset, a 30mb administrative boundaries file. I have also viewed this information successfully. Now I am trying to load a larger, 2gb, file. Using the shp2pgsql tool, I have encountered an error: >>> >>> An unhandled win32 exception occurred in shp2pgsql-gui.exe [3996]. Just-in-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. >>> >>> So I installed a new debugger, the WinDbg debugger, and executed it; however, now I am not getting an error message, and my data is still not being loaded to postgis/postgre. I then modified the data execution prevention to work only for windows programs. Still haven't gotten anywhere. >>> >>> I am using the shp2pgsql tool by itself, am I missing a step? >>> >>> Steffan Chmuryk >>> Technical Services Coordinator, ICIS >>> www.icisociety.ca >>> >>> Office: (250) 381-9295 >>> Cell: ? ? (250) 516-2481 >>> >>> -----Original Message----- >>> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >>> Sent: Monday, March 15, 2010 8:38 PM >>> To: PostGIS Users Discussion >>> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >>> >>> From an unrelated post on udig-devel it looks like the error you are >>> seeing is common to the most recent 1.2M release... try backing up to >>> the last 1.1 release and using that for PostGIS access. >>> >>> Also, if you're doing general desktop tests, you could try gvSIG, >>> CadCorp SIS and (!!) MapInfo's latest release. >>> >>> P. >>> >>> On Mon, Mar 15, 2010 at 5:30 PM, Steffan Chmuryk wrote: >>>> Thanks, >>>> >>>> So now, I have set up the connection, and have tried to connect via all three applications. Here are the errors: >>>> >>>> * Udig will connect, and seems to load the data, but then gives this message: RenderingException(s) occurred during rendering: Must call hasNext before calling next >>>> ? ? ? ?*Seems to be a java error. >>>> * OpenJump connects to the db, but gives this message: Error: syntax error at or near "ST_GeomFromText" (PSQL Exception) >>>> ? ? ? ?*Seems to require a plugin. >>>> * QGIS seems to work fine. >>>> >>>> More to come... >>>> >>>> Steffan Chmuryk >>>> Technical Services Coordinator, ICIS >>>> www.icisociety.ca >>>> >>>> Office: (250) 381-9295 >>>> Cell: ? ? (250) 516-2481 >>>> -----Original Message----- >>>> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >>>> Sent: Monday, March 15, 2010 12:15 PM >>>> To: PostGIS Users Discussion >>>> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >>>> >>>> Steffan, >>>> Leave your localhost entry in place, it's useful. Make a copy of the >>>> line and edit the copy. >>>> Change localhost to 192.168.0.0 and change 32 to 16. >>>> Ensure that listen_addresses = '*' in your postgresql.conf file. >>>> Restart the database >>>> Try again. >>>> P >>>> >>>> On Mon, Mar 15, 2010 at 11:50 AM, Steffan Chmuryk >>>> wrote: >>>>> Hello, >>>>> >>>>> This is my first post, so please go easy ;) >>>>> >>>>> I have built a PostGIS/PostGres spatial database, and have successfully >>>>> imported a shapefile. Now when I try to connect to the database via >>>>> Udig, OpenJump, or Qgis, I the following error: >>>>> >>>>> Fatal: no pg_hba.conf entry for host "192.168.x.xxx", user "postgres", >>>>> database "postgis1', SSL off (PSQL Exception) >>>>> >>>>> Now I have tried every combination of the following: >>>>> >>>>> * Edit pg_hba.conf so that the default 127.0.0.1/32 is replaced by the >>>>> 192... ip >>>>> * Add another access configuration to the file, so that the 192... ip, >>>>> the postgres user, and the database are all included >>>>> * Enable the SSL off configuration in the postgres.conf file, and >>>>> restart the machine >>>>> * I have even explored the JDBC stuff... argh! >>>>> >>>>> The error message in the application (Udig, OpenJump, or Qgis) does not >>>>> change. But upon changing the files to reflect any of the above >>>>> configurations, I am then unable to connect to the db within pgadminIII, >>>>> due to an error in loading the pg_hba.conf file. >>>>> >>>>> >>>>> Regarding the environment: >>>>> * Server used to host MSSQL and SDE; >>>>> * Server is Windows Server 2003 (not R2); >>>>> >>>>> >>>>> Steffan Chmuryk >>>>> Technical Services Coordinator, ICIS >>>>> www.icisociety.ca >>>>> >>>>> Office: ? (250) 381-9295 >>>>> Cell: ? ? (250) 516-2481 >>>>> _______________________________________________ >>>>> 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 >>>> >>>> No virus found in this incoming message. >>>> Checked by AVG - www.avg.com >>>> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 00:33:00 >>>> _______________________________________________ >>>> 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 >>> >>> No virus found in this incoming message. >>> Checked by AVG - www.avg.com >>> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 >>> _______________________________________________ >>> 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 >> >> No virus found in this incoming message. >> Checked by AVG - www.avg.com >> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 >> _______________________________________________ >> 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 > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From strk at keybit.net Tue Mar 16 23:57:50 2010 From: strk at keybit.net (strk) Date: Wed, 17 Mar 2010 07:57:50 +0100 Subject: [postgis-users] how to contribute to development? In-Reply-To: References: Message-ID: <20100317065750.GH8802@keybit.net> On Tue, Mar 16, 2010 at 06:16:02PM -0400, zach cruise wrote: > i want to contribute to the development of mapserver (maybe postgis > later :)). can someone break it down in simple steps? preferably > what's the best way to check-out outstanding dev/bug issues, work at > them, and then check them back-in for approval (without tripping over > ego ;))? See this for more informations: http://mapserver.org/development/index.html#development --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From jerry at jerrycarter.org Wed Mar 17 08:20:46 2010 From: jerry at jerrycarter.org (Jerry Carter) Date: Wed, 17 Mar 2010 11:20:46 -0400 Subject: [postgis-users] GEOS intersects() threw an error! Message-ID: According the 1.5 documentation, this is the place to report such errors. I'm using PostGIS 1.4.1 with { PostgreSQL 8.4.2, Proj.4 4.7.0, GEOS 3.2.0 }. I am happy to take further steps for debugging the issue or to upgrade PostGIS is that is believed to help. Thanks. -=- Jerry SELECT ST_Intersects('0106000020E61000002E00000001030000000100000005000000B1B10000337B63C0122217999B4434408875795FC95963C0C0A8D80632843340E93CB35FAC7563C003E4D17AECE83240EB23E07FFB8163C0DB3AEC9B4FBA3340B1B10000337B63C0122217999B44344001030000000100000004000000D3805C9F439363C04295E9770C083540C7A85B60977F63C0383DA66555B53440230D0E3F338D63C0797E0EE830953440D3805C9F439363C04295E9770C083540010300000001000000040000001427608077BF63C0FF331C630BB635400BBA5DDF1FB663C0BD1C61DF69433540F016F3E069C763C0CFAA5425857B35401427608077BF63C0FF331C630BB6354001030000000100000004000000F4CAB6DFD5EC63C0832637BDC73A364040C847402BEE63C033E267DF53DE35400832117F1CF963C0EA9693E169033640F4CAB6DFD5EC63C0832637BDC73A364001030000000100000004000000F81133801B5858C0868D6D3DEEF43A40C42DF0E16A4A58C0455B8B1F80113A407B12BD81DB5758C0000EDDE1BE333B40F81133801B5858C0868D6D3DEEF43A4001030000000100000005000000B8D06EE1351152C0935CD4FD0294444075A3D9FF802752C02E9D047D3174444065069FBFC6F651C0A57302BCA6884440E8EA41C1648252C0B4EA8E24024E4440B8D06EE1351152C0935CD4FD02944440010300000001000000040000002245217EF2A55EC089FA8CE0E73248404D619F2112985EC0E1794342DCF34740722E8BA11DB15EC0732871432D1C48402245217EF2A55EC089FA8CE0E7324840010300000001000000FD000000D93FFDE06EC357C073033A832BAD4840377CC9BDB3A557C040A79A801F5C4840F8E3BD9F9B7257C01BDCC600F74148400B51ABE0E23C57C078BED6DEA2504840BF04B43F62E456C0AF55F780C8054840CF62739F0EB656C0ED210100681F48408126471FAD5556C02C69436322FC474044A483FFBC1756C0B412099DF1264840AB6E0D3EFA3555C0288B0A5E92714740EF93943EA02355C04BFA1A7FD73A474078CB243F460855C0AAE702410344474024E2E95E1BFD54C02563F3E2320747400014BD808DE454C01957A1FE200D47404611E940E5E554C0E0A0CF7BCAE84640E69B219F9FA154C00A1DB840A3AB464033D08E9EDD8754C084E46BC04FCB45406B9C4DA05DA154C0AEE28A41224E4540BE4A36A097C954C0D9761FE428054540A487051E99AB54C030D56583B1D64440386EFD81F6BB53C05BA920415E6A4540AB4B6D81FACC53C03908D2FBB9B94540728F010199AB53C0C3D8E57C19D145401F84ACE1173353C057D96DFDD1D0454006719F206BBE52C083797C1C197E464032348ABF37E051C09671F01F018246407E50476048D251C0F926307DC0A646405F8ADAE0C6B551C043370643BA9E4640425CC89E684E51C077EC91DE1EBB4740D6869680703951C0F33F841E9C9647405DD6B000461251C0CA06F0E214AE4740A416CF7D9DF250C0895C3603898847401413F8005FF450C047C18761D6D846402B437A40AFDC50C069D9CB22F2CC4640648390600EBD50C035A5BA1E946846401DF454219F0351C0DC2299C2B02A4640FCDEF9DF060E51C0A6E1223CCF4A464012BB3EDFB61F51C0C7F8B6DD6B3F46407FB7D961792151C0D13DF95B6A1D464072918ABF363451C0D6C7F620855746401A5E083F804D51C0158BFBDB5CF74540CC47F49F7C5851C077644523610A4640EA2AC81DB66651C068AAB100EFE745407F28A3A1E66751C0C66E4D3F4E054640E8159E000E7151C004BAA79D3FE0454030141BE0E67151C0EB64F91D280A4640F413F01F057251C0C1BCA97BE5DE454041EB6221108651C0F0A2EB219CEB45406384FC3EB9B851C0975B90C4AA904540C7AAC6C1D0A551C067DBE25CB7514540D86F8221D7C251C04F360783F1244540A2CA7F01219651C0CDCB61BC50DB444001F7027E468051C0F1B34B1D12E744405EEE89E1878451C0B574A59E3506454026FEB25FC17C51C02BDD631DC3D2444020A2083E14AA51C070FFB9FEE1C14440C49B162036AD51C0A9C3ABFF52DF4440335C778184CC51C0950F74BEEEB94440EA67C79EBFC651C0AEB62F61B8E544402E4E415F6CD351C0BDDB656077D34440E244D95E00D851C025A66B7DDCED4440B1360220FDDE51C0AB27C4DE11AE444038808281DB3852C0A7353C002EA744401FD66160A18C52C00AE3BC1FC951444083E413208B8552C09DC17F402AE443408CE8DFFD8E8352C01D7A1FC260074440FE88BADE9DB252C0EA8D905F8A7F434039250C81C0E352C01B1A582395B843404F68D39FB6C252C0BE18F960293B4340D9F1D19F0DFD52C0F6742CDEA78F4240F41A1B40CFE852C0899C7F2340FA42408CF9B4DF42F952C0FB9EABFC0BF942408804D821DAF352C0B01B7B83B639434044E85E80C50153C02959A3816F1B434008C0C8BE961553C0BE11F3BC9C3E43405AFAA69EDDF852C096BC34DE8D68434014E8E63DDD0153C0BCF9CCDD6E4A434085BEA441551653C0D3DECCBEB0574340C900257FB2F552C068F319A3A3CB4340819A5621122853C0844684FCB4A243403EB5665EE71A53C0B73D6B21F42843400E903680372D53C0D902B3BDF2454340D5C26FFE351453C0E286A9A1EA04434090674D00294153C0800F073CB73F43401A497D7E295053C0F12B1B23B5314340FE5F29A2E34453C09EA6D8C15E734340713A683F615753C0DF35B5BDD02C434026CD05A1200F53C0D0AD5B3EBEF1424084A93FA1AD2053C082ED4B405ED24240854FDB1F004D53C03A603DDEF4174340A0C580C1D51253C0A002D0E1F7C742408BAA77212C2053C0DE532A83F49F42406266E93EBD4153C0E1FCE5FDCBCA424068C511A0F01253C05C91FA63AA814240E343087EBA5253C09043AAFEFCA74240C492A51FE22B53C03861B83B6099424008A31C5FDF2353C0D9C94ADED76542406CEC1CC1B9FF52C0FBA8A4620776424048280C1F3FE252C0D2CD6DC3CCE5414060F2FDA0CBFC52C01ADDDC615C5C42406B0643DFEBF252C0B8853D444F094240E7D1CAA1C90C53C02746CB439F284240F7E3AD1FE40353C0FA72BFBB8B124240DCA0B600F12453C03B9663232E01424077740D62CE3A53C0CF317F5BA5324240528C9FDE0D2F53C0B9A97D7F94F74140BDE35D80000453C0F39A3F61DAFE414017E7F41E5A0253C0A1F43D7BAFD24140850C0D01EBEF52C0E6B6E94217F14140D0D7265FE00953C0E747E23DABA941409E5C2D208D4653C0110DE6FEA4C641402FAF2B80E21D53C09A5880A271A1414066836041733353C0CDA5003E6D7B4140E158473F644853C08F8AE043D7884140DCC058822E1553C092B9D8DBAF7141406740985E725453C01411534096464140A9310C01B55B53C0A3DD14FDEB5F4140CBE584C0118153C0ECBB1B3E70F240403A974BE1C3A753C00CC39B62EDEE4040B935D57FC8D753C063A19EC06A814040E386F540E42D54C0AD1D9BC033444040D79A2B82102454C04861EDE0E52240409873137E643754C0A61C833CB4444040008DEF1FE12A54C0B670755C4D1B4040B463CB41383F54C0E7981F663BDC3F40A03C05A1765254C0B46ADB7CFDF23F402F5DE45E6E4254C05CB05359AAD03F405538DCA0945454C094B1273E16D03F40173C417EBA5254C0B6E528FA4F383F40DB11A520876754C023ECB0FB23353F40DB075A5E746C54C00183F4798F703D404D1B069EE06254C0A406B17CBA2F3D407C0CA5212C6A54C0BDBBD687CE503E40262F56421A5954C03591623DC3653E404CE0AD81DB0154C042DCE17925CE3A40CDB07501401954C04225BDFAEA2F3940D956DF418D4554C08B4929390D1E39400849D3DF5A4C54C01F0FF039EBB839402903B841C46E54C07DAD9BE202E939409BE2997FCD7E54C0425E4977330C3B400ABB6521499254C07FD63D9CFBD03A40838626C227AC54C0937FD49CE3793B40F3ABE060B79954C06C8A2B59A4F23B4052713F0198B654C0BDB697B7CEDC3B401C8EBF8169A854C08D9F61DB69E43C4082067A8132EB54C01586F33925ED3D40BDC1B421110D55C09C1F9FC09B1F3E40F12BE13ED75655C0170E5CDE25AA3D402812739E8A6355C0B4A2DEA4245D3E40B5E91E02767755C037BDBE0713503E40BBFA31DE136F55C0491F23F8C41F3E406895D65FFAA055C03A92A6833F653E40C1BED87D9D8C55C09A5A6E45A3803E40143E85FEFCCB55C0F1AB1A1A96583E407566FAE019B855C03F7BAA8291703E407F52BA7EEEC155C0BE233280AA9B3E4083D0397EF20156C075EF8A6154373E404FF8BD0159EE55C098D28AD88C453E4066D04DFE000256C065F9AD6684B03E4044C2DC5FF70856C00CBFDE682C4F3E40D9266F82825556C0649C42F83C603E4001E368DFEB7656C0275E6B7FCC003E40DF1AA3C0675B56C0C84293A5490E3E4011267E80E45556C078D2877F83C73D40E4EC06A00D7256C0F42C34A8F39A3D40574F231F914156C004F794436B373D40191D6B814F5A56C01592B1A008EB3C40EF2E3D21865156C0A71935E65D263D40BCB6C121B98C56C05BFE4FA4E5B13D40A0AD249E359156C0D83F35668A133D40C7963820769C56C028AFACA4D15A3D40555D0F81C1B856C095297538851E3D406ADC1CE03EF856C059B6573F5ED53D40F3A71EFF151257C06753689B00883D40BE0CEB5F865E57C042D967D82CC43D40676356A0ECB157C024ACA89D4D5C3D40F58B047EF39D57C0E54630172C8E3D407B4B58A0B4BD57C036FA1FDEF1B33D400A5F6E9F12B457C083AC6822215C3D402E20837F07D357C0D98CB5D89FED3C40F3801541732158C0E84EB2020A8E3C403F1126A1765858C09CC88BF802D43B40EDF8AE41716458C069C545E067D93A40632F58829F4958C06296FF5661F439401CA7859FBC8C58C0EA628B67BD0D3A40A83016DE12C758C0B9A28A45656C3A40F9FB8E7F05E158C05850B4DD26913B403407A001925959C0D6D7777AE0C43D40E961F320FAAA59C0E1E46FA071BE3D401912032249D259C08272B1DE99FA3C4091727AC0DA205AC0411DC8E0ACA23D40783D6A41013B5AC02A259244F69A3E40147A16423B9B5AC041D1DB3A7BC03F404F9249A0600D5BC045C06763D6C83F404F92CB1D610D5BC06EAA105C82553F402A1E34E1A8C45BC0F6ACA88144543F401438C5C10EB45CC09427735F523F40405144026207AE5CC08AED4ABFE85B4040A20B2E0107485DC0481EAD1BE543404031DEB4C0675E5DC05E55A25CDBA640400C56ABE073A15DC09C98755CD4034140FC4277DFEC285EC0860DF5DC55484140E842989FF6285EC02A794ABC67914140899EC940EA795EC0964855A36B274240C5AF02E26C715EC0B9C4AAFC5F684240614E1FA064A15EC0EB092A0161C44240AE5B23C1D69A5EC06EC2734195E742404593191F777F5EC0781C425E3DBB42402A62563EA5975EC02A8E69C354014340D0DE9E1E425A5EC0C585BF7F770543409F6C081E7F925EC0A2506B01A21F4340B953B020C29E5EC058BE354099E942400D0DADA190C15EC05D92254042FF4240E319791F3EBB5EC0A657217E2D1C43408DB1C221A0EE5EC056A282237B754340A4A1E01E77F65EC0B5B53FFE06EA4340D958DDE1501A5FC0C8175D84CF374440DB877E0129035FC0BBFA7FC033C44440BA444BA239245FC0D8A79E3D1C6B454041745B7FD00C5FC08FCF297EA2D545407799B17F7DFA5EC083D0CFDE29D54540E173C3E0000D5FC091CD357F9DD64540968C893FD6005FC0D735C9A3821D4740691CD8E000BA5EC04F5DD37D120A4740852C95DE11B25EC028D9B14213CD4640529A0D81FD7B5EC0B8CFBFBDB8D14640353DFA21D8A95EC0CED5EB60B9CE4640FE1D14BF38B95EC0C1565F3F4C0D4740428363816D055FC0222CAD7D4A224740A485EF6141045FC06BCCDC636E514740979429A2E3FC5EC026112DDC942F4740A6ACBBC10AF15EC02CC15C42F8564740377CD8FDE4085FC02A86923C087447407AA7CBA097F35EC00F751CFE747C4740D777BA9F0D0B5FC0AC807CE3BC7647407B30829E322E5FC0B4FC803FD5314840B41FF96061B85EC0D3632D03C9FE4740063035FE56B05EC0F33B658285124840B642BD4023A75EC0927E83DD8AF147409FFBB21E26CA5EC0F408E83C03AD4740E9426F1E09A75EC081704DC280F847400F525A7F949F5EC0E9DFE9C356C147402244A7FE6FA65EC0C32B38BBC49B4740CC4026C114A85EC080F9031EAAB447405B2F9E80AAB05EC0F8411A1D9F954740B027A84172B45EC004FBB7FDE9B34740BC034EC227C65EC01C2D0A9E199B4740B611427E45BF5EC04065FCA03E8447402A68155EB1945EC0150A706373AC47407B7CB7BEAF8A5EC00859E7C21F044840754F103EDCA05EC0FA3D2743851148403830B71E3FB05EC0E75D94E26B8048402633DB5DB0C957C0C55E165FFE7F4840D93FFDE06EC357C073033A832BAD4840010300000001000000050000000517E39EC53D66C0196947DF98F64940C92BDC9E8B3366C0257B33A2ADED4940FC18D6E0CD3C66C0EEBD09A1AECC4940AC84D360CF4666C0C976B160D5EF49400517E39EC53D66C0196947DF98F6494001030000000100000004000000BC4A9E004D2466C01A64379C10F949406DCA3BA0742466C06DA1A31FC4DA4940BB2819600D3566C0E0AC7F201DD54940BC4A9E004D2466C01A64379C10F9494001030000000100000004000000F270F8FF7B1166C0E4561B1F97FF49403379C7606B0D66C09B98CD411FDF494066D619FF8E1E66C08CBD797EDFCC4940F270F8FF7B1166C0E4561B1F97FF494001030000000100000004000000D82FE09F77B365C0B42FFFFBF2124A409EDAE7BF669E65C0C13CB91D810C4A40C4131CA04BC165C0CA3323E4EE104A40D82FE09F77B365C0B42FFFFBF2124A4001030000000100000005000000D590BD80BDC265C047ED0264C3334A40A5106D7FD4C265C0EE3A13BE670D4A40F13F2F6194EA65C0634FDF214B034A4013F82860EFCE65C0FA33AF9FD7104A40D590BD80BDC265C047ED0264C3334A4001030000000100000004000000B464AFDE689965400451A883EF804A406EBB23DFBCAD6540A17E5C5D696A4A402D7B0301588E6540326734E1FB754A40B464AFDE689965400451A883EF804A4001030000000100000004000000EF1D91202BFF64C027C2219E7AC74A4054260ABF08FB64C0D1EE01FF6DB14A40EE53CE5F9D2365C06F80C4A085694A40EF1D91202BFF64C027C2219E7AC74A400103000000010000000B0000007EF35F8007D564C0A44B21DEFC014B4099F6F83F80D364C0E17B455E2BEA4A40DC9058C090C664C07F60F35EB1F74A40DF7503E1DBD364C099928FFBF4DE4A403A0C97BFD9C864C0D5A037A1EDD74A40B1A9D64060F964C0510A3000DAA34A4025DFEFA00DDF64C09CC97D3CCCC34A40BCDAAB2039E164C0479B25DCACDA4A4008EB99E032D964C0FAAF370174D04A401C534B3FFAE464C0A074E5E1C1ED4A407EF35F8007D564C0A44B21DEFC014B40010300000001000000040000008AA21380DCBD64C058150D3EC91C4B40243364A0AEB564C06636C73C780C4B40F11A22609AC164C00E4355DC38064B408AA21380DCBD64C058150D3EC91C4B40010300000001000000050000000F2F399FA77864C06C3E8ABCDA864B4031DDE5FFEE6164C06BA3928103554B40C769407FC69A64C015E33CA198354B4070FCF8E0959164C0C7682862F4714B400F2F399FA77864C06C3E8ABCDA864B40010300000001000000040000006777739F6DA360C0D30CA602549F4B401D937E5FC89560C098A31CDBEC544B40C573922038A560C0E8595AA54A794B406777739F6DA360C0D30CA602549F4B4001030000000100000004000000CDDC629F7D7160C0610456E37FA34B404EE7339F516C60C0464A087D02814B40895617A0937460C0F346583FA6824B40CDDC629F7D7160C0610456E37FA34B40010300000001000000040000004B767460881664C07BE4AD5F3BB34B406C869860960E64C09D1AD8BD85984B40DE6EC59F301A64C0C02DC860148F4B404B767460881664C07BE4AD5F3BB34B40010300000001000000040000008B5A26BFA4B160C0D773619ECEEA4B40FB69FF1E0AAA60C0587E317F9EE54B407EDB59202DB160C0639963C248D84B408B5A26BFA4B160C0D773619ECEEA4B400103000000010000000B000000686F70FF536860C09350297E33FC4B405E847920015E60C0A7AA61C1C3CF4B4042F4F39EEF6560C0361B12FF3A984B404371C81F6A6760C088E26B2133B44B40FC60F87F6E6F60C011FF5DFE1DA64B403869709F5F6B60C0E7A333A318D34B40EDDD1FE0EF7060C0B50084E24DA54B4026CA0881AD7A60C0AAD6CF400DBA4B408C60C33EA56F60C041807362ADE44B401F52043FC07660C05A73E7E30BEB4B40686F70FF536860C09350297E33FC4B4001030000000100000004000000EFA4E720018D60C052F1D0E2302B4C4006B52F00158560C0255BD7E1FCF64B404091961FB39660C0B02BE11D660E4C40EFA4E720018D60C052F1D0E2302B4C400103000000010000001A000000185A1000DDB160C00EEEC41ECC2C4C40F6F278209EA560C012F3F6BF522A4C4047361EDF768460C003D2977C58BC4B40E81A477FF19160C05DAA8FC3E7CF4B40118F1A60C69760C0E8EE3FBD17AE4B408BA408BF328D60C0C4C66FFEE3C14B40FF2003FFF18E60C0E9FA8F3F2AA84B40F8B8C59F238360C0DB06669C45A24B40CE20F9C0098F60C03609E2BB1AA14B4062A80B3F4E8B60C07A2A789DB3904B40C0BF155FCC7F60C043080AC294A14B40CDAAEDFE1C8A60C04D51FA7C897D4B409AC0A4C0607F60C01A43943D8B844B40553E14217F8060C0749CC6FE72584B40742BF280CB8960C0BA953264C55B4B409E2546C0AA8C60C09A374480388A4B405C179A1FB19360C09354AE9DEC7B4B40789C21812C9160C05A044A1D82A34B40779491DF1D9560C03829003F50914B40F96E73BF94A760C00B01BA6123A54B407C07C380829B60C0EFF089DE16AD4B4054F4F25FF1A460C0EBD1CD9D64BC4B40BC82235FD99D60C077A95D1F5AD04B40B2646C60A4AC60C0D8AB71602DCF4B4046F53F607AA460C0166811A09BF04B40185A1000DDB160C00EEEC41ECC2C4C400103000000010000000400000079032F1F7C9D60C09DD14C3CD33A4C40B41458FFFF9460C06C007580BD234C40B7F90ADF4AA260C0F7F1FC62DF2A4C4079032F1F7C9D60C09DD14C3CD33A4C4001030000000100000004000000BF045DBFDB9C60C00979044484664C40E29BB080769160C0BAABDCA2844D4C406E8A3FC00E9A60C011C896608A3F4C40BF045DBFDB9C60C00979044484664C40010300000001000000050000005FAD2BFFE3C760C0575654A4A1774C400F51F77F50B660C0CCABF8847A4D4C40A94035C063BE60C0F8A74E225E4F4C40B9B485FF44C460C08D473BC0A7004C405FAD2BFFE3C760C0575654A4A1774C40010300000001000000070000005DC6F83E95BB60C0C22D10E3A48B4C40D8FEE17FC39F60C0865586DC06784C40A7FD98BF59A060C0FDABF682634D4C40E365FCA00DAC60C0CF6D1CBE0D6C4C40B3F3ECBE40A560C08CD1AA5BDD3A4C4076537A3F21B560C0B4D670A251384C405DC6F83E95BB60C0C22D10E3A48B4C4001030000000100000004000000A4DC9E5F012763C0380FC623B49A4C403A730060E21B63C0F81D243E6D934C403757525FAD2963C03947A804167F4C40A4DC9E5F012763C0380FC623B49A4C4001030000000100000004000000BB4A113F78F860C0C2EC8FFDB3AB4C40F857855FF3F160C0AE22D87D1B914C409746A28082FA60C02A4858BD9E7E4C40BB4A113F78F860C0C2EC8FFDB3AB4C400103000000010000000B0000004461EB405FED60C091B4C36067C74C40B8061A41EDDA60C0C603B27B58A04C409511D38093D560C0851E555EE4144C401BF8EA001FE260C0ABBC32E029454C406287D04099DA60C0ED866A1EAB5F4C4002F4D9E023E460C0F5AC46A2E84C4C4038FB911F97E060C039747A5FE4684C40E2E1435F11ED60C0E451583DD2794C405C740420F8E360C0FE48763E367E4C40A9CF28600AF660C0CAE9C1E528AD4C404461EB405FED60C091B4C36067C74C4001030000000100000021000000855D85BF922663C02D49995E5BFC4C4074F7FBE0CC1963C046589DA1E8F44C406874B9004D1B63C0AA8867FD0DDD4C40C68B0620CB0F63C0315A5FE3F7F34C40EC8D3A5FBC0E63C05BAA515F72CC4C40AFA1317F000563C0D1AC251B3BCB4C409595C7BFF60A63C077D77D3E32B64C40966DE41EA91E63C078BE977E86C24C40638121A0E81463C08DF595805CA74C40ADE0315F042563C0CDE8F3BDA5AD4C40266E1D60621E63C0CD0454C2D69F4C4082474D3F6A3163C0C317D49E7D964C40713D35605F3663C0936BB89D276D4C40822091A09F4463C0318814DF0A5F4C4087BACD1FCE3763C06E215EBDB8914C4009A42FA1E24263C0544EBEDC947B4C40DFAC3800883E63C0D025EC3E908F4C40A08A4D5F664F63C073267E043F8F4C4057A36AFF394363C028263C5D648F4C40E7951DC0D74963C0FD6EFE01796B4C40E075FCFE9D5963C012EB099F88AC4C406827167F394163C0E09B65E093D34C40D4C1391F363463C020FFED5BA3A24C40E1B1C63F113C63C0749E7BE34ED24C4087C6D3BFE53163C03FAA81237ECC4C40112EE4FEF13D63C07073D9BB84E74C400B42997F1A3463C02C6077DD03F14C40344B9E7F982F63C0F3A493A21ACF4C40A0CB1D7F632F63C0186AF17B20EC4C4009DF01E0D32563C0128FC33CE5D94C40805B1281912763C0B05C6544BCF24C4019E8113F5D2163C0DE6FA99B48E94C40855D85BF922663C02D49995E5BFC4C4001030000000100000004000000CADD4AC0702663C0352847439D0C4D402BF2EA9F671C63C096444B5D9FFE4C4050CFE220922D63C078327DA28E074D40CADD4AC0702663C0352847439D0C4D4001030000000100000015000000FD48A37F53F960C05EF8F42033244D40F4DB47C1FCEF60C0AE1651C241154D407C48583F93F960C05B47798340FD4C400AE1BCFF7BED60C0551D1B04FA114D4054FF712091DE60C0C7380F0372044D404100A7A01BDE60C00E69A3DDA2EC4C40A7EDF95F45E760C0504EC59BD3F94C4084F7F19F69E260C04F7C57BF25E34C4074C1319F09FD60C0E34197E2F3FF4C40A1DEFA7EABEE60C0EA86DD3CEBDD4C4079807EA000DE60C0F67FA3C157E14C40A104A5BFF4DB60C016CDD3BB50BB4C40E5C5BB80D9FA60C0467D133EACE24C409CD84C3FA2F160C0D9C93903EABC4C400CC62EFFC6FA60C0D0E07B9C95B14C40E19F2ADF920D61C01F70B99D27E94C40AD24B0FF350B61C018424F60D9FF4C40C0391D40D50061C0186B6700A2EB4C405A24CD405F0B61C03309C523E71B4D40AC3442FF540361C0C4317720E6074D40FD48A37F53F960C05EF8F42033244D400103000000010000000B00000021FFE1A0A9DE60C0C1D7165E48344D40271024C047D660C01D19EB5C0E144D40E5B1DBA0A9C560C0B419AF60C2134D40FA490261CDB960C0E3A827E029CD4C40C2A886FF28CA60C0A9291F7CE40B4D40EE4561BFCBBB60C0D0E7FF3C23AE4C4079306A3F5CC660C019DFA1036EB24C409F950D2096D360C065428CE176814C40FB25A36087CB60C01BB6A95FA4C64C4074916AE0A3D560C065A72D3DE7CD4C4021FFE1A0A9DE60C0C1D7165E48344D400103000000010000000A00000065019A3FE71463C065C478A1D23D4D40912DEB7F26FF62C0390677A15E1D4D403308D15F8D1163C0102C4FBEB50A4D40A586BD7F511263C0140A79BF761B4D40C4F4FBBF1F1B63C062432F7E36FF4C4076DCDDC0182763C0AA11AF40BA174D40A1747980311B63C05719A943F1134D4029646ABF4D2363C012FDA203E1214D404D7AA420661863C0C0022D61141F4D4065019A3FE71463C065C478A1D23D4D40010300000001000000040000007C76BB40701664C070735A5DBB654D40045E9C7F7D2264C0D1B3B0E1FD454D401FD78F40E22564C0998D70A0D5584D407C76BB40701664C070735A5DBB654D4001030000000100000004000000D0EA9780E86262C052DD2840E82D4E403FD4EDE0056E62C0365C21235EEF4D40D2B5AC5F017D62C0AF74A3224FE34D40D0EA9780E86262C052DD2840E82D4E4001030000000100000007000000A814979FB2C464C08FCCEA5C2B364E402CB3FC7EABB564C06DEE9A837A254E405C39E33F9FB264C01152D7005FF44D40A8916B202DC664C0927AE97E67E04D406E47435FBBEA64C0E228FBFDAA084E4090BF257F9BEE64C02203253C451B4E40A814979FB2C464C08FCCEA5C2B364E4001030000000100000004000000848F4CFFD45062C05EBDDEBCA53D4E4043AD6E5F2E4262C0A5D3A040AD324E403A0810006C5462C0D1FEF81C671D4E40848F4CFFD45062C05EBDDEBCA53D4E4001030000000100000004000000345CBBBF9E9D65C0389D405C7F4D4E40430A1B1FEF8665C0F8E9821BAD274E40EDD3DBE0B1A165C028BA6E643C3F4E40345CBBBF9E9D65C0389D405C7F4D4E4001030000000100000007000000D46459C0369D64C06849F2FDCB764E40911225A0AF8664C0568A803DCD564E40EAF079E0429764C037EF9C7D15254E401356869F7AA464C0ECC7AC0474384E40A5E00A60459F64C049AED28316454E40F3C30D8167AD64C014AB3A7CAB464E40D46459C0369D64C06849F2FDCB764E4001030000000100000004000000C086F61F774D64C0E18905FE71D14F40D00A1820774B64C04BA3953CECC44F405F730F81025764C01A980F9F6DCA4F40C086F61F774D64C0E18905FE71D14F400103000000010000000C000000292EE7FF417565C00364D79F18E44F40F5B8B940F06F65C08896EF7E34CB4F404A87A49F5C4965C02F7DDFC2B1D74F407F946A80DA4265C010B56D9B2ABC4F408FEDDA1EFE1665C056F38DC17B9D4F4049AA8B3F203865C0AE3A4A5F577A4F40676E3B7F9D5565C00BC23DE2C5B54F4042D34BE0FB6265C09AC041BE7BB64F402488FADFF04865C0A4FE97BDEA974F40C562585F585B65C0EAC4BF235BB44F4095A9A7A0827765C089D0EB5CA1AE4F40292EE7FF417565C00364D79F18E44F4001030000000100000087010000700B27C1098E63C01BD50DA022D95140358460E0999163C034E25900B0D2514000473460B47063C034FB01615FC651406429F33F497F63C00313675EA5BA51404905E780119163C01114C50021BA5140AFA7E480208063C0D513ED003EBA5140A8A8E77FA67F63C044293A7FB0AF514013C7F1FEAA7063C0071A875E31B751403A53D7BFAE6A63C0D72395615BB251401847F89EA87063C0710F3BBF68BC5140C2DE7F20016563C0E2F8A68084C7514058655F9FC26163C0190338C17BC2514006630081E76263C042F461A0CBC95140B0E4B860156263C00607DF408DC05140B8EB86A09E5E63C089F8F27EAFC7514094037D00DF5263C09207849E48C05140507835006B5863C0DD18BBBEC3B75140AA1DD99F054663C07226612014B151406DDE9900212663C0F911878128BB51404580EEDE751563C05D2A127E25AF5140E2FDF160A21663C0281787DD9BB85140549B493F220863C0EE1C7EBEC3B55140D106765F3C1263C00E375D61E5A851406DA7297F2C0263C0CA3FC1C098A45140F8848E1F251363C094422BA137A35140A73FFCDE3DF662C0C2418B5FA0A351406BAE5081BBFE62C0A752DB5E4D9B51408FE07B9F09E662C0335CBFC09996514086E4F0E015E462C06A505B80689C51406E6B9D00AFE062C0346A8CC1B48F51404E665A0035E362C0FB51FBFEA19B5140B7FB637FA9D862C0F948CB4112A05140750FAB40F0CE62C0E34CA1C1249E5140437E20DF68D762C09D60D4406D94514076D01A41EDAE62C08E46773F43A1514008C5ADBF837562C0636F14C1268D514015BA4560DE3B62C0C273D901FF8A51402E75BA7FC31E62C0668F97C0627D51407AE430C0F2E761C0217A5920DC875140445ED81FF8AB61C095B926DE9A6851405C76079F19A061C0CCB7C03F7D69514077F631E00CA061C03BEB94830C274E40C438F0BF657F61C05B0B711F38174E40A673CEBF656261C004DFAAA3122D4E4095EB96E05E6661C0BB2323E3340B4E40FED208E0703361C0DDFEE79E309F4D404AD8AB5FD53061C06F56DC8307744D407E15D7E0B01261C00C131C7C3E954D4078A46060500B61C060A2C3E1C8CC4D4042DDF6BF58EF60C0E66E6B1E28E64D403C6D821F7AE760C06489AD7C19D94D40077F767FB6DE60C02DF59922F9A34D40DBE5165F12AC60C00BD2E89E17374D40094A85DFBB7A60C067AD6201B04C4C408ABA9D40534360C00029C53EBA0F4C40F0C29E3F303F60C07101EADEF1A44B40041D323FDD5160C06882B4A34E654B4076A36780B04E60C08B62A8C207754B40B9128340EF5660C07088940255624B4096904D9FFC5760C0B4553ABF5D7B4B40720A7C20035B60C0C48834C22B624B406CFF41C0706060C0B84C449DCB7F4B4079A2C6BF2C4F60C040F525DEF5AA4B4089FB68BF5A6260C01E2B9CA161904B400D1AAD40535360C035E669E461B24B40EC08D0FFC25B60C02CFBBDDB08A84B4071174B7F9C5460C0A5A12B2135D44B40C3080EFFD65B60C075BC27DEFBC64B40F21353FF545660C0D888435F72E04B408174421FD16560C05056A5A05EF94B405DFC885FF26160C0CE33831E640A4C40884901C1FA7A60C01257B9DCFFF84B4057C1C700047F60C031CB5140B6BF4B401AB392E0068660C073B2695FEBCB4B40004135A02E7F60C0D41BA74039164C4092DF903F207060C0950CF53EBE1D4C4033C427A19B7D60C0890C0781C41D4C40559A85203A9260C09FA4F28005514C4014A715C0F28B60C08C7316DD39694C40578C46201E9960C0A36DA0C3236C4C40370AA9A0299A60C0692DE2DFCF8B4C40EFD8A47F6FB260C01516C40352974C40A6FA82A1D4A160C07DE95F424FAD4C40F760CDFF7AAE60C0CFE9FD9F26AD4C40BD6846E0A6AA60C003ABB9DC1DCC4C40D653745FF2B460C0698BE100B3DB4C4099016880689E60C0FEC16141C8C04C4002D840FFE3B260C09358893EC3F44C40A97548DF48A460C0B365AD3E4BEE4C4058D06AFFA9B660C0E6778F1C52E54C400E3D9A5F2AC060C000DFD09CB3304D40D2B3109FB6C460C0120EE5227F194D40E88A4700DDD860C0A3DCB860DF314D40BCE515C02BEB60C0DBC1FB5D45BD4D405AD7F53E41F260C00EEAFFE074A94D407076ACDFF1E260C0C803E101931E4D402C5BE8405FF060C082BCD21DB6414D4084DD454038EF60C0B7E0E43EDD2F4D4095C031A077FD60C036DFEE5F99304D4090B5F73FE50261C0426E4EC148684D40074A6B1FD1F860C0325A18BE2C724D40AB2FB4BFCB0561C08734CC5CBE844D40922B5C1FD10761C0277F94E2F55F4D40A2F71521652161C0AE2C5E619C884D400C71F7E0A32461C09F6AAC7D146A4D4024174EE0E01161C0076B6EBFE0694D40BD97F8BE951161C07CA4561C8E4D4D401237359F260261C017C9281D823B4D400A2A1820920861C00EF062FB4C284D40CE9806C00E1161C074CC0022DA394D40BFA31C7FAB0B61C0BBF3D2007C264D40B18F51FF8B1561C0210BE1FCF21A4D40361B6380E94E61C0520C104290984D40EDC0E1FF607B61C052B5931C73C34D402D59629F6F6F61C00D3D9D9CB9FE4D4088E5325F596961C017AC8764FFC74D40F6E418A0A16961C04067951EEEE94D401BFFE83EC15C61C0E36E4B2229E64D40585773A0567061C00B2CB7A11C074E40092386FF188A61C07E8A5FDF8FD84D401659212085AE61C0085BA743F3EF4D4070DC579FDEAC61C02E17211E65114E4027C92C805EB661C0DD47998066F94D4014096A9FECD561C0A122E11DC00B4E403623D4C0170862C03B34771D12034E4081348B3F93FF61C00C30EB5D22054E402A274100250662C04D02E3C3AD1B4E40E1F677E0EC1D62C0E1EF5C9EC2244E4020FEBE1F5B1A62C0329A6EE2FC4E4E4073DDE53F732A62C01AE36E1D102B4E40A434DFC08B3E62C0EFC1B2A4673B4E40F3497BFF0C3462C0FF8B423EFC554E4085A16800F74762C0E4970AE11E504E4010AF195F4B4162C0E16AE0E24E664E40988760A0BB5462C0398894C1D6574E4099AE63BF854162C0AA630822DE694E404602A7BF5A5762C0834DBCE0C6744E40EC9D1CDFBC4962C0D91472DDB2904E4026D83D1F196C62C0C757D243B96F4E4013CD93408D7162C044102CDEF5924E40273829E1DB7B62C01F635E9E206A4E4087C25EBFBF7662C0E4EF6B7CE9A24E40DD2B57A0E88162C0DE35641C6E804E40D29541E0C38C62C066287A7D11874E4075A569DF108562C09225480176884E40D89934FFC88A62C0D868080450674E40C2017C00A69662C0436E987DA3644E40C292F85F468E62C0B46B0842E6654E40D803F3A09E9562C0F890A4BB88534E405217A0E0068C62C07471122211634E40649408A0788D62C0D29A8C7DAD4E4E40D6208D20578762C00774BE5ECC614E4083A3553F068662C0689A98A2E24E4E4096827E803D9662C0FDC7507E6B384E4041A94D3F328362C0709F04DF664C4E407834B37EAC7D62C001C8F27D69384E40621624E07C8C62C0FBF39442BE224E4061AA9A9FA38262C025032141441B4E403E9497408B8D62C0734737E49AF94D407B6B88A09EA162C0062C25DD1E074E4074DCA03F05A962C0725C9B9C40EF4D40E3D34D203DAD62C01D1B1F22740F4E40EDCCDC5FAAB062C0498647FBA1DA4D400D40F27E01B762C0EB4581A25BFA4D40ECBEF5BF90B762C0D797E33FFAD14D40DF2BDC7EF2C062C0F66C6F411BE74D406E311B9F35BE62C0D192959D75D44D40EB947E3F40CC62C0C4C5E5DC56BB4D40AC1F6DA0F4C662C0D180CF2055DD4D40770D3100ECCF62C0D9C7031D51BA4D408009F3C0DFD162C010A345FE72CC4D407DEF07A0AEDE62C0840B1E83F5984D4053593D1F99E962C0F1ED9F038AA74D402AE6D9DF46E362C0A1057443DC9B4D40B03C2E41B4F762C01116B05FC2934D401433C4FF6FFC62C0C1D0671FECB54D40DED9E97E55E962C071D4DD811BB44D40F94F611F34EE62C030B169BF7CC54D4094F1FE9EA7DD62C0526FB722F3E54D40C5D1DAFF51ED62C059A29D7CCCCC4D404034673FDCFB62C04B7A95038BE04D4095DFE88084E662C0FEAF283D3E444E40C2511BE053ED62C0267F563E515C4E40709461E07CCC62C0532CEC9F21854E40946FE040999F62C03E65DCDE14694E400929B05F57C262C0AA0DC4023E944E40ED55FE003CAC62C045B25DBD46C14E4057AF3B203DBF62C011F955BE649E4E40EA8721E0A7D262C043D68D008BAF4E402B3C4BDFF5F762C0F54842FE05774E405ABE5EC0E2F662C017817EDD5A5B4E401FA73D9F520263C061843A00BD594E405907E9E0F91163C033FF089E361D4E404164F73E412363C075F1F6BFFB234E40E38462BF2F1363C0E6207DC2990C4E40F37DE01E9A1663C0DC4E23C1F3F54D40F45BB2BF582763C0CA5CDD5B15EF4D40505D9420AD2663C05B9705A236D24D40F74CB85FBA2E63C031703B0185E54D404E9859FFA84863C0141AE41BC8914D40345ABC9F342863C01664DCA04B6D4D40DF23C600F74263C009C338FD7C3E4D40B214CE5F704A63C0AB2CFDA36A0A4D405389A07F0A5063C05B0C299E581A4D40950450E05F5263C05B3CCDE0AD024D400E679380EA6063C0983B417F0D034D402CD504FFB96963C0AE88915D0BDD4C400541549FA67363C00E7859DC3DE54C405039E13F727763C0FEB749BDB6C54C4034047A7F9A9163C0DBF0899DACA94C4054047E7F8A9163C0FD495822B97D4C40498B0FC126CD63C018D582C01D394C4045F9748006D663C03405D53B62214C409C9EB160A3C363C05B0BAD9D581E4C401E0ACDA0BACD63C07B4A332036FF4B40C07D2F1FD2D363C0C6149720B4194C40AEFA7DC054D563C09E547D4235FA4B40C8C20580DCF063C05A65C1FCF3F14B401B3E3BC029F363C07EB903BC70C84B402730C27F09FA63C0A76DCFBCDBED4B40AB534600962764C07EEF015FCCAD4B403B43F75EAE2F64C020CD3DE2C2BE4B409ED985E0A72464C083BE2F00F7C54B40613D9920903264C00CAB173D92CF4B403D241AA1F13E64C0373192FF5E8D4B403B87CCFE3A4D64C06543E83E66844B406178ECFF8A5464C030FD51410AA74B40387E69C0AA5164C09756545DEE7A4B40AA554BBFA36564C0B627D2E30E924B40475F763FE86064C009596222B9794B409D498880936B64C0AB7BA8E3A1684B4018CBFF1FD96A64C042315E5F5A8D4B40F403EB3FD84E64C0FAEABB4007B04B40362E2F80083A64C0AA641D824BF24B40D1EA395F2F1C64C0FC48C33FF2FF4B405CF09920741964C05D92277EBFDB4B401EF16CBF141964C0CD655100BBF14B40C89390DF010864C08F83E97E0DE34B40167EE41FB11264C0055FE3DD14F54B40950E4320920A64C0F9FAAAA26E264C4069E874C054DE63C0426D28DE536C4C40D87D2A60C6D363C0AE81DAC140624C4088FA8CBF67D563C0753B64C0E3844C40A7B2A540C4B963C05BB70D0208C64C403ABA0E0009B663C096EAC5FEC3AC4C40E0CD19A05BAC63C052D2D37EBAB84C407638C300E8B663C0139FFF8000D24C40AABF1A205BB363C00B2D21E1390A4D40F8DDAE9F6EA463C0FA16C7211B154D40DAC357A04BB163C0B8DBDE5F53324D40576005E043A363C0E88ADC21295A4D4080813AE0EE9263C0CE981E0550534D400562837F6FA263C0F781A662925E4D404D7F205F049463C08D0EEC0177974D40A29A6B1F98C563C092A28C5E7E4E4D40DA056C7FD4CF63C0913EA2E1CB7F4D4036A650C0E4BF63C08B55BAA078744D407A03F05FFFD063C00610BAE2BC964D40DAF00A602CDA63C0C583A641AE5D4D408D5CF15F2BE463C0D3629E82EC6D4D40A2EE526043DB63C029749A0060654D40976C126045DC63C0C4DBDCDE4B324D40D43C44DFCAF363C0B34AC401D2794D401C29234081FD63C0C579F8839C624D40AB0C3620830B64C0C72BBEFB0D894D4097B164E05D3864C0A3B2BE6292464D40849661E0B34564C090995061EF524D4093B985C06F3464C03A72FA0455664D40DDAB51DF2F3B64C03C377A0068834D40A7BE707FEF3164C00322F21BDF8D4D40542BD800743B64C0672F8E8246874D40589ED080D84164C020FB47C409A14D40ED34F3BFB93664C093BD27C360BF4D409E1857C0AA4464C08AFBAEC2031F4E409E0C0AA0934A64C0351AE720E60F4E40B7836BA0F54E64C0BFEF2C62D4244E407E1BD79F404364C01995A0BD80514E4062F4095F835664C054F80ABE98204E40B67F98C0EE5064C02F3E275C2BFE4D40F295D29F058564C04460AB015EED4D401DF415A0AF9564C009EC0EA3A6264E40071EA8400A8164C0E674CA9D5D614E4054AFB3E1857864C009A6CE3F27494E405B43F27FA86E64C0198DA4FF6F554E40D8A48EBFAF7D64C0EB5B943CAF6D4E40473E119F287164C0754FD4BED1734E4057D64BA058A464C0F14A263C0C764E40FE6DFC3EB39864C0DA170ABC378F4E40484796C0C3AB64C0240380036D994E4092F27840729664C02196777E24CF4E40D8E569FFB59C64C0CF87379F33D64E4003BFBEA0D6AF64C04722E481158A4E40942C54BFEAB864C055B0DFDC3AC24E40D3116D9F17C664C0C39F235D65CA4E40B214E5BFADC464C0297AEF9FECDC4E40C033C4C061B564C07886E7BFDDD64E409497D57F42C364C0F6628D245BE84E409A3A92A002B264C04A58A3E29CED4E404BAF720094B764C0AF1FDD5C81094F401FDB4A7FFEA164C00CA81AA274444F40E3FBCF60DB9164C04CC46E2188364F40FC66A360269C64C0766762C246644F402C7E86DFBA9064C02969F8E170634F408F68BFFF5F9B64C0A458587B936B4F40EA04983F698D64C002F887FB2E9B4F4028B1DF3F9F7764C01EF75D9C9F9B4F4054CC26203D6A64C0553000DD6F7F4F40B48DD7C00A4A64C033A259E074C54F40549767E14C4564C0DCC25DFC5EB54F40065A77DF732464C035AB652006C14F40DAF10FA1B71864C0DA52FDDF8BEC4F4024D6F63E5E2664C0465FEC21CE1A50407E400761073164C0105F051EE91A5040607061FF711964C053456F60962750406B595680C02464C06A1E16E1C13A5040A1681600431D64C06711A3202B4150407E40C89F073164C01835BCC1942F50403331E25F8F3864C01A282641FC355040866FC580E75864C0D96AE1401A155040FF58797FFF6364C088404081F32950405AC9529FB46B64C08649548084255040025F501F0A6164C04F512240AF215040A3578F5FAB6464C08361EE7DB319504027AA8880127B64C0654A408017255040F7DE926019A064C0EE5CEF41F51B5040BF04C11F88CC64C0C541366256295040E505DD60F8CB64C0D6220201943850401660628096DE64C064FEB5A1874A504071670DDFF6DA64C0F9EE57BD1F5250407D64A81F6BDC64C04404405FA3475040D77ACB6069D164C04404405FA34750405B8783003FCB64C005F05CFF9C5150402E3536DFADB464C09F0DAC7E07435040AAC847BF15AB64C07FF95260F04C5040EB27D17F35BB64C07901647F034950403A14E1DFF20365C058BF717E96695040628E3BDFC9C764C0477BF1611D8B5040DF400700ECAE64C0C77F3461E68850408C26CFDFE2BB64C0CA7407FE4F8E50406F2EF57E00B864C05068A3617494504097871FC1178C64C0A045F1408AA55040703945608B7364C0E1487DDDF0A350400AA5E560967D64C0C54595DE78A550402B2BD880917A64C0836EBB4167915040F212A720808664C0177901FE308C504080B262A0F57664C0E2886542698450404499265F594464C05387AC9E2E8550402FAF617F8D3964C0A2957F1E227E5040E34B3D006B2B64C01C6F0B5E1C91504008DF9C40FD2164C06773FFBDFD8E50403FD91321D62464C01D89C99D4C845040F9D961E07A2464C04D65C621F095504046362D81103664C0AA5D2022B39950400928FE00133D64C0C66EE33D46915040D783A0BFE64E64C0E415F0810EBD5040D23C667FD63264C0B057095FA59C5040EDD7401F7D2564C0B64B5C1F8CA2504013717D9F191964C0C661921EAD97504015154D805E0764C0EB5E1A4116995040BB90DF80820964C0103DA0FDC2A950402943717FB62F64C0AC4C47E112A2504096A98B9F4F3C64C05D34433E0BAE5040C9381C1FD33464C0EF0C40C177C1504031B22F401C7764C0E20013FF66C750408B9561FF378564C064BEB42127E85040E767335FBDDA64C0FF6110E0A81551406891ED9F4CC664C0975C81E052185140481019DFD9C664C0411BB68180385140A60A0020968A64C0031644BF153B514007377B20BB7464C0ADFFB680154651409A58C960316464C0EEDE88E036565140C561ABA0AD5F64C078A94F418B705140C8A51FDF2E3E64C091622F617793514013B7BE20AB3564C0A069BBA1FC8F5140099B91E0794364C0F3765D416D895140BAE78160B41D64C06C64BE408E925140111C35C1ED0364C0873A3BFF2EA7514006ABD9FE8FFC63C01345DCDFFDA15140561CAC3FCB0364C0FC608B613E9451409427DF4042FE63C06259B3E0FC9751408634F7A0E2F763C0E9710B61E88B5140BDB1549F41F963C0964AC5DD469F514051D4AA5F39E863C0B74637212FA15140AD9C7F80A00364C0163CAFFE6AA65140F8BB46FF36F463C0E4223CDED3B25140C15C52DF11E463C0F81707E034B851407CC6641F0AEF63C0C223E3BF66B25140C0587FFF0AE663C04031AE1FC1AB5140B2619B1FA3E163C0921F247F76B451402332395F04BA63C07A19D23F77B75140700B27C1098E63C01BD50DA022D95140', '0102000020E6100000020000006EA296E656955CC050A73CBA1180464086E464E256955CC0F19E03CB11804640') From jerry at jerrycarter.org Wed Mar 17 08:23:48 2010 From: jerry at jerrycarter.org (Jerry Carter) Date: Wed, 17 Mar 2010 11:23:48 -0400 Subject: [postgis-users] GEOS intersects() threw an error! In-Reply-To: References: Message-ID: I am aware that this geometry reports a Self-intersection according to ST_IsValidReason(). On Mar 17, 2010, at 11:20 AM, Jerry Carter wrote: > > According the 1.5 documentation, this is the place to report such errors. I'm using PostGIS 1.4.1 with { PostgreSQL 8.4.2, Proj.4 4.7.0, GEOS 3.2.0 }. I am happy to take further steps for debugging the issue or to upgrade PostGIS is that is believed to help. Thanks. > > -=- Jerry > From mwtoews at gmail.com Wed Mar 17 08:51:31 2010 From: mwtoews at gmail.com (Mike Toews) Date: Wed, 17 Mar 2010 08:51:31 -0700 Subject: [postgis-users] GEOS intersects() threw an error! In-Reply-To: References: Message-ID: <22f0a52d1003170851i58cfe350l5181d581e8c79433@mail.gmail.com> Typically, this type of geometry error is fixed using ST_Buffer(the_geom,0). So just wrap your geometry in that zero buffer, and you should get a valid geometry (in ST_IsValid) and a correct ST_Intersects result. -Mike On 17 March 2010 08:23, Jerry Carter wrote: > I am aware that this geometry reports a Self-intersection according to ST_IsValidReason(). From jerry at jerrycarter.org Wed Mar 17 08:54:53 2010 From: jerry at jerrycarter.org (Jerry Carter) Date: Wed, 17 Mar 2010 11:54:53 -0400 Subject: [postgis-users] GEOS intersects() threw an error! In-Reply-To: <22f0a52d1003170851i58cfe350l5181d581e8c79433@mail.gmail.com> References: <22f0a52d1003170851i58cfe350l5181d581e8c79433@mail.gmail.com> Message-ID: Thanks. I've already started down that path. The real issue in my mind is the error text. If GEOS throws an error, couldn't PostGIS internally run the equivalent of ST_IsValidReason() on the geometry before writing a message? Seeing 'GEOS intersects() threw an error due do an invalid geometry (self-intersection)' seems much more helpful than the current message. -=- Jerry On Mar 17, 2010, at 11:51 AM, Mike Toews wrote: > Typically, this type of geometry error is fixed using > ST_Buffer(the_geom,0). So just wrap your geometry in that zero buffer, > and you should get a valid geometry (in ST_IsValid) and a correct > ST_Intersects result. > > -Mike > > On 17 March 2010 08:23, Jerry Carter wrote: >> I am aware that this geometry reports a Self-intersection according to ST_IsValidReason(). From pramsey at opengeo.org Wed Mar 17 08:57:08 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Wed, 17 Mar 2010 08:57:08 -0700 Subject: [postgis-users] GEOS intersects() threw an error! In-Reply-To: References: <22f0a52d1003170851i58cfe350l5181d581e8c79433@mail.gmail.com> Message-ID: <30fe546d1003170857u75371574l99d3f6521efeb352@mail.gmail.com> Very reasonable... ticket that as an enhancement please! http://trac.osgeo.org/postgis p On Wed, Mar 17, 2010 at 8:54 AM, Jerry Carter wrote: > Thanks. ?I've already started down that path. > > The real issue in my mind is the error text. ?If GEOS throws an error, couldn't PostGIS internally run the equivalent of ST_IsValidReason() on the geometry before writing a message? ?Seeing 'GEOS intersects() threw an error due do an invalid geometry (self-intersection)' seems much more helpful than the current message. > > -=- Jerry > > > On Mar 17, 2010, at 11:51 AM, Mike Toews wrote: > >> Typically, this type of geometry error is fixed using >> ST_Buffer(the_geom,0). So just wrap your geometry in that zero buffer, >> and you should get a valid geometry (in ST_IsValid) and a correct >> ST_Intersects result. >> >> -Mike >> >> On 17 March 2010 08:23, Jerry Carter wrote: >>> I am aware that this geometry reports a Self-intersection according to ST_IsValidReason(). > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From chris.hermansen at timberline.ca Wed Mar 17 08:59:42 2010 From: chris.hermansen at timberline.ca (Chris Hermansen) Date: Wed, 17 Mar 2010 15:59:42 +0000 Subject: [postgis-users] GEOS intersects() threw an error! Message-ID: <524667179-1268841536-cardhu_decombobulator_blackberry.rim.net-1239520755-@bda2367.bisx.prod.on.blackberry> Hey Jerry; Next you'll be wanting the error detection process to tell you which features are involved, and the coordinates of the error :-) :-) :-) ------Original Message------ From: Jerry Carter Sender: postgis-users-bounces at postgis.refractions.net To: Mike Toews Cc: PostGIS Users Discussion ReplyTo: PostGIS Users Discussion Subject: Re: [postgis-users] GEOS intersects() threw an error! Sent: Mar 17, 2010 08:54 Thanks. I've already started down that path. The real issue in my mind is the error text. If GEOS throws an error, couldn't PostGIS internally run the equivalent of ST_IsValidReason() on the geometry before writing a message? Seeing 'GEOS intersects() threw an error due do an invalid geometry (self-intersection)' seems much more helpful than the current message. -=- Jerry On Mar 17, 2010, at 11:51 AM, Mike Toews wrote: > Typically, this type of geometry error is fixed using > ST_Buffer(the_geom,0). So just wrap your geometry in that zero buffer, > and you should get a valid geometry (in ST_IsValid) and a correct > ST_Intersects result. > > -Mike > > On 17 March 2010 08:23, Jerry Carter wrote: >> I am aware that this geometry reports a Self-intersection according to ST_IsValidReason(). _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users Chris Hermansen chris.hermansen at timberline.ca tel+1.604.714.2878 ? fax+1.604.733.0631 ? mob+1.778.840.4625 Timberline Natural Resource Group ? www.timberline.ca 401 ? 958 West 8th Avenue ? Vancouver BC ? Canada ? V5Z 1E5 From mwtoews at gmail.com Wed Mar 17 09:09:30 2010 From: mwtoews at gmail.com (Mike Toews) Date: Wed, 17 Mar 2010 09:09:30 -0700 Subject: [postgis-users] GEOS intersects() threw an error! In-Reply-To: References: <22f0a52d1003170851i58cfe350l5181d581e8c79433@mail.gmail.com> Message-ID: <22f0a52d1003170909k4210c5cdqa0f841dd549f89ac@mail.gmail.com> With POSTGIS="2.0.0SVN" GEOS="3.3.0-CAPI-1.6.1" I see the error, as you reported. But primarily I use POSTGIS="1.3.6" GEOS="3.1.0-CAPI-1.5.0" which gives me first an informative NOTICE followed by an ERROR: NOTICE: TopologyException: side location conflict -164.924 60.9199 CONTEXT: SQL function "st_intersects" statement 1 ERROR: GEOS intersects() threw an error! CONTEXT: SQL function "st_intersects" statement 1 ********** Error ********** ERROR: GEOS intersects() threw an error! SQL state: XX000 Context: SQL function "st_intersects" statement 1 It seems this NOTICE feature has slipped out of the recent versions. -Mike On 17 March 2010 08:54, Jerry Carter wrote: > Thanks. ?I've already started down that path. > > The real issue in my mind is the error text. ?If GEOS throws an error, couldn't PostGIS internally run the equivalent of ST_IsValidReason() on the geometry before writing a message? ?Seeing 'GEOS intersects() threw an error due do an invalid geometry (self-intersection)' seems much more helpful than the current message. > > -=- Jerry From MTafel at drcog.org Wed Mar 17 10:38:54 2010 From: MTafel at drcog.org (Michael Tafel) Date: Wed, 17 Mar 2010 11:38:54 -0600 Subject: [postgis-users] most efficient way of finding closest feature Message-ID: <6B50D946AF8C474FA015F9C2C54B8AC8014E72BA13@EXCHANGE.cognet.drcog.org> Hello, If this has been answered in a previous thread I apologize in advance. I've googled with little success. I have two tables of points, table_a and table_b. I want to find the closest point for each record in table_a to table_b. The query we've got to work looks like this: SELECT DISTINCT ON (table_a.gid) table_a.gid, table_b.gid, ST_Distance(table_a.the_geom, table_b.the_geom) AS dist FROM table_a, table_b WHERE ST_DWithin (table_a.the_geom, table_b.the_geom, 5280) ORDER BY table_a.gid, dist ASC; However I need to run this on large tables. Table_a would have 1.2 million records and table_b would have 25,000 records (potential more). I'm afraid with the way ST_Distance() works this query could take a very, very long time. Is the above query the most efficient way to run accomplish what I need? Also would this work if table_b were polygons? Thanks in advance for any advice you may have. Cheers, --Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From no-reply at dropbox.com Wed Mar 17 23:45:13 2010 From: no-reply at dropbox.com (Dropbox) Date: Thu, 18 Mar 2010 06:45:13 +0000 Subject: [postgis-users] Linnet Kwamboka has invited you to Dropbox Message-ID: <20100318064513.B6468306045@mailman.dropbox.com> We're excited to let you know that Linnet Kwamboka has invited you to Dropbox! Linnet Kwamboka has been using Dropbox to sync and share files online and across computers, and thought you'd find it useful too. Visit http://www.dropbox.com/link/20.Vuv3l9DYjm/NjExNTY1OTMxNw to get started. - The Dropbox Team ____________________________________________________ To stop receiving invites from Dropbox, please go to http://www.dropbox.com/bl/cbda28f1396e/postgis-users%40postgis.refractions.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From pramsey at cleverelephant.ca Thu Mar 18 10:09:45 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Thu, 18 Mar 2010 10:09:45 -0700 Subject: [postgis-users] FOSS4G 2010 Presentation Deadline is April 15, 2010 Message-ID: <30fe546d1003181009s26ef9455jcd959465063b569c@mail.gmail.com> >From the Committee: -------------------------------------- We are pleased to announce that the deadline for Abstract submissions (General and Academic Sessions) has been postponed to April 15th, 2010. == General Sessions == FOSS4G presentations are 25 minute talks, with a 5 minute question and answer session at the end. Presentations cover aspects of the use or development of open source geospatial software. Anyone can can submit a presentation proposal and take part in the conference as a speaker. For more information, see http://2010.foss4g.org/presentations.php Submission deadline (Abstract for the General Sessions) - Apr, 15th, 2010 == Academic Sessions == The FOSS4G 2010 academic track aims to bringing together researchers, developers, users and practitioners carrying out research and development in the geospatial and the free and open source fields and willing to share original and recent research developments and experiences. For more information, see http://2010.foss4g.org/presentations_track.php Submission deadline (Abstract for the Academic Track) - Apr, 15th, 2010 Submission deadline (Full Paper for the Academic Track) - Jul, 15th, 2010 == Upcoming Milestones == * 15 Apr 2010, Abstract submission deadline (General Sessions and Academic Sessions) * 15 May 2010, Presenters notified of acceptance for talks * 15 Jun 2010, Author/Early registration deadline * 15 Jul 2010 Full article submission deadline for Academic Sessions * Aug 2010, Completed program available * 6-7 Sep 2010, FOSS4G Workshops * 7-9 Sep 2010, FOSS4G Presentations and Tutorials * 10 Sep 2010, FOSS4G Code Sprint From schmuryk at icisociety.ca Thu Mar 18 11:05:05 2010 From: schmuryk at icisociety.ca (Steffan Chmuryk) Date: Thu, 18 Mar 2010 11:05:05 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration References: <4B9A6C15.7060706@faunalia.it><0F5B056B5F432F4C9BF46C97DD7C161C073EC0@Suzuki.icisociety.ca><30fe546d1003151214o6d3b7e92mb316c6fe1d3a22fa@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073ED9@Suzuki.icisociety.ca><30fe546d1003152038t4758a210o716e394529587a43@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073F04@Suzuki.icisociety.ca><30fe546d1003161730n76101559pd2b222e7b280c327@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073F06@Suzuki.icisociety.ca><30fe546d1003161738x49905149ua7a4e431d16e632b@mail.gmail.com><0F5B056B5F432F4C9BF46C97DD7C161C073F07@Suzuki.icisociety.ca> <30fe546d1003161825k24c699c9tf859c504035e913d@mail.gmail.com> Message-ID: <0F5B056B5F432F4C9BF46C97DD7C161C073F42@Suzuki.icisociety.ca> Back again... I have attempted to run the shp2pgsql command, without success. So I decided to test some other datasets, and see what happens. Two polygon datasets, 300mb and 950mb, and one point dataset, 18mb, all loaded successfully. The civic address point dataset of 500mb, still does not load. Any suggestions? Also, when will PostGIS be able to load data that is larger than 2gb? And, is there any other intermediate format, other than shapefile, that I should consider using? Steffan Chmuryk Technical Services Coordinator, ICIS www.icisociety.ca Office: (250) 381-9295 Cell: (250) 516-2481 -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey Sent: Tuesday, March 16, 2010 6:25 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] PostGIS/PostGres Configuration Don't need to... run this command: Shp2pgsql -s 3005 -D CIVIC_ADDRESS.shp civic_address > CIVIC_ADDRESS.sql Then run psql -d mydatabase -f CIVIC_ADDRESS.sql Hopefully something useful happens. P On Tue, Mar 16, 2010 at 5:36 PM, Steffan Chmuryk wrote: > OK, not sure if I did this correctly. I used the psql console, under plugins in pgAdmin III. This is my command: > > Shp2pgsql -s 3005 -D CIVIC_ADDRESS.shp CIVIC_ADDRESS.dbf > CIVIC_ADDRESS.sql > > ... now this is where it gets amateurish... > > I haven't specified a directory, and I haven't created a table in pgAdmin. > > Steffan Chmuryk > Technical Services Coordinator, ICIS > www.icisociety.ca > > Office: ? (250) 381-9295 > Cell: ? ? (250) 516-2481 > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey > Sent: Tuesday, March 16, 2010 5:39 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] PostGIS/PostGres Configuration > > Steffan, could you try passing the smaller of the two datasets through > the commandline shp2pgsql tool? > > shp2pgsql -s 3005 -D thefile.shp thetable > thefile.sql > > See if it goes boom... > > P > > On Tue, Mar 16, 2010 at 5:21 PM, Steffan Chmuryk wrote: >> Thanks, >> >> Actually, I have been working with two datasets. One of which is 470mb total, and the other is 2.27gb total; however, both of these shapefiles encounter the same issues. The 470mb data is an addressing dataset, point based, and the 2.27gb file is a cadastre dataset, polygon based. >> >> Steffan Chmuryk >> Technical Services Coordinator, ICIS >> www.icisociety.ca >> >> Office: (250) 381-9295 >> Cell: ? ? (250) 516-2481 >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >> Sent: Tuesday, March 16, 2010 5:31 PM >> To: PostGIS Users Discussion >> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >> >> Steffan, >> Is your bigger file by any chance actually bigger than 2GB in any of >> its components? Large (>2GB) files are not currently supported in >> release, though we do have a patch on the issue in the tracker. >> P >> >> On Tue, Mar 16, 2010 at 5:15 PM, Steffan Chmuryk wrote: >>> Thank you for your help Paul; >>> >>> I have successfully loaded a dataset, a 30mb administrative boundaries file. I have also viewed this information successfully. Now I am trying to load a larger, 2gb, file. Using the shp2pgsql tool, I have encountered an error: >>> >>> An unhandled win32 exception occurred in shp2pgsql-gui.exe [3996]. Just-in-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. >>> >>> So I installed a new debugger, the WinDbg debugger, and executed it; however, now I am not getting an error message, and my data is still not being loaded to postgis/postgre. I then modified the data execution prevention to work only for windows programs. Still haven't gotten anywhere. >>> >>> I am using the shp2pgsql tool by itself, am I missing a step? >>> >>> Steffan Chmuryk >>> Technical Services Coordinator, ICIS >>> www.icisociety.ca >>> >>> Office: (250) 381-9295 >>> Cell: ? ? (250) 516-2481 >>> >>> -----Original Message----- >>> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >>> Sent: Monday, March 15, 2010 8:38 PM >>> To: PostGIS Users Discussion >>> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >>> >>> From an unrelated post on udig-devel it looks like the error you are >>> seeing is common to the most recent 1.2M release... try backing up to >>> the last 1.1 release and using that for PostGIS access. >>> >>> Also, if you're doing general desktop tests, you could try gvSIG, >>> CadCorp SIS and (!!) MapInfo's latest release. >>> >>> P. >>> >>> On Mon, Mar 15, 2010 at 5:30 PM, Steffan Chmuryk wrote: >>>> Thanks, >>>> >>>> So now, I have set up the connection, and have tried to connect via all three applications. Here are the errors: >>>> >>>> * Udig will connect, and seems to load the data, but then gives this message: RenderingException(s) occurred during rendering: Must call hasNext before calling next >>>> ? ? ? ?*Seems to be a java error. >>>> * OpenJump connects to the db, but gives this message: Error: syntax error at or near "ST_GeomFromText" (PSQL Exception) >>>> ? ? ? ?*Seems to require a plugin. >>>> * QGIS seems to work fine. >>>> >>>> More to come... >>>> >>>> Steffan Chmuryk >>>> Technical Services Coordinator, ICIS >>>> www.icisociety.ca >>>> >>>> Office: (250) 381-9295 >>>> Cell: ? ? (250) 516-2481 >>>> -----Original Message----- >>>> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >>>> Sent: Monday, March 15, 2010 12:15 PM >>>> To: PostGIS Users Discussion >>>> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >>>> >>>> Steffan, >>>> Leave your localhost entry in place, it's useful. Make a copy of the >>>> line and edit the copy. >>>> Change localhost to 192.168.0.0 and change 32 to 16. >>>> Ensure that listen_addresses = '*' in your postgresql.conf file. >>>> Restart the database >>>> Try again. >>>> P >>>> >>>> On Mon, Mar 15, 2010 at 11:50 AM, Steffan Chmuryk >>>> wrote: >>>>> Hello, >>>>> >>>>> This is my first post, so please go easy ;) >>>>> >>>>> I have built a PostGIS/PostGres spatial database, and have successfully >>>>> imported a shapefile. Now when I try to connect to the database via >>>>> Udig, OpenJump, or Qgis, I the following error: >>>>> >>>>> Fatal: no pg_hba.conf entry for host "192.168.x.xxx", user "postgres", >>>>> database "postgis1', SSL off (PSQL Exception) >>>>> >>>>> Now I have tried every combination of the following: >>>>> >>>>> * Edit pg_hba.conf so that the default 127.0.0.1/32 is replaced by the >>>>> 192... ip >>>>> * Add another access configuration to the file, so that the 192... ip, >>>>> the postgres user, and the database are all included >>>>> * Enable the SSL off configuration in the postgres.conf file, and >>>>> restart the machine >>>>> * I have even explored the JDBC stuff... argh! >>>>> >>>>> The error message in the application (Udig, OpenJump, or Qgis) does not >>>>> change. But upon changing the files to reflect any of the above >>>>> configurations, I am then unable to connect to the db within pgadminIII, >>>>> due to an error in loading the pg_hba.conf file. >>>>> >>>>> >>>>> Regarding the environment: >>>>> * Server used to host MSSQL and SDE; >>>>> * Server is Windows Server 2003 (not R2); >>>>> >>>>> >>>>> Steffan Chmuryk >>>>> Technical Services Coordinator, ICIS >>>>> www.icisociety.ca >>>>> >>>>> Office: ? (250) 381-9295 >>>>> Cell: ? ? (250) 516-2481 >>>>> _______________________________________________ >>>>> 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 >>>> >>>> No virus found in this incoming message. >>>> Checked by AVG - www.avg.com >>>> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 00:33:00 >>>> _______________________________________________ >>>> 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 >>> >>> No virus found in this incoming message. >>> Checked by AVG - www.avg.com >>> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 >>> _______________________________________________ >>> 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 >> >> No virus found in this incoming message. >> Checked by AVG - www.avg.com >> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 >> _______________________________________________ >> 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 > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 > _______________________________________________ > 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 From pramsey at cleverelephant.ca Thu Mar 18 11:31:00 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Thu, 18 Mar 2010 11:31:00 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration In-Reply-To: <0F5B056B5F432F4C9BF46C97DD7C161C073F42@Suzuki.icisociety.ca> References: <4B9A6C15.7060706@faunalia.it> <0F5B056B5F432F4C9BF46C97DD7C161C073ED9@Suzuki.icisociety.ca> <30fe546d1003152038t4758a210o716e394529587a43@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F04@Suzuki.icisociety.ca> <30fe546d1003161730n76101559pd2b222e7b280c327@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F06@Suzuki.icisociety.ca> <30fe546d1003161738x49905149ua7a4e431d16e632b@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F07@Suzuki.icisociety.ca> <30fe546d1003161825k24c699c9tf859c504035e913d@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F42@Suzuki.icisociety.ca> Message-ID: <30fe546d1003181131q4f4966e4t6bdfae0927c1b983@mail.gmail.com> Steffan, When you say you've tried the shp2pgsql command without success, do you mean it crashes also? Or do you have some other problem. If you could share the civic point data with me I could attempt to diagnose the problem you are having there. The 2Gb file limit is partly fixable in any event: dbf files larger than 2Gb can be supported, but shp files can only be moved up to a 4Gb maximum. After that, the shape file format itself simple can't support larger files (the shx index file only supports a 32-bit offset address record). You can use a tool like FME (safe.com/fme) to read pretty much any input format into PostGIS. ogr2ogr can also be used, to some extent, to stream changes from one supported data source into PostGIS. Paul On Thu, Mar 18, 2010 at 11:05 AM, Steffan Chmuryk wrote: > Back again... > > I have attempted to run the shp2pgsql command, without success. So I decided to test some other datasets, and see what happens. > > Two polygon datasets, 300mb and 950mb, and one point dataset, 18mb, all loaded successfully. The civic address point dataset of 500mb, still does not load. > > Any suggestions? > > Also, when will PostGIS be able to load data that is larger than 2gb? And, is there any other intermediate format, other than shapefile, that I should consider using? > > Steffan Chmuryk > Technical Services Coordinator, ICIS > www.icisociety.ca > > Office: ? (250) 381-9295 > Cell: ? ? (250) 516-2481 > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey > Sent: Tuesday, March 16, 2010 6:25 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] PostGIS/PostGres Configuration > > Don't need to... run this command: > > Shp2pgsql -s 3005 -D CIVIC_ADDRESS.shp civic_address > CIVIC_ADDRESS.sql > > Then run > > psql -d mydatabase -f CIVIC_ADDRESS.sql > > Hopefully something useful happens. > > P > > On Tue, Mar 16, 2010 at 5:36 PM, Steffan Chmuryk wrote: >> OK, not sure if I did this correctly. I used the psql console, under plugins in pgAdmin III. This is my command: >> >> Shp2pgsql -s 3005 -D CIVIC_ADDRESS.shp CIVIC_ADDRESS.dbf > CIVIC_ADDRESS.sql >> >> ... now this is where it gets amateurish... >> >> I haven't specified a directory, and I haven't created a table in pgAdmin. >> >> Steffan Chmuryk >> Technical Services Coordinator, ICIS >> www.icisociety.ca >> >> Office: ? (250) 381-9295 >> Cell: ? ? (250) 516-2481 >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >> Sent: Tuesday, March 16, 2010 5:39 PM >> To: PostGIS Users Discussion >> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >> >> Steffan, could you try passing the smaller of the two datasets through >> the commandline shp2pgsql tool? >> >> shp2pgsql -s 3005 -D thefile.shp thetable > thefile.sql >> >> See if it goes boom... >> >> P >> >> On Tue, Mar 16, 2010 at 5:21 PM, Steffan Chmuryk wrote: >>> Thanks, >>> >>> Actually, I have been working with two datasets. One of which is 470mb total, and the other is 2.27gb total; however, both of these shapefiles encounter the same issues. The 470mb data is an addressing dataset, point based, and the 2.27gb file is a cadastre dataset, polygon based. >>> >>> Steffan Chmuryk >>> Technical Services Coordinator, ICIS >>> www.icisociety.ca >>> >>> Office: (250) 381-9295 >>> Cell: ? ? (250) 516-2481 >>> >>> -----Original Message----- >>> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >>> Sent: Tuesday, March 16, 2010 5:31 PM >>> To: PostGIS Users Discussion >>> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >>> >>> Steffan, >>> Is your bigger file by any chance actually bigger than 2GB in any of >>> its components? Large (>2GB) files are not currently supported in >>> release, though we do have a patch on the issue in the tracker. >>> P >>> >>> On Tue, Mar 16, 2010 at 5:15 PM, Steffan Chmuryk wrote: >>>> Thank you for your help Paul; >>>> >>>> I have successfully loaded a dataset, a 30mb administrative boundaries file. I have also viewed this information successfully. Now I am trying to load a larger, 2gb, file. Using the shp2pgsql tool, I have encountered an error: >>>> >>>> An unhandled win32 exception occurred in shp2pgsql-gui.exe [3996]. Just-in-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. >>>> >>>> So I installed a new debugger, the WinDbg debugger, and executed it; however, now I am not getting an error message, and my data is still not being loaded to postgis/postgre. I then modified the data execution prevention to work only for windows programs. Still haven't gotten anywhere. >>>> >>>> I am using the shp2pgsql tool by itself, am I missing a step? >>>> >>>> Steffan Chmuryk >>>> Technical Services Coordinator, ICIS >>>> www.icisociety.ca >>>> >>>> Office: (250) 381-9295 >>>> Cell: ? ? (250) 516-2481 >>>> >>>> -----Original Message----- >>>> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >>>> Sent: Monday, March 15, 2010 8:38 PM >>>> To: PostGIS Users Discussion >>>> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >>>> >>>> From an unrelated post on udig-devel it looks like the error you are >>>> seeing is common to the most recent 1.2M release... try backing up to >>>> the last 1.1 release and using that for PostGIS access. >>>> >>>> Also, if you're doing general desktop tests, you could try gvSIG, >>>> CadCorp SIS and (!!) MapInfo's latest release. >>>> >>>> P. >>>> >>>> On Mon, Mar 15, 2010 at 5:30 PM, Steffan Chmuryk wrote: >>>>> Thanks, >>>>> >>>>> So now, I have set up the connection, and have tried to connect via all three applications. Here are the errors: >>>>> >>>>> * Udig will connect, and seems to load the data, but then gives this message: RenderingException(s) occurred during rendering: Must call hasNext before calling next >>>>> ? ? ? ?*Seems to be a java error. >>>>> * OpenJump connects to the db, but gives this message: Error: syntax error at or near "ST_GeomFromText" (PSQL Exception) >>>>> ? ? ? ?*Seems to require a plugin. >>>>> * QGIS seems to work fine. >>>>> >>>>> More to come... >>>>> >>>>> Steffan Chmuryk >>>>> Technical Services Coordinator, ICIS >>>>> www.icisociety.ca >>>>> >>>>> Office: (250) 381-9295 >>>>> Cell: ? ? (250) 516-2481 >>>>> -----Original Message----- >>>>> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey >>>>> Sent: Monday, March 15, 2010 12:15 PM >>>>> To: PostGIS Users Discussion >>>>> Subject: Re: [postgis-users] PostGIS/PostGres Configuration >>>>> >>>>> Steffan, >>>>> Leave your localhost entry in place, it's useful. Make a copy of the >>>>> line and edit the copy. >>>>> Change localhost to 192.168.0.0 and change 32 to 16. >>>>> Ensure that listen_addresses = '*' in your postgresql.conf file. >>>>> Restart the database >>>>> Try again. >>>>> P >>>>> >>>>> On Mon, Mar 15, 2010 at 11:50 AM, Steffan Chmuryk >>>>> wrote: >>>>>> Hello, >>>>>> >>>>>> This is my first post, so please go easy ;) >>>>>> >>>>>> I have built a PostGIS/PostGres spatial database, and have successfully >>>>>> imported a shapefile. Now when I try to connect to the database via >>>>>> Udig, OpenJump, or Qgis, I the following error: >>>>>> >>>>>> Fatal: no pg_hba.conf entry for host "192.168.x.xxx", user "postgres", >>>>>> database "postgis1', SSL off (PSQL Exception) >>>>>> >>>>>> Now I have tried every combination of the following: >>>>>> >>>>>> * Edit pg_hba.conf so that the default 127.0.0.1/32 is replaced by the >>>>>> 192... ip >>>>>> * Add another access configuration to the file, so that the 192... ip, >>>>>> the postgres user, and the database are all included >>>>>> * Enable the SSL off configuration in the postgres.conf file, and >>>>>> restart the machine >>>>>> * I have even explored the JDBC stuff... argh! >>>>>> >>>>>> The error message in the application (Udig, OpenJump, or Qgis) does not >>>>>> change. But upon changing the files to reflect any of the above >>>>>> configurations, I am then unable to connect to the db within pgadminIII, >>>>>> due to an error in loading the pg_hba.conf file. >>>>>> >>>>>> >>>>>> Regarding the environment: >>>>>> * Server used to host MSSQL and SDE; >>>>>> * Server is Windows Server 2003 (not R2); >>>>>> >>>>>> >>>>>> Steffan Chmuryk >>>>>> Technical Services Coordinator, ICIS >>>>>> www.icisociety.ca >>>>>> >>>>>> Office: ? (250) 381-9295 >>>>>> Cell: ? ? (250) 516-2481 >>>>>> _______________________________________________ >>>>>> 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 >>>>> >>>>> No virus found in this incoming message. >>>>> Checked by AVG - www.avg.com >>>>> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 00:33:00 >>>>> _______________________________________________ >>>>> 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 >>>> >>>> No virus found in this incoming message. >>>> Checked by AVG - www.avg.com >>>> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 >>>> _______________________________________________ >>>> 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 >>> >>> No virus found in this incoming message. >>> Checked by AVG - www.avg.com >>> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 >>> _______________________________________________ >>> 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 >> >> No virus found in this incoming message. >> Checked by AVG - www.avg.com >> Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 >> _______________________________________________ >> 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 > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.733 / Virus Database: 271.1.1/2748 - Release Date: 03/15/10 12:33:00 > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From strk at keybit.net Thu Mar 18 12:01:13 2010 From: strk at keybit.net (strk) Date: Thu, 18 Mar 2010 20:01:13 +0100 Subject: [postgis-users] GEOS intersects() threw an error! In-Reply-To: References: Message-ID: <20100318190113.GB75405@keybit.net> On Wed, Mar 17, 2010 at 11:23:48AM -0400, Jerry Carter wrote: > I am aware that this geometry reports a Self-intersection according to ST_IsValidReason(). Could you please attach an SQL file reproducing the problem on the bug tracker ? http://trac.osgeo.org/postgis I'll take a look. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From mwtoews at gmail.com Thu Mar 18 14:42:21 2010 From: mwtoews at gmail.com (Mike Toews) Date: Thu, 18 Mar 2010 14:42:21 -0700 Subject: [postgis-users] PostGIS/PostGres Configuration In-Reply-To: <0F5B056B5F432F4C9BF46C97DD7C161C073F42@Suzuki.icisociety.ca> References: <4B9A6C15.7060706@faunalia.it> <0F5B056B5F432F4C9BF46C97DD7C161C073ED9@Suzuki.icisociety.ca> <30fe546d1003152038t4758a210o716e394529587a43@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F04@Suzuki.icisociety.ca> <30fe546d1003161730n76101559pd2b222e7b280c327@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F06@Suzuki.icisociety.ca> <30fe546d1003161738x49905149ua7a4e431d16e632b@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F07@Suzuki.icisociety.ca> <30fe546d1003161825k24c699c9tf859c504035e913d@mail.gmail.com> <0F5B056B5F432F4C9BF46C97DD7C161C073F42@Suzuki.icisociety.ca> Message-ID: <22f0a52d1003181442x14bfcd73q81bc19dfc5f88996@mail.gmail.com> Another tool that I've used is ogr2ogr: http://www.gdal.org/ogr2ogr.html http://www.bostongis.com/PrinterFriendly.aspx?content_name=ogr_cheatsheet This transfers vector data from one database/file/etc to another. There is a large list of supported database and file formats: http://www.gdal.org/ogr/ogr_formats.html It has tricky syntax, so often a few attempts are needed to get it right. Also, there is an alternative to command-line: http://www.ogr2gui.ca/ -Mike On 18 March 2010 11:05, Steffan Chmuryk wrote: > Back again... > > I have attempted to run the shp2pgsql command, without success. So I decided to test some other datasets, and see what happens. > > Two polygon datasets, 300mb and 950mb, and one point dataset, 18mb, all loaded successfully. The civic address point dataset of 500mb, still does not load. > > Any suggestions? > > Also, when will PostGIS be able to load data that is larger than 2gb? And, is there any other intermediate format, other than shapefile, that I should consider using? > > Steffan Chmuryk > Technical Services Coordinator, ICIS > www.icisociety.ca From ptmakanga at gmail.com Fri Mar 19 04:35:56 2010 From: ptmakanga at gmail.com (Prestige Makanga) Date: Fri, 19 Mar 2010 13:35:56 +0200 Subject: [postgis-users] Windows server 2008 R2 Message-ID: Does the PostgreSQL server installation work on the new windows server 2008 R2? I have just installed no accounts were created. If it does then I can re think what the problem might be. Regards Prestige -------------- next part -------------- An HTML attachment was scrubbed... URL: From scientific1quash at gmail.com Fri Mar 19 04:42:13 2010 From: scientific1quash at gmail.com (Linnet Kwamboka) Date: Fri, 19 Mar 2010 04:42:13 -0700 Subject: [postgis-users] Windows server 2008 R2 In-Reply-To: References: Message-ID: Hey, i dont think it works with the new versions of windows, i had the same problems but once i downgraded to Windows xp, it works perfect. On Fri, Mar 19, 2010 at 4:35 AM, Prestige Makanga wrote: > Does the PostgreSQL server installation work on the new windows server 2008 > R2? I have just installed no accounts were created. If it does then I can re > think what the problem might be. > > Regards > Prestige > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > -- With regards, Linnet Kwamboka +254733229041 site: geekmates.ning.com blog: one-kenya.blogspot.com facebook: mckenzie quamboka skype: geekmate -------------- next part -------------- An HTML attachment was scrubbed... URL: From ricardo.bayley at gmail.com Fri Mar 19 08:34:54 2010 From: ricardo.bayley at gmail.com (Ricardo Bayley) Date: Fri, 19 Mar 2010 12:34:54 -0300 Subject: [postgis-users] Address Geocoding Message-ID: <9296e7dd1003190834j3df4951lb90677b5bc454d5b@mail.gmail.com> Hi fellows, I was wondering if any of you have a good approach to do Address Geocoding within postgis. Any ideas, considerations, thoughts ?? thanks in advanced. Warm regards, Ricardo -------------- next part -------------- An HTML attachment was scrubbed... URL: From woodbri at swoodbridge.com Fri Mar 19 11:23:28 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Fri, 19 Mar 2010 13:23:28 -0500 Subject: [postgis-users] Address Geocoding In-Reply-To: <9296e7dd1003190834j3df4951lb90677b5bc454d5b@mail.gmail.com> References: <9296e7dd1003190834j3df4951lb90677b5bc454d5b@mail.gmail.com> Message-ID: <4BA3C120.7020001@swoodbridge.com> http://www.google.com/#hl=en&source=hp&q=postgis+geocoder Ricardo Bayley wrote: > Hi fellows, > > I was wondering if any of you have a good approach to do Address > Geocoding within postgis. > Any ideas, considerations, thoughts ?? > > thanks in advanced. > > > Warm regards, > > > Ricardo > > > ------------------------------------------------------------------------ > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From mgleahy at alumni.uwaterloo.ca Sat Mar 20 02:17:50 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sat, 20 Mar 2010 05:17:50 -0400 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed (134217727) Message-ID: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> Hello list, I have an interesting error that's coming up on an Ubuntu 64-bit system, running PostgreSQL 8.4.2, and PostGIS 1.5.1 (packaged by me) as well as 1.4.0 (from Ubuntu repos). The query itself is somewhat complex (I'm sure it could be optimized better - but it's been working well for quite some time). I've attached two files - one is a dummed-down version of the query I am running (crashing.sql). After discussing this with some folks in the postgresql IRC channel, it seems that the st_geom(), or something PostGIS-related is causing the error. Running this query on various data will produce one of two results. One is the error mentioned in the subject (ERROR: array size exceeds the maximum allowed (134217727)). I can find very little information on this error. The other outcome is that it often causes the PostgreSQL backend to segfault (see gdboutput.txt). I can attest that this query works fine on many installations of PostgreSQL 8.2+, and PostGIS 1.3+. The only main difference I can see in this case where I'm getting errors and segfaults is that I'm running this on Ubuntu, whereas all of my successful cases are on Fedora (7 through 12). If I replace the st_union() function in the query with accum(), it still produces the error/segfaults. Also, strangely, if I remove one of the where conditions near the end of the query (e.g., " AND (cl.depth = 0)"), it suddenly works fine without any issues (except that I actually need that condition). Does this sort of problem look familiar to anyone? I can try to put together an example if that would be of any use, but since the same data/query works on other Fedora systems that I am running, I'm not sure how easy it is to replicate. Regards, Mike -------------- next part -------------- A non-text attachment was scrubbed... Name: crashing.sql Type: text/x-sql Size: 2043 bytes Desc: not available URL: -------------- next part -------------- GNU gdb (GDB) 7.0-ubuntu Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/lib/postgresql/8.4/bin/postgres...(no debugging symbols found)...done. warning: Can't read pathname for load map: Input/output error. Loaded symbols for /usr/lib/postgresql/8.4/bin/postgres Reading symbols from /usr/lib/libxml2.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libxml2.so.2 Reading symbols from /lib/libpam.so.0...(no debugging symbols found)...done. Loaded symbols for /lib/libpam.so.0 Reading symbols from /lib/libssl.so.0.9.8...(no debugging symbols found)...done. Loaded symbols for /lib/libssl.so.0.9.8 Reading symbols from /lib/libcrypto.so.0.9.8...(no debugging symbols found)...done. Loaded symbols for /lib/libcrypto.so.0.9.8 Reading symbols from /usr/lib/libkrb5.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libkrb5.so.3 Reading symbols from /lib/libcom_err.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libcom_err.so.2 Reading symbols from /usr/lib/libgssapi_krb5.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libgssapi_krb5.so.2 Reading symbols from /lib/libdl.so.2...Reading symbols from /usr/lib/debug/lib/libdl-2.10.1.so...done. (no debugging symbols found)...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libm.so.6...Reading symbols from /usr/lib/debug/lib/libm-2.10.1.so...done. (no debugging symbols found)...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /usr/lib/libldap_r-2.4.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libldap_r-2.4.so.2 Reading symbols from /lib/libc.so.6...Reading symbols from /usr/lib/debug/lib/libc-2.10.1.so...done. (no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libz.so.1 Reading symbols from /usr/lib/libk5crypto.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libk5crypto.so.3 Reading symbols from /usr/lib/libkrb5support.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libkrb5support.so.0 Reading symbols from /lib/libkeyutils.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libkeyutils.so.1 Reading symbols from /lib/libresolv.so.2...Reading symbols from /usr/lib/debug/lib/libresolv-2.10.1.so...done. (no debugging symbols found)...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib/libpthread.so.0...Reading symbols from /usr/lib/debug/lib/libpthread-2.10.1.so...done. (no debugging symbols found)...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug/lib/ld-2.10.1.so...done. (no debugging symbols found)...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from /usr/lib/liblber-2.4.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/liblber-2.4.so.2 Reading symbols from /usr/lib/libsasl2.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libsasl2.so.2 Reading symbols from /usr/lib/libgnutls.so.26...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libgnutls.so.26 Reading symbols from /usr/lib/libtasn1.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libtasn1.so.3 Reading symbols from /lib/libgcrypt.so.11...(no debugging symbols found)...done. Loaded symbols for /lib/libgcrypt.so.11 Reading symbols from /lib/libgpg-error.so.0...(no debugging symbols found)...done. Loaded symbols for /lib/libgpg-error.so.0 Reading symbols from /lib/libnss_compat.so.2...Reading symbols from /usr/lib/debug/lib/libnss_compat-2.10.1.so...done. (no debugging symbols found)...done. Loaded symbols for /lib/libnss_compat.so.2 Reading symbols from /lib/libnsl.so.1...Reading symbols from /usr/lib/debug/lib/libnsl-2.10.1.so...done. (no debugging symbols found)...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/libnss_nis.so.2...Reading symbols from /usr/lib/debug/lib/libnss_nis-2.10.1.so...done. (no debugging symbols found)...done. Loaded symbols for /lib/libnss_nis.so.2 Reading symbols from /lib/libnss_files.so.2...Reading symbols from /usr/lib/debug/lib/libnss_files-2.10.1.so...done. (no debugging symbols found)...done. Loaded symbols for /lib/libnss_files.so.2 Reading symbols from /usr/lib/postgresql/8.4/lib/postgis-1.5.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/postgresql/8.4/lib/postgis-1.5.so Reading symbols from /usr/lib/libgeos_c.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libgeos_c.so.1 Reading symbols from /usr/lib/libproj.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libproj.so.0 Reading symbols from /usr/lib/libgeos-3.1.1.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libgeos-3.1.1.so Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libstdc++.so.6 Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libgcc_s.so.1 Core was generated by `postgres: postgres testdb [local] SELECT '. Program terminated with signal 11, Segmentation fault. #0 0x00007fa4be23615b in pfree () from /usr/lib/postgresql/8.4/bin/postgres (gdb) bt full #0 0x00007fa4be23615b in pfree () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #1 0x00007fa4be18091b in makeMdArrayResult () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #2 0x00007fa4b7f038bc in pgis_accum_finalfn () from /usr/lib/postgresql/8.4/lib/postgis-1.5.so No symbol table info available. #3 0x00007fa4b7f039ee in pgis_geometry_union_finalfn () from /usr/lib/postgresql/8.4/lib/postgis-1.5.so No symbol table info available. #4 0x00007fa4be0c33f5 in ?? () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #5 0x00007fa4be0c3920 in ExecAgg () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #6 0x00007fa4be0b7148 in ExecProcNode () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #7 0x00007fa4be0c9f04 in ExecNestLoop () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #8 0x00007fa4be0b71a8 in ExecProcNode () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #9 0x00007fa4be0c9f31 in ExecNestLoop () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #10 0x00007fa4be0b71a8 in ExecProcNode () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #11 0x00007fa4be0c9f31 in ExecNestLoop () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #12 0x00007fa4be0b71a8 in ExecProcNode () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #13 0x00007fa4be0cb9d1 in ExecSort () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #14 0x00007fa4be0b7168 in ExecProcNode () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. ---Type to continue, or q to quit--- #15 0x00007fa4be0cc9f8 in ExecLimit () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #16 0x00007fa4be0b70f5 in ExecProcNode () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #17 0x00007fa4be0cb9d1 in ExecSort () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #18 0x00007fa4be0b7168 in ExecProcNode () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #19 0x00007fa4be0b4bc2 in standard_ExecutorRun () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #20 0x00007fa4be166c17 in ?? () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #21 0x00007fa4be168070 in PortalRun () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #22 0x00007fa4be163021 in ?? () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #23 0x00007fa4be164a0d in PostgresMain () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #24 0x00007fa4be1374d0 in ?? () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #25 0x00007fa4be139c31 in PostmasterMain () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. #26 0x00007fa4be0e2993 in main () from /usr/lib/postgresql/8.4/bin/postgres No symbol table info available. (gdb) From mgleahy at alumni.uwaterloo.ca Sat Mar 20 02:49:42 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sat, 20 Mar 2010 05:49:42 -0400 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed (134217727) In-Reply-To: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> Message-ID: <201003200549.42411.mgleahy@alumni.uwaterloo.ca> Hello again, It might be of interest to point out that substituting st_union() with st_memunion() seems to have worked around this. I'm curious though, because there is not a great deal of data being processed, and I am running this on a fairly sturdy system that that has more capacity than some of the Fedora systems I'm running. Mike On Saturday 20 March 2010 05:17:50 Mike Leahy wrote: > Hello list, > > I have an interesting error that's coming up on an Ubuntu 64-bit system, > running PostgreSQL 8.4.2, and PostGIS 1.5.1 (packaged by me) as well as > 1.4.0 (from Ubuntu repos). The query itself is somewhat complex (I'm sure > it could be optimized better - but it's been working well for quite some > time). I've attached two files - one is a dummed-down version of the > query I am running (crashing.sql). After discussing this with some folks > in the postgresql IRC channel, it seems that the st_geom(), or something > PostGIS-related is causing the error. > > Running this query on various data will produce one of two results. One is > the error mentioned in the subject (ERROR: array size exceeds the maximum > allowed (134217727)). I can find very little information on this error. > The other outcome is that it often causes the PostgreSQL backend to > segfault (see gdboutput.txt). > > I can attest that this query works fine on many installations of PostgreSQL > 8.2+, and PostGIS 1.3+. The only main difference I can see in this case > where I'm getting errors and segfaults is that I'm running this on Ubuntu, > whereas all of my successful cases are on Fedora (7 through 12). > > If I replace the st_union() function in the query with accum(), it still > produces the error/segfaults. > > Also, strangely, if I remove one of the where conditions near the end of > the query (e.g., " AND (cl.depth = 0)"), it suddenly works fine without > any issues (except that I actually need that condition). > > Does this sort of problem look familiar to anyone? I can try to put > together an example if that would be of any use, but since the same > data/query works on other Fedora systems that I am running, I'm not sure > how easy it is to replicate. > > Regards, > Mike > From strk at keybit.net Sat Mar 20 07:41:41 2010 From: strk at keybit.net (strk) Date: Sat, 20 Mar 2010 15:41:41 +0100 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed (134217727) In-Reply-To: <201003200549.42411.mgleahy@alumni.uwaterloo.ca> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003200549.42411.mgleahy@alumni.uwaterloo.ca> Message-ID: <20100320144141.GC22472@keybit.net> On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: > Hello again, > > It might be of interest to point out that substituting st_union() with > st_memunion() seems to have worked around this. I'm curious though, because > there is not a great deal of data being processed, and I am running this on a > fairly sturdy system that that has more capacity than some of the Fedora > systems I'm running. st_memunion builds a big array with all geometries in it.. you were hitting a limit of the array type. st_union should behave better. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From pramsey at cleverelephant.ca Sat Mar 20 07:56:14 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Sat, 20 Mar 2010 07:56:14 -0700 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed (134217727) In-Reply-To: <20100320144141.GC22472@keybit.net> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003200549.42411.mgleahy@alumni.uwaterloo.ca> <20100320144141.GC22472@keybit.net> Message-ID: <30fe546d1003200756n1d546932s34ed7aff73f3e274@mail.gmail.com> Actually, memunion does the opposite, it passes the resultant and preserves mem. The default behavior is fast-but-memory-hungry. And has been for some time, though in different forms. There were some bugs in the array handling code, but Mark CA killed most of them, so the latest 1.5 and 1.4 streams should be good. If it's possible that the issue is one of array size, maybe Mike could find the dial that controls that maximum, and turn it up and down and see if it makes his problem go away/happen sooner. P. On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: >> Hello again, >> >> It might be of interest to point out that substituting st_union() with >> st_memunion() seems to have worked around this. ?I'm curious though, because >> there is not a great deal of data being processed, and I am running this on a >> fairly sturdy system that that has more capacity than some of the Fedora >> systems I'm running. > > st_memunion builds a big array with all geometries in it.. > you were hitting a limit of the array type. > st_union should behave better. > > --strk; > > ?() ? Free GIS & Flash consultant/developer > ?/\ ? http://strk.keybit.net/services.html > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From lr at pcorp.us Sat Mar 20 08:32:35 2010 From: lr at pcorp.us (Paragon Corporation) Date: Sat, 20 Mar 2010 11:32:35 -0400 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed(134217727) In-Reply-To: <30fe546d1003200756n1d546932s34ed7aff73f3e274@mail.gmail.com> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca><201003200549.42411.mgleahy@alumni.uwaterloo.ca><20100320144141.GC22472@keybit.net> <30fe546d1003200756n1d546932s34ed7aff73f3e274@mail.gmail.com> Message-ID: <065DA21BE4EF4B39A116B4CCF713AF4F@J> Paul, I doubt array size limit is the issue. He said when he left the where condition out it worked. I would think it would definitely blow up in that case. Mike, The issue from before was that array aggregate functions did not handle NULLs correctly. 64-bit systems were more likely to segfault or give strange Errros in this case. To rule out that we still have some of these issues in the code base, can you add a geom IS NOT NULL Condition to your WHERE filter. If that works, then the NULL issue is probably still lurking somewhere. Leo and Regina http://www.postgis.us -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey Sent: Saturday, March 20, 2010 10:56 AM To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca Subject: Re: [postgis-users] ERROR: array size exceeds the maximum allowed(134217727) Actually, memunion does the opposite, it passes the resultant and preserves mem. The default behavior is fast-but-memory-hungry. And has been for some time, though in different forms. There were some bugs in the array handling code, but Mark CA killed most of them, so the latest 1.5 and 1.4 streams should be good. If it's possible that the issue is one of array size, maybe Mike could find the dial that controls that maximum, and turn it up and down and see if it makes his problem go away/happen sooner. P. On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: >> Hello again, >> >> It might be of interest to point out that substituting st_union() >> with >> st_memunion() seems to have worked around this. ?I'm curious though, >> because there is not a great deal of data being processed, and I am >> running this on a fairly sturdy system that that has more capacity >> than some of the Fedora systems I'm running. > > st_memunion builds a big array with all geometries in it.. > you were hitting a limit of the array type. > st_union should behave better. > > --strk; > > ?() ? Free GIS & Flash consultant/developer > ?/\ ? http://strk.keybit.net/services.html > _______________________________________________ > 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 keybit.net Sat Mar 20 09:19:52 2010 From: strk at keybit.net (strk) Date: Sat, 20 Mar 2010 17:19:52 +0100 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed (134217727) In-Reply-To: <30fe546d1003200756n1d546932s34ed7aff73f3e274@mail.gmail.com> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003200549.42411.mgleahy@alumni.uwaterloo.ca> <20100320144141.GC22472@keybit.net> <30fe546d1003200756n1d546932s34ed7aff73f3e274@mail.gmail.com> Message-ID: <20100320161952.GE22472@keybit.net> On Sat, Mar 20, 2010 at 07:56:14AM -0700, Paul Ramsey wrote: > Actually, memunion does the opposite, it passes the resultant and > preserves mem. Oops, sorry for the confusion. Not-so-intuitive name :P --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From chris.hermansen at timberline.ca Sat Mar 20 10:03:13 2010 From: chris.hermansen at timberline.ca (Chris Hermansen) Date: Sat, 20 Mar 2010 10:03:13 -0700 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed (134217727) In-Reply-To: <20100320161952.GE22472@keybit.net> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003200549.42411.mgleahy@alumni.uwaterloo.ca> <20100320144141.GC22472@keybit.net> <30fe546d1003200756n1d546932s34ed7aff73f3e274@mail.gmail.com> <20100320161952.GE22472@keybit.net> Message-ID: <4BA4FFD1.9020203@timberline.ca> Very recently there was a kernel patch in Ubuntu regarding - if memory serves - memory copying. How up to date is the system in question? strk wrote: > On Sat, Mar 20, 2010 at 07:56:14AM -0700, Paul Ramsey wrote: > >> Actually, memunion does the opposite, it passes the resultant and >> preserves mem. >> > > Oops, sorry for the confusion. Not-so-intuitive name :P > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Regards, Chris Hermansen ? mailto:chris.hermansen at timberline.ca tel+1.604.714.2878 ? fax+1.604.733.0631 ? mob+1.778.840.4625 Timberline Natural Resource Group ? http://www.timberline.ca 401 ? 958 West 8th Avenue ? Vancouver BC ? Canada ? V5Z 1E5 From mgleahy at alumni.uwaterloo.ca Sat Mar 20 11:00:59 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sat, 20 Mar 2010 14:00:59 -0400 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed(134217727) In-Reply-To: <065DA21BE4EF4B39A116B4CCF713AF4F@J> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <30fe546d1003200756n1d546932s34ed7aff73f3e274@mail.gmail.com> <065DA21BE4EF4B39A116B4CCF713AF4F@J> Message-ID: <201003201400.59233.mgleahy@alumni.uwaterloo.ca> Hi Leo/Regina, Thanks for the suggestion. I tried adding the clause 'not geom is null' to the where statement in each of the two sub-queries that have the st_union(geom) functions are used, but it still segfaults. I also tried this on a fresh database with very little data, and it doesn't seem to cause problems. But I have two databases with live data where I can cause this. I have been able to pare one of these down to remove personal information and reduce unnecessary data, while still generating the crash with that query. Would someone be interested in a dump of this db? Of course, that someone would ideally be able to test this on a 64-bit (K)ubutnu system, in the hopes that the problem can be replicated. Mike On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: > Paul, > I doubt array size limit is the issue. He said when he left the where > condition out it worked. I would think it would definitely blow up in that > case. > > Mike, > The issue from before was that array aggregate functions did not handle > NULLs correctly. 64-bit systems were more likely to segfault or give > strange > Errros in this case. > > To rule out that we still have some of these issues in the code base, can > you add a > > geom IS NOT NULL > > Condition to your WHERE filter. If that works, then the NULL issue is > probably still lurking somewhere. > > Leo and Regina > http://www.postgis.us > > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul > Ramsey > Sent: Saturday, March 20, 2010 10:56 AM > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum > allowed(134217727) > > Actually, memunion does the opposite, it passes the resultant and preserves > mem. The default behavior is fast-but-memory-hungry. And has been for some > time, though in different forms. There were some bugs in the array handling > code, but Mark CA killed most of them, so the latest 1.5 and 1.4 streams > should be good. If it's possible that the issue is one of array size, maybe > Mike could find the dial that controls that maximum, and turn it up and > down and see if it makes his problem go away/happen sooner. > > P. > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: > >> Hello again, > >> > >> It might be of interest to point out that substituting st_union() > >> with > >> st_memunion() seems to have worked around this. I'm curious though, > >> because there is not a great deal of data being processed, and I am > >> running this on a fairly sturdy system that that has more capacity > >> than some of the Fedora systems I'm running. > > > > st_memunion builds a big array with all geometries in it.. > > you were hitting a limit of the array type. > > st_union should behave better. > > > > --strk; > > > > () Free GIS & Flash consultant/developer > > /\ http://strk.keybit.net/services.html > > _______________________________________________ > > 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 mgleahy at alumni.uwaterloo.ca Sat Mar 20 12:03:47 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sat, 20 Mar 2010 15:03:47 -0400 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed (134217727) In-Reply-To: <20100320161952.GE22472@keybit.net> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <30fe546d1003200756n1d546932s34ed7aff73f3e274@mail.gmail.com> <20100320161952.GE22472@keybit.net> Message-ID: <201003201503.47349.mgleahy@alumni.uwaterloo.ca> Chris, Sorry for not catching this one sooner (I'm subscribed to the digest)...but thanks for pointing this out. The system is completely up to date. I could reboot into an older kernel to see if that solve the problem. I'll report results a bit later today. Mike ------------------------------ Message: 7 Date: Sat, 20 Mar 2010 10:03:13 -0700 From: Chris Hermansen Subject: Re: [postgis-users] ERROR: array size exceeds the maximum allowed (134217727) To: PostGIS Users Discussion Message-ID: <4BA4FFD1.9020203 at timberline.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Very recently there was a kernel patch in Ubuntu regarding - if memory serves - memory copying. How up to date is the system in question? strk wrote: > On Sat, Mar 20, 2010 at 07:56:14AM -0700, Paul Ramsey wrote: > >> Actually, memunion does the opposite, it passes the resultant and >> preserves mem. >> > > Oops, sorry for the confusion. Not-so-intuitive name :P > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From mgleahy at alumni.uwaterloo.ca Sat Mar 20 13:34:49 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sat, 20 Mar 2010 16:34:49 -0400 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed (134217727) In-Reply-To: <201003201503.47349.mgleahy@alumni.uwaterloo.ca> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <20100320161952.GE22472@keybit.net> <201003201503.47349.mgleahy@alumni.uwaterloo.ca> Message-ID: <201003201634.49321.mgleahy@alumni.uwaterloo.ca> Chris/list: I have tried booting into the following kernels, all exhibiting the same issue: 2.6.31-20-generic 2.6.31-19-generic 2.6.31-14-generic I believe 2.6.31-14-generic is the original kernel installed with this version of Ubuntu, so unless the change to the kernel you're thinking occurred previous to the 9.10 Karmic release, it's not the culprit here. Mike On Saturday 20 March 2010 15:03:47 Mike Leahy wrote: > Chris, > > Sorry for not catching this one sooner (I'm subscribed to the digest)...but > thanks for pointing this out. The system is completely up to date. I could > reboot into an older kernel to see if that solve the problem. I'll report > results a bit later today. > > Mike > > ------------------------------ > > Message: 7 > Date: Sat, 20 Mar 2010 10:03:13 -0700 > From: Chris Hermansen > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum > allowed (134217727) > To: PostGIS Users Discussion > Message-ID: <4BA4FFD1.9020203 at timberline.ca> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Very recently there was a kernel patch in Ubuntu regarding - if memory > serves - memory copying. How up to date is the system in question? > > strk wrote: > > On Sat, Mar 20, 2010 at 07:56:14AM -0700, Paul Ramsey wrote: > >> Actually, memunion does the opposite, it passes the resultant and > >> preserves mem. > > > > Oops, sorry for the confusion. Not-so-intuitive name :P > > > > --strk; > > > > () Free GIS & Flash consultant/developer > > /\ http://strk.keybit.net/services.html > > _______________________________________________ > > postgis-users mailing list > > postgis-users at postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users > From chris.hermansen at timberline.ca Sat Mar 20 14:08:14 2010 From: chris.hermansen at timberline.ca (Chris Hermansen) Date: Sat, 20 Mar 2010 14:08:14 -0700 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed (134217727) In-Reply-To: <201003201634.49321.mgleahy@alumni.uwaterloo.ca> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <20100320161952.GE22472@keybit.net> <201003201503.47349.mgleahy@alumni.uwaterloo.ca> <201003201634.49321.mgleahy@alumni.uwaterloo.ca> Message-ID: <4BA5393E.8020907@timberline.ca> No, the patch was very recent or I would not have remembered it. FWIW I'm also running 2.6.31-20-generic. Too bad, it would have been an easy solution! Mike Leahy wrote: > Chris/list: > > I have tried booting into the following kernels, all exhibiting the same > issue: > > 2.6.31-20-generic > 2.6.31-19-generic > 2.6.31-14-generic > > I believe 2.6.31-14-generic is the original kernel installed with this version > of Ubuntu, so unless the change to the kernel you're thinking occurred > previous to the 9.10 Karmic release, it's not the culprit here. > > Mike > > On Saturday 20 March 2010 15:03:47 Mike Leahy wrote: > >> Chris, >> >> Sorry for not catching this one sooner (I'm subscribed to the digest)...but >> thanks for pointing this out. The system is completely up to date. I could >> reboot into an older kernel to see if that solve the problem. I'll report >> results a bit later today. >> >> Mike >> >> ------------------------------ >> >> Message: 7 >> Date: Sat, 20 Mar 2010 10:03:13 -0700 >> From: Chris Hermansen >> Subject: Re: [postgis-users] ERROR: array size exceeds the maximum >> allowed (134217727) >> To: PostGIS Users Discussion >> Message-ID: <4BA4FFD1.9020203 at timberline.ca> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> Very recently there was a kernel patch in Ubuntu regarding - if memory >> serves - memory copying. How up to date is the system in question? >> >> strk wrote: >> >>> On Sat, Mar 20, 2010 at 07:56:14AM -0700, Paul Ramsey wrote: >>> >>>> Actually, memunion does the opposite, it passes the resultant and >>>> preserves mem. >>>> >>> Oops, sorry for the confusion. Not-so-intuitive name :P >>> >>> --strk; >>> >>> () Free GIS & Flash consultant/developer >>> /\ http://strk.keybit.net/services.html >>> _______________________________________________ >>> 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, Chris Hermansen ? mailto:chris.hermansen at timberline.ca tel+1.604.714.2878 ? fax+1.604.733.0631 ? mob+1.778.840.4625 Timberline Natural Resource Group ? http://www.timberline.ca 401 ? 958 West 8th Avenue ? Vancouver BC ? Canada ? V5Z 1E5 From lr at pcorp.us Sat Mar 20 14:53:24 2010 From: lr at pcorp.us (Paragon Corporation) Date: Sat, 20 Mar 2010 17:53:24 -0400 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed(134217727) In-Reply-To: <201003201400.59233.mgleahy@alumni.uwaterloo.ca> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <30fe546d1003200756n1d546932s34ed7aff73f3e274@mail.gmail.com> <065DA21BE4EF4B39A116B4CCF713AF4F@J> <201003201400.59233.mgleahy@alumni.uwaterloo.ca> Message-ID: Mike, We apologize, didn't notice this was in a subquery and that you have a limit statement in your query. So we presume regardless of your WHERE only 26 records are being selected. So Paul could be right that you do have data that is hitting some compiled or variable limit. Does running the subquery alone work or you didn't try because it takes a long time? Thanks, Leo and Regina http://www.postgis.us -----Original Message----- From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy Sent: Saturday, March 20, 2010 2:01 PM To: Paragon Corporation Cc: 'PostGIS Users Discussion' Subject: Re: [postgis-users] ERROR: array size exceeds the maximum allowed(134217727) Hi Leo/Regina, Thanks for the suggestion. I tried adding the clause 'not geom is null' to the where statement in each of the two sub-queries that have the st_union(geom) functions are used, but it still segfaults. I also tried this on a fresh database with very little data, and it doesn't seem to cause problems. But I have two databases with live data where I can cause this. I have been able to pare one of these down to remove personal information and reduce unnecessary data, while still generating the crash with that query. Would someone be interested in a dump of this db? Of course, that someone would ideally be able to test this on a 64-bit (K)ubutnu system, in the hopes that the problem can be replicated. Mike On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: > Paul, > I doubt array size limit is the issue. He said when he left the where > condition out it worked. I would think it would definitely blow up in > that case. > > Mike, > The issue from before was that array aggregate functions did not > handle NULLs correctly. 64-bit systems were more likely to segfault > or give strange Errros in this case. > > To rule out that we still have some of these issues in the code base, > can you add a > > geom IS NOT NULL > > Condition to your WHERE filter. If that works, then the NULL issue is > probably still lurking somewhere. > > Leo and Regina > http://www.postgis.us > > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > Paul Ramsey > Sent: Saturday, March 20, 2010 10:56 AM > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum > allowed(134217727) > > Actually, memunion does the opposite, it passes the resultant and > preserves mem. The default behavior is fast-but-memory-hungry. And has > been for some time, though in different forms. There were some bugs in > the array handling code, but Mark CA killed most of them, so the > latest 1.5 and 1.4 streams should be good. If it's possible that the > issue is one of array size, maybe Mike could find the dial that > controls that maximum, and turn it up and down and see if it makes his problem go away/happen sooner. > > P. > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: > >> Hello again, > >> > >> It might be of interest to point out that substituting st_union() > >> with > >> st_memunion() seems to have worked around this. I'm curious > >> though, because there is not a great deal of data being processed, > >> and I am running this on a fairly sturdy system that that has more > >> capacity than some of the Fedora systems I'm running. > > > > st_memunion builds a big array with all geometries in it.. > > you were hitting a limit of the array type. > > st_union should behave better. > > > > --strk; > > > > () Free GIS & Flash consultant/developer > > /\ http://strk.keybit.net/services.html > > _______________________________________________ > > 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 mgleahy at alumni.uwaterloo.ca Sat Mar 20 15:10:38 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sat, 20 Mar 2010 18:10:38 -0400 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed(134217727) In-Reply-To: References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003201400.59233.mgleahy@alumni.uwaterloo.ca> Message-ID: <201003201810.38956.mgleahy@alumni.uwaterloo.ca> Hey, The query (when it works) is virtually instantaneous when I use st_memunion() (or when I took out part of the where clause - although now I can't even get that to work, so maybe it was just lucky). Each of the subqueries also work fine without any obvious problem. To me, it seems to be a combination of things that somehow add up to this limitation...I don't see what settings could affect the array size limit (in postgresql.conf). Can anyone point to a config option that might make a difference, or maybe point to another place with settings I can tinker with? Mike On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: > Mike, > > We apologize, didn't notice this was in a subquery and that you have a > limit statement in your query. So we presume regardless of your WHERE > only 26 records are being selected. > > So Paul could be right that you do have data that is hitting some compiled > or variable limit. > > Does running the subquery alone work or you didn't try because it takes a > long time? > > Thanks, > Leo and Regina > http://www.postgis.us > > -----Original Message----- > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy > Sent: Saturday, March 20, 2010 2:01 PM > To: Paragon Corporation > Cc: 'PostGIS Users Discussion' > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum > allowed(134217727) > > Hi Leo/Regina, > > Thanks for the suggestion. I tried adding the clause 'not geom is null' to > the where statement in each of the two sub-queries that have the > st_union(geom) functions are used, but it still segfaults. > > I also tried this on a fresh database with very little data, and it doesn't > seem to cause problems. But I have two databases with live data where I > can cause this. I have been able to pare one of these down to remove > personal information and reduce unnecessary data, while still generating > the crash with > that query. Would someone be interested in a dump of this db? Of course, > that someone would ideally be able to test this on a 64-bit (K)ubutnu > system, in the hopes that the problem can be replicated. > > Mike > > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: > > Paul, > > I doubt array size limit is the issue. He said when he left the where > > condition out it worked. I would think it would definitely blow up in > > that case. > > > > Mike, > > The issue from before was that array aggregate functions did not > > handle NULLs correctly. 64-bit systems were more likely to segfault > > or give strange Errros in this case. > > > > To rule out that we still have some of these issues in the code base, > > can you add a > > > > geom IS NOT NULL > > > > Condition to your WHERE filter. If that works, then the NULL issue is > > probably still lurking somewhere. > > > > Leo and Regina > > http://www.postgis.us > > > > > > -----Original Message----- > > From: postgis-users-bounces at postgis.refractions.net > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > > Paul Ramsey > > Sent: Saturday, March 20, 2010 10:56 AM > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca > > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum > > allowed(134217727) > > > > Actually, memunion does the opposite, it passes the resultant and > > preserves mem. The default behavior is fast-but-memory-hungry. And has > > been for some time, though in different forms. There were some bugs in > > the array handling code, but Mark CA killed most of them, so the > > latest 1.5 and 1.4 streams should be good. If it's possible that the > > issue is one of array size, maybe Mike could find the dial that > > controls that maximum, and turn it up and down and see if it makes his > > problem go away/happen sooner. > > > P. > > > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: > > >> Hello again, > > >> > > >> It might be of interest to point out that substituting st_union() > > >> with > > >> st_memunion() seems to have worked around this. I'm curious > > >> though, because there is not a great deal of data being processed, > > >> and I am running this on a fairly sturdy system that that has more > > >> capacity than some of the Fedora systems I'm running. > > > > > > st_memunion builds a big array with all geometries in it.. > > > you were hitting a limit of the array type. > > > st_union should behave better. > > > > > > --strk; > > > > > > () Free GIS & Flash consultant/developer > > > /\ http://strk.keybit.net/services.html > > > _______________________________________________ > > > 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 mgleahy at alumni.uwaterloo.ca Sat Mar 20 15:30:42 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sat, 20 Mar 2010 18:30:42 -0400 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed(134217727) In-Reply-To: <201003201810.38956.mgleahy@alumni.uwaterloo.ca> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003201810.38956.mgleahy@alumni.uwaterloo.ca> Message-ID: <201003201830.42995.mgleahy@alumni.uwaterloo.ca> FWIW, if I remove the entire where clause at the end of the statement, it works again (with st_union()) and is virtually instantaneous. On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: > Hey, > > The query (when it works) is virtually instantaneous when I use > st_memunion() (or when I took out part of the where clause - although now > I can't even get that to work, so maybe it was just lucky). Each of the > subqueries also work fine without any obvious problem. > > To me, it seems to be a combination of things that somehow add up to this > limitation...I don't see what settings could affect the array size limit > (in postgresql.conf). Can anyone point to a config option that might make > a difference, or maybe point to another place with settings I can tinker > with? > > Mike > > On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: > > Mike, > > > > We apologize, didn't notice this was in a subquery and that you have a > > limit statement in your query. So we presume regardless of your WHERE > > only 26 records are being selected. > > > > So Paul could be right that you do have data that is hitting some > > compiled or variable limit. > > > > Does running the subquery alone work or you didn't try because it takes a > > long time? > > > > Thanks, > > Leo and Regina > > http://www.postgis.us > > > > -----Original Message----- > > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy > > Sent: Saturday, March 20, 2010 2:01 PM > > To: Paragon Corporation > > Cc: 'PostGIS Users Discussion' > > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum > > allowed(134217727) > > > > Hi Leo/Regina, > > > > Thanks for the suggestion. I tried adding the clause 'not geom is null' > > to the where statement in each of the two sub-queries that have the > > st_union(geom) functions are used, but it still segfaults. > > > > I also tried this on a fresh database with very little data, and it > > doesn't seem to cause problems. But I have two databases with live data > > where I can cause this. I have been able to pare one of these down to > > remove personal information and reduce unnecessary data, while still > > generating the crash with > > that query. Would someone be interested in a dump of this db? Of > > course, that someone would ideally be able to test this on a 64-bit > > (K)ubutnu system, in the hopes that the problem can be replicated. > > > > Mike > > > > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: > > > Paul, > > > I doubt array size limit is the issue. He said when he left the where > > > condition out it worked. I would think it would definitely blow up in > > > that case. > > > > > > Mike, > > > The issue from before was that array aggregate functions did not > > > handle NULLs correctly. 64-bit systems were more likely to segfault > > > or give strange Errros in this case. > > > > > > To rule out that we still have some of these issues in the code base, > > > can you add a > > > > > > geom IS NOT NULL > > > > > > Condition to your WHERE filter. If that works, then the NULL issue is > > > probably still lurking somewhere. > > > > > > Leo and Regina > > > http://www.postgis.us > > > > > > > > > -----Original Message----- > > > From: postgis-users-bounces at postgis.refractions.net > > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > > > Paul Ramsey > > > Sent: Saturday, March 20, 2010 10:56 AM > > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca > > > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum > > > allowed(134217727) > > > > > > Actually, memunion does the opposite, it passes the resultant and > > > preserves mem. The default behavior is fast-but-memory-hungry. And has > > > been for some time, though in different forms. There were some bugs in > > > the array handling code, but Mark CA killed most of them, so the > > > latest 1.5 and 1.4 streams should be good. If it's possible that the > > > issue is one of array size, maybe Mike could find the dial that > > > controls that maximum, and turn it up and down and see if it makes his > > > > problem go away/happen sooner. > > > > > P. > > > > > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: > > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: > > > >> Hello again, > > > >> > > > >> It might be of interest to point out that substituting st_union() > > > >> with > > > >> st_memunion() seems to have worked around this. I'm curious > > > >> though, because there is not a great deal of data being processed, > > > >> and I am running this on a fairly sturdy system that that has more > > > >> capacity than some of the Fedora systems I'm running. > > > > > > > > st_memunion builds a big array with all geometries in it.. > > > > you were hitting a limit of the array type. > > > > st_union should behave better. > > > > > > > > --strk; > > > > > > > > () Free GIS & Flash consultant/developer > > > > /\ http://strk.keybit.net/services.html > > > > _______________________________________________ > > > > 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 peter.hopfgartner at r3-gis.com Sat Mar 20 15:41:31 2010 From: peter.hopfgartner at r3-gis.com (Peter Hopfgartner) Date: Sat, 20 Mar 2010 23:41:31 +0100 Subject: [postgis-users] Read file encoding from from shape file In-Reply-To: <30fe546d1002260600l6f22afeav82704a5941ad632c@mail.gmail.com> References: <4B87D2EC.8070601@r3-gis.com> <30fe546d1002260600l6f22afeav82704a5941ad632c@mail.gmail.com> Message-ID: <4BA54F1B.20506@r3-gis.com> Paul Ramsey wrote: > I was never certain that ESRI software actually respected the DBF code > page flags, but your reference indicates they do, so this seems > reasonable. Some investigation of the current state of shapelib WRT > encoding would be wise, as I think we should update our shapelib to > the current version when we release 2.0. > > P. > > I had a look if it was quick deal to upgrade to current shapelib. I copied dbfopen.c, shpopen.c and shapefil.h from a currrent the shapelib checkout. Unfortunatly, it seems to me that date handling has disappeared from shapelib. At least FTDate is not defined anymore and in DBFOpen no 'D' is assigned as field type. Am I missing something obvious here? Regards, Peter > On Fri, Feb 26, 2010 at 5:55 AM, Peter Hopfgartner > wrote: > >> Hi >> >> Looking into the sources of shp2pgsql, [0], it seems that the loader assumes >> that the encoding of the dbf file is "WINDOWS-1252", if not specified >> differently by the -W command line option. >> >> From [1], shape files carry some information about their encoding, either in >> the dbf file header at byte position 29, [2], or in a separate file with >> extension CPG. >> >> Would it make sense to change the default behaviour of shp2pgsql into: >> >> 1) try to get file encoding from dbf file or cpg file >> 2) if 1) fails, take WINDOWS-1252 as default >> 3) if -W is given, take this option >> >> And then, is the information about the encoding set by pgsql2shp? It would >> be smooth, if shapes generated by pgsql2shp could be imported by shp2pgsql >> without specifying any encoding during import ("just works"). >> >> Regards, >> >> Peter >> >> [0] http://trac.osgeo.org/postgis/browser/trunk/loader/ >> [1] >> http://support.esri.com/index.cfm?fa=knowledgebase.techArticles.articleShow&d=21106 >> [2] http://www.dbase.com/knowledgebase/int/db7_file_fmt.htm >> >> -- >> >> Dott. Peter Hopfgartner >> >> R3 GIS Srl - GmbH >> Via Johann Kravogl-Str. 2 >> I-39012 Meran/Merano (BZ) >> Email: peter.hopfgartner at r3-gis.com >> Tel. : +39 0473 494949 >> Fax : +39 0473 069902 >> www : http://www.r3-gis.com >> >> XING : http://www.xing.com/go/invita/8917535 >> _______________________________________________ >> 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 > > -- Dott. Peter Hopfgartner R3 GIS Srl - GmbH Via Johann Kravogl-Str. 2 I-39012 Meran/Merano (BZ) Email: peter.hopfgartner at r3-gis.com Tel. : +39 0473 494949 Fax : +39 0473 069902 www : http://www.r3-gis.com XING : http://www.xing.com/go/invita/8917535 From pramsey at cleverelephant.ca Sat Mar 20 17:23:11 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Sat, 20 Mar 2010 17:23:11 -0700 Subject: [postgis-users] ERROR: array size exceeds the maximum allowed(134217727) In-Reply-To: <201003201830.42995.mgleahy@alumni.uwaterloo.ca> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003201810.38956.mgleahy@alumni.uwaterloo.ca> <201003201830.42995.mgleahy@alumni.uwaterloo.ca> Message-ID: <30fe546d1003201723m1c890792s9676231c08f2513b@mail.gmail.com> Mike Well, if you can reduce it to a small db dump and query that exercises it, I can install a 64bit ubuntu VM and see if it happens here too. P On Sat, Mar 20, 2010 at 3:30 PM, Mike Leahy wrote: > FWIW, ?if I remove the entire where clause at the end of the statement, it > works again (with st_union()) and is virtually instantaneous. > > On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: >> Hey, >> >> The query (when it works) is virtually instantaneous when I use >> ?st_memunion() (or when I took out part of the where clause - although now >> ?I can't even get that to work, so maybe it was just lucky). ?Each of the >> ?subqueries also work fine without any obvious problem. >> >> To me, it seems to be a combination of things that somehow add up to this >> limitation...I don't see what settings could affect the array size limit >> ?(in postgresql.conf). ?Can anyone point to a config option that might make >> ?a difference, or maybe point to another place with settings I can tinker >> ?with? >> >> Mike >> >> On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: >> > Mike, >> > >> > We apologize, didn't notice this was in a subquery and that you have a >> > ?limit statement in your query. ? So we presume regardless of your WHERE >> > ?only 26 records are being selected. >> > >> > So Paul could be right that you do have data that is hitting some >> > compiled or variable limit. >> > >> > Does running the subquery alone work or you didn't try because it takes a >> > long time? >> > >> > Thanks, >> > Leo and Regina >> > http://www.postgis.us >> > >> > -----Original Message----- >> > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy >> > Sent: Saturday, March 20, 2010 2:01 PM >> > To: Paragon Corporation >> > Cc: 'PostGIS Users Discussion' >> > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum >> > allowed(134217727) >> > >> > Hi Leo/Regina, >> > >> > Thanks for the suggestion. ?I tried adding the clause 'not geom is null' >> > to the where statement in each of the two sub-queries that have the >> > st_union(geom) functions are used, but it still segfaults. >> > >> > I also tried this on a fresh database with very little data, and it >> > doesn't seem to cause problems. ?But I have two databases with live data >> > where I can cause this. ?I have been able to pare one of these down to >> > remove personal information and reduce unnecessary data, while still >> > generating the crash with >> > that query. ? Would someone be interested in a dump of this db? ?Of >> > course, that someone would ideally be able to test this on a 64-bit >> > (K)ubutnu system, in the hopes that the problem can be replicated. >> > >> > Mike >> > >> > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: >> > > Paul, >> > > I doubt array size limit is the issue. ?He said when he left the where >> > > condition out it worked. ?I would think it would definitely blow up in >> > > that case. >> > > >> > > Mike, >> > > The issue from before was that array aggregate functions did not >> > > handle NULLs correctly. ?64-bit systems were more likely to segfault >> > > or give strange Errros in this case. >> > > >> > > To rule out that we still have some of these issues in the code base, >> > > can you add a >> > > >> > > geom IS NOT NULL >> > > >> > > Condition to your WHERE filter. ?If that works, then the NULL issue is >> > > probably still lurking somewhere. >> > > >> > > Leo and Regina >> > > http://www.postgis.us >> > > >> > > >> > > -----Original Message----- >> > > From: postgis-users-bounces at postgis.refractions.net >> > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> > > Paul Ramsey >> > > Sent: Saturday, March 20, 2010 10:56 AM >> > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca >> > > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum >> > > allowed(134217727) >> > > >> > > Actually, memunion does the opposite, it passes the resultant and >> > > preserves mem. The default behavior is fast-but-memory-hungry. And has >> > > been for some time, though in different forms. There were some bugs in >> > > the array handling code, but Mark CA killed most of them, so the >> > > latest 1.5 and 1.4 streams should be good. If it's possible that the >> > > issue is one of array size, maybe Mike could find the dial that >> > > controls that maximum, and turn it up and ?down and see if it makes his >> > >> > problem go away/happen sooner. >> > >> > > P. >> > > >> > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: >> > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: >> > > >> Hello again, >> > > >> >> > > >> It might be of interest to point out that substituting st_union() >> > > >> with >> > > >> st_memunion() seems to have worked around this. ?I'm curious >> > > >> though, because there is not a great deal of data being processed, >> > > >> and I am running this on a fairly sturdy system that that has more >> > > >> capacity than some of the Fedora systems I'm running. >> > > > >> > > > st_memunion builds a big array with all geometries in it.. >> > > > you were hitting a limit of the array type. >> > > > st_union should behave better. >> > > > >> > > > --strk; >> > > > >> > > > ?() ? Free GIS & Flash consultant/developer >> > > > ?/\ ? http://strk.keybit.net/services.html >> > > > _______________________________________________ >> > > > 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 pramsey at cleverelephant.ca Sat Mar 20 17:28:16 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Sat, 20 Mar 2010 17:28:16 -0700 Subject: [postgis-users] Read file encoding from from shape file In-Reply-To: <4BA54F1B.20506@r3-gis.com> References: <4B87D2EC.8070601@r3-gis.com> <30fe546d1002260600l6f22afeav82704a5941ad632c@mail.gmail.com> <4BA54F1B.20506@r3-gis.com> Message-ID: <30fe546d1003201728x7cdc7341n6fd1dc136d2f7a66@mail.gmail.com> Yes, there's patches to our shapelib that don't exist in the mainline. The process needs to identify our changes to feed back to mainline, update mainline, then bring that in. P. On Sat, Mar 20, 2010 at 3:41 PM, Peter Hopfgartner wrote: > Paul Ramsey wrote: >> >> I was never certain that ESRI software actually respected the DBF code >> page flags, but your reference indicates they do, so this seems >> reasonable. Some investigation of the current state of shapelib WRT >> encoding would be wise, as I think we should update our shapelib to >> the current version when we release 2.0. >> >> P. >> >> > > I had a look if it was quick deal to upgrade to current shapelib. I copied > dbfopen.c, shpopen.c and shapefil.h from a currrent the shapelib checkout. > Unfortunatly, it seems to me that date handling has disappeared from > shapelib. At least FTDate is not defined anymore and in DBFOpen no 'D' is > assigned as field type. > > Am I missing something obvious here? > > Regards, > > Peter >> >> On Fri, Feb 26, 2010 at 5:55 AM, Peter Hopfgartner >> wrote: >> >>> >>> Hi >>> >>> Looking into the sources of shp2pgsql, [0], it seems that the loader >>> assumes >>> that the encoding of the dbf file is ?"WINDOWS-1252", if not specified >>> differently by the -W command line option. >>> >>> From [1], shape files carry some information about their encoding, either >>> in >>> the dbf file header at byte position 29, [2], or in a separate file with >>> extension CPG. >>> >>> Would it make sense to change the default behaviour of shp2pgsql into: >>> >>> 1) try to get file encoding from dbf file or cpg file >>> 2) if 1) fails, take WINDOWS-1252 as default >>> 3) if -W is given, take this option >>> >>> And then, is the information about the encoding set by pgsql2shp? It >>> would >>> be smooth, if shapes generated by pgsql2shp could be imported by >>> shp2pgsql >>> without specifying any encoding during import ("just works"). >>> >>> Regards, >>> >>> Peter >>> >>> [0] http://trac.osgeo.org/postgis/browser/trunk/loader/ >>> [1] >>> >>> http://support.esri.com/index.cfm?fa=knowledgebase.techArticles.articleShow&d=21106 >>> [2] http://www.dbase.com/knowledgebase/int/db7_file_fmt.htm >>> >>> -- >>> >>> Dott. Peter Hopfgartner >>> >>> R3 GIS Srl - GmbH >>> Via Johann Kravogl-Str. 2 >>> I-39012 Meran/Merano (BZ) >>> Email: peter.hopfgartner at r3-gis.com >>> Tel. : +39 0473 494949 >>> Fax ?: +39 0473 069902 >>> www ?: http://www.r3-gis.com >>> >>> XING : http://www.xing.com/go/invita/8917535 >>> _______________________________________________ >>> 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 >> >> > > > -- > > Dott. Peter Hopfgartner > > R3 GIS Srl - GmbH > Via Johann Kravogl-Str. 2 > I-39012 Meran/Merano (BZ) > Email: peter.hopfgartner at r3-gis.com > Tel. : +39 0473 494949 > Fax ?: +39 0473 069902 > www ?: http://www.r3-gis.com > > XING : http://www.xing.com/go/invita/8917535 > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From lr at pcorp.us Sat Mar 20 20:28:41 2010 From: lr at pcorp.us (Paragon Corporation) Date: Sat, 20 Mar 2010 23:28:41 -0400 Subject: [postgis-users] ERROR: array size exceeds the maximumallowed(134217727) In-Reply-To: <30fe546d1003201723m1c890792s9676231c08f2513b@mail.gmail.com> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca><201003201810.38956.mgleahy@alumni.uwaterloo.ca><201003201830.42995.mgleahy@alumni.uwaterloo.ca> <30fe546d1003201723m1c890792s9676231c08f2513b@mail.gmail.com> Message-ID: <6BE1774525424E8CBCCD08B59A1486E3@c> Mike, Actually scanning thru the archives that 13... is a common number so suspect that is an OS limit. This could be very well a bug in PostgreSQL 8.4. Have you tried this on other PostgreSQL 8.4 installs on other your Fedoras - you mentioned trying on older installs? Your problem sounds exactly like this guy's and he wasn't using PostGIS at all but array_agg (which is logic that PostGIS borrowed from to implement the faster collecting ST_Union behavior)i http://archives.postgresql.org/pgsql-hackers/2009-06/msg01171.php If you haven't already probably good to check the plan difference between the two queries (one with addtional WHERE and one without). It could be doing something nuts like running the sub select for each record you have in the outer only when your extra WHERE condition is added and doing more or less the sane thing when you take it out. We've had some odd behavior in 8.4 with the planner doing strange things that we haven't been able to pin down and had to implement workaround for. As we described in this article.. Its probably unrelated though but just a thought to throw out at the wind. http://www.postgresonline.com/journal/index.php?/archives/149-Forcing-the-pl anners-hand-with-set-enable_seqscan-off-WTF.html Leo and Regina, http://www.postgis.us -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey Sent: Saturday, March 20, 2010 8:23 PM To: mgleahy at alumni.uwaterloo.ca; PostGIS Users Discussion Subject: Re: [postgis-users] ERROR: array size exceeds the maximumallowed(134217727) Mike Well, if you can reduce it to a small db dump and query that exercises it, I can install a 64bit ubuntu VM and see if it happens here too. P On Sat, Mar 20, 2010 at 3:30 PM, Mike Leahy wrote: > FWIW, ?if I remove the entire where clause at the end of the > statement, it works again (with st_union()) and is virtually instantaneous. > > On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: >> Hey, >> >> The query (when it works) is virtually instantaneous when I use >> ?st_memunion() (or when I took out part of the where clause - >> although now >> ?I can't even get that to work, so maybe it was just lucky). ?Each of >> the >> ?subqueries also work fine without any obvious problem. >> >> To me, it seems to be a combination of things that somehow add up to >> this limitation...I don't see what settings could affect the array >> size limit >> ?(in postgresql.conf). ?Can anyone point to a config option that >> might make >> ?a difference, or maybe point to another place with settings I can >> tinker >> ?with? >> >> Mike >> >> On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: >> > Mike, >> > >> > We apologize, didn't notice this was in a subquery and that you >> > have a >> > ?limit statement in your query. ? So we presume regardless of your >> > WHERE >> > ?only 26 records are being selected. >> > >> > So Paul could be right that you do have data that is hitting some >> > compiled or variable limit. >> > >> > Does running the subquery alone work or you didn't try because it >> > takes a long time? >> > >> > Thanks, >> > Leo and Regina >> > http://www.postgis.us >> > >> > -----Original Message----- >> > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy >> > Sent: Saturday, March 20, 2010 2:01 PM >> > To: Paragon Corporation >> > Cc: 'PostGIS Users Discussion' >> > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum >> > allowed(134217727) >> > >> > Hi Leo/Regina, >> > >> > Thanks for the suggestion. ?I tried adding the clause 'not geom is null' >> > to the where statement in each of the two sub-queries that have the >> > st_union(geom) functions are used, but it still segfaults. >> > >> > I also tried this on a fresh database with very little data, and it >> > doesn't seem to cause problems. ?But I have two databases with live >> > data where I can cause this. ?I have been able to pare one of these >> > down to remove personal information and reduce unnecessary data, >> > while still generating the crash with that query. ? Would someone >> > be interested in a dump of this db? ?Of course, that someone would >> > ideally be able to test this on a 64-bit (K)ubutnu system, in the >> > hopes that the problem can be replicated. >> > >> > Mike >> > >> > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: >> > > Paul, >> > > I doubt array size limit is the issue. ?He said when he left the >> > > where condition out it worked. ?I would think it would definitely >> > > blow up in that case. >> > > >> > > Mike, >> > > The issue from before was that array aggregate functions did not >> > > handle NULLs correctly. ?64-bit systems were more likely to >> > > segfault or give strange Errros in this case. >> > > >> > > To rule out that we still have some of these issues in the code >> > > base, can you add a >> > > >> > > geom IS NOT NULL >> > > >> > > Condition to your WHERE filter. ?If that works, then the NULL >> > > issue is probably still lurking somewhere. >> > > >> > > Leo and Regina >> > > http://www.postgis.us >> > > >> > > >> > > -----Original Message----- >> > > From: postgis-users-bounces at postgis.refractions.net >> > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf >> > > Of Paul Ramsey >> > > Sent: Saturday, March 20, 2010 10:56 AM >> > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca >> > > Subject: Re: [postgis-users] ERROR: array size exceeds the >> > > maximum >> > > allowed(134217727) >> > > >> > > Actually, memunion does the opposite, it passes the resultant and >> > > preserves mem. The default behavior is fast-but-memory-hungry. >> > > And has been for some time, though in different forms. There were >> > > some bugs in the array handling code, but Mark CA killed most of >> > > them, so the latest 1.5 and 1.4 streams should be good. If it's >> > > possible that the issue is one of array size, maybe Mike could >> > > find the dial that controls that maximum, and turn it up and ? >> > > down and see if it makes his >> > >> > problem go away/happen sooner. >> > >> > > P. >> > > >> > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: >> > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: >> > > >> Hello again, >> > > >> >> > > >> It might be of interest to point out that substituting >> > > >> st_union() with >> > > >> st_memunion() seems to have worked around this. ?I'm curious >> > > >> though, because there is not a great deal of data being >> > > >> processed, and I am running this on a fairly sturdy system >> > > >> that that has more capacity than some of the Fedora systems I'm running. >> > > > >> > > > st_memunion builds a big array with all geometries in it.. >> > > > you were hitting a limit of the array type. >> > > > st_union should behave better. >> > > > >> > > > --strk; >> > > > >> > > > ?() ? Free GIS & Flash consultant/developer >> > > > ?/\ ? http://strk.keybit.net/services.html >> > > > _______________________________________________ >> > > > 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 lr at pcorp.us Sat Mar 20 20:35:32 2010 From: lr at pcorp.us (Paragon Corporation) Date: Sat, 20 Mar 2010 23:35:32 -0400 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: <6BE1774525424E8CBCCD08B59A1486E3@c> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca><201003201810.38956.mgleahy@alumni.uwaterloo.ca><201003201830.42995.mgleahy@alumni.uwaterloo.ca><30fe546d1003201723m1c890792s9676231c08f2513b@mail.gmail.com> <6BE1774525424E8CBCCD08B59A1486E3@c> Message-ID: <7A13C27471C14C5392A726768A3998C1@c> Mike, Another thought. I suppose it could be the more or less two identical subselects both with array_aggs Just to give Paul something hopefully shorter to work with. Does this fail too? SELECT csls.chat_id, csls.ugeom FROM ( SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, csl1.chat_id FROM testdb.user_selections AS us1 INNER JOIN testdb.chat_selection_links AS csl1 ON us1.id = csl1.selection_id WHERE (not us1.user_drawing and not csl1.deleted) GROUP BY chat_id ) AS csls LEFT JOIN ( SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, csl2.chat_id FROM testdb.user_selections AS us2 INNER JOIN testdb.chat_selection_links AS csl2 ON us2.id = csl2.selection_id WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) GROUP BY chat_id ) AS csld ON csls.chat_id = csld.chat_id Leo and Regina, http://www.postgis.us -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paragon Corporation Sent: Saturday, March 20, 2010 11:29 PM To: 'PostGIS Users Discussion'; mgleahy at alumni.uwaterloo.ca Subject: Re: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) Mike, Actually scanning thru the archives that 13... is a common number so suspect that is an OS limit. This could be very well a bug in PostgreSQL 8.4. Have you tried this on other PostgreSQL 8.4 installs on other your Fedoras - you mentioned trying on older installs? Your problem sounds exactly like this guy's and he wasn't using PostGIS at all but array_agg (which is logic that PostGIS borrowed from to implement the faster collecting ST_Union behavior)i http://archives.postgresql.org/pgsql-hackers/2009-06/msg01171.php If you haven't already probably good to check the plan difference between the two queries (one with addtional WHERE and one without). It could be doing something nuts like running the sub select for each record you have in the outer only when your extra WHERE condition is added and doing more or less the sane thing when you take it out. We've had some odd behavior in 8.4 with the planner doing strange things that we haven't been able to pin down and had to implement workaround for. As we described in this article.. Its probably unrelated though but just a thought to throw out at the wind. http://www.postgresonline.com/journal/index.php?/archives/149-Forcing-the-pl anners-hand-with-set-enable_seqscan-off-WTF.html Leo and Regina, http://www.postgis.us -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul Ramsey Sent: Saturday, March 20, 2010 8:23 PM To: mgleahy at alumni.uwaterloo.ca; PostGIS Users Discussion Subject: Re: [postgis-users] ERROR: array size exceeds the maximumallowed(134217727) Mike Well, if you can reduce it to a small db dump and query that exercises it, I can install a 64bit ubuntu VM and see if it happens here too. P On Sat, Mar 20, 2010 at 3:30 PM, Mike Leahy wrote: > FWIW, ?if I remove the entire where clause at the end of the > statement, it works again (with st_union()) and is virtually instantaneous. > > On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: >> Hey, >> >> The query (when it works) is virtually instantaneous when I use >> ?st_memunion() (or when I took out part of the where clause - >> although now >> ?I can't even get that to work, so maybe it was just lucky). ?Each of >> the >> ?subqueries also work fine without any obvious problem. >> >> To me, it seems to be a combination of things that somehow add up to >> this limitation...I don't see what settings could affect the array >> size limit >> ?(in postgresql.conf). ?Can anyone point to a config option that >> might make >> ?a difference, or maybe point to another place with settings I can >> tinker >> ?with? >> >> Mike >> >> On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: >> > Mike, >> > >> > We apologize, didn't notice this was in a subquery and that you >> > have a >> > ?limit statement in your query. ? So we presume regardless of your >> > WHERE >> > ?only 26 records are being selected. >> > >> > So Paul could be right that you do have data that is hitting some >> > compiled or variable limit. >> > >> > Does running the subquery alone work or you didn't try because it >> > takes a long time? >> > >> > Thanks, >> > Leo and Regina >> > http://www.postgis.us >> > >> > -----Original Message----- >> > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy >> > Sent: Saturday, March 20, 2010 2:01 PM >> > To: Paragon Corporation >> > Cc: 'PostGIS Users Discussion' >> > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum >> > allowed(134217727) >> > >> > Hi Leo/Regina, >> > >> > Thanks for the suggestion. ?I tried adding the clause 'not geom is null' >> > to the where statement in each of the two sub-queries that have the >> > st_union(geom) functions are used, but it still segfaults. >> > >> > I also tried this on a fresh database with very little data, and it >> > doesn't seem to cause problems. ?But I have two databases with live >> > data where I can cause this. ?I have been able to pare one of these >> > down to remove personal information and reduce unnecessary data, >> > while still generating the crash with that query. ? Would someone >> > be interested in a dump of this db? ?Of course, that someone would >> > ideally be able to test this on a 64-bit (K)ubutnu system, in the >> > hopes that the problem can be replicated. >> > >> > Mike >> > >> > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: >> > > Paul, >> > > I doubt array size limit is the issue. ?He said when he left the >> > > where condition out it worked. ?I would think it would definitely >> > > blow up in that case. >> > > >> > > Mike, >> > > The issue from before was that array aggregate functions did not >> > > handle NULLs correctly. ?64-bit systems were more likely to >> > > segfault or give strange Errros in this case. >> > > >> > > To rule out that we still have some of these issues in the code >> > > base, can you add a >> > > >> > > geom IS NOT NULL >> > > >> > > Condition to your WHERE filter. ?If that works, then the NULL >> > > issue is probably still lurking somewhere. >> > > >> > > Leo and Regina >> > > http://www.postgis.us >> > > >> > > >> > > -----Original Message----- >> > > From: postgis-users-bounces at postgis.refractions.net >> > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf >> > > Of Paul Ramsey >> > > Sent: Saturday, March 20, 2010 10:56 AM >> > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca >> > > Subject: Re: [postgis-users] ERROR: array size exceeds the >> > > maximum >> > > allowed(134217727) >> > > >> > > Actually, memunion does the opposite, it passes the resultant and >> > > preserves mem. The default behavior is fast-but-memory-hungry. >> > > And has been for some time, though in different forms. There were >> > > some bugs in the array handling code, but Mark CA killed most of >> > > them, so the latest 1.5 and 1.4 streams should be good. If it's >> > > possible that the issue is one of array size, maybe Mike could >> > > find the dial that controls that maximum, and turn it up and down >> > > and see if it makes his >> > >> > problem go away/happen sooner. >> > >> > > P. >> > > >> > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: >> > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: >> > > >> Hello again, >> > > >> >> > > >> It might be of interest to point out that substituting >> > > >> st_union() with >> > > >> st_memunion() seems to have worked around this. ?I'm curious >> > > >> though, because there is not a great deal of data being >> > > >> processed, and I am running this on a fairly sturdy system >> > > >> that that has more capacity than some of the Fedora systems >> > > >> I'm running. >> > > > >> > > > st_memunion builds a big array with all geometries in it.. >> > > > you were hitting a limit of the array type. >> > > > st_union should behave better. >> > > > >> > > > --strk; >> > > > >> > > > ?() ? Free GIS & Flash consultant/developer >> > > > ?/\ ? http://strk.keybit.net/services.html >> > > > _______________________________________________ >> > > > 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 _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From mgleahy at alumni.uwaterloo.ca Sat Mar 20 21:04:00 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sun, 21 Mar 2010 00:04:00 -0400 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: <7A13C27471C14C5392A726768A3998C1@c> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <6BE1774525424E8CBCCD08B59A1486E3@c> <7A13C27471C14C5392A726768A3998C1@c> Message-ID: <201003210004.01042.mgleahy@alumni.uwaterloo.ca> Hi, That query there does not crash. I'll try to follow up on your suggestions in the prior email. Mike On Saturday 20 March 2010 23:35:32 Paragon Corporation wrote: > Mike, > Another thought. I suppose it could be the more or less two identical > subselects both with array_aggs > Just to give Paul something hopefully shorter to work with. Does this fail > too? > > SELECT csls.chat_id, csls.ugeom > FROM ( > > SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, csl1.chat_id > FROM testdb.user_selections AS us1 > INNER JOIN testdb.chat_selection_links AS csl1 ON us1.id = > csl1.selection_id > WHERE (not us1.user_drawing and not csl1.deleted) > GROUP BY chat_id > > ) AS csls > > LEFT JOIN ( > > SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, csl2.chat_id > FROM testdb.user_selections AS us2 > INNER JOIN testdb.chat_selection_links AS csl2 ON us2.id = > csl2.selection_id > WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) > GROUP BY chat_id > > ) AS csld ON csls.chat_id = csld.chat_id > > Leo and Regina, > http://www.postgis.us > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paragon > Corporation > Sent: Saturday, March 20, 2010 11:29 PM > To: 'PostGIS Users Discussion'; mgleahy at alumni.uwaterloo.ca > Subject: Re: [postgis-users] ERROR: array size exceeds > themaximumallowed(134217727) > > Mike, > Actually scanning thru the archives that 13... is a common number so > suspect that is an OS limit. > > This could be very well a bug in PostgreSQL 8.4. > > Have you tried this on other PostgreSQL 8.4 installs on other your Fedoras > - you mentioned trying on older installs? > > Your problem sounds exactly like this guy's and he wasn't using PostGIS at > all but array_agg (which is logic that PostGIS borrowed from to implement > the faster collecting ST_Union behavior)i > http://archives.postgresql.org/pgsql-hackers/2009-06/msg01171.php > > If you haven't already probably good to check the plan difference between > the two queries (one with addtional WHERE and one without). It could be > doing something nuts like running the sub select for each record you have > in the outer only when your extra WHERE condition is added and doing more > or less the sane thing when you take it out. > > We've had some odd behavior in 8.4 with the planner doing strange things > that we haven't been able to pin down and had to implement workaround for. > As we described in this article.. Its probably unrelated though but just a > thought to throw out at the wind. > > http://www.postgresonline.com/journal/index.php?/archives/149-Forcing-the-p > l anners-hand-with-set-enable_seqscan-off-WTF.html > > Leo and Regina, > http://www.postgis.us > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul > Ramsey > Sent: Saturday, March 20, 2010 8:23 PM > To: mgleahy at alumni.uwaterloo.ca; PostGIS Users Discussion > Subject: Re: [postgis-users] ERROR: array size exceeds the > maximumallowed(134217727) > > Mike > > Well, if you can reduce it to a small db dump and query that exercises it, > I can install a 64bit ubuntu VM and see if it happens here too. > > P > > On Sat, Mar 20, 2010 at 3:30 PM, Mike Leahy > > wrote: > > FWIW, if I remove the entire where clause at the end of the > > statement, it works again (with st_union()) and is virtually > > instantaneous. > > > On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: > >> Hey, > >> > >> The query (when it works) is virtually instantaneous when I use > >> st_memunion() (or when I took out part of the where clause - > >> although now > >> I can't even get that to work, so maybe it was just lucky). Each of > >> the > >> subqueries also work fine without any obvious problem. > >> > >> To me, it seems to be a combination of things that somehow add up to > >> this limitation...I don't see what settings could affect the array > >> size limit > >> (in postgresql.conf). Can anyone point to a config option that > >> might make > >> a difference, or maybe point to another place with settings I can > >> tinker > >> with? > >> > >> Mike > >> > >> On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: > >> > Mike, > >> > > >> > We apologize, didn't notice this was in a subquery and that you > >> > have a > >> > limit statement in your query. So we presume regardless of your > >> > WHERE > >> > only 26 records are being selected. > >> > > >> > So Paul could be right that you do have data that is hitting some > >> > compiled or variable limit. > >> > > >> > Does running the subquery alone work or you didn't try because it > >> > takes a long time? > >> > > >> > Thanks, > >> > Leo and Regina > >> > http://www.postgis.us > >> > > >> > -----Original Message----- > >> > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy > >> > Sent: Saturday, March 20, 2010 2:01 PM > >> > To: Paragon Corporation > >> > Cc: 'PostGIS Users Discussion' > >> > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum > >> > allowed(134217727) > >> > > >> > Hi Leo/Regina, > >> > > >> > Thanks for the suggestion. I tried adding the clause 'not geom is > > null' > > >> > to the where statement in each of the two sub-queries that have the > >> > st_union(geom) functions are used, but it still segfaults. > >> > > >> > I also tried this on a fresh database with very little data, and it > >> > doesn't seem to cause problems. But I have two databases with live > >> > data where I can cause this. I have been able to pare one of these > >> > down to remove personal information and reduce unnecessary data, > >> > while still generating the crash with that query. Would someone > >> > be interested in a dump of this db? Of course, that someone would > >> > ideally be able to test this on a 64-bit (K)ubutnu system, in the > >> > hopes that the problem can be replicated. > >> > > >> > Mike > >> > > >> > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: > >> > > Paul, > >> > > I doubt array size limit is the issue. He said when he left the > >> > > where condition out it worked. I would think it would definitely > >> > > blow up in that case. > >> > > > >> > > Mike, > >> > > The issue from before was that array aggregate functions did not > >> > > handle NULLs correctly. 64-bit systems were more likely to > >> > > segfault or give strange Errros in this case. > >> > > > >> > > To rule out that we still have some of these issues in the code > >> > > base, can you add a > >> > > > >> > > geom IS NOT NULL > >> > > > >> > > Condition to your WHERE filter. If that works, then the NULL > >> > > issue is probably still lurking somewhere. > >> > > > >> > > Leo and Regina > >> > > http://www.postgis.us > >> > > > >> > > > >> > > -----Original Message----- > >> > > From: postgis-users-bounces at postgis.refractions.net > >> > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf > >> > > Of Paul Ramsey > >> > > Sent: Saturday, March 20, 2010 10:56 AM > >> > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca > >> > > Subject: Re: [postgis-users] ERROR: array size exceeds the > >> > > maximum > >> > > allowed(134217727) > >> > > > >> > > Actually, memunion does the opposite, it passes the resultant and > >> > > preserves mem. The default behavior is fast-but-memory-hungry. > >> > > And has been for some time, though in different forms. There were > >> > > some bugs in the array handling code, but Mark CA killed most of > >> > > them, so the latest 1.5 and 1.4 streams should be good. If it's > >> > > possible that the issue is one of array size, maybe Mike could > >> > > find the dial that controls that maximum, and turn it up and down > >> > > and see if it makes his > >> > > >> > problem go away/happen sooner. > >> > > >> > > P. > >> > > > >> > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: > >> > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: > >> > > >> Hello again, > >> > > >> > >> > > >> It might be of interest to point out that substituting > >> > > >> st_union() with > >> > > >> st_memunion() seems to have worked around this. I'm curious > >> > > >> though, because there is not a great deal of data being > >> > > >> processed, and I am running this on a fairly sturdy system > >> > > >> that that has more capacity than some of the Fedora systems > >> > > >> I'm > > running. > > >> > > > st_memunion builds a big array with all geometries in it.. > >> > > > you were hitting a limit of the array type. > >> > > > st_union should behave better. > >> > > > > >> > > > --strk; > >> > > > > >> > > > () Free GIS & Flash consultant/developer > >> > > > /\ http://strk.keybit.net/services.html > >> > > > _______________________________________________ > >> > > > 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 > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From mgleahy at alumni.uwaterloo.ca Sat Mar 20 21:29:40 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sun, 21 Mar 2010 00:29:40 -0400 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: <7A13C27471C14C5392A726768A3998C1@c> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <6BE1774525424E8CBCCD08B59A1486E3@c> <7A13C27471C14C5392A726768A3998C1@c> Message-ID: <201003210029.40130.mgleahy@alumni.uwaterloo.ca> Leo/Regina, In response to your earlier message, I did find that report of the identical error message. However, as I'm sure you noticed, there is no apparent investigation that followed after it. That was why I went to the PostgreSQL IRC channel first...they walked me through generating a core dump, which is what then pointed to it being a problem related to PostGIS. So while it's certainly the same error being reported, the source of the problem in this case appears PostGIS-specific - likely due to the logic that you note was borrowed from the array_agg that caused the problem in the previous report. As for looking at the different query plans for working/non-working versions of the statement with different where conditions, I've attached several results in text files. Two examples that worked, one that segfaults, and one that produces the 'array size exceeds...' error message. All of these are the same query, just with variations in the where condition. The query plan is a but much for me to interpret though - what does this look like to the experts? Mike On Saturday 20 March 2010 23:35:32 Paragon Corporation wrote: > Mike, > Another thought. I suppose it could be the more or less two identical > subselects both with array_aggs > Just to give Paul something hopefully shorter to work with. Does this fail > too? > > SELECT csls.chat_id, csls.ugeom > FROM ( > > SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, csl1.chat_id > FROM testdb.user_selections AS us1 > INNER JOIN testdb.chat_selection_links AS csl1 ON us1.id = > csl1.selection_id > WHERE (not us1.user_drawing and not csl1.deleted) > GROUP BY chat_id > > ) AS csls > > LEFT JOIN ( > > SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, csl2.chat_id > FROM testdb.user_selections AS us2 > INNER JOIN testdb.chat_selection_links AS csl2 ON us2.id = > csl2.selection_id > WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) > GROUP BY chat_id > > ) AS csld ON csls.chat_id = csld.chat_id > > Leo and Regina, > http://www.postgis.us > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paragon > Corporation > Sent: Saturday, March 20, 2010 11:29 PM > To: 'PostGIS Users Discussion'; mgleahy at alumni.uwaterloo.ca > Subject: Re: [postgis-users] ERROR: array size exceeds > themaximumallowed(134217727) > > Mike, > Actually scanning thru the archives that 13... is a common number so > suspect that is an OS limit. > > This could be very well a bug in PostgreSQL 8.4. > > Have you tried this on other PostgreSQL 8.4 installs on other your Fedoras > - you mentioned trying on older installs? > > Your problem sounds exactly like this guy's and he wasn't using PostGIS at > all but array_agg (which is logic that PostGIS borrowed from to implement > the faster collecting ST_Union behavior)i > http://archives.postgresql.org/pgsql-hackers/2009-06/msg01171.php > > If you haven't already probably good to check the plan difference between > the two queries (one with addtional WHERE and one without). It could be > doing something nuts like running the sub select for each record you have > in the outer only when your extra WHERE condition is added and doing more > or less the sane thing when you take it out. > > We've had some odd behavior in 8.4 with the planner doing strange things > that we haven't been able to pin down and had to implement workaround for. > As we described in this article.. Its probably unrelated though but just a > thought to throw out at the wind. > > http://www.postgresonline.com/journal/index.php?/archives/149-Forcing-the-p > l anners-hand-with-set-enable_seqscan-off-WTF.html > > Leo and Regina, > http://www.postgis.us > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul > Ramsey > Sent: Saturday, March 20, 2010 8:23 PM > To: mgleahy at alumni.uwaterloo.ca; PostGIS Users Discussion > Subject: Re: [postgis-users] ERROR: array size exceeds the > maximumallowed(134217727) > > Mike > > Well, if you can reduce it to a small db dump and query that exercises it, > I can install a 64bit ubuntu VM and see if it happens here too. > > P > > On Sat, Mar 20, 2010 at 3:30 PM, Mike Leahy > > wrote: > > FWIW, if I remove the entire where clause at the end of the > > statement, it works again (with st_union()) and is virtually > > instantaneous. > > > On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: > >> Hey, > >> > >> The query (when it works) is virtually instantaneous when I use > >> st_memunion() (or when I took out part of the where clause - > >> although now > >> I can't even get that to work, so maybe it was just lucky). Each of > >> the > >> subqueries also work fine without any obvious problem. > >> > >> To me, it seems to be a combination of things that somehow add up to > >> this limitation...I don't see what settings could affect the array > >> size limit > >> (in postgresql.conf). Can anyone point to a config option that > >> might make > >> a difference, or maybe point to another place with settings I can > >> tinker > >> with? > >> > >> Mike > >> > >> On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: > >> > Mike, > >> > > >> > We apologize, didn't notice this was in a subquery and that you > >> > have a > >> > limit statement in your query. So we presume regardless of your > >> > WHERE > >> > only 26 records are being selected. > >> > > >> > So Paul could be right that you do have data that is hitting some > >> > compiled or variable limit. > >> > > >> > Does running the subquery alone work or you didn't try because it > >> > takes a long time? > >> > > >> > Thanks, > >> > Leo and Regina > >> > http://www.postgis.us > >> > > >> > -----Original Message----- > >> > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy > >> > Sent: Saturday, March 20, 2010 2:01 PM > >> > To: Paragon Corporation > >> > Cc: 'PostGIS Users Discussion' > >> > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum > >> > allowed(134217727) > >> > > >> > Hi Leo/Regina, > >> > > >> > Thanks for the suggestion. I tried adding the clause 'not geom is > > null' > > >> > to the where statement in each of the two sub-queries that have the > >> > st_union(geom) functions are used, but it still segfaults. > >> > > >> > I also tried this on a fresh database with very little data, and it > >> > doesn't seem to cause problems. But I have two databases with live > >> > data where I can cause this. I have been able to pare one of these > >> > down to remove personal information and reduce unnecessary data, > >> > while still generating the crash with that query. Would someone > >> > be interested in a dump of this db? Of course, that someone would > >> > ideally be able to test this on a 64-bit (K)ubutnu system, in the > >> > hopes that the problem can be replicated. > >> > > >> > Mike > >> > > >> > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: > >> > > Paul, > >> > > I doubt array size limit is the issue. He said when he left the > >> > > where condition out it worked. I would think it would definitely > >> > > blow up in that case. > >> > > > >> > > Mike, > >> > > The issue from before was that array aggregate functions did not > >> > > handle NULLs correctly. 64-bit systems were more likely to > >> > > segfault or give strange Errros in this case. > >> > > > >> > > To rule out that we still have some of these issues in the code > >> > > base, can you add a > >> > > > >> > > geom IS NOT NULL > >> > > > >> > > Condition to your WHERE filter. If that works, then the NULL > >> > > issue is probably still lurking somewhere. > >> > > > >> > > Leo and Regina > >> > > http://www.postgis.us > >> > > > >> > > > >> > > -----Original Message----- > >> > > From: postgis-users-bounces at postgis.refractions.net > >> > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf > >> > > Of Paul Ramsey > >> > > Sent: Saturday, March 20, 2010 10:56 AM > >> > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca > >> > > Subject: Re: [postgis-users] ERROR: array size exceeds the > >> > > maximum > >> > > allowed(134217727) > >> > > > >> > > Actually, memunion does the opposite, it passes the resultant and > >> > > preserves mem. The default behavior is fast-but-memory-hungry. > >> > > And has been for some time, though in different forms. There were > >> > > some bugs in the array handling code, but Mark CA killed most of > >> > > them, so the latest 1.5 and 1.4 streams should be good. If it's > >> > > possible that the issue is one of array size, maybe Mike could > >> > > find the dial that controls that maximum, and turn it up and down > >> > > and see if it makes his > >> > > >> > problem go away/happen sooner. > >> > > >> > > P. > >> > > > >> > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: > >> > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: > >> > > >> Hello again, > >> > > >> > >> > > >> It might be of interest to point out that substituting > >> > > >> st_union() with > >> > > >> st_memunion() seems to have worked around this. I'm curious > >> > > >> though, because there is not a great deal of data being > >> > > >> processed, and I am running this on a fairly sturdy system > >> > > >> that that has more capacity than some of the Fedora systems > >> > > >> I'm > > running. > > >> > > > st_memunion builds a big array with all geometries in it.. > >> > > > you were hitting a limit of the array type. > >> > > > st_union should behave better. > >> > > > > >> > > > --strk; > >> > > > > >> > > > () Free GIS & Flash consultant/developer > >> > > > /\ http://strk.keybit.net/services.html > >> > > > _______________________________________________ > >> > > > 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 > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -------------- next part -------------- explain SELECT tdesc.* FROM ( SELECT cl.id, cl.parent_id, cl.username, cl.type, cl.text, cl.time, cl.flags, cl.depth, '[stuff]' as extent, csls.selection, csld.drawing, round(date_part('epoch',time)*1000.0) AS epoch_ms, csls.selection, csld.drawing, ctu.target_users, ctg.target_groups, clr.replies, case when (num_target_users>0 or num_target_groups>0) then true else false end AS private FROM bv_mc2.chat_log AS cl LEFT JOIN ( SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, csl1.chat_id FROM bv_mc2.user_selections AS us1 INNER JOIN bv_mc2.chat_selection_links AS csl1 ON us1.id = csl1.selection_id WHERE (not us1.user_drawing and not csl1.deleted) GROUP BY chat_id ) AS csls ON csls.chat_id = cl.id LEFT JOIN ( SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, csl2.chat_id FROM bv_mc2.user_selections AS us2 INNER JOIN bv_mc2.chat_selection_links AS csl2 ON us2.id = csl2.selection_id WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) GROUP BY chat_id ) AS csld ON csld.chat_id = cl.id LEFT JOIN ( SELECT chat_target_users.id, count(*) AS num_target_users, '[stuff]'::varchar AS target_users, ARRAY['stuff']::text[] AS target_users_array FROM bv_mc2.chat_target_users GROUP BY id ) AS ctu ON cl.id = ctu.id LEFT JOIN ( SELECT chat_target_groups.id, count(*) AS num_target_groups, '[stuff]'::varchar AS target_groups, ARRAY['stuff']::text[] AS target_groups_array FROM bv_mc2.chat_target_groups GROUP BY id ) AS ctg ON cl.id = ctg.id LEFT JOIN ( SELECT chat_log.parent_id AS id, '[stuff]' AS replies FROM bv_mc2.chat_log GROUP BY parent_id ) AS clr ON cl.id = clr.id WHERE ((num_target_users is null and num_target_groups is null) or (num_target_users+num_target_groups)=0 or ((cl.username = 'admin' or 'admin' = any(target_users_array) or ARRAY['admin','everyone'] && target_groups_array))) AND (not deleted) ORDER BY cl.id desc LIMIT 25 ) AS tdesc ORDER BY tdesc.id asc; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Sort (cost=89.44..89.46 rows=7 width=385) Sort Key: cl.id -> Limit (cost=89.25..89.27 rows=7 width=229) -> Sort (cost=89.25..89.27 rows=7 width=229) Sort Key: cl.id -> Hash Left Join (cost=80.71..89.16 rows=7 width=229) Hash Cond: (cl.id = csld.chat_id) -> Hash Left Join (cost=62.45..70.77 rows=7 width=197) Hash Cond: (cl.id = clr.id) -> Hash Left Join (cost=57.87..66.13 rows=7 width=165) Hash Cond: (cl.id = csls.chat_id) -> Hash Left Join (cost=38.15..46.38 rows=7 width=133) Hash Cond: (cl.id = ctu.id) Filter: (((ctu.num_target_users IS NULL) AND (ctg.num_target_groups IS NULL)) OR ((ctu.num_target_users + ctg.num_target_groups) = 0) OR ((cl.username)::text = 'admin'::text) OR ('admin'::text = ANY (ctu.target_users_array)) OR ('{admin,everyone}'::text[] && ctg.target_groups_array)) -> Hash Left Join (cost=35.45..42.20 rows=100 width=125) Hash Cond: (cl.id = ctg.id) -> Seq Scan on chat_log cl (cost=0.00..3.00 rows=100 width=53) Filter: (NOT deleted) -> Hash (cost=32.95..32.95 rows=200 width=76) -> Subquery Scan ctg (cost=28.45..32.95 rows=200 width=76) -> HashAggregate (cost=28.45..30.95 rows=200 width=4) -> Seq Scan on chat_target_groups (cost=0.00..22.30 rows=1230 width=4) -> Hash (cost=2.27..2.27 rows=34 width=76) -> Subquery Scan ctu (cost=1.51..2.27 rows=34 width=76) -> HashAggregate (cost=1.51..1.94 rows=34 width=4) -> Seq Scan on chat_target_users (cost=0.00..1.34 rows=34 width=4) -> Hash (cost=19.47..19.47 rows=20 width=36) -> Subquery Scan csls (cost=19.02..19.47 rows=20 width=36) -> HashAggregate (cost=19.02..19.27 rows=20 width=22665) -> Hash Join (cost=2.11..18.80 rows=44 width=22665) Hash Cond: (us1.id = csl1.selection_id) -> Seq Scan on user_selections us1 (cost=0.00..15.41 rows=223 width=22665) Filter: (NOT user_drawing) -> Hash (cost=1.56..1.56 rows=44 width=8) -> Seq Scan on chat_selection_links csl1 (cost=0.00..1.56 rows=44 width=8) Filter: (NOT deleted) -> Hash (cost=4.07..4.07 rows=41 width=36) -> Subquery Scan clr (cost=3.25..4.07 rows=41 width=36) -> HashAggregate (cost=3.25..3.66 rows=41 width=4) -> Seq Scan on chat_log (cost=0.00..3.00 rows=100 width=4) -> Hash (cost=18.04..18.04 rows=18 width=36) -> Subquery Scan csld (cost=17.63..18.04 rows=18 width=36) -> HashAggregate (cost=17.63..17.86 rows=18 width=22665) -> Hash Join (cost=15.63..17.54 rows=18 width=22665) Hash Cond: (csl2.selection_id = us2.id) -> Seq Scan on chat_selection_links csl2 (cost=0.00..1.56 rows=44 width=8) Filter: (NOT deleted) -> Hash (cost=15.41..15.41 rows=18 width=22665) -> Seq Scan on user_selections us2 (cost=0.00..15.41 rows=18 width=22665) Filter: (user_drawing AND deleted) (50 rows) -------------- next part -------------- explain SELECT tdesc.* FROM ( SELECT cl.id, cl.parent_id, cl.username, cl.type, cl.text, cl.time, cl.flags, cl.depth, '[stuff]' as extent, csls.selection, csld.drawing, round(date_part('epoch',time)*1000.0) AS epoch_ms, csls.selection, csld.drawing, ctu.target_users, ctg.target_groups, clr.replies, case when (num_target_users>0 or num_target_groups>0) then true else false end AS private FROM bv_mc2.chat_log AS cl LEFT JOIN ( SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, csl1.chat_id FROM bv_mc2.user_selections AS us1 INNER JOIN bv_mc2.chat_selection_links AS csl1 ON us1.id = csl1.selection_id WHERE (not us1.user_drawing and not csl1.deleted) GROUP BY chat_id ) AS csls ON csls.chat_id = cl.id LEFT JOIN ( SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, csl2.chat_id FROM bv_mc2.user_selections AS us2 INNER JOIN bv_mc2.chat_selection_links AS csl2 ON us2.id = csl2.selection_id WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) GROUP BY chat_id ) AS csld ON csld.chat_id = cl.id LEFT JOIN ( SELECT chat_target_users.id, count(*) AS num_target_users, '[stuff]'::varchar AS target_users, ARRAY['stuff']::text[] AS target_users_array FROM bv_mc2.chat_target_users GROUP BY id ) AS ctu ON cl.id = ctu.id LEFT JOIN ( SELECT chat_target_groups.id, count(*) AS num_target_groups, '[stuff]'::varchar AS target_groups, ARRAY['stuff']::text[] AS target_groups_array FROM bv_mc2.chat_target_groups GROUP BY id ) AS ctg ON cl.id = ctg.id LEFT JOIN ( SELECT chat_log.parent_id AS id, '[stuff]' AS replies FROM bv_mc2.chat_log GROUP BY parent_id ) AS clr ON cl.id = clr.id WHERE ((num_target_users is null and num_target_groups is null) or (num_target_users+num_target_groups)=0 or ((cl.username = 'admin' or 'admin' = any(target_users_array) or ARRAY['admin','everyone'] && target_groups_array) and (time>'2010-03-20 00:52:57.230968-04'::timestamptz))) AND (not deleted) AND (cl.depth = 0) ORDER BY cl.id desc LIMIT 25 ) AS tdesc ORDER BY tdesc.id asc; QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sort (cost=87.05..87.06 rows=1 width=385) Sort Key: cl.id -> Limit (cost=87.03..87.03 rows=1 width=229) -> Sort (cost=87.03..87.03 rows=1 width=229) Sort Key: cl.id -> Nested Loop Left Join (cost=78.05..87.02 rows=1 width=229) Join Filter: (csl2.chat_id = cl.id) -> Nested Loop Left Join (cost=60.42..68.74 rows=1 width=197) Join Filter: (cl.id = chat_log.parent_id) -> Nested Loop Left Join (cost=57.17..64.16 rows=1 width=165) Join Filter: (csl1.chat_id = cl.id) -> Hash Left Join (cost=38.15..44.45 rows=1 width=133) Hash Cond: (cl.id = ctu.id) Filter: (((ctu.num_target_users IS NULL) AND (ctg.num_target_groups IS NULL)) OR ((ctu.num_target_users + ctg.num_target_groups) = 0) OR ((((cl.username)::text = 'admin'::text) OR ('admin'::text = ANY (ctu.target_users_array)) OR ('{admin,everyone}'::text[] && ctg.target_groups_array)) AND (cl."time" > '2010-03-20 00:52:57.230968-04'::timestamp with time zone))) -> Hash Left Join (cost=35.45..40.39 rows=45 width=125) Hash Cond: (cl.id = ctg.id) -> Seq Scan on chat_log cl (cost=0.00..3.25 rows=45 width=53) Filter: ((NOT deleted) AND (depth = 0)) -> Hash (cost=32.95..32.95 rows=200 width=76) -> Subquery Scan ctg (cost=28.45..32.95 rows=200 width=76) -> HashAggregate (cost=28.45..30.95 rows=200 width=4) -> Seq Scan on chat_target_groups (cost=0.00..22.30 rows=1230 width=4) -> Hash (cost=2.27..2.27 rows=34 width=76) -> Subquery Scan ctu (cost=1.51..2.27 rows=34 width=76) -> HashAggregate (cost=1.51..1.94 rows=34 width=4) -> Seq Scan on chat_target_users (cost=0.00..1.34 rows=34 width=4) -> HashAggregate (cost=19.02..19.27 rows=20 width=22665) -> Hash Join (cost=2.11..18.80 rows=44 width=22665) Hash Cond: (us1.id = csl1.selection_id) -> Seq Scan on user_selections us1 (cost=0.00..15.41 rows=223 width=22665) Filter: (NOT user_drawing) -> Hash (cost=1.56..1.56 rows=44 width=8) -> Seq Scan on chat_selection_links csl1 (cost=0.00..1.56 rows=44 width=8) Filter: (NOT deleted) -> HashAggregate (cost=3.25..3.66 rows=41 width=4) -> Seq Scan on chat_log (cost=0.00..3.00 rows=100 width=4) -> HashAggregate (cost=17.63..17.86 rows=18 width=22665) -> Hash Join (cost=15.63..17.54 rows=18 width=22665) Hash Cond: (csl2.selection_id = us2.id) -> Seq Scan on chat_selection_links csl2 (cost=0.00..1.56 rows=44 width=8) Filter: (NOT deleted) -> Hash (cost=15.41..15.41 rows=18 width=22665) -> Seq Scan on user_selections us2 (cost=0.00..15.41 rows=18 width=22665) Filter: (user_drawing AND deleted) (44 rows) -------------- next part -------------- explain SELECT tdesc.* FROM ( SELECT cl.id, cl.parent_id, cl.username, cl.type, cl.text, cl.time, cl.flags, cl.depth, '[stuff]' as extent, csls.selection, csld.drawing, round(date_part('epoch',time)*1000.0) AS epoch_ms, csls.selection, csld.drawing, ctu.target_users, ctg.target_groups, clr.replies, case when (num_target_users>0 or num_target_groups>0) then true else false end AS private FROM bv_mc2.chat_log AS cl LEFT JOIN ( SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, csl1.chat_id FROM bv_mc2.user_selections AS us1 INNER JOIN bv_mc2.chat_selection_links AS csl1 ON us1.id = csl1.selection_id WHERE (not us1.user_drawing and not csl1.deleted) GROUP BY chat_id ) AS csls ON csls.chat_id = cl.id LEFT JOIN ( SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, csl2.chat_id FROM bv_mc2.user_selections AS us2 INNER JOIN bv_mc2.chat_selection_links AS csl2 ON us2.id = csl2.selection_id WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) GROUP BY chat_id ) AS csld ON csld.chat_id = cl.id LEFT JOIN ( SELECT chat_target_users.id, count(*) AS num_target_users, '[stuff]'::varchar AS target_users, ARRAY['stuff']::text[] AS target_users_array FROM bv_mc2.chat_target_users GROUP BY id ) AS ctu ON cl.id = ctu.id LEFT JOIN ( SELECT chat_target_groups.id, count(*) AS num_target_groups, '[stuff]'::varchar AS target_groups, ARRAY['stuff']::text[] AS target_groups_array FROM bv_mc2.chat_target_groups GROUP BY id ) AS ctg ON cl.id = ctg.id LEFT JOIN ( SELECT chat_log.parent_id AS id, '[stuff]' AS replies FROM bv_mc2.chat_log GROUP BY parent_id ) AS clr ON cl.id = clr.id WHERE ((num_target_users is null and num_target_groups is null) or (num_target_users+num_target_groups)=0 or ((cl.username = 'admin' or 'admin' = any(target_users_array) or ARRAY['admin','everyone'] && target_groups_array))) AND (not deleted) AND (cl.depth = 0) ORDER BY cl.id desc LIMIT 25 ) AS tdesc ORDER BY tdesc.id asc; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Sort (cost=87.13..87.13 rows=3 width=385) Sort Key: cl.id -> Limit (cost=87.07..87.07 rows=3 width=229) -> Sort (cost=87.07..87.07 rows=3 width=229) Sort Key: cl.id -> Hash Left Join (cost=80.71..87.04 rows=3 width=229) Hash Cond: (cl.id = csld.chat_id) -> Hash Left Join (cost=62.45..68.72 rows=3 width=197) Hash Cond: (cl.id = clr.id) -> Hash Left Join (cost=57.87..64.10 rows=3 width=165) Hash Cond: (cl.id = csls.chat_id) -> Hash Left Join (cost=38.15..44.36 rows=3 width=133) Hash Cond: (cl.id = ctu.id) Filter: (((ctu.num_target_users IS NULL) AND (ctg.num_target_groups IS NULL)) OR ((ctu.num_target_users + ctg.num_target_groups) = 0) OR ((cl.username)::text = 'admin'::text) OR ('admin'::text = ANY (ctu.target_users_array)) OR ('{admin,everyone}'::text[] && ctg.target_groups_array)) -> Hash Left Join (cost=35.45..40.39 rows=45 width=125) Hash Cond: (cl.id = ctg.id) -> Seq Scan on chat_log cl (cost=0.00..3.25 rows=45 width=53) Filter: ((NOT deleted) AND (depth = 0)) -> Hash (cost=32.95..32.95 rows=200 width=76) -> Subquery Scan ctg (cost=28.45..32.95 rows=200 width=76) -> HashAggregate (cost=28.45..30.95 rows=200 width=4) -> Seq Scan on chat_target_groups (cost=0.00..22.30 rows=1230 width=4) -> Hash (cost=2.27..2.27 rows=34 width=76) -> Subquery Scan ctu (cost=1.51..2.27 rows=34 width=76) -> HashAggregate (cost=1.51..1.94 rows=34 width=4) -> Seq Scan on chat_target_users (cost=0.00..1.34 rows=34 width=4) -> Hash (cost=19.47..19.47 rows=20 width=36) -> Subquery Scan csls (cost=19.02..19.47 rows=20 width=36) -> HashAggregate (cost=19.02..19.27 rows=20 width=22665) -> Hash Join (cost=2.11..18.80 rows=44 width=22665) Hash Cond: (us1.id = csl1.selection_id) -> Seq Scan on user_selections us1 (cost=0.00..15.41 rows=223 width=22665) Filter: (NOT user_drawing) -> Hash (cost=1.56..1.56 rows=44 width=8) -> Seq Scan on chat_selection_links csl1 (cost=0.00..1.56 rows=44 width=8) Filter: (NOT deleted) -> Hash (cost=4.07..4.07 rows=41 width=36) -> Subquery Scan clr (cost=3.25..4.07 rows=41 width=36) -> HashAggregate (cost=3.25..3.66 rows=41 width=4) -> Seq Scan on chat_log (cost=0.00..3.00 rows=100 width=4) -> Hash (cost=18.04..18.04 rows=18 width=36) -> Subquery Scan csld (cost=17.63..18.04 rows=18 width=36) -> HashAggregate (cost=17.63..17.86 rows=18 width=22665) -> Hash Join (cost=15.63..17.54 rows=18 width=22665) Hash Cond: (csl2.selection_id = us2.id) -> Seq Scan on chat_selection_links csl2 (cost=0.00..1.56 rows=44 width=8) Filter: (NOT deleted) -> Hash (cost=15.41..15.41 rows=18 width=22665) -> Seq Scan on user_selections us2 (cost=0.00..15.41 rows=18 width=22665) Filter: (user_drawing AND deleted) (50 rows) -------------- next part -------------- explain SELECT tdesc.* FROM ( SELECT cl.id, cl.parent_id, cl.username, cl.type, cl.text, cl.time, cl.flags, cl.depth, '[stuff]' as extent, csls.selection, csld.drawing, round(date_part('epoch',time)*1000.0) AS epoch_ms, csls.selection, csld.drawing, ctu.target_users, ctg.target_groups, clr.replies, case when (num_target_users>0 or num_target_groups>0) then true else false end AS private FROM bv_mc2.chat_log AS cl LEFT JOIN ( SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, csl1.chat_id FROM bv_mc2.user_selections AS us1 INNER JOIN bv_mc2.chat_selection_links AS csl1 ON us1.id = csl1.selection_id WHERE (not us1.user_drawing and not csl1.deleted) GROUP BY chat_id ) AS csls ON csls.chat_id = cl.id LEFT JOIN ( SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, csl2.chat_id FROM bv_mc2.user_selections AS us2 INNER JOIN bv_mc2.chat_selection_links AS csl2 ON us2.id = csl2.selection_id WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) GROUP BY chat_id ) AS csld ON csld.chat_id = cl.id LEFT JOIN ( SELECT chat_target_users.id, count(*) AS num_target_users, '[stuff]'::varchar AS target_users, ARRAY['stuff']::text[] AS target_users_array FROM bv_mc2.chat_target_users GROUP BY id ) AS ctu ON cl.id = ctu.id LEFT JOIN ( SELECT chat_target_groups.id, count(*) AS num_target_groups, '[stuff]'::varchar AS target_groups, ARRAY['stuff']::text[] AS target_groups_array FROM bv_mc2.chat_target_groups GROUP BY id ) AS ctg ON cl.id = ctg.id LEFT JOIN ( SELECT chat_log.parent_id AS id, '[stuff]' AS replies FROM bv_mc2.chat_log GROUP BY parent_id ) AS clr ON cl.id = clr.id WHERE ((num_target_users is null and num_target_groups is null) or (num_target_users+num_target_groups)=0 or ((cl.username = 'admin' or 'admin' = any(target_users_array) or ARRAY['admin','everyone'] && target_groups_array) and (time>'2010-03-20 00:52:57.230968-04'::timestamptz))) ORDER BY cl.id desc LIMIT 25 ) AS tdesc ORDER BY tdesc.id asc; QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sort (cost=89.07..89.08 rows=1 width=385) Sort Key: cl.id -> Limit (cost=89.05..89.05 rows=1 width=229) -> Sort (cost=89.05..89.05 rows=1 width=229) Sort Key: cl.id -> Nested Loop Left Join (cost=78.05..89.04 rows=1 width=229) Join Filter: (csl1.chat_id = cl.id) -> Nested Loop Left Join (cost=59.03..69.31 rows=1 width=197) Join Filter: (cl.id = chat_log.parent_id) -> Nested Loop Left Join (cost=55.78..64.72 rows=1 width=165) Join Filter: (csl2.chat_id = cl.id) -> Hash Left Join (cost=38.15..46.46 rows=1 width=133) Hash Cond: (cl.id = ctu.id) Filter: (((ctu.num_target_users IS NULL) AND (ctg.num_target_groups IS NULL)) OR ((ctu.num_target_users + ctg.num_target_groups) = 0) OR ((((cl.username)::text = 'admin'::text) OR ('admin'::text = ANY (ctu.target_users_array)) OR ('{admin,everyone}'::text[] && ctg.target_groups_array)) AND (cl."time" > '2010-03-20 00:52:57.230968-04'::timestamp with time zone))) -> Hash Left Join (cost=35.45..42.20 rows=100 width=125) Hash Cond: (cl.id = ctg.id) -> Seq Scan on chat_log cl (cost=0.00..3.00 rows=100 width=53) -> Hash (cost=32.95..32.95 rows=200 width=76) -> Subquery Scan ctg (cost=28.45..32.95 rows=200 width=76) -> HashAggregate (cost=28.45..30.95 rows=200 width=4) -> Seq Scan on chat_target_groups (cost=0.00..22.30 rows=1230 width=4) -> Hash (cost=2.27..2.27 rows=34 width=76) -> Subquery Scan ctu (cost=1.51..2.27 rows=34 width=76) -> HashAggregate (cost=1.51..1.94 rows=34 width=4) -> Seq Scan on chat_target_users (cost=0.00..1.34 rows=34 width=4) -> HashAggregate (cost=17.63..17.86 rows=18 width=22665) -> Hash Join (cost=15.63..17.54 rows=18 width=22665) Hash Cond: (csl2.selection_id = us2.id) -> Seq Scan on chat_selection_links csl2 (cost=0.00..1.56 rows=44 width=8) Filter: (NOT deleted) -> Hash (cost=15.41..15.41 rows=18 width=22665) -> Seq Scan on user_selections us2 (cost=0.00..15.41 rows=18 width=22665) Filter: (user_drawing AND deleted) -> HashAggregate (cost=3.25..3.66 rows=41 width=4) -> Seq Scan on chat_log (cost=0.00..3.00 rows=100 width=4) -> HashAggregate (cost=19.02..19.27 rows=20 width=22665) -> Hash Join (cost=2.11..18.80 rows=44 width=22665) Hash Cond: (us1.id = csl1.selection_id) -> Seq Scan on user_selections us1 (cost=0.00..15.41 rows=223 width=22665) Filter: (NOT user_drawing) -> Hash (cost=1.56..1.56 rows=44 width=8) -> Seq Scan on chat_selection_links csl1 (cost=0.00..1.56 rows=44 width=8) Filter: (NOT deleted) (43 rows) From pramsey at cleverelephant.ca Sun Mar 21 09:57:03 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Sun, 21 Mar 2010 09:57:03 -0700 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: <201003210029.40130.mgleahy@alumni.uwaterloo.ca> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <6BE1774525424E8CBCCD08B59A1486E3@c> <7A13C27471C14C5392A726768A3998C1@c> <201003210029.40130.mgleahy@alumni.uwaterloo.ca> Message-ID: <30fe546d1003210957s622d11f2ie01764a07aa52646@mail.gmail.com> As I was installing KUbuntu, I realized I should try the query on my own system, and under OS/X 10.6 I see the array error, though it seems to be cleanly trapped, there is no segfault. crashdb=# \i ./crashing.sql psql:./crashing.sql:36: ERROR: array size exceeds the maximum allowed (134217727) crashdb=# P. On Sat, Mar 20, 2010 at 9:29 PM, Mike Leahy wrote: > Leo/Regina, > > In response to your earlier message, I did find that report of the identical > error message. ?However, as I'm sure you noticed, there is no apparent > investigation that followed after it. ?That was why I went to the PostgreSQL > IRC channel first...they walked me through generating a core dump, which is > what then pointed to it being a problem related to PostGIS. ?So while it's > certainly the same error being reported, the source of the problem in this > case appears PostGIS-specific - likely due to the logic that you note was > borrowed from the array_agg that caused the problem in the previous report. > > As for looking at the different query plans for working/non-working versions of > the statement with different where conditions, I've attached several results in > text files. ?Two examples that worked, one that segfaults, and one that > produces the 'array size exceeds...' error message. ?All of these are the same > query, just with variations in the where condition. ?The query plan is a but > much for me to interpret though - what does this look like to the experts? > > Mike > > On Saturday 20 March 2010 23:35:32 Paragon Corporation wrote: >> Mike, >> Another thought. ?I suppose it could be the more or less two identical >> subselects both with array_aggs >> Just to give Paul something hopefully shorter to work with. ?Does this fail >> too? >> >> SELECT csls.chat_id, csls.ugeom >> FROM ?( >> >> ? ? SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, csl1.chat_id >> ? ? ? FROM testdb.user_selections AS us1 >> ? ? INNER JOIN testdb.chat_selection_links AS csl1 ON us1.id = >> csl1.selection_id >> ? ? ? WHERE (not us1.user_drawing and not csl1.deleted) >> ? ? GROUP BY chat_id >> >> ? ) AS csls >> >> ? LEFT JOIN ( >> >> ? ? SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, csl2.chat_id >> ? ? ? FROM testdb.user_selections AS us2 >> ? ? INNER JOIN testdb.chat_selection_links AS csl2 ON us2.id = >> csl2.selection_id >> ? ? ? WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) >> ? ?GROUP BY chat_id >> >> ? ) AS csld ON csls.chat_id = csld.chat_id >> >> Leo and Regina, >> http://www.postgis.us >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paragon >> Corporation >> Sent: Saturday, March 20, 2010 11:29 PM >> To: 'PostGIS Users Discussion'; mgleahy at alumni.uwaterloo.ca >> Subject: Re: [postgis-users] ERROR: array size exceeds >> themaximumallowed(134217727) >> >> Mike, >> Actually scanning thru the archives that 13... is a common number so >> ?suspect that is an OS limit. >> >> This could be very well a bug in PostgreSQL 8.4. >> >> Have you tried this on other PostgreSQL 8.4 installs on other your Fedoras >> ?- you mentioned trying on older installs? >> >> Your problem sounds exactly like this guy's and he wasn't using PostGIS at >> all but array_agg (which is logic that PostGIS borrowed from to implement >> the faster collecting ST_Union behavior)i >> http://archives.postgresql.org/pgsql-hackers/2009-06/msg01171.php >> >> If you haven't already probably good to check the plan difference between >> the two queries (one with addtional WHERE and one without). ?It could be >> doing something nuts like running the sub select for each record you have >> ?in the outer only when your extra WHERE condition is added and doing more >> ?or less the sane thing when you take it out. >> >> We've had some odd behavior in 8.4 with the planner doing strange things >> that we haven't been able to pin down and had to implement workaround for. >> As we described in this article.. Its probably unrelated though but just a >> thought to throw out at the wind. >> >> http://www.postgresonline.com/journal/index.php?/archives/149-Forcing-the-p >> l anners-hand-with-set-enable_seqscan-off-WTF.html >> >> Leo and Regina, >> http://www.postgis.us >> >> -----Original Message----- >> From: postgis-users-bounces at postgis.refractions.net >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul >> Ramsey >> Sent: Saturday, March 20, 2010 8:23 PM >> To: mgleahy at alumni.uwaterloo.ca; PostGIS Users Discussion >> Subject: Re: [postgis-users] ERROR: array size exceeds the >> maximumallowed(134217727) >> >> Mike >> >> Well, if you can reduce it to a small db dump and query that exercises it, >> ?I can install a 64bit ubuntu VM and see if it happens here too. >> >> P >> >> On Sat, Mar 20, 2010 at 3:30 PM, Mike Leahy >> >> wrote: >> > FWIW, ?if I remove the entire where clause at the end of the >> > statement, it works again (with st_union()) and is virtually >> >> instantaneous. >> >> > On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: >> >> Hey, >> >> >> >> The query (when it works) is virtually instantaneous when I use >> >> ?st_memunion() (or when I took out part of the where clause - >> >> although now >> >> ?I can't even get that to work, so maybe it was just lucky). ?Each of >> >> the >> >> ?subqueries also work fine without any obvious problem. >> >> >> >> To me, it seems to be a combination of things that somehow add up to >> >> this limitation...I don't see what settings could affect the array >> >> size limit >> >> ?(in postgresql.conf). ?Can anyone point to a config option that >> >> might make >> >> ?a difference, or maybe point to another place with settings I can >> >> tinker >> >> ?with? >> >> >> >> Mike >> >> >> >> On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: >> >> > Mike, >> >> > >> >> > We apologize, didn't notice this was in a subquery and that you >> >> > have a >> >> > ?limit statement in your query. ? So we presume regardless of your >> >> > WHERE >> >> > ?only 26 records are being selected. >> >> > >> >> > So Paul could be right that you do have data that is hitting some >> >> > compiled or variable limit. >> >> > >> >> > Does running the subquery alone work or you didn't try because it >> >> > takes a long time? >> >> > >> >> > Thanks, >> >> > Leo and Regina >> >> > http://www.postgis.us >> >> > >> >> > -----Original Message----- >> >> > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy >> >> > Sent: Saturday, March 20, 2010 2:01 PM >> >> > To: Paragon Corporation >> >> > Cc: 'PostGIS Users Discussion' >> >> > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum >> >> > allowed(134217727) >> >> > >> >> > Hi Leo/Regina, >> >> > >> >> > Thanks for the suggestion. ?I tried adding the clause 'not geom is >> >> null' >> >> >> > to the where statement in each of the two sub-queries that have the >> >> > st_union(geom) functions are used, but it still segfaults. >> >> > >> >> > I also tried this on a fresh database with very little data, and it >> >> > doesn't seem to cause problems. ?But I have two databases with live >> >> > data where I can cause this. ?I have been able to pare one of these >> >> > down to remove personal information and reduce unnecessary data, >> >> > while still generating the crash with that query. ? Would someone >> >> > be interested in a dump of this db? ?Of course, that someone would >> >> > ideally be able to test this on a 64-bit (K)ubutnu system, in the >> >> > hopes that the problem can be replicated. >> >> > >> >> > Mike >> >> > >> >> > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: >> >> > > Paul, >> >> > > I doubt array size limit is the issue. ?He said when he left the >> >> > > where condition out it worked. ?I would think it would definitely >> >> > > blow up in that case. >> >> > > >> >> > > Mike, >> >> > > The issue from before was that array aggregate functions did not >> >> > > handle NULLs correctly. ?64-bit systems were more likely to >> >> > > segfault or give strange Errros in this case. >> >> > > >> >> > > To rule out that we still have some of these issues in the code >> >> > > base, can you add a >> >> > > >> >> > > geom IS NOT NULL >> >> > > >> >> > > Condition to your WHERE filter. ?If that works, then the NULL >> >> > > issue is probably still lurking somewhere. >> >> > > >> >> > > Leo and Regina >> >> > > http://www.postgis.us >> >> > > >> >> > > >> >> > > -----Original Message----- >> >> > > From: postgis-users-bounces at postgis.refractions.net >> >> > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf >> >> > > Of Paul Ramsey >> >> > > Sent: Saturday, March 20, 2010 10:56 AM >> >> > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca >> >> > > Subject: Re: [postgis-users] ERROR: array size exceeds the >> >> > > maximum >> >> > > allowed(134217727) >> >> > > >> >> > > Actually, memunion does the opposite, it passes the resultant and >> >> > > preserves mem. The default behavior is fast-but-memory-hungry. >> >> > > And has been for some time, though in different forms. There were >> >> > > some bugs in the array handling code, but Mark CA killed most of >> >> > > them, so the latest 1.5 and 1.4 streams should be good. If it's >> >> > > possible that the issue is one of array size, maybe Mike could >> >> > > find the dial that controls that maximum, and turn it up and down >> >> > > and see if it makes his >> >> > >> >> > problem go away/happen sooner. >> >> > >> >> > > P. >> >> > > >> >> > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: >> >> > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: >> >> > > >> Hello again, >> >> > > >> >> >> > > >> It might be of interest to point out that substituting >> >> > > >> st_union() with >> >> > > >> st_memunion() seems to have worked around this. ?I'm curious >> >> > > >> though, because there is not a great deal of data being >> >> > > >> processed, and I am running this on a fairly sturdy system >> >> > > >> that that has more capacity than some of the Fedora systems >> >> > > >> I'm >> >> running. >> >> >> > > > st_memunion builds a big array with all geometries in it.. >> >> > > > you were hitting a limit of the array type. >> >> > > > st_union should behave better. >> >> > > > >> >> > > > --strk; >> >> > > > >> >> > > > ?() ? Free GIS & Flash consultant/developer >> >> > > > ?/\ ? http://strk.keybit.net/services.html >> >> > > > _______________________________________________ >> >> > > > 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 >> >> >> _______________________________________________ >> 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 mgleahy at alumni.uwaterloo.ca Sun Mar 21 12:58:03 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sun, 21 Mar 2010 15:58:03 -0400 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: <30fe546d1003210957s622d11f2ie01764a07aa52646@mail.gmail.com> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003210029.40130.mgleahy@alumni.uwaterloo.ca> <30fe546d1003210957s622d11f2ie01764a07aa52646@mail.gmail.com> Message-ID: <201003211558.03097.mgleahy@alumni.uwaterloo.ca> Paul, Thanks for looking into it - at least I know it's not just me (for the array size limit at least). What does a cleanly trapped error like this suggest to you? If you try different variations on the where condition at the end of the statement, are you able to get a segfault? Mike On Sunday 21 March 2010 12:57:03 Paul Ramsey wrote: > As I was installing KUbuntu, I realized I should try the query on my > own system, and under OS/X 10.6 I see the array error, though it seems > to be cleanly trapped, there is no segfault. > > crashdb=# \i ./crashing.sql > psql:./crashing.sql:36: ERROR: array size exceeds the maximum allowed > (134217727) > crashdb=# > > > P. > > On Sat, Mar 20, 2010 at 9:29 PM, Mike Leahy wrote: > > Leo/Regina, > > > > In response to your earlier message, I did find that report of the > > identical error message. However, as I'm sure you noticed, there is no > > apparent investigation that followed after it. That was why I went to > > the PostgreSQL IRC channel first...they walked me through generating a > > core dump, which is what then pointed to it being a problem related to > > PostGIS. So while it's certainly the same error being reported, the > > source of the problem in this case appears PostGIS-specific - likely due > > to the logic that you note was borrowed from the array_agg that caused > > the problem in the previous report. > > > > As for looking at the different query plans for working/non-working > > versions of the statement with different where conditions, I've attached > > several results in text files. Two examples that worked, one that > > segfaults, and one that produces the 'array size exceeds...' error > > message. All of these are the same query, just with variations in the > > where condition. The query plan is a but much for me to interpret though > > - what does this look like to the experts? > > > > Mike > > > > On Saturday 20 March 2010 23:35:32 Paragon Corporation wrote: > >> Mike, > >> Another thought. I suppose it could be the more or less two identical > >> subselects both with array_aggs > >> Just to give Paul something hopefully shorter to work with. Does this > >> fail too? > >> > >> SELECT csls.chat_id, csls.ugeom > >> FROM ( > >> > >> SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, csl1.chat_id > >> FROM testdb.user_selections AS us1 > >> INNER JOIN testdb.chat_selection_links AS csl1 ON us1.id = > >> csl1.selection_id > >> WHERE (not us1.user_drawing and not csl1.deleted) > >> GROUP BY chat_id > >> > >> ) AS csls > >> > >> LEFT JOIN ( > >> > >> SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, csl2.chat_id > >> FROM testdb.user_selections AS us2 > >> INNER JOIN testdb.chat_selection_links AS csl2 ON us2.id = > >> csl2.selection_id > >> WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) > >> GROUP BY chat_id > >> > >> ) AS csld ON csls.chat_id = csld.chat_id > >> > >> Leo and Regina, > >> http://www.postgis.us > >> > >> -----Original Message----- > >> From: postgis-users-bounces at postgis.refractions.net > >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > >> Paragon Corporation > >> Sent: Saturday, March 20, 2010 11:29 PM > >> To: 'PostGIS Users Discussion'; mgleahy at alumni.uwaterloo.ca > >> Subject: Re: [postgis-users] ERROR: array size exceeds > >> themaximumallowed(134217727) > >> > >> Mike, > >> Actually scanning thru the archives that 13... is a common number so > >> suspect that is an OS limit. > >> > >> This could be very well a bug in PostgreSQL 8.4. > >> > >> Have you tried this on other PostgreSQL 8.4 installs on other your > >> Fedoras - you mentioned trying on older installs? > >> > >> Your problem sounds exactly like this guy's and he wasn't using PostGIS > >> at all but array_agg (which is logic that PostGIS borrowed from to > >> implement the faster collecting ST_Union behavior)i > >> http://archives.postgresql.org/pgsql-hackers/2009-06/msg01171.php > >> > >> If you haven't already probably good to check the plan difference > >> between the two queries (one with addtional WHERE and one without). It > >> could be doing something nuts like running the sub select for each > >> record you have in the outer only when your extra WHERE condition is > >> added and doing more or less the sane thing when you take it out. > >> > >> We've had some odd behavior in 8.4 with the planner doing strange things > >> that we haven't been able to pin down and had to implement workaround > >> for. As we described in this article.. Its probably unrelated though but > >> just a thought to throw out at the wind. > >> > >> http://www.postgresonline.com/journal/index.php?/archives/149-Forcing-th > >>e-p l anners-hand-with-set-enable_seqscan-off-WTF.html > >> > >> Leo and Regina, > >> http://www.postgis.us > >> > >> -----Original Message----- > >> From: postgis-users-bounces at postgis.refractions.net > >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul > >> Ramsey > >> Sent: Saturday, March 20, 2010 8:23 PM > >> To: mgleahy at alumni.uwaterloo.ca; PostGIS Users Discussion > >> Subject: Re: [postgis-users] ERROR: array size exceeds the > >> maximumallowed(134217727) > >> > >> Mike > >> > >> Well, if you can reduce it to a small db dump and query that exercises > >> it, I can install a 64bit ubuntu VM and see if it happens here too. > >> > >> P > >> > >> On Sat, Mar 20, 2010 at 3:30 PM, Mike Leahy > >> > >> > >> wrote: > >> > FWIW, if I remove the entire where clause at the end of the > >> > statement, it works again (with st_union()) and is virtually > >> > >> instantaneous. > >> > >> > On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: > >> >> Hey, > >> >> > >> >> The query (when it works) is virtually instantaneous when I use > >> >> st_memunion() (or when I took out part of the where clause - > >> >> although now > >> >> I can't even get that to work, so maybe it was just lucky). Each of > >> >> the > >> >> subqueries also work fine without any obvious problem. > >> >> > >> >> To me, it seems to be a combination of things that somehow add up to > >> >> this limitation...I don't see what settings could affect the array > >> >> size limit > >> >> (in postgresql.conf). Can anyone point to a config option that > >> >> might make > >> >> a difference, or maybe point to another place with settings I can > >> >> tinker > >> >> with? > >> >> > >> >> Mike > >> >> > >> >> On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: > >> >> > Mike, > >> >> > > >> >> > We apologize, didn't notice this was in a subquery and that you > >> >> > have a > >> >> > limit statement in your query. So we presume regardless of your > >> >> > WHERE > >> >> > only 26 records are being selected. > >> >> > > >> >> > So Paul could be right that you do have data that is hitting some > >> >> > compiled or variable limit. > >> >> > > >> >> > Does running the subquery alone work or you didn't try because it > >> >> > takes a long time? > >> >> > > >> >> > Thanks, > >> >> > Leo and Regina > >> >> > http://www.postgis.us > >> >> > > >> >> > -----Original Message----- > >> >> > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy > >> >> > Sent: Saturday, March 20, 2010 2:01 PM > >> >> > To: Paragon Corporation > >> >> > Cc: 'PostGIS Users Discussion' > >> >> > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum > >> >> > allowed(134217727) > >> >> > > >> >> > Hi Leo/Regina, > >> >> > > >> >> > Thanks for the suggestion. I tried adding the clause 'not geom is > >> > >> null' > >> > >> >> > to the where statement in each of the two sub-queries that have the > >> >> > st_union(geom) functions are used, but it still segfaults. > >> >> > > >> >> > I also tried this on a fresh database with very little data, and it > >> >> > doesn't seem to cause problems. But I have two databases with live > >> >> > data where I can cause this. I have been able to pare one of these > >> >> > down to remove personal information and reduce unnecessary data, > >> >> > while still generating the crash with that query. Would someone > >> >> > be interested in a dump of this db? Of course, that someone would > >> >> > ideally be able to test this on a 64-bit (K)ubutnu system, in the > >> >> > hopes that the problem can be replicated. > >> >> > > >> >> > Mike > >> >> > > >> >> > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: > >> >> > > Paul, > >> >> > > I doubt array size limit is the issue. He said when he left the > >> >> > > where condition out it worked. I would think it would definitely > >> >> > > blow up in that case. > >> >> > > > >> >> > > Mike, > >> >> > > The issue from before was that array aggregate functions did not > >> >> > > handle NULLs correctly. 64-bit systems were more likely to > >> >> > > segfault or give strange Errros in this case. > >> >> > > > >> >> > > To rule out that we still have some of these issues in the code > >> >> > > base, can you add a > >> >> > > > >> >> > > geom IS NOT NULL > >> >> > > > >> >> > > Condition to your WHERE filter. If that works, then the NULL > >> >> > > issue is probably still lurking somewhere. > >> >> > > > >> >> > > Leo and Regina > >> >> > > http://www.postgis.us > >> >> > > > >> >> > > > >> >> > > -----Original Message----- > >> >> > > From: postgis-users-bounces at postgis.refractions.net > >> >> > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf > >> >> > > Of Paul Ramsey > >> >> > > Sent: Saturday, March 20, 2010 10:56 AM > >> >> > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca > >> >> > > Subject: Re: [postgis-users] ERROR: array size exceeds the > >> >> > > maximum > >> >> > > allowed(134217727) > >> >> > > > >> >> > > Actually, memunion does the opposite, it passes the resultant and > >> >> > > preserves mem. The default behavior is fast-but-memory-hungry. > >> >> > > And has been for some time, though in different forms. There were > >> >> > > some bugs in the array handling code, but Mark CA killed most of > >> >> > > them, so the latest 1.5 and 1.4 streams should be good. If it's > >> >> > > possible that the issue is one of array size, maybe Mike could > >> >> > > find the dial that controls that maximum, and turn it up and down > >> >> > > and see if it makes his > >> >> > > >> >> > problem go away/happen sooner. > >> >> > > >> >> > > P. > >> >> > > > >> >> > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: > >> >> > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: > >> >> > > >> Hello again, > >> >> > > >> > >> >> > > >> It might be of interest to point out that substituting > >> >> > > >> st_union() with > >> >> > > >> st_memunion() seems to have worked around this. I'm curious > >> >> > > >> though, because there is not a great deal of data being > >> >> > > >> processed, and I am running this on a fairly sturdy system > >> >> > > >> that that has more capacity than some of the Fedora systems > >> >> > > >> I'm > >> > >> running. > >> > >> >> > > > st_memunion builds a big array with all geometries in it.. > >> >> > > > you were hitting a limit of the array type. > >> >> > > > st_union should behave better. > >> >> > > > > >> >> > > > --strk; > >> >> > > > > >> >> > > > () Free GIS & Flash consultant/developer > >> >> > > > /\ http://strk.keybit.net/services.html > >> >> > > > _______________________________________________ > >> >> > > > 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 > >> > >> > >> _______________________________________________ > >> 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 pramsey at cleverelephant.ca Sun Mar 21 15:28:59 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Sun, 21 Mar 2010 15:28:59 -0700 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: <201003211558.03097.mgleahy@alumni.uwaterloo.ca> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003210029.40130.mgleahy@alumni.uwaterloo.ca> <30fe546d1003210957s622d11f2ie01764a07aa52646@mail.gmail.com> <201003211558.03097.mgleahy@alumni.uwaterloo.ca> Message-ID: <30fe546d1003211528h21c5b2c8r34de68e1df47007b@mail.gmail.com> Suggests nothing in particular, I'm afraid, because this isn't my area of expertise ;) It's probably an 8-hour bug, so it could be a while before I can devote an entire day to tracking back into it. It would be ideal to have a smaller query that does the same thing. On Sun, Mar 21, 2010 at 12:58 PM, Mike Leahy wrote: > Paul, > > Thanks for looking into it - at least I know it's not just me (for the array > size limit at least). > > What does a cleanly trapped error like this suggest to you? ?If you try > different variations on the where condition at the end of the statement, are > you able to get a segfault? > > Mike > > On Sunday 21 March 2010 12:57:03 Paul Ramsey wrote: >> As I was installing KUbuntu, I realized I should try the query on my >> own system, and under OS/X 10.6 I see the array error, though it seems >> to be cleanly trapped, there is no segfault. >> >> crashdb=# \i ./crashing.sql >> psql:./crashing.sql:36: ERROR: ?array size exceeds the maximum allowed >> (134217727) >> crashdb=# >> >> >> P. >> >> On Sat, Mar 20, 2010 at 9:29 PM, Mike Leahy > wrote: >> > Leo/Regina, >> > >> > In response to your earlier message, I did find that report of the >> > identical error message. ?However, as I'm sure you noticed, there is no >> > apparent investigation that followed after it. ?That was why I went to >> > the PostgreSQL IRC channel first...they walked me through generating a >> > core dump, which is what then pointed to it being a problem related to >> > PostGIS. ?So while it's certainly the same error being reported, the >> > source of the problem in this case appears PostGIS-specific - likely due >> > to the logic that you note was borrowed from the array_agg that caused >> > the problem in the previous report. >> > >> > As for looking at the different query plans for working/non-working >> > versions of the statement with different where conditions, I've attached >> > several results in text files. ?Two examples that worked, one that >> > segfaults, and one that produces the 'array size exceeds...' error >> > message. ?All of these are the same query, just with variations in the >> > where condition. ?The query plan is a but much for me to interpret though >> > - what does this look like to the experts? >> > >> > Mike >> > >> > On Saturday 20 March 2010 23:35:32 Paragon Corporation wrote: >> >> Mike, >> >> Another thought. ?I suppose it could be the more or less two identical >> >> subselects both with array_aggs >> >> Just to give Paul something hopefully shorter to work with. ?Does this >> >> fail too? >> >> >> >> SELECT csls.chat_id, csls.ugeom >> >> FROM ?( >> >> >> >> ? ? SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, csl1.chat_id >> >> ? ? ? FROM testdb.user_selections AS us1 >> >> ? ? INNER JOIN testdb.chat_selection_links AS csl1 ON us1.id = >> >> csl1.selection_id >> >> ? ? ? WHERE (not us1.user_drawing and not csl1.deleted) >> >> ? ? GROUP BY chat_id >> >> >> >> ? ) AS csls >> >> >> >> ? LEFT JOIN ( >> >> >> >> ? ? SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, csl2.chat_id >> >> ? ? ? FROM testdb.user_selections AS us2 >> >> ? ? INNER JOIN testdb.chat_selection_links AS csl2 ON us2.id = >> >> csl2.selection_id >> >> ? ? ? WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) >> >> ? ?GROUP BY chat_id >> >> >> >> ? ) AS csld ON csls.chat_id = csld.chat_id >> >> >> >> Leo and Regina, >> >> http://www.postgis.us >> >> >> >> -----Original Message----- >> >> From: postgis-users-bounces at postgis.refractions.net >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of >> >> Paragon Corporation >> >> Sent: Saturday, March 20, 2010 11:29 PM >> >> To: 'PostGIS Users Discussion'; mgleahy at alumni.uwaterloo.ca >> >> Subject: Re: [postgis-users] ERROR: array size exceeds >> >> themaximumallowed(134217727) >> >> >> >> Mike, >> >> Actually scanning thru the archives that 13... is a common number so >> >> ?suspect that is an OS limit. >> >> >> >> This could be very well a bug in PostgreSQL 8.4. >> >> >> >> Have you tried this on other PostgreSQL 8.4 installs on other your >> >> Fedoras - you mentioned trying on older installs? >> >> >> >> Your problem sounds exactly like this guy's and he wasn't using PostGIS >> >> at all but array_agg (which is logic that PostGIS borrowed from to >> >> implement the faster collecting ST_Union behavior)i >> >> http://archives.postgresql.org/pgsql-hackers/2009-06/msg01171.php >> >> >> >> If you haven't already probably good to check the plan difference >> >> between the two queries (one with addtional WHERE and one without). ?It >> >> could be doing something nuts like running the sub select for each >> >> record you have in the outer only when your extra WHERE condition is >> >> added and doing more or less the sane thing when you take it out. >> >> >> >> We've had some odd behavior in 8.4 with the planner doing strange things >> >> that we haven't been able to pin down and had to implement workaround >> >> for. As we described in this article.. Its probably unrelated though but >> >> just a thought to throw out at the wind. >> >> >> >> http://www.postgresonline.com/journal/index.php?/archives/149-Forcing-th >> >>e-p l anners-hand-with-set-enable_seqscan-off-WTF.html >> >> >> >> Leo and Regina, >> >> http://www.postgis.us >> >> >> >> -----Original Message----- >> >> From: postgis-users-bounces at postgis.refractions.net >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul >> >> Ramsey >> >> Sent: Saturday, March 20, 2010 8:23 PM >> >> To: mgleahy at alumni.uwaterloo.ca; PostGIS Users Discussion >> >> Subject: Re: [postgis-users] ERROR: array size exceeds the >> >> maximumallowed(134217727) >> >> >> >> Mike >> >> >> >> Well, if you can reduce it to a small db dump and query that exercises >> >> it, I can install a 64bit ubuntu VM and see if it happens here too. >> >> >> >> P >> >> >> >> On Sat, Mar 20, 2010 at 3:30 PM, Mike Leahy >> >> >> >> >> >> wrote: >> >> > FWIW, ?if I remove the entire where clause at the end of the >> >> > statement, it works again (with st_union()) and is virtually >> >> >> >> instantaneous. >> >> >> >> > On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: >> >> >> Hey, >> >> >> >> >> >> The query (when it works) is virtually instantaneous when I use >> >> >> ?st_memunion() (or when I took out part of the where clause - >> >> >> although now >> >> >> ?I can't even get that to work, so maybe it was just lucky). ?Each of >> >> >> the >> >> >> ?subqueries also work fine without any obvious problem. >> >> >> >> >> >> To me, it seems to be a combination of things that somehow add up to >> >> >> this limitation...I don't see what settings could affect the array >> >> >> size limit >> >> >> ?(in postgresql.conf). ?Can anyone point to a config option that >> >> >> might make >> >> >> ?a difference, or maybe point to another place with settings I can >> >> >> tinker >> >> >> ?with? >> >> >> >> >> >> Mike >> >> >> >> >> >> On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: >> >> >> > Mike, >> >> >> > >> >> >> > We apologize, didn't notice this was in a subquery and that you >> >> >> > have a >> >> >> > ?limit statement in your query. ? So we presume regardless of your >> >> >> > WHERE >> >> >> > ?only 26 records are being selected. >> >> >> > >> >> >> > So Paul could be right that you do have data that is hitting some >> >> >> > compiled or variable limit. >> >> >> > >> >> >> > Does running the subquery alone work or you didn't try because it >> >> >> > takes a long time? >> >> >> > >> >> >> > Thanks, >> >> >> > Leo and Regina >> >> >> > http://www.postgis.us >> >> >> > >> >> >> > -----Original Message----- >> >> >> > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy >> >> >> > Sent: Saturday, March 20, 2010 2:01 PM >> >> >> > To: Paragon Corporation >> >> >> > Cc: 'PostGIS Users Discussion' >> >> >> > Subject: Re: [postgis-users] ERROR: array size exceeds the maximum >> >> >> > allowed(134217727) >> >> >> > >> >> >> > Hi Leo/Regina, >> >> >> > >> >> >> > Thanks for the suggestion. ?I tried adding the clause 'not geom is >> >> >> >> null' >> >> >> >> >> > to the where statement in each of the two sub-queries that have the >> >> >> > st_union(geom) functions are used, but it still segfaults. >> >> >> > >> >> >> > I also tried this on a fresh database with very little data, and it >> >> >> > doesn't seem to cause problems. ?But I have two databases with live >> >> >> > data where I can cause this. ?I have been able to pare one of these >> >> >> > down to remove personal information and reduce unnecessary data, >> >> >> > while still generating the crash with that query. ? Would someone >> >> >> > be interested in a dump of this db? ?Of course, that someone would >> >> >> > ideally be able to test this on a 64-bit (K)ubutnu system, in the >> >> >> > hopes that the problem can be replicated. >> >> >> > >> >> >> > Mike >> >> >> > >> >> >> > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: >> >> >> > > Paul, >> >> >> > > I doubt array size limit is the issue. ?He said when he left the >> >> >> > > where condition out it worked. ?I would think it would definitely >> >> >> > > blow up in that case. >> >> >> > > >> >> >> > > Mike, >> >> >> > > The issue from before was that array aggregate functions did not >> >> >> > > handle NULLs correctly. ?64-bit systems were more likely to >> >> >> > > segfault or give strange Errros in this case. >> >> >> > > >> >> >> > > To rule out that we still have some of these issues in the code >> >> >> > > base, can you add a >> >> >> > > >> >> >> > > geom IS NOT NULL >> >> >> > > >> >> >> > > Condition to your WHERE filter. ?If that works, then the NULL >> >> >> > > issue is probably still lurking somewhere. >> >> >> > > >> >> >> > > Leo and Regina >> >> >> > > http://www.postgis.us >> >> >> > > >> >> >> > > >> >> >> > > -----Original Message----- >> >> >> > > From: postgis-users-bounces at postgis.refractions.net >> >> >> > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf >> >> >> > > Of Paul Ramsey >> >> >> > > Sent: Saturday, March 20, 2010 10:56 AM >> >> >> > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca >> >> >> > > Subject: Re: [postgis-users] ERROR: array size exceeds the >> >> >> > > maximum >> >> >> > > allowed(134217727) >> >> >> > > >> >> >> > > Actually, memunion does the opposite, it passes the resultant and >> >> >> > > preserves mem. The default behavior is fast-but-memory-hungry. >> >> >> > > And has been for some time, though in different forms. There were >> >> >> > > some bugs in the array handling code, but Mark CA killed most of >> >> >> > > them, so the latest 1.5 and 1.4 streams should be good. If it's >> >> >> > > possible that the issue is one of array size, maybe Mike could >> >> >> > > find the dial that controls that maximum, and turn it up and down >> >> >> > > and see if it makes his >> >> >> > >> >> >> > problem go away/happen sooner. >> >> >> > >> >> >> > > P. >> >> >> > > >> >> >> > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: >> >> >> > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: >> >> >> > > >> Hello again, >> >> >> > > >> >> >> >> > > >> It might be of interest to point out that substituting >> >> >> > > >> st_union() with >> >> >> > > >> st_memunion() seems to have worked around this. ?I'm curious >> >> >> > > >> though, because there is not a great deal of data being >> >> >> > > >> processed, and I am running this on a fairly sturdy system >> >> >> > > >> that that has more capacity than some of the Fedora systems >> >> >> > > >> I'm >> >> >> >> running. >> >> >> >> >> > > > st_memunion builds a big array with all geometries in it.. >> >> >> > > > you were hitting a limit of the array type. >> >> >> > > > st_union should behave better. >> >> >> > > > >> >> >> > > > --strk; >> >> >> > > > >> >> >> > > > ?() ? Free GIS & Flash consultant/developer >> >> >> > > > ?/\ ? http://strk.keybit.net/services.html >> >> >> > > > _______________________________________________ >> >> >> > > > 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 >> >> >> >> >> >> _______________________________________________ >> >> 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 mgleahy at alumni.uwaterloo.ca Sun Mar 21 16:43:02 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sun, 21 Mar 2010 19:43:02 -0400 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: <30fe546d1003211528h21c5b2c8r34de68e1df47007b@mail.gmail.com> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003211558.03097.mgleahy@alumni.uwaterloo.ca> <30fe546d1003211528h21c5b2c8r34de68e1df47007b@mail.gmail.com> Message-ID: <201003211943.02472.mgleahy@alumni.uwaterloo.ca> Ok, I've attached the smallest version of this query I can make before the error goes away. It seems to be very particular, but at least I have been able to take out some of the subqueries. Does this still produce the error in your environments as well? Mike On Sunday 21 March 2010 18:28:59 Paul Ramsey wrote: > Suggests nothing in particular, I'm afraid, because this isn't my area > of expertise ;) It's probably an 8-hour bug, so it could be a while > before I can devote an entire day to tracking back into it. It would > be ideal to have a smaller query that does the same thing. > > On Sun, Mar 21, 2010 at 12:58 PM, Mike Leahy > > wrote: > > Paul, > > > > Thanks for looking into it - at least I know it's not just me (for the > > array size limit at least). > > > > What does a cleanly trapped error like this suggest to you? If you try > > different variations on the where condition at the end of the statement, > > are you able to get a segfault? > > > > Mike > > > > On Sunday 21 March 2010 12:57:03 Paul Ramsey wrote: > >> As I was installing KUbuntu, I realized I should try the query on my > >> own system, and under OS/X 10.6 I see the array error, though it seems > >> to be cleanly trapped, there is no segfault. > >> > >> crashdb=# \i ./crashing.sql > >> psql:./crashing.sql:36: ERROR: array size exceeds the maximum allowed > >> (134217727) > >> crashdb=# > >> > >> > >> P. > >> > >> On Sat, Mar 20, 2010 at 9:29 PM, Mike Leahy > >> > > > > wrote: > >> > Leo/Regina, > >> > > >> > In response to your earlier message, I did find that report of the > >> > identical error message. However, as I'm sure you noticed, there is > >> > no apparent investigation that followed after it. That was why I went > >> > to the PostgreSQL IRC channel first...they walked me through > >> > generating a core dump, which is what then pointed to it being a > >> > problem related to PostGIS. So while it's certainly the same error > >> > being reported, the source of the problem in this case appears > >> > PostGIS-specific - likely due to the logic that you note was borrowed > >> > from the array_agg that caused the problem in the previous report. > >> > > >> > As for looking at the different query plans for working/non-working > >> > versions of the statement with different where conditions, I've > >> > attached several results in text files. Two examples that worked, one > >> > that segfaults, and one that produces the 'array size exceeds...' > >> > error message. All of these are the same query, just with variations > >> > in the where condition. The query plan is a but much for me to > >> > interpret though - what does this look like to the experts? > >> > > >> > Mike > >> > > >> > On Saturday 20 March 2010 23:35:32 Paragon Corporation wrote: > >> >> Mike, > >> >> Another thought. I suppose it could be the more or less two > >> >> identical subselects both with array_aggs > >> >> Just to give Paul something hopefully shorter to work with. Does > >> >> this fail too? > >> >> > >> >> SELECT csls.chat_id, csls.ugeom > >> >> FROM ( > >> >> > >> >> SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, > >> >> csl1.chat_id FROM testdb.user_selections AS us1 > >> >> INNER JOIN testdb.chat_selection_links AS csl1 ON us1.id = > >> >> csl1.selection_id > >> >> WHERE (not us1.user_drawing and not csl1.deleted) > >> >> GROUP BY chat_id > >> >> > >> >> ) AS csls > >> >> > >> >> LEFT JOIN ( > >> >> > >> >> SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, > >> >> csl2.chat_id FROM testdb.user_selections AS us2 > >> >> INNER JOIN testdb.chat_selection_links AS csl2 ON us2.id = > >> >> csl2.selection_id > >> >> WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) > >> >> GROUP BY chat_id > >> >> > >> >> ) AS csld ON csls.chat_id = csld.chat_id > >> >> > >> >> Leo and Regina, > >> >> http://www.postgis.us > >> >> > >> >> -----Original Message----- > >> >> From: postgis-users-bounces at postgis.refractions.net > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > >> >> Paragon Corporation > >> >> Sent: Saturday, March 20, 2010 11:29 PM > >> >> To: 'PostGIS Users Discussion'; mgleahy at alumni.uwaterloo.ca > >> >> Subject: Re: [postgis-users] ERROR: array size exceeds > >> >> themaximumallowed(134217727) > >> >> > >> >> Mike, > >> >> Actually scanning thru the archives that 13... is a common number so > >> >> suspect that is an OS limit. > >> >> > >> >> This could be very well a bug in PostgreSQL 8.4. > >> >> > >> >> Have you tried this on other PostgreSQL 8.4 installs on other your > >> >> Fedoras - you mentioned trying on older installs? > >> >> > >> >> Your problem sounds exactly like this guy's and he wasn't using > >> >> PostGIS at all but array_agg (which is logic that PostGIS borrowed > >> >> from to implement the faster collecting ST_Union behavior)i > >> >> http://archives.postgresql.org/pgsql-hackers/2009-06/msg01171.php > >> >> > >> >> If you haven't already probably good to check the plan difference > >> >> between the two queries (one with addtional WHERE and one without). > >> >> It could be doing something nuts like running the sub select for > >> >> each record you have in the outer only when your extra WHERE > >> >> condition is added and doing more or less the sane thing when you > >> >> take it out. > >> >> > >> >> We've had some odd behavior in 8.4 with the planner doing strange > >> >> things that we haven't been able to pin down and had to implement > >> >> workaround for. As we described in this article.. Its probably > >> >> unrelated though but just a thought to throw out at the wind. > >> >> > >> >> http://www.postgresonline.com/journal/index.php?/archives/149-Forcing > >> >>-th e-p l anners-hand-with-set-enable_seqscan-off-WTF.html > >> >> > >> >> Leo and Regina, > >> >> http://www.postgis.us > >> >> > >> >> -----Original Message----- > >> >> From: postgis-users-bounces at postgis.refractions.net > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of > >> >> Paul Ramsey > >> >> Sent: Saturday, March 20, 2010 8:23 PM > >> >> To: mgleahy at alumni.uwaterloo.ca; PostGIS Users Discussion > >> >> Subject: Re: [postgis-users] ERROR: array size exceeds the > >> >> maximumallowed(134217727) > >> >> > >> >> Mike > >> >> > >> >> Well, if you can reduce it to a small db dump and query that > >> >> exercises it, I can install a 64bit ubuntu VM and see if it happens > >> >> here too. > >> >> > >> >> P > >> >> > >> >> On Sat, Mar 20, 2010 at 3:30 PM, Mike Leahy > >> >> > >> >> > >> >> wrote: > >> >> > FWIW, if I remove the entire where clause at the end of the > >> >> > statement, it works again (with st_union()) and is virtually > >> >> > >> >> instantaneous. > >> >> > >> >> > On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: > >> >> >> Hey, > >> >> >> > >> >> >> The query (when it works) is virtually instantaneous when I use > >> >> >> st_memunion() (or when I took out part of the where clause - > >> >> >> although now > >> >> >> I can't even get that to work, so maybe it was just lucky). Each > >> >> >> of the > >> >> >> subqueries also work fine without any obvious problem. > >> >> >> > >> >> >> To me, it seems to be a combination of things that somehow add up > >> >> >> to this limitation...I don't see what settings could affect the > >> >> >> array size limit > >> >> >> (in postgresql.conf). Can anyone point to a config option that > >> >> >> might make > >> >> >> a difference, or maybe point to another place with settings I can > >> >> >> tinker > >> >> >> with? > >> >> >> > >> >> >> Mike > >> >> >> > >> >> >> On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: > >> >> >> > Mike, > >> >> >> > > >> >> >> > We apologize, didn't notice this was in a subquery and that you > >> >> >> > have a > >> >> >> > limit statement in your query. So we presume regardless of > >> >> >> > your WHERE > >> >> >> > only 26 records are being selected. > >> >> >> > > >> >> >> > So Paul could be right that you do have data that is hitting > >> >> >> > some compiled or variable limit. > >> >> >> > > >> >> >> > Does running the subquery alone work or you didn't try because > >> >> >> > it takes a long time? > >> >> >> > > >> >> >> > Thanks, > >> >> >> > Leo and Regina > >> >> >> > http://www.postgis.us > >> >> >> > > >> >> >> > -----Original Message----- > >> >> >> > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike > >> >> >> > Leahy Sent: Saturday, March 20, 2010 2:01 PM > >> >> >> > To: Paragon Corporation > >> >> >> > Cc: 'PostGIS Users Discussion' > >> >> >> > Subject: Re: [postgis-users] ERROR: array size exceeds the > >> >> >> > maximum allowed(134217727) > >> >> >> > > >> >> >> > Hi Leo/Regina, > >> >> >> > > >> >> >> > Thanks for the suggestion. I tried adding the clause 'not geom > >> >> >> > is > >> >> > >> >> null' > >> >> > >> >> >> > to the where statement in each of the two sub-queries that have > >> >> >> > the st_union(geom) functions are used, but it still segfaults. > >> >> >> > > >> >> >> > I also tried this on a fresh database with very little data, and > >> >> >> > it doesn't seem to cause problems. But I have two databases > >> >> >> > with live data where I can cause this. I have been able to pare > >> >> >> > one of these down to remove personal information and reduce > >> >> >> > unnecessary data, while still generating the crash with that > >> >> >> > query. Would someone be interested in a dump of this db? Of > >> >> >> > course, that someone would ideally be able to test this on a > >> >> >> > 64-bit (K)ubutnu system, in the hopes that the problem can be > >> >> >> > replicated. > >> >> >> > > >> >> >> > Mike > >> >> >> > > >> >> >> > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: > >> >> >> > > Paul, > >> >> >> > > I doubt array size limit is the issue. He said when he left > >> >> >> > > the where condition out it worked. I would think it would > >> >> >> > > definitely blow up in that case. > >> >> >> > > > >> >> >> > > Mike, > >> >> >> > > The issue from before was that array aggregate functions did > >> >> >> > > not handle NULLs correctly. 64-bit systems were more likely > >> >> >> > > to segfault or give strange Errros in this case. > >> >> >> > > > >> >> >> > > To rule out that we still have some of these issues in the > >> >> >> > > code base, can you add a > >> >> >> > > > >> >> >> > > geom IS NOT NULL > >> >> >> > > > >> >> >> > > Condition to your WHERE filter. If that works, then the NULL > >> >> >> > > issue is probably still lurking somewhere. > >> >> >> > > > >> >> >> > > Leo and Regina > >> >> >> > > http://www.postgis.us > >> >> >> > > > >> >> >> > > > >> >> >> > > -----Original Message----- > >> >> >> > > From: postgis-users-bounces at postgis.refractions.net > >> >> >> > > [mailto:postgis-users-bounces at postgis.refractions.net] On > >> >> >> > > Behalf Of Paul Ramsey > >> >> >> > > Sent: Saturday, March 20, 2010 10:56 AM > >> >> >> > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca > >> >> >> > > Subject: Re: [postgis-users] ERROR: array size exceeds the > >> >> >> > > maximum > >> >> >> > > allowed(134217727) > >> >> >> > > > >> >> >> > > Actually, memunion does the opposite, it passes the resultant > >> >> >> > > and preserves mem. The default behavior is > >> >> >> > > fast-but-memory-hungry. And has been for some time, though in > >> >> >> > > different forms. There were some bugs in the array handling > >> >> >> > > code, but Mark CA killed most of them, so the latest 1.5 and > >> >> >> > > 1.4 streams should be good. If it's possible that the issue is > >> >> >> > > one of array size, maybe Mike could find the dial that > >> >> >> > > controls that maximum, and turn it up and down and see if it > >> >> >> > > makes his > >> >> >> > > >> >> >> > problem go away/happen sooner. > >> >> >> > > >> >> >> > > P. > >> >> >> > > > >> >> >> > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: > >> >> >> > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: > >> >> >> > > >> Hello again, > >> >> >> > > >> > >> >> >> > > >> It might be of interest to point out that substituting > >> >> >> > > >> st_union() with > >> >> >> > > >> st_memunion() seems to have worked around this. I'm > >> >> >> > > >> curious though, because there is not a great deal of data > >> >> >> > > >> being processed, and I am running this on a fairly sturdy > >> >> >> > > >> system that that has more capacity than some of the Fedora > >> >> >> > > >> systems I'm > >> >> > >> >> running. > >> >> > >> >> >> > > > st_memunion builds a big array with all geometries in it.. > >> >> >> > > > you were hitting a limit of the array type. > >> >> >> > > > st_union should behave better. > >> >> >> > > > > >> >> >> > > > --strk; > >> >> >> > > > > >> >> >> > > > () Free GIS & Flash consultant/developer > >> >> >> > > > /\ http://strk.keybit.net/services.html > >> >> >> > > > _______________________________________________ > >> >> >> > > > postgis-users mailing list > >> >> >> > > > postgis-users at postgis.refractions.net > >> >> >> > > > http://postgis.refractions.net/mailman/listinfo/postgis-user > >> >> >> > > >s > >> >> >> > > > >> >> >> > > _______________________________________________ > >> >> >> > > 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 > >> > > >> > _______________________________________________ > >> > 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: crashing_smaller.sql Type: text/x-sql Size: 863 bytes Desc: not available URL: From lr at pcorp.us Sun Mar 21 20:01:34 2010 From: lr at pcorp.us (Paragon Corporation) Date: Sun, 21 Mar 2010 23:01:34 -0400 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: <201003211943.02472.mgleahy@alumni.uwaterloo.ca> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003211558.03097.mgleahy@alumni.uwaterloo.ca> <30fe546d1003211528h21c5b2c8r34de68e1df47007b@mail.gmail.com> <201003211943.02472.mgleahy@alumni.uwaterloo.ca> Message-ID: Mike and Paul, We took a quick look at the query plans. Admittedly we suck at reading text plans; always rely on the graphical explain. Anyrate -- one striking thing it seems between the ones that don't work and the ones that work are The ones that work never employ a nested loop scan Both the segfault one and the exceed max allowed employ nested loops. So maybe its the interaction between nested loops and hash agg causing the problem. Could you two try disabling nested loop scan and run the crashing ones. Also verify that the plan has indeed changed to not use nested loops. set enable_nestloop = off; set enable_hashjoin = on; run query --- If you can't disable nested loop, try disabling the hash_join to see if you can make the working queries crash set enable_hashjoin = off; set enable_nestloop = on; run query Leo and Regina http://www.postgis.us -----Original Message----- From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy Sent: Sunday, March 21, 2010 7:43 PM To: Paul Ramsey Cc: PostGIS Users Discussion; Paragon Corporation Subject: Re: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) Ok, I've attached the smallest version of this query I can make before the error goes away. It seems to be very particular, but at least I have been able to take out some of the subqueries. Does this still produce the error in your environments as well? Mike On Sunday 21 March 2010 18:28:59 Paul Ramsey wrote: > Suggests nothing in particular, I'm afraid, because this isn't my area > of expertise ;) It's probably an 8-hour bug, so it could be a while > before I can devote an entire day to tracking back into it. It would > be ideal to have a smaller query that does the same thing. > > On Sun, Mar 21, 2010 at 12:58 PM, Mike Leahy > > wrote: > > Paul, > > > > Thanks for looking into it - at least I know it's not just me (for > > the array size limit at least). > > > > What does a cleanly trapped error like this suggest to you? If you > > try different variations on the where condition at the end of the > > statement, are you able to get a segfault? > > > > Mike > > > > On Sunday 21 March 2010 12:57:03 Paul Ramsey wrote: > >> As I was installing KUbuntu, I realized I should try the query on > >> my own system, and under OS/X 10.6 I see the array error, though it > >> seems to be cleanly trapped, there is no segfault. > >> > >> crashdb=# \i ./crashing.sql > >> psql:./crashing.sql:36: ERROR: array size exceeds the maximum > >> allowed > >> (134217727) > >> crashdb=# > >> > >> > >> P. > >> > >> On Sat, Mar 20, 2010 at 9:29 PM, Mike Leahy > >> > > > > wrote: > >> > Leo/Regina, > >> > > >> > In response to your earlier message, I did find that report of > >> > the identical error message. However, as I'm sure you noticed, > >> > there is no apparent investigation that followed after it. That > >> > was why I went to the PostgreSQL IRC channel first...they walked > >> > me through generating a core dump, which is what then pointed to > >> > it being a problem related to PostGIS. So while it's certainly > >> > the same error being reported, the source of the problem in this > >> > case appears PostGIS-specific - likely due to the logic that you > >> > note was borrowed from the array_agg that caused the problem in the previous report. > >> > > >> > As for looking at the different query plans for > >> > working/non-working versions of the statement with different > >> > where conditions, I've attached several results in text files. > >> > Two examples that worked, one that segfaults, and one that produces the 'array size exceeds...' > >> > error message. All of these are the same query, just with > >> > variations in the where condition. The query plan is a but much > >> > for me to interpret though - what does this look like to the experts? > >> > > >> > Mike > >> > > >> > On Saturday 20 March 2010 23:35:32 Paragon Corporation wrote: > >> >> Mike, > >> >> Another thought. I suppose it could be the more or less two > >> >> identical subselects both with array_aggs Just to give Paul > >> >> something hopefully shorter to work with. Does this fail too? > >> >> > >> >> SELECT csls.chat_id, csls.ugeom > >> >> FROM ( > >> >> > >> >> SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, > >> >> csl1.chat_id FROM testdb.user_selections AS us1 > >> >> INNER JOIN testdb.chat_selection_links AS csl1 ON us1.id = > >> >> csl1.selection_id > >> >> WHERE (not us1.user_drawing and not csl1.deleted) > >> >> GROUP BY chat_id > >> >> > >> >> ) AS csls > >> >> > >> >> LEFT JOIN ( > >> >> > >> >> SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, > >> >> csl2.chat_id FROM testdb.user_selections AS us2 > >> >> INNER JOIN testdb.chat_selection_links AS csl2 ON us2.id = > >> >> csl2.selection_id > >> >> WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) > >> >> GROUP BY chat_id > >> >> > >> >> ) AS csld ON csls.chat_id = csld.chat_id > >> >> > >> >> Leo and Regina, > >> >> http://www.postgis.us > >> >> > >> >> -----Original Message----- > >> >> From: postgis-users-bounces at postgis.refractions.net > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf > >> >> Of Paragon Corporation > >> >> Sent: Saturday, March 20, 2010 11:29 PM > >> >> To: 'PostGIS Users Discussion'; mgleahy at alumni.uwaterloo.ca > >> >> Subject: Re: [postgis-users] ERROR: array size exceeds > >> >> themaximumallowed(134217727) > >> >> > >> >> Mike, > >> >> Actually scanning thru the archives that 13... is a common > >> >> number so suspect that is an OS limit. > >> >> > >> >> This could be very well a bug in PostgreSQL 8.4. > >> >> > >> >> Have you tried this on other PostgreSQL 8.4 installs on other > >> >> your Fedoras - you mentioned trying on older installs? > >> >> > >> >> Your problem sounds exactly like this guy's and he wasn't using > >> >> PostGIS at all but array_agg (which is logic that PostGIS > >> >> borrowed from to implement the faster collecting ST_Union > >> >> behavior)i > >> >> http://archives.postgresql.org/pgsql-hackers/2009-06/msg01171.ph > >> >> p > >> >> > >> >> If you haven't already probably good to check the plan > >> >> difference between the two queries (one with addtional WHERE and one without). > >> >> It could be doing something nuts like running the sub select > >> >> for each record you have in the outer only when your extra WHERE > >> >> condition is added and doing more or less the sane thing when > >> >> you take it out. > >> >> > >> >> We've had some odd behavior in 8.4 with the planner doing > >> >> strange things that we haven't been able to pin down and had to > >> >> implement workaround for. As we described in this article.. Its > >> >> probably unrelated though but just a thought to throw out at the wind. > >> >> > >> >> > >> >>http://www.postgresonline.com/journal/index.php?/archives/149-For > >> >>cing -th e-p l anners-hand-with-set-enable_seqscan-off-WTF.html > >> >> > >> >> Leo and Regina, > >> >> http://www.postgis.us > >> >> > >> >> -----Original Message----- > >> >> From: postgis-users-bounces at postgis.refractions.net > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf > >> >> Of Paul Ramsey > >> >> Sent: Saturday, March 20, 2010 8:23 PM > >> >> To: mgleahy at alumni.uwaterloo.ca; PostGIS Users Discussion > >> >> Subject: Re: [postgis-users] ERROR: array size exceeds the > >> >> maximumallowed(134217727) > >> >> > >> >> Mike > >> >> > >> >> Well, if you can reduce it to a small db dump and query that > >> >> exercises it, I can install a 64bit ubuntu VM and see if it > >> >> happens here too. > >> >> > >> >> P > >> >> > >> >> On Sat, Mar 20, 2010 at 3:30 PM, Mike Leahy > >> >> > >> >> > >> >> wrote: > >> >> > FWIW, if I remove the entire where clause at the end of the > >> >> > statement, it works again (with st_union()) and is virtually > >> >> > >> >> instantaneous. > >> >> > >> >> > On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: > >> >> >> Hey, > >> >> >> > >> >> >> The query (when it works) is virtually instantaneous when I > >> >> >> use > >> >> >> st_memunion() (or when I took out part of the where clause - > >> >> >> although now I can't even get that to work, so maybe it was > >> >> >> just lucky). Each of the subqueries also work fine without > >> >> >> any obvious problem. > >> >> >> > >> >> >> To me, it seems to be a combination of things that somehow > >> >> >> add up to this limitation...I don't see what settings could > >> >> >> affect the array size limit (in postgresql.conf). Can > >> >> >> anyone point to a config option that might make a > >> >> >> difference, or maybe point to another place with settings I > >> >> >> can tinker with? > >> >> >> > >> >> >> Mike > >> >> >> > >> >> >> On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: > >> >> >> > Mike, > >> >> >> > > >> >> >> > We apologize, didn't notice this was in a subquery and that > >> >> >> > you have a > >> >> >> > limit statement in your query. So we presume regardless of > >> >> >> > your WHERE > >> >> >> > only 26 records are being selected. > >> >> >> > > >> >> >> > So Paul could be right that you do have data that is > >> >> >> > hitting some compiled or variable limit. > >> >> >> > > >> >> >> > Does running the subquery alone work or you didn't try > >> >> >> > because it takes a long time? > >> >> >> > > >> >> >> > Thanks, > >> >> >> > Leo and Regina > >> >> >> > http://www.postgis.us > >> >> >> > > >> >> >> > -----Original Message----- > >> >> >> > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of > >> >> >> > Mike Leahy Sent: Saturday, March 20, 2010 2:01 PM > >> >> >> > To: Paragon Corporation > >> >> >> > Cc: 'PostGIS Users Discussion' > >> >> >> > Subject: Re: [postgis-users] ERROR: array size exceeds the > >> >> >> > maximum allowed(134217727) > >> >> >> > > >> >> >> > Hi Leo/Regina, > >> >> >> > > >> >> >> > Thanks for the suggestion. I tried adding the clause 'not > >> >> >> > geom is > >> >> > >> >> null' > >> >> > >> >> >> > to the where statement in each of the two sub-queries that > >> >> >> > have the st_union(geom) functions are used, but it still segfaults. > >> >> >> > > >> >> >> > I also tried this on a fresh database with very little > >> >> >> > data, and it doesn't seem to cause problems. But I have > >> >> >> > two databases with live data where I can cause this. I > >> >> >> > have been able to pare one of these down to remove personal > >> >> >> > information and reduce unnecessary data, while still generating the crash with that > >> >> >> > query. Would someone be interested in a dump of this db? Of > >> >> >> > course, that someone would ideally be able to test this on > >> >> >> > a 64-bit (K)ubutnu system, in the hopes that the problem > >> >> >> > can be replicated. > >> >> >> > > >> >> >> > Mike > >> >> >> > > >> >> >> > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: > >> >> >> > > Paul, > >> >> >> > > I doubt array size limit is the issue. He said when he > >> >> >> > > left the where condition out it worked. I would think it > >> >> >> > > would definitely blow up in that case. > >> >> >> > > > >> >> >> > > Mike, > >> >> >> > > The issue from before was that array aggregate functions > >> >> >> > > did not handle NULLs correctly. 64-bit systems were more > >> >> >> > > likely to segfault or give strange Errros in this case. > >> >> >> > > > >> >> >> > > To rule out that we still have some of these issues in > >> >> >> > > the code base, can you add a > >> >> >> > > > >> >> >> > > geom IS NOT NULL > >> >> >> > > > >> >> >> > > Condition to your WHERE filter. If that works, then the > >> >> >> > > NULL issue is probably still lurking somewhere. > >> >> >> > > > >> >> >> > > Leo and Regina > >> >> >> > > http://www.postgis.us > >> >> >> > > > >> >> >> > > > >> >> >> > > -----Original Message----- > >> >> >> > > From: postgis-users-bounces at postgis.refractions.net > >> >> >> > > [mailto:postgis-users-bounces at postgis.refractions.net] On > >> >> >> > > Behalf Of Paul Ramsey > >> >> >> > > Sent: Saturday, March 20, 2010 10:56 AM > >> >> >> > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca > >> >> >> > > Subject: Re: [postgis-users] ERROR: array size exceeds > >> >> >> > > the maximum > >> >> >> > > allowed(134217727) > >> >> >> > > > >> >> >> > > Actually, memunion does the opposite, it passes the > >> >> >> > > resultant and preserves mem. The default behavior is > >> >> >> > > fast-but-memory-hungry. And has been for some time, > >> >> >> > > though in different forms. There were some bugs in the > >> >> >> > > array handling code, but Mark CA killed most of them, so > >> >> >> > > the latest 1.5 and > >> >> >> > > 1.4 streams should be good. If it's possible that the > >> >> >> > > issue is one of array size, maybe Mike could find the > >> >> >> > > dial that controls that maximum, and turn it up and down > >> >> >> > > and see if it makes his > >> >> >> > > >> >> >> > problem go away/happen sooner. > >> >> >> > > >> >> >> > > P. > >> >> >> > > > >> >> >> > > On Sat, Mar 20, 2010 at 7:41 AM, strk wrote: > >> >> >> > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: > >> >> >> > > >> Hello again, > >> >> >> > > >> > >> >> >> > > >> It might be of interest to point out that substituting > >> >> >> > > >> st_union() with > >> >> >> > > >> st_memunion() seems to have worked around this. I'm > >> >> >> > > >> curious though, because there is not a great deal of > >> >> >> > > >> data being processed, and I am running this on a > >> >> >> > > >> fairly sturdy system that that has more capacity than > >> >> >> > > >> some of the Fedora systems I'm > >> >> > >> >> running. > >> >> > >> >> >> > > > st_memunion builds a big array with all geometries in it.. > >> >> >> > > > you were hitting a limit of the array type. > >> >> >> > > > st_union should behave better. > >> >> >> > > > > >> >> >> > > > --strk; > >> >> >> > > > > >> >> >> > > > () Free GIS & Flash consultant/developer > >> >> >> > > > /\ http://strk.keybit.net/services.html > >> >> >> > > > _______________________________________________ > >> >> >> > > > postgis-users mailing list > >> >> >> > > >postgis-users at postgis.refractions.net > >> >> >> > > > > >> >> >> > > >http://postgis.refractions.net/mailman/listinfo/postgis- > >> >> >> > > >user > >> >> >> > > >s > >> >> >> > > > >> >> >> > > _______________________________________________ > >> >> >> > > postgis-users mailing list > >> >> >> > > postgis-users at postgis.refractions.net > >> >> >> > > http://postgis.refractions.net/mailman/listinfo/postgis-u > >> >> >> > > sers > >> >> > > >> >> > _______________________________________________ > >> >> > 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 mgleahy at alumni.uwaterloo.ca Sun Mar 21 20:54:44 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sun, 21 Mar 2010 23:54:44 -0400 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003211943.02472.mgleahy@alumni.uwaterloo.ca> Message-ID: <201003212354.44939.mgleahy@alumni.uwaterloo.ca> Leo/Regina, Yes, I can confirm that the non-working queries work when enable_nestloop is off, and enable_hashjoin is on. The opposite is not the case - setting enable_nestloop on and enable_hashjoin off does not make the 'working' variations of my query crash. Nice catch - is there anything further I can do from my end to troubleshoot this? Mike On Sunday 21 March 2010 23:01:34 Paragon Corporation wrote: > Mike and Paul, > We took a quick look at the query plans. Admittedly we suck at reading > text plans; always rely on the graphical explain. > > Anyrate -- one striking thing it seems between the ones that don't work and > the ones that work are > > The ones that work never employ a nested loop scan > > Both the segfault one and the exceed max allowed employ nested loops. So > maybe its the interaction between nested loops and hash agg causing the > problem. > > > Could you two try disabling nested loop scan and run the crashing ones. > Also verify that the plan has indeed changed to not use nested loops. > > set enable_nestloop = off; > set enable_hashjoin = on; > > run query > > > --- If you can't disable nested loop, try disabling the hash_join to see if > you can make the working queries crash > > set enable_hashjoin = off; > set enable_nestloop = on; > run query > > > Leo and Regina > http://www.postgis.us > > -----Original Message----- > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy > Sent: Sunday, March 21, 2010 7:43 PM > To: Paul Ramsey > Cc: PostGIS Users Discussion; Paragon Corporation > Subject: Re: [postgis-users] ERROR: array size exceeds > themaximumallowed(134217727) > > Ok, > > I've attached the smallest version of this query I can make before the > error goes away. It seems to be very particular, but at least I have been > able to take out some of the subqueries. Does this still produce the error > in your environments as well? > > Mike > > On Sunday 21 March 2010 18:28:59 Paul Ramsey wrote: > > Suggests nothing in particular, I'm afraid, because this isn't my area > > of expertise ;) It's probably an 8-hour bug, so it could be a while > > before I can devote an entire day to tracking back into it. It would > > be ideal to have a smaller query that does the same thing. > > > > On Sun, Mar 21, 2010 at 12:58 PM, Mike Leahy > > > > wrote: > > > Paul, > > > > > > Thanks for looking into it - at least I know it's not just me (for > > > the array size limit at least). > > > > > > What does a cleanly trapped error like this suggest to you? If you > > > try different variations on the where condition at the end of the > > > statement, are you able to get a segfault? > > > > > > Mike > > > > > > On Sunday 21 March 2010 12:57:03 Paul Ramsey wrote: > > >> As I was installing KUbuntu, I realized I should try the query on > > >> my own system, and under OS/X 10.6 I see the array error, though it > > >> seems to be cleanly trapped, there is no segfault. > > >> > > >> crashdb=# \i ./crashing.sql > > >> psql:./crashing.sql:36: ERROR: array size exceeds the maximum > > >> allowed > > >> (134217727) > > >> crashdb=# > > >> > > >> > > >> P. > > >> > > >> On Sat, Mar 20, 2010 at 9:29 PM, Mike Leahy > > >> > > > > > > wrote: > > >> > Leo/Regina, > > >> > > > >> > In response to your earlier message, I did find that report of > > >> > the identical error message. However, as I'm sure you noticed, > > >> > there is no apparent investigation that followed after it. That > > >> > was why I went to the PostgreSQL IRC channel first...they walked > > >> > me through generating a core dump, which is what then pointed to > > >> > it being a problem related to PostGIS. So while it's certainly > > >> > the same error being reported, the source of the problem in this > > >> > case appears PostGIS-specific - likely due to the logic that you > > >> > note was borrowed from the array_agg that caused the problem in the > > previous report. > > > >> > As for looking at the different query plans for > > >> > working/non-working versions of the statement with different > > >> > where conditions, I've attached several results in text files. > > >> > Two examples that worked, one that segfaults, and one that produces > > the 'array size exceeds...' > > > >> > error message. All of these are the same query, just with > > >> > variations in the where condition. The query plan is a but much > > >> > for me to interpret though - what does this look like to the > > >> > experts? > > >> > > > >> > Mike > > >> > > > >> > On Saturday 20 March 2010 23:35:32 Paragon Corporation wrote: > > >> >> Mike, > > >> >> Another thought. I suppose it could be the more or less two > > >> >> identical subselects both with array_aggs Just to give Paul > > >> >> something hopefully shorter to work with. Does this fail too? > > >> >> > > >> >> SELECT csls.chat_id, csls.ugeom > > >> >> FROM ( > > >> >> > > >> >> SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, > > >> >> csl1.chat_id FROM testdb.user_selections AS us1 > > >> >> INNER JOIN testdb.chat_selection_links AS csl1 ON us1.id = > > >> >> csl1.selection_id > > >> >> WHERE (not us1.user_drawing and not csl1.deleted) > > >> >> GROUP BY chat_id > > >> >> > > >> >> ) AS csls > > >> >> > > >> >> LEFT JOIN ( > > >> >> > > >> >> SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, > > >> >> csl2.chat_id FROM testdb.user_selections AS us2 > > >> >> INNER JOIN testdb.chat_selection_links AS csl2 ON us2.id = > > >> >> csl2.selection_id > > >> >> WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) > > >> >> GROUP BY chat_id > > >> >> > > >> >> ) AS csld ON csls.chat_id = csld.chat_id > > >> >> > > >> >> Leo and Regina, > > >> >> http://www.postgis.us > > >> >> > > >> >> -----Original Message----- > > >> >> From: postgis-users-bounces at postgis.refractions.net > > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf > > >> >> Of Paragon Corporation > > >> >> Sent: Saturday, March 20, 2010 11:29 PM > > >> >> To: 'PostGIS Users Discussion'; mgleahy at alumni.uwaterloo.ca > > >> >> Subject: Re: [postgis-users] ERROR: array size exceeds > > >> >> themaximumallowed(134217727) > > >> >> > > >> >> Mike, > > >> >> Actually scanning thru the archives that 13... is a common > > >> >> number so suspect that is an OS limit. > > >> >> > > >> >> This could be very well a bug in PostgreSQL 8.4. > > >> >> > > >> >> Have you tried this on other PostgreSQL 8.4 installs on other > > >> >> your Fedoras - you mentioned trying on older installs? > > >> >> > > >> >> Your problem sounds exactly like this guy's and he wasn't using > > >> >> PostGIS at all but array_agg (which is logic that PostGIS > > >> >> borrowed from to implement the faster collecting ST_Union > > >> >> behavior)i > > >> >> http://archives.postgresql.org/pgsql-hackers/2009-06/msg01171.ph > > >> >> p > > >> >> > > >> >> If you haven't already probably good to check the plan > > >> >> difference between the two queries (one with addtional WHERE and > > >> >> one > > without). > > > >> >> It could be doing something nuts like running the sub select > > >> >> for each record you have in the outer only when your extra WHERE > > >> >> condition is added and doing more or less the sane thing when > > >> >> you take it out. > > >> >> > > >> >> We've had some odd behavior in 8.4 with the planner doing > > >> >> strange things that we haven't been able to pin down and had to > > >> >> implement workaround for. As we described in this article.. Its > > >> >> probably unrelated though but just a thought to throw out at the > > wind. > > > >> >>http://www.postgresonline.com/journal/index.php?/archives/149-For > > >> >>cing -th e-p l anners-hand-with-set-enable_seqscan-off-WTF.html > > >> >> > > >> >> Leo and Regina, > > >> >> http://www.postgis.us > > >> >> > > >> >> -----Original Message----- > > >> >> From: postgis-users-bounces at postgis.refractions.net > > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf > > >> >> Of Paul Ramsey > > >> >> Sent: Saturday, March 20, 2010 8:23 PM > > >> >> To: mgleahy at alumni.uwaterloo.ca; PostGIS Users Discussion > > >> >> Subject: Re: [postgis-users] ERROR: array size exceeds the > > >> >> maximumallowed(134217727) > > >> >> > > >> >> Mike > > >> >> > > >> >> Well, if you can reduce it to a small db dump and query that > > >> >> exercises it, I can install a 64bit ubuntu VM and see if it > > >> >> happens here too. > > >> >> > > >> >> P > > >> >> > > >> >> On Sat, Mar 20, 2010 at 3:30 PM, Mike Leahy > > >> >> > > >> >> > > >> >> wrote: > > >> >> > FWIW, if I remove the entire where clause at the end of the > > >> >> > statement, it works again (with st_union()) and is virtually > > >> >> > > >> >> instantaneous. > > >> >> > > >> >> > On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: > > >> >> >> Hey, > > >> >> >> > > >> >> >> The query (when it works) is virtually instantaneous when I > > >> >> >> use > > >> >> >> st_memunion() (or when I took out part of the where clause - > > >> >> >> although now I can't even get that to work, so maybe it was > > >> >> >> just lucky). Each of the subqueries also work fine without > > >> >> >> any obvious problem. > > >> >> >> > > >> >> >> To me, it seems to be a combination of things that somehow > > >> >> >> add up to this limitation...I don't see what settings could > > >> >> >> affect the array size limit (in postgresql.conf). Can > > >> >> >> anyone point to a config option that might make a > > >> >> >> difference, or maybe point to another place with settings I > > >> >> >> can tinker with? > > >> >> >> > > >> >> >> Mike > > >> >> >> > > >> >> >> On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: > > >> >> >> > Mike, > > >> >> >> > > > >> >> >> > We apologize, didn't notice this was in a subquery and that > > >> >> >> > you have a > > >> >> >> > limit statement in your query. So we presume regardless of > > >> >> >> > your WHERE > > >> >> >> > only 26 records are being selected. > > >> >> >> > > > >> >> >> > So Paul could be right that you do have data that is > > >> >> >> > hitting some compiled or variable limit. > > >> >> >> > > > >> >> >> > Does running the subquery alone work or you didn't try > > >> >> >> > because it takes a long time? > > >> >> >> > > > >> >> >> > Thanks, > > >> >> >> > Leo and Regina > > >> >> >> > http://www.postgis.us > > >> >> >> > > > >> >> >> > -----Original Message----- > > >> >> >> > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of > > >> >> >> > Mike Leahy Sent: Saturday, March 20, 2010 2:01 PM > > >> >> >> > To: Paragon Corporation > > >> >> >> > Cc: 'PostGIS Users Discussion' > > >> >> >> > Subject: Re: [postgis-users] ERROR: array size exceeds the > > >> >> >> > maximum allowed(134217727) > > >> >> >> > > > >> >> >> > Hi Leo/Regina, > > >> >> >> > > > >> >> >> > Thanks for the suggestion. I tried adding the clause 'not > > >> >> >> > geom is > > >> >> > > >> >> null' > > >> >> > > >> >> >> > to the where statement in each of the two sub-queries that > > >> >> >> > have the st_union(geom) functions are used, but it still > > segfaults. > > > >> >> >> > I also tried this on a fresh database with very little > > >> >> >> > data, and it doesn't seem to cause problems. But I have > > >> >> >> > two databases with live data where I can cause this. I > > >> >> >> > have been able to pare one of these down to remove personal > > >> >> >> > information and reduce unnecessary data, while still > > >> >> >> > generating > > the crash with that > > > >> >> >> > query. Would someone be interested in a dump of this db? Of > > >> >> >> > course, that someone would ideally be able to test this on > > >> >> >> > a 64-bit (K)ubutnu system, in the hopes that the problem > > >> >> >> > can be replicated. > > >> >> >> > > > >> >> >> > Mike > > >> >> >> > > > >> >> >> > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: > > >> >> >> > > Paul, > > >> >> >> > > I doubt array size limit is the issue. He said when he > > >> >> >> > > left the where condition out it worked. I would think it > > >> >> >> > > would definitely blow up in that case. > > >> >> >> > > > > >> >> >> > > Mike, > > >> >> >> > > The issue from before was that array aggregate functions > > >> >> >> > > did not handle NULLs correctly. 64-bit systems were more > > >> >> >> > > likely to segfault or give strange Errros in this case. > > >> >> >> > > > > >> >> >> > > To rule out that we still have some of these issues in > > >> >> >> > > the code base, can you add a > > >> >> >> > > > > >> >> >> > > geom IS NOT NULL > > >> >> >> > > > > >> >> >> > > Condition to your WHERE filter. If that works, then the > > >> >> >> > > NULL issue is probably still lurking somewhere. > > >> >> >> > > > > >> >> >> > > Leo and Regina > > >> >> >> > > http://www.postgis.us > > >> >> >> > > > > >> >> >> > > > > >> >> >> > > -----Original Message----- > > >> >> >> > > From: postgis-users-bounces at postgis.refractions.net > > >> >> >> > > [mailto:postgis-users-bounces at postgis.refractions.net] On > > >> >> >> > > Behalf Of Paul Ramsey > > >> >> >> > > Sent: Saturday, March 20, 2010 10:56 AM > > >> >> >> > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca > > >> >> >> > > Subject: Re: [postgis-users] ERROR: array size exceeds > > >> >> >> > > the maximum > > >> >> >> > > allowed(134217727) > > >> >> >> > > > > >> >> >> > > Actually, memunion does the opposite, it passes the > > >> >> >> > > resultant and preserves mem. The default behavior is > > >> >> >> > > fast-but-memory-hungry. And has been for some time, > > >> >> >> > > though in different forms. There were some bugs in the > > >> >> >> > > array handling code, but Mark CA killed most of them, so > > >> >> >> > > the latest 1.5 and > > >> >> >> > > 1.4 streams should be good. If it's possible that the > > >> >> >> > > issue is one of array size, maybe Mike could find the > > >> >> >> > > dial that controls that maximum, and turn it up and down > > >> >> >> > > and see if it makes his > > >> >> >> > > > >> >> >> > problem go away/happen sooner. > > >> >> >> > > > >> >> >> > > P. > > >> >> >> > > > > >> >> >> > > On Sat, Mar 20, 2010 at 7:41 AM, strk > > wrote: > > >> >> >> > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: > > >> >> >> > > >> Hello again, > > >> >> >> > > >> > > >> >> >> > > >> It might be of interest to point out that substituting > > >> >> >> > > >> st_union() with > > >> >> >> > > >> st_memunion() seems to have worked around this. I'm > > >> >> >> > > >> curious though, because there is not a great deal of > > >> >> >> > > >> data being processed, and I am running this on a > > >> >> >> > > >> fairly sturdy system that that has more capacity than > > >> >> >> > > >> some of the Fedora systems I'm > > >> >> > > >> >> running. > > >> >> > > >> >> >> > > > st_memunion builds a big array with all geometries in it.. > > >> >> >> > > > you were hitting a limit of the array type. > > >> >> >> > > > st_union should behave better. > > >> >> >> > > > > > >> >> >> > > > --strk; > > >> >> >> > > > > > >> >> >> > > > () Free GIS & Flash consultant/developer > > >> >> >> > > > /\ http://strk.keybit.net/services.html > > >> >> >> > > > _______________________________________________ > > >> >> >> > > > postgis-users mailing list > > >> >> >> > > >postgis-users at postgis.refractions.net > > >> >> >> > > > > > >> >> >> > > >http://postgis.refractions.net/mailman/listinfo/postgis- > > >> >> >> > > >user > > >> >> >> > > >s > > >> >> >> > > > > >> >> >> > > _______________________________________________ > > >> >> >> > > postgis-users mailing list > > >> >> >> > > postgis-users at postgis.refractions.net > > >> >> >> > > http://postgis.refractions.net/mailman/listinfo/postgis-u > > >> >> >> > > sers > > >> >> > > > >> >> > _______________________________________________ > > >> >> > 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 pramsey at cleverelephant.ca Mon Mar 22 09:45:33 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Mon, 22 Mar 2010 09:45:33 -0700 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: <201003212354.44939.mgleahy@alumni.uwaterloo.ca> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003211943.02472.mgleahy@alumni.uwaterloo.ca> <201003212354.44939.mgleahy@alumni.uwaterloo.ca> Message-ID: <30fe546d1003220945g47e7f315r192fef42a398e3c7@mail.gmail.com> Did you already try replacing your postgis functions with array_agg calls to see if we can push the problem back over the fence to pgsql land? http://www.postgresonline.com/journal/index.php?/archives/126-PostgreSQL-8.4-Faster-array-building-with-array_agg.html P. On Sun, Mar 21, 2010 at 8:54 PM, Mike Leahy wrote: > Leo/Regina, > > Yes, I can confirm that the non-working queries work when enable_nestloop is > off, and enable_hashjoin is on. > > The opposite is not the case - setting enable_nestloop on and enable_hashjoin > off does not make the 'working' variations of my query crash. > > Nice catch - is there anything further I can do from my end to troubleshoot > this? > > Mike > > > > > On Sunday 21 March 2010 23:01:34 Paragon Corporation wrote: >> Mike and Paul, >> We took a quick look at the query plans. ?Admittedly we suck at reading >> ?text plans; always rely on the graphical explain. >> >> Anyrate -- one striking thing it seems between the ones that don't work and >> the ones that work are >> >> The ones that work never employ a nested loop scan >> >> Both the segfault one and the exceed max allowed employ nested loops. ?So >> maybe its the interaction between nested loops and hash agg causing the >> problem. >> >> >> Could you two try disabling nested loop scan and run the crashing ones. >> ?Also verify that the plan has indeed changed to not use nested loops. >> >> set enable_nestloop = off; >> set enable_hashjoin = on; >> >> run query >> >> >> --- If you can't disable nested loop, try disabling the hash_join to see if >> you can make the working queries crash >> >> set enable_hashjoin = off; >> set enable_nestloop = on; >> run query >> >> >> Leo and Regina >> http://www.postgis.us >> >> -----Original Message----- >> From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of Mike Leahy >> Sent: Sunday, March 21, 2010 7:43 PM >> To: Paul Ramsey >> Cc: PostGIS Users Discussion; Paragon Corporation >> Subject: Re: [postgis-users] ERROR: array size exceeds >> themaximumallowed(134217727) >> >> Ok, >> >> I've attached the smallest version of this query I can make before the >> ?error goes away. ?It seems to be very particular, but at least I have been >> ?able to take out some of the subqueries. Does this still produce the error >> ?in your environments as well? >> >> Mike >> >> On Sunday 21 March 2010 18:28:59 Paul Ramsey wrote: >> > Suggests nothing in particular, I'm afraid, because this isn't my area >> > of expertise ;) It's probably an 8-hour bug, so it could be a while >> > before I can devote an entire day to tracking back into it. It would >> > be ideal to have a smaller query that does the same thing. >> > >> > On Sun, Mar 21, 2010 at 12:58 PM, Mike Leahy >> > >> > wrote: >> > > Paul, >> > > >> > > Thanks for looking into it - at least I know it's not just me (for >> > > the array size limit at least). >> > > >> > > What does a cleanly trapped error like this suggest to you? ?If you >> > > try different variations on the where condition at the end of the >> > > statement, are you able to get a segfault? >> > > >> > > Mike >> > > >> > > On Sunday 21 March 2010 12:57:03 Paul Ramsey wrote: >> > >> As I was installing KUbuntu, I realized I should try the query on >> > >> my own system, and under OS/X 10.6 I see the array error, though it >> > >> seems to be cleanly trapped, there is no segfault. >> > >> >> > >> crashdb=# \i ./crashing.sql >> > >> psql:./crashing.sql:36: ERROR: ?array size exceeds the maximum >> > >> allowed >> > >> (134217727) >> > >> crashdb=# >> > >> >> > >> >> > >> P. >> > >> >> > >> On Sat, Mar 20, 2010 at 9:29 PM, Mike Leahy >> > >> >> > > >> > > wrote: >> > >> > Leo/Regina, >> > >> > >> > >> > In response to your earlier message, I did find that report of >> > >> > the identical error message. ?However, as I'm sure you noticed, >> > >> > there is no apparent investigation that followed after it. ?That >> > >> > was why I went to the PostgreSQL IRC channel first...they walked >> > >> > me through generating a core dump, which is what then pointed to >> > >> > it being a problem related to PostGIS. ?So while it's certainly >> > >> > the same error being reported, the source of the problem in this >> > >> > case appears PostGIS-specific - likely due to the logic that you >> > >> > note was borrowed from the array_agg that caused the problem in the >> >> previous report. >> >> > >> > As for looking at the different query plans for >> > >> > working/non-working versions of the statement with different >> > >> > where conditions, I've attached several results in text files. >> > >> > Two examples that worked, one that segfaults, and one that produces >> >> the 'array size exceeds...' >> >> > >> > error message. ?All of these are the same query, just with >> > >> > variations in the where condition. ?The query plan is a but much >> > >> > for me to interpret though - what does this look like to the >> > >> > experts? >> > >> > >> > >> > Mike >> > >> > >> > >> > On Saturday 20 March 2010 23:35:32 Paragon Corporation wrote: >> > >> >> Mike, >> > >> >> Another thought. ?I suppose it could be the more or less two >> > >> >> identical subselects both with array_aggs Just to give Paul >> > >> >> something hopefully shorter to work with. ?Does this fail too? >> > >> >> >> > >> >> SELECT csls.chat_id, csls.ugeom >> > >> >> FROM ?( >> > >> >> >> > >> >> ? ? SELECT '[stuff]' AS selection, st_union(geom) AS ugeom, >> > >> >> csl1.chat_id FROM testdb.user_selections AS us1 >> > >> >> ? ? INNER JOIN testdb.chat_selection_links AS csl1 ON us1.id = >> > >> >> csl1.selection_id >> > >> >> ? ? ? WHERE (not us1.user_drawing and not csl1.deleted) >> > >> >> ? ? GROUP BY chat_id >> > >> >> >> > >> >> ? ) AS csls >> > >> >> >> > >> >> ? LEFT JOIN ( >> > >> >> >> > >> >> ? ? SELECT '[stuff]' AS drawing, st_union(geom) AS ugeom, >> > >> >> csl2.chat_id FROM testdb.user_selections AS us2 >> > >> >> ? ? INNER JOIN testdb.chat_selection_links AS csl2 ON us2.id = >> > >> >> csl2.selection_id >> > >> >> ? ? ? WHERE (us2.user_drawing and us2.deleted and not csl2.deleted) >> > >> >> ? ?GROUP BY chat_id >> > >> >> >> > >> >> ? ) AS csld ON csls.chat_id = csld.chat_id >> > >> >> >> > >> >> Leo and Regina, >> > >> >> http://www.postgis.us >> > >> >> >> > >> >> -----Original Message----- >> > >> >> From: postgis-users-bounces at postgis.refractions.net >> > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf >> > >> >> Of Paragon Corporation >> > >> >> Sent: Saturday, March 20, 2010 11:29 PM >> > >> >> To: 'PostGIS Users Discussion'; mgleahy at alumni.uwaterloo.ca >> > >> >> Subject: Re: [postgis-users] ERROR: array size exceeds >> > >> >> themaximumallowed(134217727) >> > >> >> >> > >> >> Mike, >> > >> >> Actually scanning thru the archives that 13... is a common >> > >> >> number so ?suspect that is an OS limit. >> > >> >> >> > >> >> This could be very well a bug in PostgreSQL 8.4. >> > >> >> >> > >> >> Have you tried this on other PostgreSQL 8.4 installs on other >> > >> >> your Fedoras - you mentioned trying on older installs? >> > >> >> >> > >> >> Your problem sounds exactly like this guy's and he wasn't using >> > >> >> PostGIS at all but array_agg (which is logic that PostGIS >> > >> >> borrowed from to implement the faster collecting ST_Union >> > >> >> behavior)i >> > >> >> http://archives.postgresql.org/pgsql-hackers/2009-06/msg01171.ph >> > >> >> p >> > >> >> >> > >> >> If you haven't already probably good to check the plan >> > >> >> difference between the two queries (one with addtional WHERE and >> > >> >> one >> >> without). >> >> > >> >> ?It could be doing something nuts like running the sub select >> > >> >> for each record you have in the outer only when your extra WHERE >> > >> >> condition is added and doing more or less the sane thing when >> > >> >> you take it out. >> > >> >> >> > >> >> We've had some odd behavior in 8.4 with the planner doing >> > >> >> strange things that we haven't been able to pin down and had to >> > >> >> implement workaround for. As we described in this article.. Its >> > >> >> probably unrelated though but just a thought to throw out at the >> >> wind. >> >> > >> >>http://www.postgresonline.com/journal/index.php?/archives/149-For >> > >> >>cing -th e-p l anners-hand-with-set-enable_seqscan-off-WTF.html >> > >> >> >> > >> >> Leo and Regina, >> > >> >> http://www.postgis.us >> > >> >> >> > >> >> -----Original Message----- >> > >> >> From: postgis-users-bounces at postgis.refractions.net >> > >> >> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf >> > >> >> Of Paul Ramsey >> > >> >> Sent: Saturday, March 20, 2010 8:23 PM >> > >> >> To: mgleahy at alumni.uwaterloo.ca; PostGIS Users Discussion >> > >> >> Subject: Re: [postgis-users] ERROR: array size exceeds the >> > >> >> maximumallowed(134217727) >> > >> >> >> > >> >> Mike >> > >> >> >> > >> >> Well, if you can reduce it to a small db dump and query that >> > >> >> exercises it, I can install a 64bit ubuntu VM and see if it >> > >> >> happens here too. >> > >> >> >> > >> >> P >> > >> >> >> > >> >> On Sat, Mar 20, 2010 at 3:30 PM, Mike Leahy >> > >> >> >> > >> >> >> > >> >> wrote: >> > >> >> > FWIW, ?if I remove the entire where clause at the end of the >> > >> >> > statement, it works again (with st_union()) and is virtually >> > >> >> >> > >> >> instantaneous. >> > >> >> >> > >> >> > On Saturday 20 March 2010 18:10:38 Mike Leahy wrote: >> > >> >> >> Hey, >> > >> >> >> >> > >> >> >> The query (when it works) is virtually instantaneous when I >> > >> >> >> use >> > >> >> >> ?st_memunion() (or when I took out part of the where clause - >> > >> >> >> although now ?I can't even get that to work, so maybe it was >> > >> >> >> just lucky). ?Each of the ?subqueries also work fine without >> > >> >> >> any obvious problem. >> > >> >> >> >> > >> >> >> To me, it seems to be a combination of things that somehow >> > >> >> >> add up to this limitation...I don't see what settings could >> > >> >> >> affect the array size limit ?(in postgresql.conf). ?Can >> > >> >> >> anyone point to a config option that might make ?a >> > >> >> >> difference, or maybe point to another place with settings I >> > >> >> >> can tinker ?with? >> > >> >> >> >> > >> >> >> Mike >> > >> >> >> >> > >> >> >> On Saturday 20 March 2010 17:53:24 Paragon Corporation wrote: >> > >> >> >> > Mike, >> > >> >> >> > >> > >> >> >> > We apologize, didn't notice this was in a subquery and that >> > >> >> >> > you have a >> > >> >> >> > ?limit statement in your query. ? So we presume regardless of >> > >> >> >> > your WHERE >> > >> >> >> > ?only 26 records are being selected. >> > >> >> >> > >> > >> >> >> > So Paul could be right that you do have data that is >> > >> >> >> > hitting some compiled or variable limit. >> > >> >> >> > >> > >> >> >> > Does running the subquery alone work or you didn't try >> > >> >> >> > because it takes a long time? >> > >> >> >> > >> > >> >> >> > Thanks, >> > >> >> >> > Leo and Regina >> > >> >> >> > http://www.postgis.us >> > >> >> >> > >> > >> >> >> > -----Original Message----- >> > >> >> >> > From: Mike Leahy [mailto:mgl.gis at gmail.com] On Behalf Of >> > >> >> >> > Mike Leahy Sent: Saturday, March 20, 2010 2:01 PM >> > >> >> >> > To: Paragon Corporation >> > >> >> >> > Cc: 'PostGIS Users Discussion' >> > >> >> >> > Subject: Re: [postgis-users] ERROR: array size exceeds the >> > >> >> >> > maximum allowed(134217727) >> > >> >> >> > >> > >> >> >> > Hi Leo/Regina, >> > >> >> >> > >> > >> >> >> > Thanks for the suggestion. ?I tried adding the clause 'not >> > >> >> >> > geom is >> > >> >> >> > >> >> null' >> > >> >> >> > >> >> >> > to the where statement in each of the two sub-queries that >> > >> >> >> > have the st_union(geom) functions are used, but it still >> >> segfaults. >> >> > >> >> >> > I also tried this on a fresh database with very little >> > >> >> >> > data, and it doesn't seem to cause problems. ?But I have >> > >> >> >> > two databases with live data where I can cause this. ?I >> > >> >> >> > have been able to pare one of these down to remove personal >> > >> >> >> > information and reduce unnecessary data, while still >> > >> >> >> > generating >> >> the crash with that >> >> > >> >> >> > query. ? Would someone be interested in a dump of this db? ?Of >> > >> >> >> > course, that someone would ideally be able to test this on >> > >> >> >> > a 64-bit (K)ubutnu system, in the hopes that the problem >> > >> >> >> > can be replicated. >> > >> >> >> > >> > >> >> >> > Mike >> > >> >> >> > >> > >> >> >> > On Saturday 20 March 2010 11:32:35 Paragon Corporation wrote: >> > >> >> >> > > Paul, >> > >> >> >> > > I doubt array size limit is the issue. ?He said when he >> > >> >> >> > > left the where condition out it worked. ?I would think it >> > >> >> >> > > would definitely blow up in that case. >> > >> >> >> > > >> > >> >> >> > > Mike, >> > >> >> >> > > The issue from before was that array aggregate functions >> > >> >> >> > > did not handle NULLs correctly. ?64-bit systems were more >> > >> >> >> > > likely to segfault or give strange Errros in this case. >> > >> >> >> > > >> > >> >> >> > > To rule out that we still have some of these issues in >> > >> >> >> > > the code base, can you add a >> > >> >> >> > > >> > >> >> >> > > geom IS NOT NULL >> > >> >> >> > > >> > >> >> >> > > Condition to your WHERE filter. ?If that works, then the >> > >> >> >> > > NULL issue is probably still lurking somewhere. >> > >> >> >> > > >> > >> >> >> > > Leo and Regina >> > >> >> >> > > http://www.postgis.us >> > >> >> >> > > >> > >> >> >> > > >> > >> >> >> > > -----Original Message----- >> > >> >> >> > > From: postgis-users-bounces at postgis.refractions.net >> > >> >> >> > > [mailto:postgis-users-bounces at postgis.refractions.net] On >> > >> >> >> > > Behalf Of Paul Ramsey >> > >> >> >> > > Sent: Saturday, March 20, 2010 10:56 AM >> > >> >> >> > > To: PostGIS Users Discussion; mgleahy at alumni.uwaterloo.ca >> > >> >> >> > > Subject: Re: [postgis-users] ERROR: array size exceeds >> > >> >> >> > > the maximum >> > >> >> >> > > allowed(134217727) >> > >> >> >> > > >> > >> >> >> > > Actually, memunion does the opposite, it passes the >> > >> >> >> > > resultant and preserves mem. The default behavior is >> > >> >> >> > > fast-but-memory-hungry. And has been for some time, >> > >> >> >> > > though in different forms. There were some bugs in the >> > >> >> >> > > array handling code, but Mark CA killed most of them, so >> > >> >> >> > > the latest 1.5 and >> > >> >> >> > > 1.4 streams should be good. If it's possible that the >> > >> >> >> > > issue is one of array size, maybe Mike could find the >> > >> >> >> > > dial that controls that maximum, and turn it up and down >> > >> >> >> > > and see if it makes his >> > >> >> >> > >> > >> >> >> > problem go away/happen sooner. >> > >> >> >> > >> > >> >> >> > > P. >> > >> >> >> > > >> > >> >> >> > > On Sat, Mar 20, 2010 at 7:41 AM, strk >> >> wrote: >> > >> >> >> > > > On Sat, Mar 20, 2010 at 05:49:42AM -0400, Mike Leahy wrote: >> > >> >> >> > > >> Hello again, >> > >> >> >> > > >> >> > >> >> >> > > >> It might be of interest to point out that substituting >> > >> >> >> > > >> st_union() with >> > >> >> >> > > >> st_memunion() seems to have worked around this. ?I'm >> > >> >> >> > > >> curious though, because there is not a great deal of >> > >> >> >> > > >> data being processed, and I am running this on a >> > >> >> >> > > >> fairly sturdy system that that has more capacity than >> > >> >> >> > > >> some of the Fedora systems I'm >> > >> >> >> > >> >> running. >> > >> >> >> > >> >> >> > > > st_memunion builds a big array with all geometries in it.. >> > >> >> >> > > > you were hitting a limit of the array type. >> > >> >> >> > > > st_union should behave better. >> > >> >> >> > > > >> > >> >> >> > > > --strk; >> > >> >> >> > > > >> > >> >> >> > > > ?() ? Free GIS & Flash consultant/developer >> > >> >> >> > > > ?/\ ? http://strk.keybit.net/services.html >> > >> >> >> > > > _______________________________________________ >> > >> >> >> > > > postgis-users mailing list >> > >> >> >> > > >postgis-users at postgis.refractions.net >> > >> >> >> > > > >> > >> >> >> > > >http://postgis.refractions.net/mailman/listinfo/postgis- >> > >> >> >> > > >user >> > >> >> >> > > >s >> > >> >> >> > > >> > >> >> >> > > _______________________________________________ >> > >> >> >> > > postgis-users mailing list >> > >> >> >> > > postgis-users at postgis.refractions.net >> > >> >> >> > > http://postgis.refractions.net/mailman/listinfo/postgis-u >> > >> >> >> > > sers >> > >> >> > >> > >> >> > _______________________________________________ >> > >> >> > 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 gsstark at mit.edu Mon Mar 22 13:29:21 2010 From: gsstark at mit.edu (Greg Stark) Date: Mon, 22 Mar 2010 20:29:21 +0000 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: <30fe546d1003220945g47e7f315r192fef42a398e3c7@mail.gmail.com> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003211943.02472.mgleahy@alumni.uwaterloo.ca> <201003212354.44939.mgleahy@alumni.uwaterloo.ca> <30fe546d1003220945g47e7f315r192fef42a398e3c7@mail.gmail.com> Message-ID: <407d949e1003221329h5effb60cud0cf2097986f39c1@mail.gmail.com> On Mon, Mar 22, 2010 at 4:45 PM, Paul Ramsey wrote: > Did you already try replacing your postgis functions with array_agg > calls to see if we can push the problem back over the fence to pgsql > land? On Sat, Mar 20, 2010 at 9:17 AM, Mike Leahy wrote: > Running this query on various data will produce one of two results. ?One is > the error mentioned in the subject (ERROR: ?array size exceeds the maximum > allowed (134217727)). ?I can find very little information on this error. ?The > other outcome is that it often causes the PostgreSQL backend to segfault (see > gdboutput.txt). gdboutput.txt: Program terminated with signal 11, Segmentation fault. #0 0x00007fa4be23615b in pfree () from /usr/lib/postgresql/8.4/bin/postgres #1 0x00007fa4be18091b in makeMdArrayResult () from /usr/lib/postgresql/8.4/bin/postgres #2 0x00007fa4b7f038bc in pgis_accum_finalfn () from /usr/lib/postgresql/8.4/lib/postgis-1.5.so #3 0x00007fa4b7f039ee in pgis_geometry_union_finalfn () from /usr/lib/postgresql/8.4/lib/postgis-1.5.so Any chance you can generate one of these seg faults from a build with symbols and with assertions enabled? It might catch the problem earlier and provide more info. IIRC there were some memory management changes which required changes to array_agg() and which had some risk of causing problems for other sites with similar coding. Is it possible your'e missing some of these changes? I'm having trouble tracking them all down but at least there's these: commit 3d332de2eab8a01c0ef3f58ea69de2010fe8a1e1 Author: Tom Lane Date: Thu Jul 23 20:45:27 2009 +0000 In a non-hashed Agg node, reset the "aggcontext" at group boundaries, instead of individually pfree'ing pass-by-reference transition values. This should be at least as fast as the prior coding, and it has the major advantage of clearing out any working data an aggregate function may have stored in or underneath the aggcontext. This avoids memory leakage when an aggregate such as array_agg() is used in GROUP BY mode. Per report from Chris Spotts. Back-patch to 8.4. In principle the problem could arise in prior versions, but since they didn't have array_agg the issue seems not critical. commit 7f83b61cc26eeac0c5a09add49f6cf899f87fc0b Author: Tom Lane Date: Sat Jun 20 18:45:28 2009 +0000 Fix things so that array_agg_finalfn does not modify or free its input ArrayBuildState, per trouble report from Merlin Moncure. By adopting this fix, we are essentially deciding that aggregate final-functions should not modify their inputs ever. Adjust documentation and comments to match that conclusion. -- greg From pramsey at cleverelephant.ca Mon Mar 22 14:15:58 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Mon, 22 Mar 2010 14:15:58 -0700 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: <407d949e1003221329h5effb60cud0cf2097986f39c1@mail.gmail.com> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003211943.02472.mgleahy@alumni.uwaterloo.ca> <201003212354.44939.mgleahy@alumni.uwaterloo.ca> <30fe546d1003220945g47e7f315r192fef42a398e3c7@mail.gmail.com> <407d949e1003221329h5effb60cud0cf2097986f39c1@mail.gmail.com> Message-ID: <30fe546d1003221415l4b1abdb7x90cda278ad1ca076@mail.gmail.com> Mike, See if this patch makes anything better. It matches tlane's changes to the 8.4 agg finalfunc. P. On Mon, Mar 22, 2010 at 1:29 PM, Greg Stark wrote: > On Mon, Mar 22, 2010 at 4:45 PM, Paul Ramsey wrote: >> Did you already try replacing your postgis functions with array_agg >> calls to see if we can push the problem back over the fence to pgsql >> land? > > On Sat, Mar 20, 2010 at 9:17 AM, Mike Leahy wrote: >> Running this query on various data will produce one of two results. ?One is >> the error mentioned in the subject (ERROR: ?array size exceeds the maximum >> allowed (134217727)). ?I can find very little information on this error. ?The >> other outcome is that it often causes the PostgreSQL backend to segfault (see >> gdboutput.txt). > > gdboutput.txt: > > Program terminated with signal 11, Segmentation fault. > #0 ?0x00007fa4be23615b in pfree () from > /usr/lib/postgresql/8.4/bin/postgres > #1 ?0x00007fa4be18091b in makeMdArrayResult () from > /usr/lib/postgresql/8.4/bin/postgres > #2 ?0x00007fa4b7f038bc in pgis_accum_finalfn () from > /usr/lib/postgresql/8.4/lib/postgis-1.5.so > #3 ?0x00007fa4b7f039ee in pgis_geometry_union_finalfn () from > /usr/lib/postgresql/8.4/lib/postgis-1.5.so > > Any chance you can generate one of these seg faults from a build with > symbols and with assertions enabled? It might catch the problem > earlier and provide more info. > > IIRC there were some memory management changes which required changes > to array_agg() and which had some risk of causing problems for other > sites with similar coding. Is it possible your'e missing some of these > changes? I'm having trouble tracking them all down but at least > there's these: > > > commit 3d332de2eab8a01c0ef3f58ea69de2010fe8a1e1 > Author: Tom Lane > Date: ? Thu Jul 23 20:45:27 2009 +0000 > > ? ?In a non-hashed Agg node, reset the "aggcontext" at group > boundaries, instead > ? ?of individually pfree'ing pass-by-reference transition values. ?This should > ? ?be at least as fast as the prior coding, and it has the major advantage of > ? ?clearing out any working data an aggregate function may have stored in or > ? ?underneath the aggcontext. ?This avoids memory leakage when an aggregate > ? ?such as array_agg() is used in GROUP BY mode. ?Per report from Chris Spotts. > > ? ?Back-patch to 8.4. ?In principle the problem could arise in prior versions, > ? ?but since they didn't have array_agg the issue seems not critical. > > commit 7f83b61cc26eeac0c5a09add49f6cf899f87fc0b > Author: Tom Lane > Date: ? Sat Jun 20 18:45:28 2009 +0000 > > ? ?Fix things so that array_agg_finalfn does not modify or free its input > ? ?ArrayBuildState, per trouble report from Merlin Moncure. ?By adopting > ? ?this fix, we are essentially deciding that aggregate final-functions > ? ?should not modify their inputs ever. ?Adjust documentation and comments > ? ?to match that conclusion. > > -- > greg > _______________________________________________ > 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: finalfunc.patch Type: application/octet-stream Size: 868 bytes Desc: not available URL: From pramsey at cleverelephant.ca Mon Mar 22 14:27:18 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Mon, 22 Mar 2010 14:27:18 -0700 Subject: [postgis-users] ERROR: array size exceeds themaximumallowed(134217727) In-Reply-To: <30fe546d1003221415l4b1abdb7x90cda278ad1ca076@mail.gmail.com> References: <201003200517.50665.mgleahy@alumni.uwaterloo.ca> <201003211943.02472.mgleahy@alumni.uwaterloo.ca> <201003212354.44939.mgleahy@alumni.uwaterloo.ca> <30fe546d1003220945g47e7f315r192fef42a398e3c7@mail.gmail.com> <407d949e1003221329h5effb60cud0cf2097986f39c1@mail.gmail.com> <30fe546d1003221415l4b1abdb7x90cda278ad1ca076@mail.gmail.com> Message-ID: <30fe546d1003221427t3aa684c9kb6bd13c803ee4613@mail.gmail.com> This looks like a winner, at least insofar as it removes the max array error condition for me in OS/X. Huge thanks to Greg Stark for digging up the references to Tom Lane's changes in the array agg stuff... On Mon, Mar 22, 2010 at 2:15 PM, Paul Ramsey wrote: > Mike, > See if this patch makes anything better. It matches tlane's changes to > the 8.4 agg finalfunc. > P. > > On Mon, Mar 22, 2010 at 1:29 PM, Greg Stark wrote: >> On Mon, Mar 22, 2010 at 4:45 PM, Paul Ramsey wrote: >>> Did you already try replacing your postgis functions with array_agg >>> calls to see if we can push the problem back over the fence to pgsql >>> land? >> >> On Sat, Mar 20, 2010 at 9:17 AM, Mike Leahy wrote: >>> Running this query on various data will produce one of two results. ?One is >>> the error mentioned in the subject (ERROR: ?array size exceeds the maximum >>> allowed (134217727)). ?I can find very little information on this error. ?The >>> other outcome is that it often causes the PostgreSQL backend to segfault (see >>> gdboutput.txt). >> >> gdboutput.txt: >> >> Program terminated with signal 11, Segmentation fault. >> #0 ?0x00007fa4be23615b in pfree () from >> /usr/lib/postgresql/8.4/bin/postgres >> #1 ?0x00007fa4be18091b in makeMdArrayResult () from >> /usr/lib/postgresql/8.4/bin/postgres >> #2 ?0x00007fa4b7f038bc in pgis_accum_finalfn () from >> /usr/lib/postgresql/8.4/lib/postgis-1.5.so >> #3 ?0x00007fa4b7f039ee in pgis_geometry_union_finalfn () from >> /usr/lib/postgresql/8.4/lib/postgis-1.5.so >> >> Any chance you can generate one of these seg faults from a build with >> symbols and with assertions enabled? It might catch the problem >> earlier and provide more info. >> >> IIRC there were some memory management changes which required changes >> to array_agg() and which had some risk of causing problems for other >> sites with similar coding. Is it possible your'e missing some of these >> changes? I'm having trouble tracking them all down but at least >> there's these: >> >> >> commit 3d332de2eab8a01c0ef3f58ea69de2010fe8a1e1 >> Author: Tom Lane >> Date: ? Thu Jul 23 20:45:27 2009 +0000 >> >> ? ?In a non-hashed Agg node, reset the "aggcontext" at group >> boundaries, instead >> ? ?of individually pfree'ing pass-by-reference transition values. ?This should >> ? ?be at least as fast as the prior coding, and it has the major advantage of >> ? ?clearing out any working data an aggregate function may have stored in or >> ? ?underneath the aggcontext. ?This avoids memory leakage when an aggregate >> ? ?such as array_agg() is used in GROUP BY mode. ?Per report from Chris Spotts. >> >> ? ?Back-patch to 8.4. ?In principle the problem could arise in prior versions, >> ? ?but since they didn't have array_agg the issue seems not critical. >> >> commit 7f83b61cc26eeac0c5a09add49f6cf899f87fc0b >> Author: Tom Lane >> Date: ? Sat Jun 20 18:45:28 2009 +0000 >> >> ? ?Fix things so that array_agg_finalfn does not modify or free its input >> ? ?ArrayBuildState, per trouble report from Merlin Moncure. ?By adopting >> ? ?this fix, we are essentially deciding that aggregate final-functions >> ? ?should not modify their inputs ever. ?Adjust documentation and comments >> ? ?to match that conclusion. >> >> -- >> greg >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> > From Stephen.Salathiel at dse.vic.gov.au Mon Mar 22 16:02:30 2010 From: Stephen.Salathiel at dse.vic.gov.au (Stephen.Salathiel at dse.vic.gov.au) Date: Tue, 23 Mar 2010 10:02:30 +1100 Subject: [postgis-users] Stephen Salathiel is out of the office on fire duties. Message-ID: I will be out of the office starting 23/03/2010 and will not return until 29/03/2010. For all urgent enquiries, please contact Brett Miller on (03) 9637 9008. Notice: This email and any attachments may contain information that is personal, confidential, legally privileged and/or copyright.No part of it should be reproduced, adapted or communicated without the prior written consent of the copyright owner. It is the responsibility of the recipient to check for and remove viruses. If you have received this email in error, please notify the sender by return email, delete it from your system and destroy any copies. You are not authorised to use, communicate or rely on the information contained in this email. Please consider the environment before printing this email. From ivan.marchesini at gmail.com Mon Mar 22 17:19:47 2010 From: ivan.marchesini at gmail.com (ivan marchesini) Date: Tue, 23 Mar 2010 01:19:47 +0100 Subject: [postgis-users] postgis upgrade Message-ID: <1269303587.5658.6.camel@beedo> Dear postgis users I have this problem: I have a geographic-db dump made uding postgresql 8.2 and, I suppose, postgis 1.2 In my computer now I have postgresql 8.4 and postgis 1.4 (ubuntu) It seems that simply trying a restore (\i filename.sql) a lot of file and postgis functions ar not find... and the restore is only partially done.. can you suggest me the best solution for this problem? many thanks Ivan -- Ti prego di cercare di non inviarmi files .dwg, .doc, .xls, .ppt. Preferisco formati liberi. Please try to avoid to send me .dwg, .doc, .xls, .ppt files. I prefer free formats. http://it.wikipedia.org/wiki/Formato_aperto http://en.wikipedia.org/wiki/Open_format Ivan Marchesini Perugia (Italy) Socio fondatore GFOSS "Geospatial Free and Open Source Software" http://www.gfoss.it e-mail: marchesini at unipg.it ivan.marchesini at gmail.com fax (home): +39(0)5782830887 jabber: geoivan73 at jabber.org skype: geoivan73 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: Questa ? una parte del messaggio firmata digitalmente URL: From pmoen at offroadsoftware.com Mon Mar 22 22:01:40 2010 From: pmoen at offroadsoftware.com (Paul moen) Date: Tue, 23 Mar 2010 00:01:40 -0500 Subject: [postgis-users] Confused about st_snaptogrid and precision. Message-ID: I create a table as drop table the_control; CREATE TABLE the_control ( gid integer ) WITH ( OIDS=FALSE ); ALTER TABLE the_control OWNER TO postgres; SELECT addGeometryColumn('','the_control','the_geom',-1,'POINT',2); -- -- Data for Name: the_control; Type: TABLE DATA; Schema: public; Owner: postgres -- INSERT INTO the_control VALUES (1, '0101000000E266E916EDB53C414A0CEC1CF1792341'); INSERT INTO the_control VALUES (2, '0101000000A7098E8438C03C4102C52BDECC792341'); INSERT INTO the_control VALUES (3, '01010000002FB1D6F681CA3C413A57A0B0AD792341'); INSERT INTO the_control VALUES (4, '0101000000CC3A53AFA6CF3C41C7F208619E792341'); INSERT INTO the_control VALUES (5, '01010000009F73C169CBD43C4178C4E23E8F792341'); INSERT INTO the_control VALUES (6, '010100000060279054F0D93C41775A479B81792341'); INSERT INTO the_control VALUES (7, '01010000003CAD833F15DF3C413F1F542574792341'); INSERT INTO the_control VALUES (8, '0101000000C108622C3AE43C41FD6035DD66792341'); INSERT INTO the_control VALUES (9, '0101000000BD73A0175FE93C41E36F9DC759792341'); INSERT INTO the_control VALUES (10, '0101000000E3DE13BFD5F83C41428CD5CA32792341'); INSERT INTO the_control VALUES (11, '010100000069DF144DFDFD3C41A951632926792341'); INSERT INTO the_control VALUES (12, '0101000000E3C6DA2B24033D41D3F8BC501B792341'); INSERT INTO the_control VALUES (13, '0101000000A9447FEB710D3D4157C0CD2806792341'); INSERT INTO the_control VALUES (14, '010100000033105DCC98123D41290485D9FB782341'); INSERT INTO the_control VALUES (15, '0101000000B4333505743D3F41999534C3AA772341'); INSERT INTO the_control VALUES (16, '01010000005816A018A9663F41A51D97D600782341'); INSERT INTO the_control VALUES (17, '0101000000C437881183613F41406780E5F1772341'); INSERT INTO the_control VALUES (18, '0101000000FC863181C2473F41633DCD1DB8772341'); INSERT INTO the_control VALUES (19, '010100000021B5AF68CE6B3F412580DDBA09782341'); INSERT INTO the_control VALUES (20, '010100000096D7450A5D5C3F419DDD8F27E3772341'); SELECT gid,st_asewkt(the_geom) FROM the_control WHERE gid in (1,2,3,4,5); 1;"POINT(1881581.08949893 638200.556488403)" 2;"POINT(1884216.51779232 638182.433927685)" 3;"POINT(1886849.96421344 638166.844973303)" 4;"POINT(1888166.68486373 638159.189521395)" 5;"POINT(1889483.41310809 638151.622823848)" I then try SELECT * FROM the_control WHERE st_equals(st_geomfromewkt('POINT(1881581.08949893 638200.556488403)'),the_geom); This returns 0 rows, which is what I would expect since the documentation for st_asewkt says 'WKT format does not maintain precision so to prevent ?oating truncation, use ST_AsBinary or ST_AsEWKB format for transport.' If I try the following sql statement, it returns a row which leads me to believe that there is more precision in the binary geometry and truncation is occuring. SELECT * FROM the_control WHERE st_equals(st_geomfromewkt('POINT(1881581.08949893 638200.556488403)'),st_geomfromewkt(st_asewkt(the_geom))); I wanted to reduce the precision of the geometry in the table the_control so the st_astext would match. I tried using st_snaptogrid. UPDATE the_control SET the_geom=st_snaptogrid(the_geom,.0000001); I then get the following for SELECT gid,st_asewkt(the_geom) FROM the_control WHERE gid in (1,2,3,4,5); 1;"POINT(1881581.0894989 638200.5564884)" 2;"POINT(1884216.5177923 638182.4339277)" 3;"POINT(1886849.9642134 638166.8449733)" 4;"POINT(1888166.6848637 638159.1895214)" 5;"POINT(1889483.4131081 638151.6228238)" But I still can't get a row FROM the st_equals. SELECT * FROM the_control WHERE st_equals(st_geomfromewkt('POINT(1881581.0894989 638200.5564884)'),the_geom); Shouldn't they be the same, now? The only way I have found to make the geom the same is to UPDATE the table using the st_asewkt. UPDATE the_control SET the_geom=st_geomfromewkt(st_asewkt(st_snaptogrid(the_geom,.0000001))); Then it returns the row SELECT * FROM the_control WHERE st_equals(st_geomfromewkt('POINT(1881581.0894989 638200.5564884)'),the_geom); 1;"01010000006166E916EDB53C412D0CEC1CF1792341" When I use ST_X and ST_Y, I get the x and y that I expect. SELECT gid, st_X(the_geom), st_Y(the_geom) FROM the_control WHERE gid in (1,2,3,4,5); 1;1881581.0894989;638200.5564884 2;1884216.5177923;638182.4339277 3;1886849.9642134;638166.8449733 4;1888166.6848637;638159.1895214 5;1889483.4131081;638151.6228238 Can someone help explain this to me? How do I see what coordinates are actually stored in the geometry? Is there a way to force the precision of the geometry using a contstraint? SELECT postgis_full_version(); "POSTGIS="1.5.1" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.3" USE_STATS" Thanks, Paul From strk at keybit.net Tue Mar 23 03:16:59 2010 From: strk at keybit.net (strk) Date: Tue, 23 Mar 2010 11:16:59 +0100 Subject: [postgis-users] Confused about st_snaptogrid and precision. In-Reply-To: References: Message-ID: <20100323101659.GK81818@keybit.net> On Tue, Mar 23, 2010 at 12:01:40AM -0500, Paul moen wrote: > Can someone help explain this to me? How do I see what coordinates > are actually stored in the geometry? Is there a way to force the > precision of the geometry using a contstraint? If you snap all geometries to the same grid you should get a consistent precision all over. The equality tests you report are only snapping one operator, thus the false return. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From pmoen at offroadsoftware.com Tue Mar 23 04:57:41 2010 From: pmoen at offroadsoftware.com (Paul Moen) Date: Tue, 23 Mar 2010 06:57:41 -0500 Subject: [postgis-users] Confused about st_snaptogrid and precision. In-Reply-To: <20100323101659.GK81818@keybit.net> References: <20100323101659.GK81818@keybit.net> Message-ID: <5C654192-F756-4994-8EE7-519EDE018C3F@offroadsoftware.com> On Mar 23, 2010, at 5:16 AM, strk wrote: > On Tue, Mar 23, 2010 at 12:01:40AM -0500, Paul moen wrote: > >> Can someone help explain this to me? How do I see what coordinates >> are actually stored in the geometry? Is there a way to force the >> precision of the geometry using a contstraint? > > If you snap all geometries to the same grid you should get a > consistent precision all over. The equality tests you report > are only snapping one operator, thus the false return. But I first am applying the following SQL, which should set the precision on every point in the table. UPDATE the_control SET the_geom=st_snaptogrid(the_geom,.0000001); After setting the precision, shouldn't I be able to find the point, POINT(1881581.0894989 638200.5564884), at that precision, in the table by using SELECT * FROM the_control WHERE st_equals(st_geomfromewkt('POINT(1881581.0894989 638200.5564884)'),the_geom); The exact order I am doing this is create the table. (see previous message i thread) UPDATE the_control SET the_geom=st_snaptogrid(the_geom,.0000001); SELECT * FROM the_control WHERE st_equals(st_geomfromewkt('POINT(1881581.0894989 638200.5564884)'),the_geom); After I set the precision the output looks like SELECT gid,st_asewkt(the_geom) FROM the_control WHERE gid in (1,2,3,4,5); 1;"POINT(1881581.0894989 638200.5564884)" 2;"POINT(1884216.5177923 638182.4339277)" 3;"POINT(1886849.9642134 638166.8449733)" 4;"POINT(1888166.6848637 638159.1895214)" 5;"POINT(1889483.4131081 638151.6228238)" and it looks like SELECT * FROM the_control WHERE st_equals(st_geomfromewkt('POINT(1881581.0894989 638200.5564884)'),the_geom); should return a row. sorry if I am just not getting this, Paul > > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From strk at keybit.net Tue Mar 23 05:05:52 2010 From: strk at keybit.net (strk) Date: Tue, 23 Mar 2010 13:05:52 +0100 Subject: [postgis-users] Confused about st_snaptogrid and precision. In-Reply-To: <5C654192-F756-4994-8EE7-519EDE018C3F@offroadsoftware.com> References: <20100323101659.GK81818@keybit.net> <5C654192-F756-4994-8EE7-519EDE018C3F@offroadsoftware.com> Message-ID: <20100323120552.GA883@keybit.net> On Tue, Mar 23, 2010 at 06:57:41AM -0500, Paul Moen wrote: > UPDATE the_control SET the_geom=st_snaptogrid(the_geom,.0000001); > > After setting the precision, shouldn't I be able to find the point, POINT(1881581.0894989 638200.5564884), at that precision, in the table by using > > SELECT * FROM the_control WHERE st_equals(st_geomfromewkt('POINT(1881581.0894989 638200.5564884)'),the_geom); You are NOT snapping the return from st_geomfromewkt. Try this: SELECT * FROM the_control WHERE st_equals( st_snaptogrid(st_geomfromewkt('POINT(1881581.08949 89 638200.5564884)', .0000001)),the_geom); --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From strk at keybit.net Tue Mar 23 05:10:02 2010 From: strk at keybit.net (strk) Date: Tue, 23 Mar 2010 13:10:02 +0100 Subject: [postgis-users] Confused about st_snaptogrid and precision. In-Reply-To: <20100323120552.GA883@keybit.net> References: <20100323101659.GK81818@keybit.net> <5C654192-F756-4994-8EE7-519EDE018C3F@offroadsoftware.com> <20100323120552.GA883@keybit.net> Message-ID: <20100323121002.GB883@keybit.net> On Tue, Mar 23, 2010 at 01:05:52PM +0100, strk wrote: > On Tue, Mar 23, 2010 at 06:57:41AM -0500, Paul Moen wrote: > > > UPDATE the_control SET the_geom=st_snaptogrid(the_geom,.0000001); > > > > After setting the precision, shouldn't I be able to find the point, POINT(1881581.0894989 638200.5564884), at that precision, in the table by using > > > > SELECT * FROM the_control WHERE st_equals(st_geomfromewkt('POINT(1881581.0894989 638200.5564884)'),the_geom); > > You are NOT snapping the return from st_geomfromewkt. > > Try this: > SELECT * FROM the_control WHERE st_equals( > st_snaptogrid(st_geomfromewkt('POINT(1881581.08949 > 89 638200.5564884)', .0000001)),the_geom); Also, note that if the geometries you're comparing do not have the same structure (number of points in the same place) snapping to the grid may have the unexpected result of making them different than they were. This is because snapToGrid doesn't add new vertices, but only snaps the existing ones. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From pmoen at offroadsoftware.com Tue Mar 23 07:37:59 2010 From: pmoen at offroadsoftware.com (Paul moen) Date: Tue, 23 Mar 2010 09:37:59 -0500 Subject: [postgis-users] Confused about st_snaptogrid and precision. In-Reply-To: <20100323121002.GB883@keybit.net> References: <20100323101659.GK81818@keybit.net> <5C654192-F756-4994-8EE7-519EDE018C3F@offroadsoftware.com> <20100323120552.GA883@keybit.net> <20100323121002.GB883@keybit.net> Message-ID: On Mar 23, 2010, at 7:10 AM, strk wrote: > On Tue, Mar 23, 2010 at 01:05:52PM +0100, strk wrote: >> On Tue, Mar 23, 2010 at 06:57:41AM -0500, Paul Moen wrote: >> >>> UPDATE the_control SET the_geom=st_snaptogrid(the_geom,.0000001); >>> >>> After setting the precision, shouldn't I be able to find the >>> point, POINT(1881581.0894989 638200.5564884), at that precision, >>> in the table by using >>> >>> SELECT * FROM the_control WHERE >>> st_equals(st_geomfromewkt('POINT(1881581.0894989 >>> 638200.5564884)'),the_geom); >> >> You are NOT snapping the return from st_geomfromewkt. >> >> Try this: >> SELECT * FROM the_control WHERE st_equals( >> st_snaptogrid(st_geomfromewkt('POINT(1881581.08949 >> 89 638200.5564884)', .0000001)),the_geom); Bottom line, when I store a geometry using st_geomFromEWKT('POINT(1881581.089489 638200.5564884)'), is is not actually storing a geometry with an X of 1881581.089489 and a Y of 638200.5564884. It is storing a geometry with an X = some number that rounds to 1881581.089489 and a Y = some number that rounds to 638200.5564884. > Also, note that if the geometries you're comparing do not > have the same structure (number of points in the same place) > snapping to the grid may have the unexpected result of making > them different than they were. > > This is because snapToGrid doesn't add new vertices, but only > snaps the existing ones. > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users From paul.malm at saabgroup.com Wed Mar 24 00:30:01 2010 From: paul.malm at saabgroup.com (Malm Paul) Date: Wed, 24 Mar 2010 08:30:01 +0100 Subject: [postgis-users] spatial extents of a PostGIS db In-Reply-To: References: <4AC021BD.1070301@orlitzky.com> <11D78582A8854AF8938AEBDF09A7E504@b> <9CE1BBC0D3132A43A391263616F51E7D60615984F3@corpappl079.corp.saab.se> <5a9699850909280645ie1f47e8vd4acb8367bd287be@mail.gmail.com> <5a9699850909280651g64f913a7yf530045f2694be84@mail.gmail.com> Message-ID: <9CE1BBC0D3132A43A391263616F51E7D60B329139B@corpappl079.corp.saab.se> Hi List! I have imported a map with ogr2ogr to a "PostGIS" db, is there a way to find out the spatial extent of this map e.g the envelope that is build from all including layers? Kind regards, Paul From debasish.sahu at gmail.com Wed Mar 24 00:35:17 2010 From: debasish.sahu at gmail.com (Debasish Sahu) Date: Wed, 24 Mar 2010 13:05:17 +0530 Subject: [postgis-users] spatial extents of a PostGIS db In-Reply-To: <9CE1BBC0D3132A43A391263616F51E7D60B329139B@corpappl079.corp.saab.se> References: <4AC021BD.1070301@orlitzky.com> <11D78582A8854AF8938AEBDF09A7E504@b> <9CE1BBC0D3132A43A391263616F51E7D60615984F3@corpappl079.corp.saab.se> <5a9699850909280645ie1f47e8vd4acb8367bd287be@mail.gmail.com> <5a9699850909280651g64f913a7yf530045f2694be84@mail.gmail.com> <9CE1BBC0D3132A43A391263616F51E7D60B329139B@corpappl079.corp.saab.se> Message-ID: <698ee8af1003240035x576c176fy9c7508f310dbbd0@mail.gmail.com> You can use the PostGIS function ST_Extent to get the envelope. Thanks Deb On Wed, Mar 24, 2010 at 1:00 PM, Malm Paul wrote: > Hi List! > > I have imported a map with ogr2ogr to a "PostGIS" db, is there a way to > find out the spatial extent of this map e.g the envelope that is build from > all including layers? > > Kind regards, > Paul > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Thanks and Warm Regards Debasish Sahu -------------- next part -------------- An HTML attachment was scrubbed... URL: From mwtoews at gmail.com Wed Mar 24 01:29:59 2010 From: mwtoews at gmail.com (Mike Toews) Date: Wed, 24 Mar 2010 01:29:59 -0700 Subject: [postgis-users] spatial extents of a PostGIS db In-Reply-To: <9CE1BBC0D3132A43A391263616F51E7D60B329139B@corpappl079.corp.saab.se> References: <4AC021BD.1070301@orlitzky.com> <11D78582A8854AF8938AEBDF09A7E504@b> <9CE1BBC0D3132A43A391263616F51E7D60615984F3@corpappl079.corp.saab.se> <5a9699850909280645ie1f47e8vd4acb8367bd287be@mail.gmail.com> <5a9699850909280651g64f913a7yf530045f2694be84@mail.gmail.com> <9CE1BBC0D3132A43A391263616F51E7D60B329139B@corpappl079.corp.saab.se> Message-ID: <22f0a52d1003240129n69a8bf5fxe5ba3bdea70cc50a@mail.gmail.com> Hi Paul, To get the bounds for one layer/table, you need an aggregate (ST_Collect) and envelope on the aggregate. For one layer/table, it would look something like: SELECT ST_AsText(ST_Envelope(ST_Collect(the_geom))) AS envelope FROM mylayer; And for multiple layers/tables, you need some unions and subqueries: SELECT ST_AsText(ST_Envelope(ST_Collect(sub_envelope))) AS envelope FROM ( SELECT ST_Envelope(ST_Collect(the_geom)) AS sub_envelope FROM layer1 UNION ALL SELECT ST_Envelope(ST_Collect(the_geom)) AS sub_envelope FROM layer2 ) AS envelopes_from_several_layers; Which does the envelope of several sub-envelopes. Make sure they all share the same SRIDs. -Mike On 24 March 2010 00:30, Malm Paul wrote: > Hi List! > > I have imported a map with ogr2ogr to a "PostGIS" db, is there a way to find out the spatial extent of this map e.g the envelope that is build from all including layers? > > Kind regards, > Paul > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From ibrahimsaricicek at gmail.com Wed Mar 24 02:21:23 2010 From: ibrahimsaricicek at gmail.com (ibrahim saricicek) Date: Wed, 24 Mar 2010 11:21:23 +0200 Subject: [postgis-users] Address Geocoding In-Reply-To: <4BA3C120.7020001@swoodbridge.com> References: <9296e7dd1003190834j3df4951lb90677b5bc454d5b@mail.gmail.com> <4BA3C120.7020001@swoodbridge.com> Message-ID: <10c070ab1003240221t614cdb56x7bba317753b5dcf1@mail.gmail.com> Hi; for reverse geoceding now using this and works fine; SELECT id, the_geom FROM (roads, settlements, poi, province, etc...) WHERE the_geom && SetSRID('BOX3D(x+0.01 y+0.01, x-0.01 y-0.01)'::box3d, 4326) ORDER BY ST_Distance(the_geom, GeomFromText('POINT(x y)', 4326)) LIMIT 1; regards... On Fri, Mar 19, 2010 at 8:23 PM, Stephen Woodbridge wrote: > http://www.google.com/#hl=en&source=hp&q=postgis+geocoder > > Ricardo Bayley wrote: > >> Hi fellows, >> >> I was wondering if any of you have a good approach to do Address Geocoding >> within postgis. >> Any ideas, considerations, thoughts ?? >> >> thanks in advanced. >> >> >> Warm regards, >> >> >> Ricardo >> >> >> ------------------------------------------------------------------------ >> >> >> _______________________________________________ >> 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: From TRNI at rudersdal.dk Wed Mar 24 04:57:14 2010 From: TRNI at rudersdal.dk (Trine Louring Nielsen) Date: Wed, 24 Mar 2010 12:57:14 +0100 Subject: [postgis-users] postgis-users Digest, Vol 93, Issue 13 In-Reply-To: References: Message-ID: <442AD76F64A6D24D906FEA5D79F009BA4B6FB6@rdexchange02.RD.Local> Hej Helge Du lovede mig at du vil sende noget beskrivende materiale om jeres indberetningssystem. Vh trine -----Oprindelig meddelelse----- Fra: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] P? vegne af postgis-users-request at postgis.refractions.net Sendt: 13. marts 2010 21:00 Til: postgis-users at postgis.refractions.net Emne: postgis-users Digest, Vol 93, Issue 13 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. Re: "ERROR: could not access file "$libdir/postgis-1.5": No such file or directory" (Gissur ??rhallsson) ---------------------------------------------------------------------- Message: 1 Date: Sat, 13 Mar 2010 15:15:21 +0000 From: Gissur ??rhallsson Subject: Re: [postgis-users] "ERROR: could not access file "$libdir/postgis-1.5": No such file or directory" To: PostGIS Users Discussion Message-ID: <497c70db1003130715i13b46658i35c6f494e73d8ad3 at mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" Hi there pramsey solved this for me on irc: I had installed and then removed postgresql 8.3 via apt previously - but some of it was still hanging about, to wit: [120310 16:52:30] the problem is you have a system pg_config in /usr/bin, but I imagine the postgresql you are running is the one from /usr/local/pgsql [120310 16:53:04] export PATH=/usr/local/pgsql/bin:$PATH and the reconfigure, rebuild, reinstall your postgis This did the trick Thanks anyway, and kind regards from Iceland, Gissur On Fri, Mar 12, 2010 at 7:13 PM, Jorge Arevalo wrote: > 2010/3/12 Gissur ??rhallsson : > > Hi, > > I'm setting up postgis on a Ubuntu 8.0.4 LTS Server that I'm setting up. > > I decided that it would be best for me build Postgis 1.5 from source > > so that's what I did - starting with Postgres 8.4.2 from trunk > > through GEOS > and > > PROJ and everything went fine. I've now also compiled postgis 1.5 > > and was preparing to run new_postgis_restore.pl to restore my > > database (migrated from windows postgresql 8.2). > > When I try to run psql postgis.sql on the database I intend to > > restore > into > > (as stipulated inside new_postgis_restore.pl) I get the > > following: http://postgis.pastebin.com/TCC0yk35 > > Running $ldd /absolute/path/to/postgis-1.5.so returns > > this: http://postgis.pastebin.com/yERz1HeY (which looks normal > > enough) > > > > For further reference I enclose my pg_config > > output: http://postgis.pastebin.com/6u3zfTyc > > LIBDIR is set to /usr/lib in there, and my postgis-1.5.so is located > > at /usr/lib/postgresql/8.4/lib/ postgis-1.5.so Does anybody have > > any ideas? > > Kind regards from Iceland, > > Gissur ??rhallsson > > > > Loftmyndir ehf. > > Laugavegur 13 > > IS 101 Reykjav?k - Iceland > > s?mi (tel): (+354) 540 2500 > > t?lvup?stur (email): gissur at loftmyndir.is > > > > Hi, > > Try adding /usr/lib/postgresql/8.4/lib/postgis-1.5.so to > /etc/ld.so.conf and then executing "sudo ldconfig" > > Hope this helps... > > Best regards, > Jorge > > > > _______________________________________________ > > 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 > -- Gissur ??rhallsson Loftmyndir ehf. Laugavegur 13 IS 101 Reykjav?k - Iceland s?mi (tel): (+354) 540 2500 t?lvup?stur (email): gissur at loftmyndir.is -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users End of postgis-users Digest, Vol 93, Issue 13 ********************************************* From flavio.rigolon at gmail.com Wed Mar 24 05:07:01 2010 From: flavio.rigolon at gmail.com (flavio rigolon) Date: Wed, 24 Mar 2010 13:07:01 +0100 Subject: [postgis-users] postgis upgrade In-Reply-To: <1269303587.5658.6.camel@beedo> References: <1269303587.5658.6.camel@beedo> Message-ID: <2ce45db01003240507j2df12525u7b5e3ceab3e781a9@mail.gmail.com> Il giorno 23 marzo 2010 01.19, ivan marchesini ha scritto: > Dear postgis users > > I have this problem: > > I have a geographic-db dump made uding postgresql 8.2 and, I suppose, > postgis 1.2 > > In my computer now I have postgresql 8.4 and postgis 1.4 (ubuntu) > > It seems that simply trying a restore (\i filename.sql) a lot of file > and postgis functions ar not find... and the restore is only partially > done.. > > can you suggest me the best solution for this problem? > > many thanks > > Ivan > Hi Ivan, not sure (I red something about it over internet) but I think you have to migrate step by step from a version to the next one (i.e. from 8.2 to 8.3, then from 8.3 to 8.4). flavio -------------- next part -------------- An HTML attachment was scrubbed... URL: From Majid.Kazemi at teranet.ca Wed Mar 24 07:13:22 2010 From: Majid.Kazemi at teranet.ca (Majid Kazemi) Date: Wed, 24 Mar 2010 10:13:22 -0400 Subject: [postgis-users] Importing none geometric table into PostGIS database Message-ID: Hi all; I was able to import all my geometry table/data into a PostGIS database using FME without any issue. Now, I am having some issue during importing none geometry table/data into the same PostGIS database. It imports the table name without any column or data. Your help will highly be appreciated . Thanks, Majid -------------- next part -------------- An HTML attachment was scrubbed... URL: From kneufeld at refractions.net Wed Mar 24 09:36:35 2010 From: kneufeld at refractions.net (Kevin Neufeld) Date: Wed, 24 Mar 2010 09:36:35 -0700 Subject: [postgis-users] spatial extents of a PostGIS db In-Reply-To: <22f0a52d1003240129n69a8bf5fxe5ba3bdea70cc50a@mail.gmail.com> References: <4AC021BD.1070301@orlitzky.com> <11D78582A8854AF8938AEBDF09A7E504@b> <9CE1BBC0D3132A43A391263616F51E7D60615984F3@corpappl079.corp.saab.se> <5a9699850909280645ie1f47e8vd4acb8367bd287be@mail.gmail.com> <5a9699850909280651g64f913a7yf530045f2694be84@mail.gmail.com> <9CE1BBC0D3132A43A391263616F51E7D60B329139B@corpappl079.corp.saab.se> <22f0a52d1003240129n69a8bf5fxe5ba3bdea70cc50a@mail.gmail.com> Message-ID: <4BAA3F93.9050601@refractions.net> On 3/24/2010 1:29 AM, Mike Toews wrote: > Hi Paul, > > To get the bounds for one layer/table, you need an aggregate > (ST_Collect) and envelope on the aggregate. For one layer/table, it > would look something like: > > SELECT ST_AsText(ST_Envelope(ST_Collect(the_geom))) AS envelope FROM mylayer; > Sorry, Mike, but I don't think you want to do this. As an example, I have a linear table of 18 million records spanning about 12GB of data. Your solution will try to create a single geometry from the entire collection (a single 12GB geometry object) and then take the envelope of it. Rather, as Debasish Sahu suggested, use ST_Extent (http://postgis.refractions.net/docs/ST_Extent.html). Cheers, Kevin From bryan at ideotrope.org Thu Mar 25 08:55:09 2010 From: bryan at ideotrope.org (Bryan Keith) Date: Thu, 25 Mar 2010 09:55:09 -0600 (MDT) Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs Message-ID: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> Hello, I'm not sure if this is the correct list for this question, but here goes. If I ought to post to another list, please let me know which one. I'm seeing a discrepancy between coordinate transformations in postgis and transformations using cs2cs with the exact same proj.4 string. Here are the proj.4 strings and transformation using postgis: select proj4text from spatial_ref_sys where srid = 32003; proj4text ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs (1 row) select proj4text from spatial_ref_sys where srid = 32100; proj4text -------------------------------------------------------------------------------------------------------------------------- +proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs (1 row) select astext(transform(setsrid(makepoint(1234488, 744181), 32003), 32100)); astext ------------------------------------------ POINT(366770.791392722 199138.151643548) Here is the transformation using cs2cs: cs2cs +proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs +to +proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs 1234488 744181 366704.35 199132.53 0.00 Why the discrepancy? I'm guessing it has something to do with how datum shifts are handled. So which one is right? That's probably going to depend on something that I don't know about my input data, but maybe someone will enlighten differently. Thank you. Bryan From peter.hopfgartner at r3-gis.com Thu Mar 25 10:18:20 2010 From: peter.hopfgartner at r3-gis.com (Peter Hopfgartner) Date: Thu, 25 Mar 2010 18:18:20 +0100 Subject: [postgis-users] Read file encoding from from shape file In-Reply-To: <30fe546d1003201728x7cdc7341n6fd1dc136d2f7a66@mail.gmail.com> References: <4B87D2EC.8070601@r3-gis.com> <30fe546d1002260600l6f22afeav82704a5941ad632c@mail.gmail.com> <4BA54F1B.20506@r3-gis.com> <30fe546d1003201728x7cdc7341n6fd1dc136d2f7a66@mail.gmail.com> Message-ID: <4BAB9ADC.6050606@r3-gis.com> Well, I've started to compare the version in PostGIS with that from shapelib, dated 2003-07-08 (that should be approx the date of the fork). I've run indent on those files, so that diff produces less noise caused by changing white spaces. In the PostGIS version are: 1) a lot of added casts to unsigned int 2) some bug fixes, which I would be cautious to port, since the same bugs may have been fixed in the main shapelib 3) 2 new functions: DBFReadDeleted and DBFReadSetup. Here I'm not sure what really happens here. 4) support for date. This seems to be easy and I've posted the diffs to the shapelib mailing list. The diff between current PostGIS version and those of Shapefile dated 2003-07-08 are attached. Regards, Peter Paul Ramsey wrote: > Yes, there's patches to our shapelib that don't exist in the mainline. > The process needs to identify our changes to feed back to mainline, > update mainline, then bring that in. > > P. > > On Sat, Mar 20, 2010 at 3:41 PM, Peter Hopfgartner > wrote: > >> Paul Ramsey wrote: >> >>> I was never certain that ESRI software actually respected the DBF code >>> page flags, but your reference indicates they do, so this seems >>> reasonable. Some investigation of the current state of shapelib WRT >>> encoding would be wise, as I think we should update our shapelib to >>> the current version when we release 2.0. >>> >>> P. >>> >>> >>> >> I had a look if it was quick deal to upgrade to current shapelib. I copied >> dbfopen.c, shpopen.c and shapefil.h from a currrent the shapelib checkout. >> Unfortunatly, it seems to me that date handling has disappeared from >> shapelib. At least FTDate is not defined anymore and in DBFOpen no 'D' is >> assigned as field type. >> >> Am I missing something obvious here? >> >> Regards, >> >> Peter >> >>> On Fri, Feb 26, 2010 at 5:55 AM, Peter Hopfgartner >>> wrote: >>> >>> >>>> Hi >>>> >>>> Looking into the sources of shp2pgsql, [0], it seems that the loader >>>> assumes >>>> that the encoding of the dbf file is "WINDOWS-1252", if not specified >>>> differently by the -W command line option. >>>> >>>> From [1], shape files carry some information about their encoding, either >>>> in >>>> the dbf file header at byte position 29, [2], or in a separate file with >>>> extension CPG. >>>> >>>> Would it make sense to change the default behaviour of shp2pgsql into: >>>> >>>> 1) try to get file encoding from dbf file or cpg file >>>> 2) if 1) fails, take WINDOWS-1252 as default >>>> 3) if -W is given, take this option >>>> >>>> And then, is the information about the encoding set by pgsql2shp? It >>>> would >>>> be smooth, if shapes generated by pgsql2shp could be imported by >>>> shp2pgsql >>>> without specifying any encoding during import ("just works"). >>>> >>>> Regards, >>>> >>>> Peter >>>> >>>> [0] http://trac.osgeo.org/postgis/browser/trunk/loader/ >>>> [1] >>>> >>>> http://support.esri.com/index.cfm?fa=knowledgebase.techArticles.articleShow&d=21106 >>>> [2] http://www.dbase.com/knowledgebase/int/db7_file_fmt.htm >>>> >>>> -- >>>> >>>> Dott. Peter Hopfgartner >>>> >>>> R3 GIS Srl - GmbH >>>> Via Johann Kravogl-Str. 2 >>>> I-39012 Meran/Merano (BZ) >>>> Email: peter.hopfgartner at r3-gis.com >>>> Tel. : +39 0473 494949 >>>> Fax : +39 0473 069902 >>>> www : http://www.r3-gis.com >>>> >>>> XING : http://www.xing.com/go/invita/8917535 >>>> _______________________________________________ >>>> 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 >>> >>> >>> >> -- >> >> Dott. Peter Hopfgartner >> >> R3 GIS Srl - GmbH >> Via Johann Kravogl-Str. 2 >> I-39012 Meran/Merano (BZ) >> Email: peter.hopfgartner at r3-gis.com >> Tel. : +39 0473 494949 >> Fax : +39 0473 069902 >> www : http://www.r3-gis.com >> >> XING : http://www.xing.com/go/invita/8917535 >> _______________________________________________ >> 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 > > -- Dott. Peter Hopfgartner R3 GIS Srl - GmbH Via Johann Kravogl-Str. 2 I-39012 Meran/Merano (BZ) Email: peter.hopfgartner at r3-gis.com Tel. : +39 0473 494949 Fax : +39 0473 069902 www : http://www.r3-gis.com XING : http://www.xing.com/go/invita/8917535 -------------- next part -------------- A non-text attachment was scrubbed... Name: dbfopen.c.diff Type: text/x-patch Size: 41870 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: shapefil.h.diff Type: text/x-patch Size: 17368 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: shpopen.c.diff Type: text/x-patch Size: 61278 bytes Desc: not available URL: From bryan at ideotrope.org Thu Mar 25 12:48:49 2010 From: bryan at ideotrope.org (Bryan Keith) Date: Thu, 25 Mar 2010 13:48:49 -0600 (MDT) Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs In-Reply-To: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> References: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> Message-ID: <1707.64.15.96.66.1269546529.squirrel@ideotrope.org> Turns out ArcMap's transformation on-the-fly does the same thing as cs2cs. What is postgis' transform doing differently? Bryan > Hello, > > I'm not sure if this is the correct list for this question, but here goes. > If I ought to post to another list, please let me know which one. > > I'm seeing a discrepancy between coordinate transformations in postgis and > transformations using cs2cs with the exact same proj.4 string. Here are > the proj.4 strings and transformation using postgis: > > select proj4text from spatial_ref_sys where srid = 32003; > proj4text > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > +proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 +lon_0=-109.5 > +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 > +to_meter=0.3048006096012192 +no_defs > (1 row) > > select proj4text from spatial_ref_sys where srid = 32100; > proj4text > -------------------------------------------------------------------------------------------------------------------------- > +proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 > +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs > (1 row) > > select astext(transform(setsrid(makepoint(1234488, 744181), 32003), > 32100)); > astext > ------------------------------------------ > POINT(366770.791392722 199138.151643548) > > Here is the transformation using cs2cs: > > cs2cs +proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 > +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 > +to_meter=0.3048006096012192 +no_defs +to +proj=lcc +lat_1=49 +lat_2=45 > +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 > +units=m +no_defs > 1234488 744181 > 366704.35 199132.53 0.00 > > Why the discrepancy? I'm guessing it has something to do with how datum > shifts are handled. So which one is right? That's probably going to > depend on something that I don't know about my input data, but maybe > someone will enlighten differently. Thank you. > > Bryan > From pramsey at opengeo.org Thu Mar 25 12:55:24 2010 From: pramsey at opengeo.org (Paul Ramsey) Date: Thu, 25 Mar 2010 12:55:24 -0700 Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs In-Reply-To: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> References: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> Message-ID: <30fe546d1003251255g5c9ed5fav97bd8c1228c86625@mail.gmail.com> It's probably a function of your installation, I get the same results as cs2cs on my PostGIS; postgis15=# select astext(transform(setsrid(makepoint(1234488, 744181), 32003), 32100)); astext ------------------------------------------ POINT(366704.349230461 199132.534090009) (1 row) If the grid shift files are missing or not being found by postgis for some reason (which could be a host of reasons depending on how you compiled / installed proj) then you'd get a different result. P On Thu, Mar 25, 2010 at 8:55 AM, Bryan Keith wrote: > Hello, > > I'm not sure if this is the correct list for this question, but here goes. > ?If I ought to post to another list, please let me know which one. > > I'm seeing a discrepancy between coordinate transformations in postgis and > transformations using cs2cs with the exact same proj.4 string. ?Here are > the proj.4 strings and transformation using postgis: > > select proj4text from spatial_ref_sys where srid = 32003; > proj4text > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > ?+proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 +lon_0=-109.5 > +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 > +to_meter=0.3048006096012192 +no_defs > (1 row) > > select proj4text from spatial_ref_sys where srid = 32100; > proj4text > -------------------------------------------------------------------------------------------------------------------------- > ?+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 > +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs > (1 row) > > select astext(transform(setsrid(makepoint(1234488, 744181), 32003), 32100)); > ? ? ? ? ? ? ? ? ?astext > ------------------------------------------ > ?POINT(366770.791392722 199138.151643548) > > Here is the transformation using cs2cs: > > cs2cs +proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 > +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 > +to_meter=0.3048006096012192 +no_defs +to +proj=lcc +lat_1=49 +lat_2=45 > +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 > +units=m +no_defs > 1234488 ?744181 > 366704.35 ? ? ? 199132.53 0.00 > > Why the discrepancy? ?I'm guessing it has something to do with how datum > shifts are handled. ?So which one is right? ?That's probably going to > depend on something that I don't know about my input data, but maybe > someone will enlighten differently. ?Thank you. > > Bryan > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From aperi2007 at gmail.com Thu Mar 25 13:59:36 2010 From: aperi2007 at gmail.com (Andrea Peri 2007) Date: Thu, 25 Mar 2010 21:59:36 +0100 Subject: [postgis-users] Unsupported GML Message-ID: <4BABCEB8.80708@gmail.com> Hi, I'm try-ing to insert on postgis 1.5.1 a geometry using ST_GeomFromGML. The fragment I'm using is this: 10 10 20 20 30 30 But the postgis report this error: > ERROR: invalid GML representation I don't understand if the error is because this is an unsupported fragment or the fragment is bad defined. (It seem ok for the GML 3.1.1 definitions). So there is some info about the supported tags ? Many thx, Andrea Peri From bryan at ideotrope.org Thu Mar 25 14:28:31 2010 From: bryan at ideotrope.org (Bryan Keith) Date: Thu, 25 Mar 2010 15:28:31 -0600 (MDT) Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs In-Reply-To: <30fe546d1003251255g5c9ed5fav97bd8c1228c86625@mail.gmail.com> References: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> <30fe546d1003251255g5c9ed5fav97bd8c1228c86625@mail.gmail.com> Message-ID: <2409.64.15.96.66.1269552511.squirrel@ideotrope.org> Hmmm, for my original post I did the cs2cs check on a different machine. When I run the cs2cs transformation on the machine that's running postgis, then I get the same result that postgis returns. Does this mean that cs2cs isn't finding the grid shift files either? Or does it mean that it's using the wrong grid shift files? Or? Bryan > It's probably a function of your installation, I get the same results > as cs2cs on my PostGIS; > > postgis15=# select astext(transform(setsrid(makepoint(1234488, > 744181), 32003), 32100)); > astext > ------------------------------------------ > POINT(366704.349230461 199132.534090009) > (1 row) > > > If the grid shift files are missing or not being found by postgis for > some reason (which could be a host of reasons depending on how you > compiled / installed proj) then you'd get a different result. > > P > > On Thu, Mar 25, 2010 at 8:55 AM, Bryan Keith wrote: >> Hello, >> >> I'm not sure if this is the correct list for this question, but here >> goes. >> ?If I ought to post to another list, please let me know which one. >> >> I'm seeing a discrepancy between coordinate transformations in postgis >> and >> transformations using cs2cs with the exact same proj.4 string. ?Here are >> the proj.4 strings and transformation using postgis: >> >> select proj4text from spatial_ref_sys where srid = 32003; >> proj4text >> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >> ?+proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 +lon_0=-109.5 >> +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 >> +to_meter=0.3048006096012192 +no_defs >> (1 row) >> >> select proj4text from spatial_ref_sys where srid = 32100; >> proj4text >> -------------------------------------------------------------------------------------------------------------------------- >> ?+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 >> +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs >> (1 row) >> >> select astext(transform(setsrid(makepoint(1234488, 744181), 32003), >> 32100)); >> ? ? ? ? ? ? ? ? ?astext >> ------------------------------------------ >> ?POINT(366770.791392722 199138.151643548) >> >> Here is the transformation using cs2cs: >> >> cs2cs +proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 >> +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 >> +to_meter=0.3048006096012192 +no_defs +to +proj=lcc +lat_1=49 +lat_2=45 >> +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 >> +units=m +no_defs >> 1234488 ?744181 >> 366704.35 ? ? ? 199132.53 0.00 >> >> Why the discrepancy? ?I'm guessing it has something to do with how datum >> shifts are handled. ?So which one is right? ?That's probably going to >> depend on something that I don't know about my input data, but maybe >> someone will enlighten differently. ?Thank you. >> >> Bryan >> >> _______________________________________________ >> 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 mwtoews at gmail.com Thu Mar 25 14:40:38 2010 From: mwtoews at gmail.com (Mike Toews) Date: Thu, 25 Mar 2010 14:40:38 -0700 Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs In-Reply-To: <2409.64.15.96.66.1269552511.squirrel@ideotrope.org> References: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> <30fe546d1003251255g5c9ed5fav97bd8c1228c86625@mail.gmail.com> <2409.64.15.96.66.1269552511.squirrel@ideotrope.org> Message-ID: <22f0a52d1003251440k758ed078n7112c538b367c5a1@mail.gmail.com> On 25 March 2010 14:28, Bryan Keith wrote: > Hmmm, for my original post I did the cs2cs check on a different machine. > When I run the cs2cs transformation on the machine that's running postgis, > then I get the same result that postgis returns. ?Does this mean that > cs2cs isn't finding the grid shift files either? ?Or does it mean that > it's using the wrong grid shift files? ?Or? > > Bryan Something is definitely strange with the PROJ.4 installation on that one system. If I had to guess, you compiled PROJ.4 yourself, but didn't unzip the gridshift files in the nad folder before ./configure ? It should be apparent that the grid shift files are installed with the make install command. Try reinstalling the PROJ.4 library with the gridshift files intact, and it should affect both PostGIS and cs2cs (since they use the same system library). -Mike From olivier.courtin at oslandia.com Fri Mar 26 01:03:15 2010 From: olivier.courtin at oslandia.com (Olivier Courtin) Date: Fri, 26 Mar 2010 09:03:15 +0100 Subject: [postgis-users] Unsupported GML In-Reply-To: <4BABCEB8.80708@gmail.com> References: <4BABCEB8.80708@gmail.com> Message-ID: On Mar 25, 2010, at 9:59 PM, Andrea Peri 2007 wrote: Hi Andrea, > I'm try-ing to insert on postgis 1.5.1 a geometry using > ST_GeomFromGML. > > The fragment I'm using is this: > > > [...] > > > But the postgis report this error: > > ERROR: invalid GML representation > > I don't understand if the error is because this is an unsupported > fragment or the fragment is bad defined. > (It seem ok for the GML 3.1.1 definitions). > > So there is some info about the supported tags ? Well it's true we did'nt document the whole tags list, but, from the 1.5 PostGIS documentation: "GML 3.1.1 Simple Features profile SF-2 (with GML 3.1.0 and 3.0.0 backward compatibility)" So GML 3.1.1 is supported up to Simple Profile level 2. (GML SF-2) And TopoCurve is not inside SF-2, but should be part of topology profile. Then it explains why your fragment is not currently supported. A good tool to explore schemas online: HTH, -- Olivier From aperi2007 at gmail.com Fri Mar 26 03:53:11 2010 From: aperi2007 at gmail.com (Andrea Peri) Date: Fri, 26 Mar 2010 11:53:11 +0100 Subject: [postgis-users] Unsupported GML Message-ID: Hi, thx for response. I read the postgis documentation and try your link, in effect the GML 3.1.1 support the topocurve, but the GML3.1.1 SimpleFeature not support the topocurve. But reading the postgis documention I read also the support to the GML 3.2.1, not specifically simple-feature only (perhaps a lack of documentation?) Teh GML3.2.1 supported is a specifically subset simple-feature only ? Thx, Andrea. A good tool to explore schemas online: >Well it's true we did'nt document the whole tags list, >but, from the 1.5 PostGIS documentation: >"GML 3.1.1 Simple Features profile SF-2 (with GML 3.1.0 and 3.0.0 >backward compatibility)" > >So GML 3.1.1 is supported up to Simple Profile level 2. (GML SF-2) >And TopoCurve is not inside SF-2, but should be part of topology >profile. > >Then it explains why your fragment is not currently supported. > > >A good tool to explore schemas online: > -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivier.courtin at oslandia.com Fri Mar 26 04:11:46 2010 From: olivier.courtin at oslandia.com (Olivier Courtin) Date: Fri, 26 Mar 2010 12:11:46 +0100 Subject: [postgis-users] Unsupported GML In-Reply-To: References: Message-ID: <0057FAD6-9F7D-4E08-9EBC-21C792F31B3E@oslandia.com> On Mar 26, 2010, at 11:53 AM, Andrea Peri wrote: > Hi, > > thx for response. > > I read the postgis documentation and try your link, > in effect the GML 3.1.1 support the topocurve, > but the GML3.1.1 SimpleFeature not support the topocurve. > > But reading the postgis documention I read also the support to the > > GML 3.2.1, not specifically simple-feature only (perhaps a lack of > documentation? Well OGC only provide Simple Feature for 3.1.1, not seen (right now) SF for 3.2.1 And PostGIS support 3.2.1 namespace (as it change from previsous version) But not provide more geometry type as 3.1.1 SF-2 (even in 3.2.1 so) If you have suggestion to improve documentation, you're welcome :) -- Olivier > > Teh GML3.2.1 supported is a specifically subset simple-feature only ? > > Thx, > > Andrea. > > > A good tool to explore schemas online: > > 3.1.1/> > > >Well it's true we did'nt document the whole tags list, > > >but, from the 1.5 PostGIS documentation: > >"GML 3.1.1 Simple Features profile SF-2 (with GML 3.1.0 and 3.0.0 > >backward compatibility)" > > > >So GML 3.1.1 is supported up to Simple Profile level 2. (GML SF-2) > > >And TopoCurve is not inside SF-2, but should be part of topology > >profile. > > > >Then it explains why your fragment is not currently supported. > > > > > >A good tool to explore schemas online: > > > > > > > -- > ----------------- > Andrea Peri > . . . . . . . . . > qwerty ????? > ----------------- > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users -- Olivier Courtin Oslandia Directeur associ? +33 977 217 501 From bryan at ideotrope.org Fri Mar 26 07:09:15 2010 From: bryan at ideotrope.org (Bryan Keith) Date: Fri, 26 Mar 2010 08:09:15 -0600 (MDT) Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs In-Reply-To: <22f0a52d1003251440k758ed078n7112c538b367c5a1@mail.gmail.com> References: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> <30fe546d1003251255g5c9ed5fav97bd8c1228c86625@mail.gmail.com> <2409.64.15.96.66.1269552511.squirrel@ideotrope.org> <22f0a52d1003251440k758ed078n7112c538b367c5a1@mail.gmail.com> Message-ID: <1406.64.15.96.66.1269612555.squirrel@ideotrope.org> > On 25 March 2010 14:28, Bryan Keith wrote: >> Hmmm, for my original post I did the cs2cs check on a different machine. >> When I run the cs2cs transformation on the machine that's running >> postgis, >> then I get the same result that postgis returns. ?Does this mean that >> cs2cs isn't finding the grid shift files either? ?Or does it mean that >> it's using the wrong grid shift files? ?Or? >> >> Bryan > > Something is definitely strange with the PROJ.4 installation on that > one system. If I had to guess, you compiled PROJ.4 yourself, but > didn't unzip the gridshift files in the nad folder before ./configure > ? It should be apparent that the grid shift files are installed with > the make install command. Mike, Thanks for the reply. I certainly don't think I compiled anything myself. I'm on Ubuntu/Debian and installed postgres, postgis, gdal, and the gdal/ogr Python bindings with apt-get. I don't know that I ever explicitly installed proj.4, but I figured it was installed because I have the cs2cs executable. I've installed some other GIS-type stuff like Quantum. > > Try reinstalling the PROJ.4 library with the gridshift files intact, > and it should affect both PostGIS and cs2cs (since they use the same > system library). Should I just try: sudo apt-get install proj ? Bryan > > -Mike > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From bryan at ideotrope.org Fri Mar 26 08:51:53 2010 From: bryan at ideotrope.org (Bryan Keith) Date: Fri, 26 Mar 2010 09:51:53 -0600 (MDT) Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs In-Reply-To: <1406.64.15.96.66.1269612555.squirrel@ideotrope.org> References: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> <30fe546d1003251255g5c9ed5fav97bd8c1228c86625@mail.gmail.com> <2409.64.15.96.66.1269552511.squirrel@ideotrope.org> <22f0a52d1003251440k758ed078n7112c538b367c5a1@mail.gmail.com> <1406.64.15.96.66.1269612555.squirrel@ideotrope.org> Message-ID: <2254.64.15.96.66.1269618713.squirrel@ideotrope.org> >> >> Something is definitely strange with the PROJ.4 installation on that >> one system. If I had to guess, you compiled PROJ.4 yourself, but >> didn't unzip the gridshift files in the nad folder before ./configure >> ? It should be apparent that the grid shift files are installed with >> the make install command. > > Mike, > > Thanks for the reply. > > I certainly don't think I compiled anything myself. I'm on Ubuntu/Debian > and installed postgres, postgis, gdal, and the gdal/ogr Python bindings > with apt-get. I don't know that I ever explicitly installed proj.4, but I > figured it was installed because I have the cs2cs executable. I've > installed some other GIS-type stuff like Quantum. > >> >> Try reinstalling the PROJ.4 library with the gridshift files intact, >> and it should affect both PostGIS and cs2cs (since they use the same >> system library). > > Should I just try: > > sudo apt-get install proj I tried this and got the message: proj is already the newest version. proj set to manually installed. Manually installed? I wonder why that is. Where is it installed? I search for a nad directory and only found this one: /usr/lib/grass/etc/nad I didn't try doing the coordinate conversion in GRASS since I don't know how to use GRASS, but the nad directory seems to have the uncompressed grid shift files: -rw-r--r-- 1 root root 1053896 2008-05-29 14:33 alaska -rw-r--r-- 1 root root 264392 2008-05-29 14:33 conus -rw-r--r-- 1 root root 8840 2008-05-29 14:33 FL -rw-r--r-- 1 root root 451976 2008-05-29 14:33 hawaii -rw-r--r-- 1 root root 3528 2008-05-29 14:33 MD -rw-r--r-- 1 root root 1113184 2008-05-29 14:33 ntv1_can.dat -rw-r--r-- 1 root root 318464 2008-05-29 14:33 nzgd2kgrid0005.gsb -rw-r--r-- 1 root root 26696 2008-05-29 14:33 prvi -rw-r--r-- 1 root root 59176 2008-05-29 14:33 stgeorge -rw-r--r-- 1 root root 26696 2008-05-29 14:33 stlrnc -rw-r--r-- 1 root root 7016 2008-05-29 14:33 stpaul -rw-r--r-- 1 root root 4392 2008-05-29 14:33 TN -rw-r--r-- 1 root root 6728 2008-05-29 14:33 WI -rw-r--r-- 1 root root 11080 2008-05-29 14:33 WO I appreciate any suggestions. I don't really know what I'm doing here. Bryan > > ? > > Bryan > >> >> -Mike >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> > > From bryan at ideotrope.org Fri Mar 26 10:23:32 2010 From: bryan at ideotrope.org (Bryan Keith) Date: Fri, 26 Mar 2010 11:23:32 -0600 (MDT) Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs In-Reply-To: <2254.64.15.96.66.1269618713.squirrel@ideotrope.org> References: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> <30fe546d1003251255g5c9ed5fav97bd8c1228c86625@mail.gmail.com> <2409.64.15.96.66.1269552511.squirrel@ideotrope.org> <22f0a52d1003251440k758ed078n7112c538b367c5a1@mail.gmail.com> <1406.64.15.96.66.1269612555.squirrel@ideotrope.org> <2254.64.15.96.66.1269618713.squirrel@ideotrope.org> Message-ID: <3086.64.15.96.66.1269624212.squirrel@ideotrope.org> >>> >>> Something is definitely strange with the PROJ.4 installation on that >>> one system. If I had to guess, you compiled PROJ.4 yourself, but >>> didn't unzip the gridshift files in the nad folder before ./configure >>> ? It should be apparent that the grid shift files are installed with >>> the make install command. >> >> >>> >>> Try reinstalling the PROJ.4 library with the gridshift files intact, >>> and it should affect both PostGIS and cs2cs (since they use the same >>> system library). >> >> Should I just try: >> >> sudo apt-get install proj > > I tried this and got the message: > > proj is already the newest version. > proj set to manually installed. > > Manually installed? I wonder why that is. > > Where is it installed? I search for a nad directory and only found this > one: > > /usr/lib/grass/etc/nad > > I didn't try doing the coordinate conversion in GRASS since I don't know > how to use GRASS, but the nad directory seems to have the uncompressed > grid shift files: > > -rw-r--r-- 1 root root 1053896 2008-05-29 14:33 alaska > -rw-r--r-- 1 root root 264392 2008-05-29 14:33 conus > -rw-r--r-- 1 root root 8840 2008-05-29 14:33 FL > -rw-r--r-- 1 root root 451976 2008-05-29 14:33 hawaii > -rw-r--r-- 1 root root 3528 2008-05-29 14:33 MD > -rw-r--r-- 1 root root 1113184 2008-05-29 14:33 ntv1_can.dat > -rw-r--r-- 1 root root 318464 2008-05-29 14:33 nzgd2kgrid0005.gsb > -rw-r--r-- 1 root root 26696 2008-05-29 14:33 prvi > -rw-r--r-- 1 root root 59176 2008-05-29 14:33 stgeorge > -rw-r--r-- 1 root root 26696 2008-05-29 14:33 stlrnc > -rw-r--r-- 1 root root 7016 2008-05-29 14:33 stpaul > -rw-r--r-- 1 root root 4392 2008-05-29 14:33 TN > -rw-r--r-- 1 root root 6728 2008-05-29 14:33 WI > -rw-r--r-- 1 root root 11080 2008-05-29 14:33 WO > > I appreciate any suggestions. I don't really know what I'm doing here. I tried reinstalling proj: sudo apt-get --reinstall install proj Do I need to do anything else to get the grid shift files? Where should they be installed? In the readme files, they give a cs2cs example, but I don't get the correct results. Here's my version: cs2cs +proj=latlong +datum=NAD27 +to +proj=latlong +datum=NAD83 -117 30 117dW 30dN 0.000 Should be: 117d0'2.901"W 30d0'0.407"N 0.00 Clearly I don't have the grid shift files, but I'm not sure where I'm supposed to get them or where they're supposed to be. Bryan From pramsey at cleverelephant.ca Fri Mar 26 10:38:00 2010 From: pramsey at cleverelephant.ca (Paul Ramsey) Date: Fri, 26 Mar 2010 10:38:00 -0700 Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs In-Reply-To: <3086.64.15.96.66.1269624212.squirrel@ideotrope.org> References: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> <30fe546d1003251255g5c9ed5fav97bd8c1228c86625@mail.gmail.com> <2409.64.15.96.66.1269552511.squirrel@ideotrope.org> <22f0a52d1003251440k758ed078n7112c538b367c5a1@mail.gmail.com> <1406.64.15.96.66.1269612555.squirrel@ideotrope.org> <2254.64.15.96.66.1269618713.squirrel@ideotrope.org> <3086.64.15.96.66.1269624212.squirrel@ideotrope.org> Message-ID: <30fe546d1003261038k7a06bbdi86130b4ba1384f12@mail.gmail.com> Does apt have a search function? Probably the proj packagers broke the grid files out into a different proj-something package? P On Fri, Mar 26, 2010 at 10:23 AM, Bryan Keith wrote: >>>> >>>> Something is definitely strange with the PROJ.4 installation on that >>>> one system. If I had to guess, you compiled PROJ.4 yourself, but >>>> didn't unzip the gridshift files in the nad folder before ./configure >>>> ? It should be apparent that the grid shift files are installed with >>>> the make install command. >>> >>> >>>> >>>> Try reinstalling the PROJ.4 library with the gridshift files intact, >>>> and it should affect both PostGIS and cs2cs (since they use the same >>>> system library). >>> >>> Should I just try: >>> >>> sudo apt-get install proj >> >> I tried this and got the message: >> >> proj is already the newest version. >> proj set to manually installed. >> >> Manually installed? ?I wonder why that is. >> >> Where is it installed? ?I search for a nad directory and only found this >> one: >> >> /usr/lib/grass/etc/nad >> >> I didn't try doing the coordinate conversion in GRASS since I don't know >> how to use GRASS, but the nad directory seems to have the uncompressed >> grid shift files: >> >> -rw-r--r-- 1 root root 1053896 2008-05-29 14:33 alaska >> -rw-r--r-- 1 root root ?264392 2008-05-29 14:33 conus >> -rw-r--r-- 1 root root ? ?8840 2008-05-29 14:33 FL >> -rw-r--r-- 1 root root ?451976 2008-05-29 14:33 hawaii >> -rw-r--r-- 1 root root ? ?3528 2008-05-29 14:33 MD >> -rw-r--r-- 1 root root 1113184 2008-05-29 14:33 ntv1_can.dat >> -rw-r--r-- 1 root root ?318464 2008-05-29 14:33 nzgd2kgrid0005.gsb >> -rw-r--r-- 1 root root ? 26696 2008-05-29 14:33 prvi >> -rw-r--r-- 1 root root ? 59176 2008-05-29 14:33 stgeorge >> -rw-r--r-- 1 root root ? 26696 2008-05-29 14:33 stlrnc >> -rw-r--r-- 1 root root ? ?7016 2008-05-29 14:33 stpaul >> -rw-r--r-- 1 root root ? ?4392 2008-05-29 14:33 TN >> -rw-r--r-- 1 root root ? ?6728 2008-05-29 14:33 WI >> -rw-r--r-- 1 root root ? 11080 2008-05-29 14:33 WO >> >> I appreciate any suggestions. ?I don't really know what I'm doing here. > > I tried reinstalling proj: > > sudo apt-get --reinstall install proj > > Do I need to do anything else to get the grid shift files? ?Where should > they be installed? ?In the readme files, they give a cs2cs example, but I > don't get the correct results. ?Here's my version: > > cs2cs +proj=latlong +datum=NAD27 +to +proj=latlong +datum=NAD83 > -117 30 > 117dW ? 30dN 0.000 > > Should be: > 117d0'2.901"W ? 30d0'0.407"N 0.00 > > Clearly I don't have the grid shift files, but I'm not sure where I'm > supposed to get them or where they're supposed to be. > > Bryan > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From Doug_Newcomb at fws.gov Fri Mar 26 10:42:52 2010 From: Doug_Newcomb at fws.gov (Doug_Newcomb at fws.gov) Date: Fri, 26 Mar 2010 13:42:52 -0400 Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs In-Reply-To: <30fe546d1003261038k7a06bbdi86130b4ba1384f12@mail.gmail.com> Message-ID: aptitude search "string" Doug Newcomb USFWS Raleigh, NC 919-856-4520 ext. 14 doug_newcomb at fws.gov --------------------------------------------------------------------------------------------------------- The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior. Life is too short for undocumented, proprietary data formats. Paul Ramsey Sent by: postgis-users-bounces at postgis.refractions.net 03/26/2010 01:38 PM Please respond to PostGIS Users Discussion To PostGIS Users Discussion cc Subject Re: [postgis-users] transformation discrepancy with postgis v. cs2cs Does apt have a search function? Probably the proj packagers broke the grid files out into a different proj-something package? P On Fri, Mar 26, 2010 at 10:23 AM, Bryan Keith wrote: >>>> >>>> Something is definitely strange with the PROJ.4 installation on that >>>> one system. If I had to guess, you compiled PROJ.4 yourself, but >>>> didn't unzip the gridshift files in the nad folder before ./configure >>>> ? It should be apparent that the grid shift files are installed with >>>> the make install command. >>> >>> >>>> >>>> Try reinstalling the PROJ.4 library with the gridshift files intact, >>>> and it should affect both PostGIS and cs2cs (since they use the same >>>> system library). >>> >>> Should I just try: >>> >>> sudo apt-get install proj >> >> I tried this and got the message: >> >> proj is already the newest version. >> proj set to manually installed. >> >> Manually installed? I wonder why that is. >> >> Where is it installed? I search for a nad directory and only found this >> one: >> >> /usr/lib/grass/etc/nad >> >> I didn't try doing the coordinate conversion in GRASS since I don't know >> how to use GRASS, but the nad directory seems to have the uncompressed >> grid shift files: >> >> -rw-r--r-- 1 root root 1053896 2008-05-29 14:33 alaska >> -rw-r--r-- 1 root root 264392 2008-05-29 14:33 conus >> -rw-r--r-- 1 root root 8840 2008-05-29 14:33 FL >> -rw-r--r-- 1 root root 451976 2008-05-29 14:33 hawaii >> -rw-r--r-- 1 root root 3528 2008-05-29 14:33 MD >> -rw-r--r-- 1 root root 1113184 2008-05-29 14:33 ntv1_can.dat >> -rw-r--r-- 1 root root 318464 2008-05-29 14:33 nzgd2kgrid0005.gsb >> -rw-r--r-- 1 root root 26696 2008-05-29 14:33 prvi >> -rw-r--r-- 1 root root 59176 2008-05-29 14:33 stgeorge >> -rw-r--r-- 1 root root 26696 2008-05-29 14:33 stlrnc >> -rw-r--r-- 1 root root 7016 2008-05-29 14:33 stpaul >> -rw-r--r-- 1 root root 4392 2008-05-29 14:33 TN >> -rw-r--r-- 1 root root 6728 2008-05-29 14:33 WI >> -rw-r--r-- 1 root root 11080 2008-05-29 14:33 WO >> >> I appreciate any suggestions. I don't really know what I'm doing here. > > I tried reinstalling proj: > > sudo apt-get --reinstall install proj > > Do I need to do anything else to get the grid shift files? Where should > they be installed? In the readme files, they give a cs2cs example, but I > don't get the correct results. Here's my version: > > cs2cs +proj=latlong +datum=NAD27 +to +proj=latlong +datum=NAD83 > -117 30 > 117dW 30dN 0.000 > > Should be: > 117d0'2.901"W 30d0'0.407"N 0.00 > > Clearly I don't have the grid shift files, but I'm not sure where I'm > supposed to get them or where they're supposed to be. > > Bryan > > _______________________________________________ > 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: From mcubranic at gmail.com Fri Mar 26 11:50:03 2010 From: mcubranic at gmail.com (=?ISO-8859-2?Q?Marko_=C8ubrani=E6?=) Date: Fri, 26 Mar 2010 19:50:03 +0100 Subject: [postgis-users] Defining new spatial system Message-ID: <57ff9b271003261150y7b6f1261k1a45786ec99cd6a5@mail.gmail.com> Dear, I need to define new srid/spatial referent system: TM projection, 16.5 East central meridian, false easting 500000, scale factor 0.9999, datum ETRS89, ellipsoid GRS80. Can you tell me how to do it Thank you, Marko Cubranic -------------- next part -------------- An HTML attachment was scrubbed... URL: From mwtoews at gmail.com Fri Mar 26 12:18:03 2010 From: mwtoews at gmail.com (Mike Toews) Date: Fri, 26 Mar 2010 12:18:03 -0700 Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs In-Reply-To: <3086.64.15.96.66.1269624212.squirrel@ideotrope.org> References: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> <30fe546d1003251255g5c9ed5fav97bd8c1228c86625@mail.gmail.com> <2409.64.15.96.66.1269552511.squirrel@ideotrope.org> <22f0a52d1003251440k758ed078n7112c538b367c5a1@mail.gmail.com> <1406.64.15.96.66.1269612555.squirrel@ideotrope.org> <2254.64.15.96.66.1269618713.squirrel@ideotrope.org> <3086.64.15.96.66.1269624212.squirrel@ideotrope.org> Message-ID: <22f0a52d1003261218x7e9f52h4fffe69992916c9a@mail.gmail.com> I have an Ubuntu Hardy server with proj installed via apt-get, and from source. I'm not sure if the proj package was build properly, see: http://packages.ubuntu.com/hardy/i386/proj/filelist (there should be a whole lot more in there, so I'm suspicious of this packaging) I recommend leaving the proj installation from apt, and build/install another version on top. Once you are done, proj (cs2cs and PostGIS) will use the locally installed build instead of the packaged version. (You should leave the proj package alone, since it is probably a dependency for something else) -Mike On 26 March 2010 10:23, Bryan Keith wrote: >>>> >>>> Something is definitely strange with the PROJ.4 installation on that >>>> one system. If I had to guess, you compiled PROJ.4 yourself, but >>>> didn't unzip the gridshift files in the nad folder before ./configure >>>> ? It should be apparent that the grid shift files are installed with >>>> the make install command. >>> >>> >>>> >>>> Try reinstalling the PROJ.4 library with the gridshift files intact, >>>> and it should affect both PostGIS and cs2cs (since they use the same >>>> system library). >>> >>> Should I just try: >>> >>> sudo apt-get install proj >> >> I tried this and got the message: >> >> proj is already the newest version. >> proj set to manually installed. >> >> Manually installed? ?I wonder why that is. >> >> Where is it installed? ?I search for a nad directory and only found this >> one: >> >> /usr/lib/grass/etc/nad >> >> I didn't try doing the coordinate conversion in GRASS since I don't know >> how to use GRASS, but the nad directory seems to have the uncompressed >> grid shift files: >> >> -rw-r--r-- 1 root root 1053896 2008-05-29 14:33 alaska >> -rw-r--r-- 1 root root ?264392 2008-05-29 14:33 conus >> -rw-r--r-- 1 root root ? ?8840 2008-05-29 14:33 FL >> -rw-r--r-- 1 root root ?451976 2008-05-29 14:33 hawaii >> -rw-r--r-- 1 root root ? ?3528 2008-05-29 14:33 MD >> -rw-r--r-- 1 root root 1113184 2008-05-29 14:33 ntv1_can.dat >> -rw-r--r-- 1 root root ?318464 2008-05-29 14:33 nzgd2kgrid0005.gsb >> -rw-r--r-- 1 root root ? 26696 2008-05-29 14:33 prvi >> -rw-r--r-- 1 root root ? 59176 2008-05-29 14:33 stgeorge >> -rw-r--r-- 1 root root ? 26696 2008-05-29 14:33 stlrnc >> -rw-r--r-- 1 root root ? ?7016 2008-05-29 14:33 stpaul >> -rw-r--r-- 1 root root ? ?4392 2008-05-29 14:33 TN >> -rw-r--r-- 1 root root ? ?6728 2008-05-29 14:33 WI >> -rw-r--r-- 1 root root ? 11080 2008-05-29 14:33 WO >> >> I appreciate any suggestions. ?I don't really know what I'm doing here. > > I tried reinstalling proj: > > sudo apt-get --reinstall install proj > > Do I need to do anything else to get the grid shift files? ?Where should > they be installed? ?In the readme files, they give a cs2cs example, but I > don't get the correct results. ?Here's my version: > > cs2cs +proj=latlong +datum=NAD27 +to +proj=latlong +datum=NAD83 > -117 30 > 117dW ? 30dN 0.000 > > Should be: > 117d0'2.901"W ? 30d0'0.407"N 0.00 > > Clearly I don't have the grid shift files, but I'm not sure where I'm > supposed to get them or where they're supposed to be. > > Bryan > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From mwtoews at gmail.com Fri Mar 26 14:06:10 2010 From: mwtoews at gmail.com (Mike Toews) Date: Fri, 26 Mar 2010 14:06:10 -0700 Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs In-Reply-To: <22f0a52d1003261218x7e9f52h4fffe69992916c9a@mail.gmail.com> References: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> <30fe546d1003251255g5c9ed5fav97bd8c1228c86625@mail.gmail.com> <2409.64.15.96.66.1269552511.squirrel@ideotrope.org> <22f0a52d1003251440k758ed078n7112c538b367c5a1@mail.gmail.com> <1406.64.15.96.66.1269612555.squirrel@ideotrope.org> <2254.64.15.96.66.1269618713.squirrel@ideotrope.org> <3086.64.15.96.66.1269624212.squirrel@ideotrope.org> <22f0a52d1003261218x7e9f52h4fffe69992916c9a@mail.gmail.com> Message-ID: <22f0a52d1003261406k2e1828a0gdc1afa8f2ee8aef5@mail.gmail.com> On 26 March 2010 12:18, Mike Toews wrote: > I have an Ubuntu Hardy server with proj installed via apt-get, and > from source. I'm not sure if the proj package was build properly, see: > > http://packages.ubuntu.com/hardy/i386/proj/filelist Yup, there is a problem with the default PROJ library for Ubuntu: https://bugs.launchpad.net/ubuntu/+source/proj/+bug/368065 It doesn't seem like the package maintainers aren't fixing or doing anything about it, which is a bit ridiculous since it is an easy configure step. -Mike From bryan at ideotrope.org Fri Mar 26 15:40:21 2010 From: bryan at ideotrope.org (Bryan Keith) Date: Fri, 26 Mar 2010 16:40:21 -0600 (MDT) Subject: [postgis-users] transformation discrepancy with postgis v. cs2cs In-Reply-To: <22f0a52d1003261406k2e1828a0gdc1afa8f2ee8aef5@mail.gmail.com> References: <3781.64.15.96.66.1269532509.squirrel@ideotrope.org> <30fe546d1003251255g5c9ed5fav97bd8c1228c86625@mail.gmail.com> <2409.64.15.96.66.1269552511.squirrel@ideotrope.org> <22f0a52d1003251440k758ed078n7112c538b367c5a1@mail.gmail.com> <1406.64.15.96.66.1269612555.squirrel@ideotrope.org> <2254.64.15.96.66.1269618713.squirrel@ideotrope.org> <3086.64.15.96.66.1269624212.squirrel@ideotrope.org> <22f0a52d1003261218x7e9f52h4fffe69992916c9a@mail.gmail.com> <22f0a52d1003261406k2e1828a0gdc1afa8f2ee8aef5@mail.gmail.com> Message-ID: <2054.64.15.96.66.1269643221.squirrel@ideotrope.org> > On 26 March 2010 12:18, Mike Toews wrote: >> I have an Ubuntu Hardy server with proj installed via apt-get, and >> from source. I'm not sure if the proj package was build properly, see: >> >> http://packages.ubuntu.com/hardy/i386/proj/filelist > > Yup, there is a problem with the default PROJ library for Ubuntu: > https://bugs.launchpad.net/ubuntu/+source/proj/+bug/368065 Mike, Thank you for finding that. In the above link that Mike posted was a reference to the ubuntugis packages which include the correct grid shift files. Here's that link: https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable I followed the instructions on this page to install the proj package from there, and now everything is working as I expect it to. Bryan From patwardhan.shreerang at gmail.com Fri Mar 26 19:57:55 2010 From: patwardhan.shreerang at gmail.com (Shreerang Patwardhan) Date: Sat, 27 Mar 2010 08:27:55 +0530 Subject: [postgis-users] linux command to list tables in a postgresql database Message-ID: <5dd65e1e1003261957m1413179fs1d2c1939c2afe7e1@mail.gmail.com> Hey all, I am using PostgreSQL database. I have a few tables in my database. I wish to list all of them but not through the psql prompt. I want to list them through the terminal. \dt is used to list the tables from the psql prompt. Is there any equivalent command? Like psql -l is used to list all the databases from the terminal. Thanx, Shreerang Patwardhan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume at lelarge.info Fri Mar 26 20:21:07 2010 From: guillaume at lelarge.info (Guillaume Lelarge) Date: Sat, 27 Mar 2010 04:21:07 +0100 Subject: [postgis-users] linux command to list tables in a postgresql database In-Reply-To: <5dd65e1e1003261957m1413179fs1d2c1939c2afe7e1@mail.gmail.com> References: <5dd65e1e1003261957m1413179fs1d2c1939c2afe7e1@mail.gmail.com> Message-ID: <4BAD79A3.4040006@lelarge.info> Shreerang Patwardhan a ?crit : > Hey all, > I am using PostgreSQL database. I have a few tables in my database. > I wish to list all of them but not through the psql prompt. I want to > list them through the terminal. \dt is used to list the tables from the > psql prompt. Is there any equivalent command? Like psql -l is used to > list all the databases from the terminal. > psql -c "\dt" your_database -- Guillaume. From patwardhan.shreerang at gmail.com Sat Mar 27 01:34:36 2010 From: patwardhan.shreerang at gmail.com (Shreerang Patwardhan) Date: Sat, 27 Mar 2010 14:04:36 +0530 Subject: [postgis-users] linux command to list tables in a postgresql database In-Reply-To: <4BAD79A3.4040006@lelarge.info> References: <5dd65e1e1003261957m1413179fs1d2c1939c2afe7e1@mail.gmail.com> <4BAD79A3.4040006@lelarge.info> Message-ID: <5dd65e1e1003270134x16809698o765a527bfad6ab70@mail.gmail.com> Thanx Guillaume. Just what I wanted... -------------- next part -------------- An HTML attachment was scrubbed... URL: From patwardhan.shreerang at gmail.com Sat Mar 27 21:11:06 2010 From: patwardhan.shreerang at gmail.com (Shreerang Patwardhan) Date: Sun, 28 Mar 2010 09:41:06 +0530 Subject: [postgis-users] PSQL command to drop table from a databae Message-ID: <5dd65e1e1003272111s38dde215tfed64d5612311df1@mail.gmail.com> Hey all, I am trying the following command to drop a table from a postgresql database. It gives an error. Can anyone please rectify the command if it is wrong? *Command:* psql -h localhost -p 5433 -U postgres -d testdb -c DROP TABLE 11001_district_of_columbia_arealm *Error Message:* psql: warning: extra command-line argument "TABLE" ignored psql: warning: extra command-line argument "11001_district_of_columbia_arealm" ignored ERROR: syntax error at end of input LINE 1: DROP ^ Please help! Thanx, Shreerang Patwardhan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From viroos.pl at gmail.com Sat Mar 27 21:32:48 2010 From: viroos.pl at gmail.com (Maciej Sawicki) Date: Sun, 28 Mar 2010 06:32:48 +0200 Subject: [postgis-users] PSQL command to drop table from a databae In-Reply-To: <5dd65e1e1003272111s38dde215tfed64d5612311df1@mail.gmail.com> References: <5dd65e1e1003272111s38dde215tfed64d5612311df1@mail.gmail.com> Message-ID: <55fd1e871003272132r36cd9e75xac0a574990a43963@mail.gmail.com> Hi, I think it should be: psql -h localhost -p 5433 -U postgres -d testdb -c "DROP TABLE 11001_district_of_columbia_arealm" regards, Maciej Sawicki From patwardhan.shreerang at gmail.com Sun Mar 28 03:10:21 2010 From: patwardhan.shreerang at gmail.com (Shreerang Patwardhan) Date: Sun, 28 Mar 2010 15:40:21 +0530 Subject: [postgis-users] PSQL command to drop table from a databae In-Reply-To: <55fd1e871003272132r36cd9e75xac0a574990a43963@mail.gmail.com> References: <5dd65e1e1003272111s38dde215tfed64d5612311df1@mail.gmail.com> <55fd1e871003272132r36cd9e75xac0a574990a43963@mail.gmail.com> Message-ID: <5dd65e1e1003280310seaca89cxc900c0be3c717d2f@mail.gmail.com> Hello Maciej, I have tried up the quotes as well...Still doesn't work....[?] Do you think that 11001_district_of_columbia_arealm is an invalid table name? Actually, a table with the said name can be created using psql command as well as through pgadmin3. But then why does it give an error while deleting this table? The error message reads as: ERROR: syntax error at or near "11001" LINE 1: DROP TABLE 11001_district_of_columbia_arealm ^ I am unable to guage what the problem is?...Please help me.... Thanx, Shreerang Patwardhan. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 325.png Type: image/png Size: 592 bytes Desc: not available URL: From olivier.courtin at oslandia.com Sun Mar 28 05:13:25 2010 From: olivier.courtin at oslandia.com (Olivier Courtin) Date: Sun, 28 Mar 2010 14:13:25 +0200 Subject: [postgis-users] PSQL command to drop table from a databae In-Reply-To: <5dd65e1e1003280310seaca89cxc900c0be3c717d2f@mail.gmail.com> References: <5dd65e1e1003272111s38dde215tfed64d5612311df1@mail.gmail.com> <55fd1e871003272132r36cd9e75xac0a574990a43963@mail.gmail.com> <5dd65e1e1003280310seaca89cxc900c0be3c717d2f@mail.gmail.com> Message-ID: On Mar 28, 2010, at 12:10 PM, Shreerang Patwardhan wrote: > Do you think that 11001_district_of_columbia_arealm is an invalid > table name? Yes, label table name first char cannot be a number. > Actually, a table with the said name can be created using psql command Really ? postgres=# CREATE TABLE 1a(); ERROR: syntax error at or near "1" with psql (PostgreSQL) 8.3.7 P.S: These kind of question is more PostgreSQL than PostGIS relevant -- Olivier From olivier.courtin at oslandia.com Sun Mar 28 05:40:07 2010 From: olivier.courtin at oslandia.com (Olivier Courtin) Date: Sun, 28 Mar 2010 14:40:07 +0200 Subject: [postgis-users] PSQL command to drop table from a databae In-Reply-To: References: <5dd65e1e1003272111s38dde215tfed64d5612311df1@mail.gmail.com> <55fd1e871003272132r36cd9e75xac0a574990a43963@mail.gmail.com> <5dd65e1e1003280310seaca89cxc900c0be3c717d2f@mail.gmail.com> Message-ID: On Mar 28, 2010, at 2:13 PM, Olivier Courtin wrote: >> Actually, a table with the said name can be created using psql >> command > > Really ? Well in fact, my previous answer wasn't right at all CREATE TABLE "1a" (); and so DROP TABLE "1a"; works both well... So just need to double quote the label name -- Olivier From patwardhan.shreerang at gmail.com Sun Mar 28 08:35:41 2010 From: patwardhan.shreerang at gmail.com (Shreerang Patwardhan) Date: Sun, 28 Mar 2010 21:05:41 +0530 Subject: [postgis-users] PSQL command to drop table from a databae In-Reply-To: References: <5dd65e1e1003272111s38dde215tfed64d5612311df1@mail.gmail.com> <55fd1e871003272132r36cd9e75xac0a574990a43963@mail.gmail.com> <5dd65e1e1003280310seaca89cxc900c0be3c717d2f@mail.gmail.com> Message-ID: <5dd65e1e1003280835s135ada5egd17942c840c80540@mail.gmail.com> Hi Ollvier, I was just writing to you about your previous mail. Well, th e DROP TABLE command is not working at my end. I have used double quotes also. Can you guess what could the problem be? I am trying to use that command in a shell script and it is not working. I have also tried it on the terminal and still the result is the same....ERROR!!!.....[?] Need help!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 325.png Type: image/png Size: 592 bytes Desc: not available URL: From mgleahy at alumni.uwaterloo.ca Sun Mar 28 08:57:01 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sun, 28 Mar 2010 11:57:01 -0400 Subject: [postgis-users] Nested loop join = very bad performance Message-ID: <201003281157.01365.mgleahy@alumni.uwaterloo.ca> Hello list, Following up from the bug that was successfully resolved last week (http://trac.osgeo.org/postgis/ticket/469), I've found that nested loop joins are actually causing very bad performance with my queries. Thanks to the observations of Leo and Regina in that discussion, I have found that I can work around this by setting enable_nestloop = off. Once that is specified, queries start working about as fast. With enable_nestloop = on, a query may take ~15000 ms, while enable_nestloop = off returns the same query in ~90 ms. I have attached a textfile showing the different 'explain analzye' results for the full query with/without nestloop enabled. You could also refer to the somewhat simplified queries I put together in discussion thread related to bug #469 (see http://postgis.refractions.net/pipermail/postgis-users/2010- March/026235.html for some examples). Is this something that should be looked into, or should I just incorporate the workaround of disabling nested loop joins into my code? Thanks, Mike From mgleahy at alumni.uwaterloo.ca Sun Mar 28 08:57:53 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Sun, 28 Mar 2010 11:57:53 -0400 Subject: [postgis-users] Nested loop join = very bad performance In-Reply-To: <201003281157.01365.mgleahy@alumni.uwaterloo.ca> References: <201003281157.01365.mgleahy@alumni.uwaterloo.ca> Message-ID: <201003281157.54193.mgleahy@alumni.uwaterloo.ca> Sorry all...here's the explain output I promised in my previous message... On Sunday 28 March 2010 11:57:01 Mike Leahy wrote: > Hello list, > > Following up from the bug that was successfully resolved last week > (http://trac.osgeo.org/postgis/ticket/469), I've found that nested loop > joins are actually causing very bad performance with my queries. > > Thanks to the observations of Leo and Regina in that discussion, I have > found that I can work around this by setting enable_nestloop = off. Once > that is specified, queries start working about as fast. With > enable_nestloop = on, a query may take ~15000 ms, while enable_nestloop = > off returns the same query in ~90 ms. > > I have attached a textfile showing the different 'explain analzye' results > for the full query with/without nestloop enabled. You could also refer to > the somewhat simplified queries I put together in discussion thread > related to bug #469 (see > http://postgis.refractions.net/pipermail/postgis-users/2010- > March/026235.html for some examples). > > Is this something that should be looked into, or should I just incorporate > the workaround of disabling nested loop joins into my code? > > Thanks, > Mike > -------------- next part -------------- enable_nestloop = on: QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sort (cost=260.10..260.10 rows=1 width=385) (actual time=15084.727..15084.730 rows=25 loops=1) Sort Key: cl.id Sort Method: quicksort Memory: 32kB -> Limit (cost=260.07..260.08 rows=1 width=360) (actual time=15084.700..15084.708 rows=25 loops=1) -> Sort (cost=260.07..260.08 rows=1 width=360) (actual time=15084.699..15084.704 rows=25 loops=1) Sort Key: cl.id Sort Method: top-N heapsort Memory: 32kB -> Nested Loop Left Join (cost=212.58..260.06 rows=1 width=360) (actual time=68.629..15083.483 rows=204 loops=1) Join Filter: (csl1.chat_id = cl.id) -> Nested Loop Left Join (cost=159.35..202.70 rows=1 width=328) (actual time=68.070..10418.323 rows=204 loops=1) Join Filter: (csl2.chat_id = cl.id) -> Nested Loop Left Join (cost=99.82..134.88 rows=1 width=296) (actual time=7.868..18.477 rows=204 loops=1) Join Filter: (cl.id = chat_log.parent_id) -> Hash Left Join (cost=87.20..120.09 rows=1 width=264) (actual time=0.040..1.787 rows=204 loops=1) Hash Cond: (cl.id = ctu.id) Filter: (((ctu.num_target_users IS NULL) AND (ctg.num_target_groups IS NULL)) OR ((ctu.num_target_users + ctg.num_target_groups) = 0) OR ((((cl.username)::text = 'admin'::text) OR ('admin'::text = ANY (ctu.target_users_array)) OR ('{admin,everyone}'::text[] && ctg.target_groups_array)) AND (cl."time" > '2010-03-28 10:54:44.382616-04'::timestamp with time zone))) -> Hash Left Join (cost=43.60..63.86 rows=205 width=256) (actual time=0.030..1.302 rows=204 loops=1) Hash Cond: (cl.id = ctg.id) -> Seq Scan on chat_log cl (cost=0.00..12.62 rows=205 width=184) (actual time=0.015..0.833 rows=204 loops=1) Filter: ((NOT deleted) AND (id < 5090) AND (depth = 0)) -> Hash (cost=41.10..41.10 rows=200 width=76) (actual time=0.004..0.004 rows=0 loops=1) -> Subquery Scan ctg (cost=34.60..41.10 rows=200 width=76) (actual time=0.004..0.004 rows=0 loops=1) -> HashAggregate (cost=34.60..39.10 rows=200 width=36) (actual time=0.004..0.004 rows=0 loops=1) -> Seq Scan on chat_target_groups (cost=0.00..22.30 rows=1230 width=36) (actual time=0.001..0.001 rows=0 loops=1) -> Hash (cost=41.10..41.10 rows=200 width=76) (actual time=0.003..0.003 rows=0 loops=1) -> Subquery Scan ctu (cost=34.60..41.10 rows=200 width=76) (actual time=0.002..0.002 rows=0 loops=1) -> HashAggregate (cost=34.60..39.10 rows=200 width=36) (actual time=0.002..0.002 rows=0 loops=1) -> Seq Scan on chat_target_users (cost=0.00..22.30 rows=1230 width=36) (actual time=0.001..0.001 rows=0 loops=1) -> HashAggregate (cost=12.62..13.70 rows=48 width=8) (actual time=0.041..0.070 rows=49 loops=204) -> Seq Scan on chat_log (cost=0.00..11.08 rows=308 width=8) (actual time=0.003..0.190 rows=308 loops=1) -> HashAggregate (cost=59.53..62.49 rows=237 width=6240) (actual time=0.017..50.908 rows=219 loops=204) -> Hash Join (cost=10.56..57.87 rows=333 width=6240) (actual time=0.358..1.104 rows=279 loops=1) Hash Cond: (us2.id = csl2.selection_id) -> Seq Scan on user_selections us2 (cost=0.00..42.39 rows=422 width=6240) (actual time=0.006..0.397 rows=343 loops=1) Filter: (user_drawing AND deleted) -> Hash (cost=6.40..6.40 rows=333 width=8) (actual time=0.339..0.339 rows=333 loops=1) -> Seq Scan on chat_selection_links csl2 (cost=0.00..6.40 rows=333 width=8) (actual time=0.007..0.178 rows=333 loops=1) Filter: (NOT deleted) -> HashAggregate (cost=53.23..54.68 rows=116 width=6240) (actual time=0.004..22.842 rows=20 loops=204) -> Hash Join (cost=43.84..52.65 rows=116 width=6240) (actual time=0.260..0.414 rows=54 loops=1) Hash Cond: (csl1.selection_id = us1.id) -> Seq Scan on chat_selection_links csl1 (cost=0.00..6.40 rows=333 width=8) (actual time=0.011..0.092 rows=333 loops=1) Filter: (NOT deleted) -> Hash (cost=42.39..42.39 rows=116 width=6240) (actual time=0.228..0.228 rows=138 loops=1) -> Seq Scan on user_selections us1 (cost=0.00..42.39 rows=116 width=6240) (actual time=0.009..0.165 rows=138 loops=1) Filter: (NOT user_drawing) Total runtime: 15085.197 ms enable_nestloop = off: QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sort (cost=260.17..260.17 rows=1 width=385) (actual time=88.643..88.645 rows=25 loops=1) Sort Key: cl.id Sort Method: quicksort Memory: 32kB -> Limit (cost=260.14..260.15 rows=1 width=360) (actual time=88.618..88.626 rows=25 loops=1) -> Sort (cost=260.14..260.15 rows=1 width=360) (actual time=88.617..88.620 rows=25 loops=1) Sort Key: cl.id Sort Method: top-N heapsort Memory: 32kB -> Hash Left Join (cost=227.09..260.13 rows=1 width=360) (actual time=87.445..88.392 rows=204 loops=1) Hash Cond: (cl.id = csls.chat_id) -> Hash Left Join (cost=169.81..202.76 rows=1 width=328) (actual time=64.063..64.633 rows=204 loops=1) Hash Cond: (cl.id = csld.chat_id) -> Hash Left Join (cost=101.98..134.89 rows=1 width=296) (actual time=8.303..8.737 rows=204 loops=1) Hash Cond: (cl.id = clr.id) -> Hash Left Join (cost=87.20..120.09 rows=1 width=264) (actual time=0.040..0.386 rows=204 loops=1) Hash Cond: (cl.id = ctu.id) Filter: (((ctu.num_target_users IS NULL) AND (ctg.num_target_groups IS NULL)) OR ((ctu.num_target_users + ctg.num_target_groups) = 0) OR ((((cl.username)::text = 'admin'::text) OR ('admin'::text = ANY (ctu.target_users_array)) OR ('{admin,everyone}'::text[] && ctg.target_groups_array)) AND (cl."time" > '2010-03-28 10:54:44.382616-04'::timestamp with time zone))) -> Hash Left Join (cost=43.60..63.86 rows=205 width=256) (actual time=0.030..0.278 rows=204 loops=1) Hash Cond: (cl.id = ctg.id) -> Seq Scan on chat_log cl (cost=0.00..12.62 rows=205 width=184) (actual time=0.015..0.171 rows=204 loops=1) Filter: ((NOT deleted) AND (id < 5090) AND (depth = 0)) -> Hash (cost=41.10..41.10 rows=200 width=76) (actual time=0.005..0.005 rows=0 loops=1) -> Subquery Scan ctg (cost=34.60..41.10 rows=200 width=76) (actual time=0.003..0.003 rows=0 loops=1) -> HashAggregate (cost=34.60..39.10 rows=200 width=36) (actual time=0.003..0.003 rows=0 loops=1) -> Seq Scan on chat_target_groups (cost=0.00..22.30 rows=1230 width=36) (actual time=0.000..0.000 rows=0 loops=1) -> Hash (cost=41.10..41.10 rows=200 width=76) (actual time=0.003..0.003 rows=0 loops=1) -> Subquery Scan ctu (cost=34.60..41.10 rows=200 width=76) (actual time=0.003..0.003 rows=0 loops=1) -> HashAggregate (cost=34.60..39.10 rows=200 width=36) (actual time=0.002..0.002 rows=0 loops=1) -> Seq Scan on chat_target_users (cost=0.00..22.30 rows=1230 width=36) (actual time=0.000..0.000 rows=0 loops=1) -> Hash (cost=14.18..14.18 rows=48 width=36) (actual time=8.254..8.254 rows=48 loops=1) -> Subquery Scan clr (cost=12.62..14.18 rows=48 width=36) (actual time=8.159..8.224 rows=49 loops=1) -> HashAggregate (cost=12.62..13.70 rows=48 width=8) (actual time=8.158..8.202 rows=49 loops=1) -> Seq Scan on chat_log (cost=0.00..11.08 rows=308 width=8) (actual time=0.003..0.198 rows=308 loops=1) -> Hash (cost=64.86..64.86 rows=237 width=36) (actual time=55.749..55.749 rows=219 loops=1) -> Subquery Scan csld (cost=59.53..64.86 rows=237 width=36) (actual time=3.565..55.590 rows=219 loops=1) -> HashAggregate (cost=59.53..62.49 rows=237 width=6240) (actual time=3.564..55.517 rows=219 loops=1) -> Hash Join (cost=10.56..57.87 rows=333 width=6240) (actual time=0.347..1.164 rows=279 loops=1) Hash Cond: (us2.id = csl2.selection_id) -> Seq Scan on user_selections us2 (cost=0.00..42.39 rows=422 width=6240) (actual time=0.006..0.453 rows=343 loops=1) Filter: (user_drawing AND deleted) -> Hash (cost=6.40..6.40 rows=333 width=8) (actual time=0.333..0.333 rows=333 loops=1) -> Seq Scan on chat_selection_links csl2 (cost=0.00..6.40 rows=333 width=8) (actual time=0.008..0.169 rows=333 loops=1) Filter: (NOT deleted) -> Hash (cost=55.84..55.84 rows=116 width=36) (actual time=23.342..23.342 rows=20 loops=1) -> Subquery Scan csls (cost=53.23..55.84 rows=116 width=36) (actual time=0.531..23.319 rows=20 loops=1) -> HashAggregate (cost=53.23..54.68 rows=116 width=6240) (actual time=0.530..23.304 rows=20 loops=1) -> Hash Join (cost=43.84..52.65 rows=116 width=6240) (actual time=0.254..0.414 rows=54 loops=1) Hash Cond: (csl1.selection_id = us1.id) -> Seq Scan on chat_selection_links csl1 (cost=0.00..6.40 rows=333 width=8) (actual time=0.011..0.096 rows=333 loops=1) Filter: (NOT deleted) -> Hash (cost=42.39..42.39 rows=116 width=6240) (actual time=0.229..0.229 rows=138 loops=1) -> Seq Scan on user_selections us1 (cost=0.00..42.39 rows=116 width=6240) (actual time=0.009..0.161 rows=138 loops=1) Filter: (NOT user_drawing) Total runtime: 89.130 ms From kneufeld at refractions.net Sun Mar 28 09:25:12 2010 From: kneufeld at refractions.net (Kevin Neufeld) Date: Sun, 28 Mar 2010 09:25:12 -0700 Subject: [postgis-users] PSQL command to drop table from a databae In-Reply-To: <5dd65e1e1003280835s135ada5egd17942c840c80540@mail.gmail.com> References: <5dd65e1e1003272111s38dde215tfed64d5612311df1@mail.gmail.com> <55fd1e871003272132r36cd9e75xac0a574990a43963@mail.gmail.com> <5dd65e1e1003280310seaca89cxc900c0be3c717d2f@mail.gmail.com> <5dd65e1e1003280835s135ada5egd17942c840c80540@mail.gmail.com> Message-ID: <4BAF82E8.3090809@refractions.net> Since you are using a non-standard way of naming your table (starting with number), as Oliver was explaining, you need to double quote your table name. $ set mytab=\"123foo\" $ echo $mytab "foo" $ psql -c "CREATE TABLE $mytab( a int ) " postgis CREATE TABLE $ psql -c "\dt" postgis List of relations Schema | Name | Type | Owner --------+------------------+-------+---------- public | 123foo | table | kneufeld public | geometry_columns | table | kneufeld public | spatial_ref_sys | table | kneufeld (3 rows) $ psql -c "DROP TABLE $mytab" postgis DROP TABLE -- Kevin On 3/28/2010 8:35 AM, Shreerang Patwardhan wrote: > Hi Ollvier, > I was just writing to you about your previous mail. Well, th e DROP > TABLE command is not working at my end. I have used double quotes > also. Can you guess what could the problem be? I am trying to use that > command in a shell script and it is not working. I have also tried it > on the terminal and still the result is the same....ERROR!!!..... > Need help!!! > > > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 592 bytes Desc: not available URL: From nicklas.aven at jordogskog.no Sun Mar 28 15:29:01 2010 From: nicklas.aven at jordogskog.no (=?iso-8859-1?Q?Nicklas_Av=E9n?=) Date: Mon, 29 Mar 2010 00:29:01 +0200 Subject: [postgis-users] PostGIS online Message-ID: <201003282229.o2SMT1Ji022942@mail-core.space2u.com> Hallo everybody PostGIS online is a new site for trying, testing and showing PostGIS. You can try sql queries against the test datasets (so far only one) and follow tutorials (so far only two) or you can write tutorials yourself to let other know how to do nifty things, an instruction how to do that will soon be found in the document area of the site. I have written a few words about it here http://blog.jordogskog.no/2010/03/28/postgis-online/ Welcome Nicklas Avén http://blog.jordogskog.no -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at zwartberg.com Sun Mar 28 21:46:00 2010 From: brian at zwartberg.com (Brian Modra) Date: Mon, 29 Mar 2010 06:46:00 +0200 Subject: [postgis-users] PostGIS online In-Reply-To: <201003282229.o2SMT1Ji022942@mail-core.space2u.com> References: <201003282229.o2SMT1Ji022942@mail-core.space2u.com> Message-ID: <5a9699851003282146g324ce10ci6c5adbd74c929c1a@mail.gmail.com> Hi Nicklas, have you seen my site: http://www.zwartberg.com/ and in particular: http://www.zwartberg.com/tutorial_1.html ? (It could compliment what you are doing.) By the way, please tell me if you get flamed for announcing in the postgis-users list. I tried to announce on the postgis-announce list, but it does not seem to work for just anyone, maybe only certain people have that privilege. I am announcing via postgis news though, which gets posted to postgis-announce. Brian On 29/03/2010, Nicklas Av?n wrote: > > Hallo everybody > > PostGIS online is a new site for trying, testing and showing PostGIS. You > can try sql queries against the test datasets (so far only one) and follow > tutorials (so far only two) or you can write tutorials yourself to let other > know how to do nifty things, an instruction how to do that will soon be > found in the document area of the site. > > I have written a few words about it here > http://blog.jordogskog.no/2010/03/28/postgis-online/ > > Welcome > > Nicklas Avén > > http://blog.jordogskog.no -- Brian Modra Land line: +27 23 5411 462 Mobile: +27 79 69 77 082 5 Jan Louw Str, Prince Albert, 6930 Postal: P.O. Box 2, Prince Albert 6930 South Africa http://www.zwartberg.com/ From patwardhan.shreerang at gmail.com Mon Mar 29 02:48:53 2010 From: patwardhan.shreerang at gmail.com (Shreerang Patwardhan) Date: Mon, 29 Mar 2010 15:18:53 +0530 Subject: [postgis-users] PSQL command to drop table from a databae In-Reply-To: <4BAF82E8.3090809@refractions.net> References: <5dd65e1e1003272111s38dde215tfed64d5612311df1@mail.gmail.com> <55fd1e871003272132r36cd9e75xac0a574990a43963@mail.gmail.com> <5dd65e1e1003280310seaca89cxc900c0be3c717d2f@mail.gmail.com> <5dd65e1e1003280835s135ada5egd17942c840c80540@mail.gmail.com> <4BAF82E8.3090809@refractions.net> Message-ID: <5dd65e1e1003290248w46daa584g5592536a4f13f6d6@mail.gmail.com> Hey Kevin, Thanx a million tons.....My problem is solved...Thanx a lot.....!!!.... -------------- next part -------------- An HTML attachment was scrubbed... URL: From patwardhan.shreerang at gmail.com Mon Mar 29 03:43:43 2010 From: patwardhan.shreerang at gmail.com (Shreerang Patwardhan) Date: Mon, 29 Mar 2010 16:13:43 +0530 Subject: [postgis-users] shp2pgsql in quite mode????...(shp2pgsql -q)??? Message-ID: <5dd65e1e1003290343x2f1dd37bqe5ebd21ed5eae7fb@mail.gmail.com> Hey all, I do not wish to display the output of the command shp2pgsql at the terminal. I want the command to run in quite mode. But there is no -q option for shp2pgsql. How do I get around this issue? Thanx, Shreerang Patwardhan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.cave-ayland at siriusit.co.uk Mon Mar 29 04:53:50 2010 From: mark.cave-ayland at siriusit.co.uk (Mark Cave-Ayland) Date: Mon, 29 Mar 2010 12:53:50 +0100 Subject: [postgis-users] Nested loop join = very bad performance In-Reply-To: <201003281157.01365.mgleahy@alumni.uwaterloo.ca> References: <201003281157.01365.mgleahy@alumni.uwaterloo.ca> Message-ID: <4BB094CE.7020001@siriusit.co.uk> Mike Leahy wrote: > Is this something that should be looked into, or should I just incorporate the > workaround of disabling nested loop joins into my code? I find that generally PostgreSQL is fairly good at its estimates unless someone has already tried to tune the database. Have you changed any of the settings in postgresql.conf from their defaults? ATB, Mark. -- Mark Cave-Ayland - Senior Technical Architect PostgreSQL - PostGIS Sirius Corporation plc - control through freedom http://www.siriusit.co.uk t: +44 870 608 0063 Sirius Labs: http://www.siriusit.co.uk/labs From mark.cave-ayland at siriusit.co.uk Mon Mar 29 04:56:54 2010 From: mark.cave-ayland at siriusit.co.uk (Mark Cave-Ayland) Date: Mon, 29 Mar 2010 12:56:54 +0100 Subject: [postgis-users] shp2pgsql in quite mode????...(shp2pgsql -q)??? In-Reply-To: <5dd65e1e1003290343x2f1dd37bqe5ebd21ed5eae7fb@mail.gmail.com> References: <5dd65e1e1003290343x2f1dd37bqe5ebd21ed5eae7fb@mail.gmail.com> Message-ID: <4BB09586.20602@siriusit.co.uk> Shreerang Patwardhan wrote: > Hey all, > I do not wish to display the output of the command shp2pgsql at the > terminal. I want the command to run in quite mode. But there is no -q > option for shp2pgsql. How do I get around this issue? Perhaps something like: shp2pgsql ... > /dev/null or shp2pgsql ... 2>&1 > /dev/null HTH, Mark. -- Mark Cave-Ayland - Senior Technical Architect PostgreSQL - PostGIS Sirius Corporation plc - control through freedom http://www.siriusit.co.uk t: +44 870 608 0063 Sirius Labs: http://www.siriusit.co.uk/labs From nicolas.gillet at market-ip.com Mon Mar 29 06:18:42 2010 From: nicolas.gillet at market-ip.com (Nicolas Gillet - MARKET-IP) Date: Mon, 29 Mar 2010 15:18:42 +0200 Subject: [postgis-users] shp2pgsql in quite mode????...(shp2pgsql -q)??? In-Reply-To: <5dd65e1e1003290343x2f1dd37bqe5ebd21ed5eae7fb@mail.gmail.com> References: <5dd65e1e1003290343x2f1dd37bqe5ebd21ed5eae7fb@mail.gmail.com> Message-ID: <00d201cacf42$5aea82f0$10bf88d0$@gillet@market-ip.com> Hello, Indeed there is no ?-q?. But are you sure that it actually is shp2pgsql that you want to quiet down ? (there are at most 15 lines) I think that what can annoy you is the output from the psql that usually is piped behind shp2pgsql. Psql do have a ?-q? parameter. e.g. : shp2pgsql -W utf-8 -s 4326 -d -I /path/to/some/shp my_table | psql -q -d my_database -h host -U user That?s the command I used most of the time. If you really want to remove shp2pgsql output I think that your only option is using something like ?command > null? to redirect the ouput nowhere. Hope this helps. Nicolas De : postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] De la part de Shreerang Patwardhan Envoy? : lundi 29 mars 2010 12:44 ? : Pune GNU/Linux Users Group Mailing List; PostGIS Users Discussion Objet : [postgis-users] shp2pgsql in quite mode????...(shp2pgsql -q)??? Hey all, I do not wish to display the output of the command shp2pgsql at the terminal. I want the command to run in quite mode. But there is no -q option for shp2pgsql. How do I get around this issue? Thanx, Shreerang Patwardhan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From janos.lobb at yale.edu Mon Mar 29 07:04:16 2010 From: janos.lobb at yale.edu (=?ISO-8859-1?Q?J=E1nos_L=F6bb?=) Date: Mon, 29 Mar 2010 10:04:16 -0400 Subject: [postgis-users] PostGIS online In-Reply-To: <201003282229.o2SMT1Ji022942@mail-core.space2u.com> References: <201003282229.o2SMT1Ji022942@mail-core.space2u.com> Message-ID: On Mar 28, 2010, at 6:29 PM, Nicklas Av?n wrote: > Hallo everybody > > PostGIS online is a new site for trying, testing and showing > PostGIS. You can try sql queries against the test datasets (so far > only one) and follow tutorials (so far only two) or you can write > tutorials yourself to let other know how to do nifty things, an > instruction how to do that will soon be found in the document area > of the site. > > I have written a few words about it here http://blog.jordogskog.no/2010/03/28/postgis-online/ > > Welcome > > Nicklas Av?n > > http://blog.jordogskog.no Now I understand what Sarah Palin meant when she said that she could see Russia from her porch. She only saw the Republican elephant :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From mgleahy at alumni.uwaterloo.ca Mon Mar 29 14:35:29 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Mon, 29 Mar 2010 17:35:29 -0400 Subject: [postgis-users] Nested loop join = very bad performance In-Reply-To: <4BB094CE.7020001@siriusit.co.uk> References: <201003281157.01365.mgleahy@alumni.uwaterloo.ca> <4BB094CE.7020001@siriusit.co.uk> Message-ID: <201003291735.29274.mgleahy@alumni.uwaterloo.ca> Hi Mark, I don't recall making any changes...at least not until the error I encountered last week cropped up - but I think I reversed those changes (I will double- check tonight). But I think I have encountered performance problems with this query before on other systems - I had originally dismissed it as hardware limitations I was dealing in my testing system at the time. After recent hardware upgrades and after dealing with that specific bug, that's when the slow performance of this query really stood out. Mike On Monday 29 March 2010 07:53:50 Mark Cave-Ayland wrote: > Mike Leahy wrote: > > Is this something that should be looked into, or should I just > > incorporate the workaround of disabling nested loop joins into my code? > > I find that generally PostgreSQL is fairly good at its estimates unless > someone has already tried to tune the database. Have you changed any of > the settings in postgresql.conf from their defaults? > > > ATB, > > Mark. > From cmntlk at gmail.com Mon Mar 29 18:49:56 2010 From: cmntlk at gmail.com (Oscar Zamudio) Date: Mon, 29 Mar 2010 22:49:56 -0300 Subject: [postgis-users] Address Geocoding In-Reply-To: <10c070ab1003240221t614cdb56x7bba317753b5dcf1@mail.gmail.com> References: <9296e7dd1003190834j3df4951lb90677b5bc454d5b@mail.gmail.com> <4BA3C120.7020001@swoodbridge.com> <10c070ab1003240221t614cdb56x7bba317753b5dcf1@mail.gmail.com> Message-ID: When you write: "FROM (roads, settlements, poi, province, etc...)" you actually mean one table at a time? Because if you try more than one table separated by commas, there will be an error. If you are trying to use more than one table I'm afraid you will need to use a JOIN clause ... Regards, On Wed, Mar 24, 2010 at 6:21 AM, ibrahim saricicek < ibrahimsaricicek at gmail.com> wrote: > Hi; > > for reverse geoceding now using this and works fine; > > SELECT id, the_geom > FROM (roads, settlements, poi, province, etc...) > WHERE > the_geom && SetSRID('BOX3D(x+0.01 y+0.01, x-0.01 y-0.01)'::box3d, 4326) > ORDER BY > ST_Distance(the_geom, GeomFromText('POINT(x y)', 4326)) > LIMIT 1; > > regards... > > > On Fri, Mar 19, 2010 at 8:23 PM, Stephen Woodbridge < > woodbri at swoodbridge.com> wrote: > >> http://www.google.com/#hl=en&source=hp&q=postgis+geocoder >> >> Ricardo Bayley wrote: >> >>> Hi fellows, >>> >>> I was wondering if any of you have a good approach to do Address >>> Geocoding within postgis. >>> Any ideas, considerations, thoughts ?? >>> >>> thanks in advanced. >>> >>> >>> Warm regards, >>> >>> >>> Ricardo >>> >>> >>> ------------------------------------------------------------------------ >>> >>> >>> _______________________________________________ >>> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.greenwood at gmail.com Mon Mar 29 19:43:06 2010 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Mon, 29 Mar 2010 20:43:06 -0600 Subject: [postgis-users] reverse geocoding Message-ID: I'm not even sure if "reverse geocoding" is the correct term, but what I am trying to do is improve TIGER road centerline data from known points. I have a set a accurate address points, and I would like to assign fromleft, toleft, fromright, toright ranges to the TIGER centerlines from these points. I am just doing this for one small community, so I don't intend to turn it into a big programming project. i.e. I don't want to spend more time doing it programatically than it would take to do it "by hand". But if there is a tool or some code out there that would help, I sure would appreciate any pointers. Thanks, Rich -- Richard Greenwood richard.greenwood at gmail.com www.greenwoodmap.com From mgleahy at alumni.uwaterloo.ca Mon Mar 29 19:53:41 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Mon, 29 Mar 2010 22:53:41 -0400 Subject: [postgis-users] Nested loop join = very bad performance In-Reply-To: <201003291735.29274.mgleahy@alumni.uwaterloo.ca> References: <201003281157.01365.mgleahy@alumni.uwaterloo.ca> <4BB094CE.7020001@siriusit.co.uk> <201003291735.29274.mgleahy@alumni.uwaterloo.ca> Message-ID: <201003292253.42224.mgleahy@alumni.uwaterloo.ca> Mark/List, I just replaced my postgresql.conf with the default copy that appears in /etc/postgresql/8.4/main/ after a fresh install. The performance is pretty much the same as before (maybe even about 400 ms worse than before). Is there anything else I should try? Mike On Monday 29 March 2010 17:35:29 Mike Leahy wrote: > Hi Mark, > > I don't recall making any changes...at least not until the error I > encountered last week cropped up - but I think I reversed those changes (I > will double- check tonight). But I think I have encountered performance > problems with this query before on other systems - I had originally > dismissed it as hardware limitations I was dealing in my testing system at > the time. After recent hardware upgrades and after dealing with that > specific bug, that's when the slow performance of this query really stood > out. > > Mike > > On Monday 29 March 2010 07:53:50 Mark Cave-Ayland wrote: > > Mike Leahy wrote: > > > Is this something that should be looked into, or should I just > > > incorporate the workaround of disabling nested loop joins into my code? > > > > I find that generally PostgreSQL is fairly good at its estimates unless > > someone has already tried to tune the database. Have you changed any of > > the settings in postgresql.conf from their defaults? > > > > > > ATB, > > > > Mark. > From woodbri at swoodbridge.com Mon Mar 29 21:58:36 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Mon, 29 Mar 2010 23:58:36 -0500 Subject: [postgis-users] reverse geocoding In-Reply-To: References: Message-ID: <4BB184FC.30602@swoodbridge.com> Richard Greenwood wrote: > I'm not even sure if "reverse geocoding" is the correct term, but what > I am trying to do is improve TIGER road centerline data from known > points. I have a set a accurate address points, and I would like to > assign fromleft, toleft, fromright, toright ranges to the TIGER > centerlines from these points. I am just doing this for one small > community, so I don't intend to turn it into a big programming > project. i.e. I don't want to spend more time doing it programatically > than it would take to do it "by hand". But if there is a tool or some > code out there that would help, I sure would appreciate any pointers. > > Thanks, > Rich > If you have a POINT then you can find the closest centerline within some RADIUS with: select *, distance(POINT, the_geom) as dist from lines where expand(POINT, RADIUS) && the_geom order by dist limit 1; -Steve From kneufeld at refractions.net Mon Mar 29 22:41:03 2010 From: kneufeld at refractions.net (Kevin Neufeld) Date: Mon, 29 Mar 2010 22:41:03 -0700 Subject: [postgis-users] reverse geocoding In-Reply-To: <4BB184FC.30602@swoodbridge.com> References: <4BB184FC.30602@swoodbridge.com> Message-ID: <4BB18EEF.9090104@refractions.net> On 3/29/2010 9:58 PM, Stephen Woodbridge wrote: > If you have a POINT then you can find the closest centerline within > some RADIUS with: > > select *, distance(POINT, the_geom) as dist > from lines > where expand(POINT, RADIUS) && the_geom > order by dist limit 1; > > -Steve Or to find the closest centerline for all points in your point table: SELECT DISTINCT ON (a.gid) a.*, b.*, ST_Distance(a.geom, b.geom) AS dist FROM points a, lines b WHERE ST_Expand(a.geom, RADIUS) && b.geom ORDER BY a.gid, dist ASC; Cheers, Kevin From brian at zwartberg.com Mon Mar 29 23:29:04 2010 From: brian at zwartberg.com (Brian Modra) Date: Tue, 30 Mar 2010 08:29:04 +0200 Subject: [postgis-users] reverse geocoding In-Reply-To: <4BB18EEF.9090104@refractions.net> References: <4BB184FC.30602@swoodbridge.com> <4BB18EEF.9090104@refractions.net> Message-ID: <5a9699851003292329o789c14cbwd6b4943bbdbb353c@mail.gmail.com> On 30/03/2010, Kevin Neufeld wrote: > On 3/29/2010 9:58 PM, Stephen Woodbridge wrote: >> If you have a POINT then you can find the closest centerline within >> some RADIUS with: >> >> select *, distance(POINT, the_geom) as dist >> from lines >> where expand(POINT, RADIUS) && the_geom >> order by dist limit 1; >> >> -Steve > > Or to find the closest centerline for all points in your point table: > > SELECT DISTINCT ON (a.gid) a.*, b.*, ST_Distance(a.geom, b.geom) AS dist > FROM points a, lines b > WHERE ST_Expand(a.geom, RADIUS) && b.geom > ORDER BY a.gid, dist ASC; I've found some data sets have very long road linestrings, and this makes the spatial index less effective, so if this is the case, you want to create a new table of roads (for search purposes only) and break the linestrings up into smaller linestrings. I used a plpgsql function that did a select on the entire roads line table, and row by row did this: calculate the length of the linestring using length2d do simple maths to work out how many segments I wanted then in a for loop, used line_substring to create the segments. Insert each segment into a new table, copying across the UID of the original linsestring Then of course, create a spatial index on this new (larger) table. To do the reverse geocoding, I then search using a SQL very similar to Kevin's, and also search on a points table (points of interest such as Church, Petrol Station etc) Then also on the polygons tables to get the suburb etc. The hardest part of reverse geocoding is that you need to become very fmiliar with your data set, and set up the parameters of your search so that the results are sensible. Sometimes the data set is not so good, and you need to make a lot of tweaks to work around this. > > Cheers, > Kevin > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Brian Modra Land line: +27 23 5411 462 Mobile: +27 79 69 77 082 5 Jan Louw Str, Prince Albert, 6930 Postal: P.O. Box 2, Prince Albert 6930 South Africa http://www.zwartberg.com/ From mcubranic at gmail.com Mon Mar 29 23:53:43 2010 From: mcubranic at gmail.com (=?ISO-8859-2?Q?Marko_=C8ubrani=E6?=) Date: Tue, 30 Mar 2010 08:53:43 +0200 Subject: [postgis-users] How to change srid Message-ID: <57ff9b271003292353h30be9ed1qf570b0dd37cb7ae9@mail.gmail.com> dear, iv loaded data to postgis and for all geometry srid is -1. if i want to change srid without doing and transformations, can i do that and how? Thank you, Marko Cubranic -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.lechner at fossgis.de Mon Mar 29 23:59:42 2010 From: marco.lechner at fossgis.de (Marco Lechner - FOSSGIS e.V.) Date: Tue, 30 Mar 2010 08:59:42 +0200 Subject: [postgis-users] How to change srid In-Reply-To: <57ff9b271003292353h30be9ed1qf570b0dd37cb7ae9@mail.gmail.com> References: <57ff9b271003292353h30be9ed1qf570b0dd37cb7ae9@mail.gmail.com> Message-ID: <4BB1A15E.4020807@fossgis.de> change the SRID in the geometry_columns table. There should be a corresponding recordset defining the SRID, geometry type, geometry column and so on of your table. Marco Am 30.03.2010 08:53, schrieb Marko C(ubranic': > dear, > > iv loaded data to postgis and for all geometry srid is -1. > if i want to change srid without doing and transformations, can i do > that and how? > > Thank you, > > Marko Cubranic > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcubranic at gmail.com Tue Mar 30 00:04:32 2010 From: mcubranic at gmail.com (=?ISO-8859-2?Q?Marko_=C8ubrani=E6?=) Date: Tue, 30 Mar 2010 09:04:32 +0200 Subject: [postgis-users] How to change srid In-Reply-To: <4BB1A15E.4020807@fossgis.de> References: <57ff9b271003292353h30be9ed1qf570b0dd37cb7ae9@mail.gmail.com> <4BB1A15E.4020807@fossgis.de> Message-ID: <57ff9b271003300004y20cbff42jbc23069ff409dc8c@mail.gmail.com> i did that, but than i have problems with mapserver which reads two srid (original one and the one that i set) and doesnt want to visualize any geometry. 2010/3/30 Marco Lechner - FOSSGIS e.V. > change the SRID in the geometry_columns table. There should be a > corresponding recordset defining the SRID, geometry type, geometry column > and so on of your table. > > Marco > > Am 30.03.2010 08:53, schrieb Marko ?ubrani?: > > dear, > > iv loaded data to postgis and for all geometry srid is -1. > if i want to change srid without doing and transformations, can i do that > and how? > > Thank you, > > Marko Cubranic > > > _______________________________________________ > postgis-users mailing listpostgis-users at postgis.refractions.nethttp://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: From nicolas.gillet at market-ip.com Tue Mar 30 00:05:00 2010 From: nicolas.gillet at market-ip.com (Nicolas Gillet - MARKET-IP) Date: Tue, 30 Mar 2010 09:05:00 +0200 Subject: [postgis-users] How to change srid In-Reply-To: <4BB1A15E.4020807@fossgis.de> References: <57ff9b271003292353h30be9ed1qf570b0dd37cb7ae9@mail.gmail.com> <4BB1A15E.4020807@fossgis.de> Message-ID: <005501cacfd7$502b8c70$f082a550$@gillet@market-ip.com> Hello, Editing the geometry_column table is half part of the job. You have to update the geometries too. UPDATE table SET the_geom = ST_SetSRID(the_geom, 4326). Usually the SRID is -1 when you forget to set the srid when you import a shape file. Hope this helps. Nicolas. De : postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] De la part de Marco Lechner - FOSSGIS e.V. Envoy? : mardi 30 mars 2010 9:00 ? : postgis-users at postgis.refractions.net Objet : Re: [postgis-users] How to change srid change the SRID in the geometry_columns table. There should be a corresponding recordset defining the SRID, geometry type, geometry column and so on of your table. Marco Am 30.03.2010 08:53, schrieb Marko ?ubrani?: dear, iv loaded data to postgis and for all geometry srid is -1. if i want to change srid without doing and transformations, can i do that and how? Thank you, Marko Cubranic _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcubranic at gmail.com Tue Mar 30 00:06:27 2010 From: mcubranic at gmail.com (=?ISO-8859-2?Q?Marko_=C8ubrani=E6?=) Date: Tue, 30 Mar 2010 09:06:27 +0200 Subject: [postgis-users] How to change srid In-Reply-To: <-7077815661138439829@unknownmsgid> References: <57ff9b271003292353h30be9ed1qf570b0dd37cb7ae9@mail.gmail.com> <4BB1A15E.4020807@fossgis.de> <-7077815661138439829@unknownmsgid> Message-ID: <57ff9b271003300006y772e2a2eu2b98d580ab3e533f@mail.gmail.com> thank you, i think this will help me. Marko 2010/3/30 Nicolas Gillet - MARKET-IP > Hello, > > > > Editing the geometry_column table is half part of the job. > > > > You have to update the geometries too. > > > > UPDATE table SET the_geom = ST_SetSRID(the_geom, 4326). > > > > Usually the SRID is -1 when you forget to set the srid when you import a > shape file. > > > > Hope this helps. > > > > Nicolas. > > > > *De :* postgis-users-bounces at postgis.refractions.net [mailto: > postgis-users-bounces at postgis.refractions.net] *De la part de* Marco > Lechner - FOSSGIS e.V. > *Envoy? :* mardi 30 mars 2010 9:00 > *? :* postgis-users at postgis.refractions.net > *Objet :* Re: [postgis-users] How to change srid > > > > change the SRID in the geometry_columns table. There should be a > corresponding recordset defining the SRID, geometry type, geometry column > and so on of your table. > > Marco > > Am 30.03.2010 08:53, schrieb Marko ?ubrani?: > > dear, > > iv loaded data to postgis and for all geometry srid is -1. > if i want to change srid without doing and transformations, can i do that > and how? > > Thank you, > > Marko Cubranic > > > > > > _______________________________________________ > > 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: From strk at keybit.net Tue Mar 30 01:46:45 2010 From: strk at keybit.net (strk) Date: Tue, 30 Mar 2010 10:46:45 +0200 Subject: [postgis-users] Recommended update: GEOS-3.2.1 Message-ID: <20100330084645.GM49328@keybit.net> FYI, GEOS-3.2.1 has just been released: http://download.osgeo.org/geos/geos-3.2.1.tar.bz2 This bugfix release fixes a bug in Validity computation which results in the postgis's ST_IsValid() to return TRUE for possibly invalid geometries. In particular, multi-component geometries were affected. This version plugs painlessly in existing PostGIS installations, just make install and you would get a correct ST_isValid() implementation. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From nasoblu5 at yahoo.it Tue Mar 30 03:16:49 2010 From: nasoblu5 at yahoo.it (marcello marcellone) Date: Tue, 30 Mar 2010 10:16:49 +0000 (GMT) Subject: [postgis-users] Inverse Distance Weighted with postgis Message-ID: <989592.60722.qm@web23405.mail.ird.yahoo.com> is it possible in some way directly with posgres/postgis to calculate interpolated depth for a grid with IDW method avoiding to use gis like grass....? ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From johnzhang06 at gmail.com Tue Mar 30 03:19:27 2010 From: johnzhang06 at gmail.com (John Zhang) Date: Tue, 30 Mar 2010 18:19:27 +0800 Subject: [postgis-users] digital city solutions Message-ID: <618950b81003300319i4bafee7eq29758ff7feefda43@mail.gmail.com> Hey there, I understand this not the right link to ask such a question. I was wondering if you could point me to where I can get more information on Digital City. I would appreciate a lot if anyone can point me to where I can gain more information. Some use cases would be much helpful. I am trying to learn what the topic covers and how to work out a solution. Any input would be much appreciated. Sincerely, John -------------- next part -------------- An HTML attachment was scrubbed... URL: From lehodey at gmail.com Tue Mar 30 03:31:16 2010 From: lehodey at gmail.com (Fred Lehodey) Date: Tue, 30 Mar 2010 11:31:16 +0100 Subject: [postgis-users] How to change srid In-Reply-To: <57ff9b271003300006y772e2a2eu2b98d580ab3e533f@mail.gmail.com> References: <57ff9b271003292353h30be9ed1qf570b0dd37cb7ae9@mail.gmail.com> <4BB1A15E.4020807@fossgis.de> <-7077815661138439829@unknownmsgid> <57ff9b271003300006y772e2a2eu2b98d580ab3e533f@mail.gmail.com> Message-ID: Hi, UpdateGeometrySRID() http://postgis.refractions.net/documentation/manual-1.5/UpdateGeometrySRID.html Fred 2010/3/30 Marko ?ubrani? > thank you, > > i think this will help me. > > Marko > > 2010/3/30 Nicolas Gillet - MARKET-IP > > Hello, >> >> >> >> Editing the geometry_column table is half part of the job. >> >> >> >> You have to update the geometries too. >> >> >> >> UPDATE table SET the_geom = ST_SetSRID(the_geom, 4326). >> >> >> >> Usually the SRID is -1 when you forget to set the srid when you import a >> shape file. >> >> >> >> Hope this helps. >> >> >> >> Nicolas. >> >> >> >> *De :* postgis-users-bounces at postgis.refractions.net [mailto: >> postgis-users-bounces at postgis.refractions.net] *De la part de* Marco >> Lechner - FOSSGIS e.V. >> *Envoy? :* mardi 30 mars 2010 9:00 >> *? :* postgis-users at postgis.refractions.net >> *Objet :* Re: [postgis-users] How to change srid >> >> >> >> change the SRID in the geometry_columns table. There should be a >> corresponding recordset defining the SRID, geometry type, geometry column >> and so on of your table. >> >> Marco >> >> Am 30.03.2010 08:53, schrieb Marko ?ubrani?: >> >> dear, >> >> iv loaded data to postgis and for all geometry srid is -1. >> if i want to change srid without doing and transformations, can i do that >> and how? >> >> Thank you, >> >> Marko Cubranic >> >> >> >> >> >> _______________________________________________ >> >> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yves.moisan at boreal-is.com Tue Mar 30 05:22:38 2010 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Tue, 30 Mar 2010 08:22:38 -0400 Subject: [postgis-users] How to change srid In-Reply-To: <57ff9b271003300004y20cbff42jbc23069ff409dc8c@mail.gmail.com> References: <57ff9b271003292353h30be9ed1qf570b0dd37cb7ae9@mail.gmail.com> <4BB1A15E.4020807@fossgis.de> <57ff9b271003300004y20cbff42jbc23069ff409dc8c@mail.gmail.com> Message-ID: <4BB1ED0E.1060708@boreal-is.com> Le 2010-03-30 03:04, Marko ?ubrani? a ?crit : > i did that, but than i have problems with mapserver which reads two > srid (original one and the one that i set) and doesnt want to > visualize any geometry. Did you modify the constraint on your geometry ? Yves From Pierre.Racine at sbf.ulaval.ca Tue Mar 30 05:37:38 2010 From: Pierre.Racine at sbf.ulaval.ca (Pierre Racine) Date: Tue, 30 Mar 2010 08:37:38 -0400 Subject: [postgis-users] Inverse Distance Weighted with postgis In-Reply-To: <989592.60722.qm@web23405.mail.ird.yahoo.com> References: <989592.60722.qm@web23405.mail.ird.yahoo.com> Message-ID: <87A96661E65C5541AB4D20721C2DD7F88099EA2BE6@EXCH-MBX-A.ulaval.ca> Marcello, PostGIS handle only vector data. The raster part is under development and tools to interpolate raster from points are planned even if there are not our first priority. Pierre From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of marcello marcellone Sent: 30 mars 2010 06:17 To: postgis-users at postgis.refractions.net Subject: [postgis-users] Inverse Distance Weighted with postgis is it possible in some way directly with posgres/postgis to calculate interpolated depth for a grid with IDW method avoiding to use gis like grass....? -------------- next part -------------- An HTML attachment was scrubbed... URL: From rykovd at gmail.com Tue Mar 30 09:38:55 2010 From: rykovd at gmail.com (Rykov Denis) Date: Tue, 30 Mar 2010 20:38:55 +0400 Subject: [postgis-users] Polygon validity Message-ID: <2c9bd88a1003300938m21ef3104s8e30788f223829ce@mail.gmail.com> There is following polygon: POLYGON((317371.62563763 5731575.49932608, 317028.110300846 5731043.43103426, 317028.110300846 5731043.43103426, 316389.822682815 5731138.79331604, 316478.209591618 5731705.00321977, 316478.209591619 5731705.00321977, 317350.223258488 5731584.46661525, 317371.62563763 5731575.49932608)) with two duplicate nodes. When I try to check it with ST_IsValidReason function I get message that it is Valid Geometry. Is this OGC compliant? When I try to check it with QGIS, ArcView or ArcGIS - I get notice about self intersection. Please explain this situation. From richard.greenwood at gmail.com Tue Mar 30 15:46:15 2010 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Tue, 30 Mar 2010 16:46:15 -0600 Subject: [postgis-users] reverse geocoding In-Reply-To: <5a9699851003292329o789c14cbwd6b4943bbdbb353c@mail.gmail.com> References: <4BB184FC.30602@swoodbridge.com> <4BB18EEF.9090104@refractions.net> <5a9699851003292329o789c14cbwd6b4943bbdbb353c@mail.gmail.com> Message-ID: Steve, Kevin, Brian - Thank you for the pointers. They provide a good starting point. Eric Randall also provided a very interesting outline that takes it quite a bit further. In addition to finding the street which is nearest to a given point, I need to determine what the min and max address values are of the points which are adjacent to a street segment, and also determine whether odd or even numbers are to the left or right side of each segment. I'm not sure how far I will ultimately get with this, but I do appreciate all of your help. Best regards, Rich On Tue, Mar 30, 2010 at 12:29 AM, Brian Modra wrote: > On 30/03/2010, Kevin Neufeld wrote: >> On 3/29/2010 9:58 PM, Stephen Woodbridge wrote: >>> If you have a POINT then you can find the closest centerline within >>> some RADIUS with: >>> >>> select *, distance(POINT, the_geom) as dist >>> ? from lines >>> ?where expand(POINT, RADIUS) && the_geom >>> ?order by dist limit 1; >>> >>> -Steve >> >> Or to find the closest centerline for all points in your point table: >> >> SELECT DISTINCT ON (a.gid) a.*, b.*, ST_Distance(a.geom, b.geom) AS dist >> FROM points a, lines b >> WHERE ST_Expand(a.geom, RADIUS) && b.geom >> ORDER BY a.gid, dist ASC; > > I've found some data sets have very long road linestrings, and this > makes the spatial index less effective, so if this is the case, you > want to create a new table of roads (for search purposes only) and > break the linestrings up into smaller linestrings. > > I used a plpgsql function that did a select on the entire roads line > table, and row by row did this: > > calculate the length of the linestring using length2d > do simple maths to work out how many segments I wanted > then in a for loop, used line_substring to create the segments. > Insert each segment into a new table, copying across the UID of the > original linsestring > > Then of course, create a spatial index on this new (larger) table. > > To do the reverse geocoding, I then search using a SQL very similar to > Kevin's, and also search on a points table (points of interest such as > Church, Petrol Station etc) > Then also on the polygons tables to get the suburb etc. > > The hardest part of reverse geocoding is that you need to become very > fmiliar with your data set, and set up the parameters of your search > so that the results are sensible. Sometimes the data set is not so > good, and you need to make a lot of tweaks to work around this. > >> >> Cheers, >> Kevin >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> > > > -- > Brian Modra ? Land line: +27 23 5411 462 > Mobile: +27 79 69 77 082 > 5 Jan Louw Str, Prince Albert, 6930 > Postal: P.O. Box 2, Prince Albert 6930 > South Africa > http://www.zwartberg.com/ > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Richard Greenwood richard.greenwood at gmail.com www.greenwoodmap.com From woodbri at swoodbridge.com Tue Mar 30 17:48:52 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Tue, 30 Mar 2010 19:48:52 -0500 Subject: [postgis-users] reverse geocoding In-Reply-To: References: <4BB184FC.30602@swoodbridge.com> <4BB18EEF.9090104@refractions.net> <5a9699851003292329o789c14cbwd6b4943bbdbb353c@mail.gmail.com> Message-ID: <4BB29BF4.3080207@swoodbridge.com> Richard Greenwood wrote: > Steve, Kevin, Brian - > > Thank you for the pointers. They provide a good starting point. Eric > Randall also provided a very interesting outline that takes it quite a > bit further. In addition to finding the street which is nearest to a > given point, I need to determine what the min and max address values > are of the points which are adjacent to a street segment, and also > determine whether odd or even numbers are to the left or right side of > each segment. Richard, to find the adjacent segments just do: 1) find the nearest segment to you x,y 2) get the start and end points of that segment 3) select * from lines where expand(start, 0.000002) && the_geom and gid != first_segment_gid and name = first_segment_name; 4) do the same for the end point. 0.000002 is just a very small tolerance in case the segments have rounding errors and are not exactly the same. -Steve > I'm not sure how far I will ultimately get with this, but I do > appreciate all of your help. > > Best regards, > Rich > > > On Tue, Mar 30, 2010 at 12:29 AM, Brian Modra wrote: >> On 30/03/2010, Kevin Neufeld wrote: >>> On 3/29/2010 9:58 PM, Stephen Woodbridge wrote: >>>> If you have a POINT then you can find the closest centerline within >>>> some RADIUS with: >>>> >>>> select *, distance(POINT, the_geom) as dist >>>> from lines >>>> where expand(POINT, RADIUS) && the_geom >>>> order by dist limit 1; >>>> >>>> -Steve >>> Or to find the closest centerline for all points in your point table: >>> >>> SELECT DISTINCT ON (a.gid) a.*, b.*, ST_Distance(a.geom, b.geom) AS dist >>> FROM points a, lines b >>> WHERE ST_Expand(a.geom, RADIUS) && b.geom >>> ORDER BY a.gid, dist ASC; >> I've found some data sets have very long road linestrings, and this >> makes the spatial index less effective, so if this is the case, you >> want to create a new table of roads (for search purposes only) and >> break the linestrings up into smaller linestrings. >> >> I used a plpgsql function that did a select on the entire roads line >> table, and row by row did this: >> >> calculate the length of the linestring using length2d >> do simple maths to work out how many segments I wanted >> then in a for loop, used line_substring to create the segments. >> Insert each segment into a new table, copying across the UID of the >> original linsestring >> >> Then of course, create a spatial index on this new (larger) table. >> >> To do the reverse geocoding, I then search using a SQL very similar to >> Kevin's, and also search on a points table (points of interest such as >> Church, Petrol Station etc) >> Then also on the polygons tables to get the suburb etc. >> >> The hardest part of reverse geocoding is that you need to become very >> fmiliar with your data set, and set up the parameters of your search >> so that the results are sensible. Sometimes the data set is not so >> good, and you need to make a lot of tweaks to work around this. >> >>> Cheers, >>> Kevin >>> _______________________________________________ >>> postgis-users mailing list >>> postgis-users at postgis.refractions.net >>> http://postgis.refractions.net/mailman/listinfo/postgis-users >>> >> >> -- >> Brian Modra Land line: +27 23 5411 462 >> Mobile: +27 79 69 77 082 >> 5 Jan Louw Str, Prince Albert, 6930 >> Postal: P.O. Box 2, Prince Albert 6930 >> South Africa >> http://www.zwartberg.com/ >> _______________________________________________ >> postgis-users mailing list >> postgis-users at postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> > > > From aperi2007 at gmail.com Tue Mar 30 23:16:03 2010 From: aperi2007 at gmail.com (Andrea Peri) Date: Wed, 31 Mar 2010 08:16:03 +0200 Subject: [postgis-users] Polygon validity Message-ID: >with two duplicate nodes. When I try to check it with ST_IsValidReason >function I get message >that it is Valid Geometry. Is this OGC compliant? When I try to check >it with QGIS, ArcView or >ArcGIS - I get notice about self intersection. Please explain this situation. Hi, give my explain... The selfintersect is an invalidity for OGC because OGC use the simple-feature model. Postgis actually not limit only to the simple-feature model the ST_IsValid. (even if other postgis functions are simple-feature only) Another think to understand is that the OCG-simple-feature model actually is only 2D and don't know the 3D dimension. So is quite difficult limit the ST_IsValid only to the simple-fature model. -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From strk at keybit.net Tue Mar 30 23:18:29 2010 From: strk at keybit.net (strk) Date: Wed, 31 Mar 2010 08:18:29 +0200 Subject: [postgis-users] Polygon validity In-Reply-To: <2c9bd88a1003300938m21ef3104s8e30788f223829ce@mail.gmail.com> References: <2c9bd88a1003300938m21ef3104s8e30788f223829ce@mail.gmail.com> Message-ID: <20100331061829.GA91781@keybit.net> On Tue, Mar 30, 2010 at 08:38:55PM +0400, Rykov Denis wrote: > There is following polygon: > POLYGON((317371.62563763 5731575.49932608, > 317028.110300846 5731043.43103426, > 317028.110300846 5731043.43103426, > 316389.822682815 5731138.79331604, > 316478.209591618 5731705.00321977, > 316478.209591619 5731705.00321977, > 317350.223258488 5731584.46661525, > 317371.62563763 5731575.49932608)) > > with two duplicate nodes. When I try to check it with ST_IsValidReason > function I get message > that it is Valid Geometry. Is this OGC compliant? When I try to check > it with QGIS, ArcView or > ArcGIS - I get notice about self intersection. Please explain this situation. My guess is that when transferring the data from postgis to QGIS, ArcView or ArcGis you're loosing precision (using WKT ?) thus introducing self intersections. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From rykovd at gmail.com Tue Mar 30 23:38:37 2010 From: rykovd at gmail.com (Rykov Denis) Date: Wed, 31 Mar 2010 10:38:37 +0400 Subject: [postgis-users] Polygon validity In-Reply-To: References: Message-ID: Thanks a lot for taking you time to explain. So if Postgis actually not limit only to the simple-feature model the ST_IsValid, what kinds of geometries are InValid in PostGIS terms? So does this make my example non-compliant with OGC SFA? I'm not topology expert and asking for the practical reasons, the software that claims to be OGC-compliant cannot import such data correctly. If such structures are indeed not covered by OGC SFA then I cannot do anything, if they are allowed, than this is a software issue and it is in fact not compliant. 2010/3/31 Andrea Peri : >>with two duplicate nodes. When I try to check it with ST_IsValidReason >>function I get message >>that it is Valid Geometry. Is this OGC compliant? When I try to check >>it with QGIS, ArcView or > >>ArcGIS - I get notice about self intersection. Please explain this >> situation. > > Hi, > > give my explain... > > The selfintersect is an invalidity for OGC because OGC use the > simple-feature model. > > Postgis actually not limit only to the simple-feature model the ST_IsValid. > (even if other postgis functions are simple-feature only) > > Another think to understand is that the OCG-simple-feature model actually is > only 2D and don't know the 3D dimension. > > So is quite difficult limit the ST_IsValid only to the simple-fature model. > > -- > ----------------- > Andrea Peri > . . . . . . . . . > qwerty ????? > ----------------- > > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > From aperi2007 at gmail.com Tue Mar 30 23:46:16 2010 From: aperi2007 at gmail.com (Andrea Peri) Date: Wed, 31 Mar 2010 08:46:16 +0200 Subject: [postgis-users] Polygon validity Message-ID: >Thanks a lot for taking you time to explain. > >So if Postgis actually not limit only to the simple-feature model the >ST_IsValid, >what kinds of geometries are InValid in PostGIS terms? > >So does this make my example non-compliant with OGC SFA? I'm not >topology expert and asking for the practical reasons, the software >that claims to be OGC-compliant cannot import such data correctly. If >such structures are indeed not covered by OGC SFA then I cannot do >anything, if they are allowed, than this is a software issue and it is >in fact not compliant. You can use the ST_IsSimple to know if a geometry is simple-feature. If true it is simple-feature. After, if you geometry is ST_IsSimpe = true, you can test with ST_IsValid , to detect eventually invalidity for geometry. So you can detect if it is a simple-feature valid geometry. Andrea. -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.cave-ayland at siriusit.co.uk Wed Mar 31 01:40:09 2010 From: mark.cave-ayland at siriusit.co.uk (Mark Cave-Ayland) Date: Wed, 31 Mar 2010 09:40:09 +0100 Subject: [postgis-users] Nested loop join = very bad performance In-Reply-To: <201003292253.42224.mgleahy@alumni.uwaterloo.ca> References: <201003281157.01365.mgleahy@alumni.uwaterloo.ca> <4BB094CE.7020001@siriusit.co.uk> <201003291735.29274.mgleahy@alumni.uwaterloo.ca> <201003292253.42224.mgleahy@alumni.uwaterloo.ca> Message-ID: <4BB30A69.70009@siriusit.co.uk> Mike Leahy wrote: > Mark/List, > > I just replaced my postgresql.conf with the default copy that appears in > /etc/postgresql/8.4/main/ after a fresh install. The performance is pretty > much the same as before (maybe even about 400 ms worse than before). > > Is there anything else I should try? > > Mike Hi Mike, Which parameters did you change? effective_cache_size and shared_buffers should be tweaked to suit the RAM available in your machine but the rest of the defaults are fairly sensible. You probably want to set effective_cache_size to ~75% of your physical RAM and shared_buffers to ~25%. Does that make any difference at all? Otherwise, you'll need to start breaking down your query into parts to see which bit is causing the slowdown. Start with the innermost query and then add one join at a time until you find the part which is causing the slowdown. ATB, Mark. -- Mark Cave-Ayland - Senior Technical Architect PostgreSQL - PostGIS Sirius Corporation plc - control through freedom http://www.siriusit.co.uk t: +44 870 608 0063 Sirius Labs: http://www.siriusit.co.uk/labs From mbdavis at refractions.net Wed Mar 31 09:17:02 2010 From: mbdavis at refractions.net (Martin Davis) Date: Wed, 31 Mar 2010 09:17:02 -0700 Subject: [postgis-users] Polygon validity In-Reply-To: <2c9bd88a1003300938m21ef3104s8e30788f223829ce@mail.gmail.com> References: <2c9bd88a1003300938m21ef3104s8e30788f223829ce@mail.gmail.com> Message-ID: <4BB3757E.7060909@refractions.net> This polygon is valid according to the OGC SFS, and thus validates correctly in PostGIS (also GEOS/JTS). You'd have to look at the validation semantics of the other systems to determine why they don't validate it. The OGC SFS model is fairly tolerant in terms of trivial structural aspects - for instance, it allows duplicate points. I believe this is done in order to allow as a wide a range of geometries as possible to be represented, consistent with topological integrity. Some other systems are less tolerant. So I think strk is probably right - perhaps they don't allow duplicate points, or perhaps they are reducing the precision and thus causing a self-intersection (although I tried this in JTS, and reducing precision doesn't actually cause self-intersections) Martin Rykov Denis wrote: > There is following polygon: > POLYGON((317371.62563763 5731575.49932608, > 317028.110300846 5731043.43103426, > 317028.110300846 5731043.43103426, > 316389.822682815 5731138.79331604, > 316478.209591618 5731705.00321977, > 316478.209591619 5731705.00321977, > 317350.223258488 5731584.46661525, > 317371.62563763 5731575.49932608)) > > with two duplicate nodes. When I try to check it with ST_IsValidReason > function I get message > that it is Valid Geometry. Is this OGC compliant? When I try to check > it with QGIS, ArcView or > ArcGIS - I get notice about self intersection. Please explain this situation. > _______________________________________________ > 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 kneufeld at refractions.net Wed Mar 31 09:26:53 2010 From: kneufeld at refractions.net (Kevin Neufeld) Date: Wed, 31 Mar 2010 09:26:53 -0700 Subject: [postgis-users] Polygon validity In-Reply-To: References: Message-ID: <4BB377CD.7030803@refractions.net> On 3/30/2010 11:46 PM, Andrea Peri wrote: > You can use the ST_IsSimple to know if a geometry is simple-feature. > > If true it is simple-feature. > > After, if you geometry is ST_IsSimpe = true, > you can test with ST_IsValid , to detect eventually invalidity for geometry. > > So you can detect if it is a simple-feature valid geometry. > This is often something that is easily misunderstood. So, to be clear, according to the OGC specs, simplicity really *only* applies to point and linear features ([multi]point, [multi]linestrings). Validity on the other hand *only* applies to areal features ([multi]polygons). I put together some thoughts [1] a while back on this. The OGC specs aren't totally clear regarding duplicate points in linestrings, just that "has no anomalous geometric points, such as self intersection or self tangency" and "is simple if it does not pass through the same point twice". The developers at the time decided that this does not include duplicate points. I suppose one could argue either way, but to me this really does include duplicate points. PostGIS also somewhat subscribes to the SQL/MM specifications. In there I read "is not simple if any interior point has the same location as another interior point or a point on the boundary". To me, this is more clear and, Rykov, I think you're right, ST_IsSimple really should not allow duplicate points. I'll put in a ticket. So, simplicity is for lines and points. A *polygon* is *valid* iff all the underlying linear features are *simple* (like no figure 8's in the boundary) and also follows several other rules (like the inner rings being contained within the exterior ring, etc). Rykov, this is why your polygon passes validity - currently PostGIS does not include duplicate points in linestrings (the boundary of your polygon) as non-simple. Cheers, Kevin [1] http://postgis.refractions.net/docs/ch04.html#OGC_Validity From mbdavis at refractions.net Wed Mar 31 09:57:43 2010 From: mbdavis at refractions.net (Martin Davis) Date: Wed, 31 Mar 2010 09:57:43 -0700 Subject: [postgis-users] Polygon validity In-Reply-To: <4BB377CD.7030803@refractions.net> References: <4BB377CD.7030803@refractions.net> Message-ID: <4BB37F07.5050107@refractions.net> So you're saying that any geometry which contains consecutive duplicate points is invalid? This is a pretty major change to validity semantics. (As a side note, I wouldn't say that validity doesn't apply to linear features - just that there are few constraints on what constitutes a valid linear feature.) Another thing to consider - if you change the semantics of isSimple to report false for linestrings containing duplicate points, then you have no way of telling the difference between linestrings which contain true, topological self-intersections and ones which just happen to contain a topologically irrelevant duplicate point. So there should probably be a function which detects *just* duplicate points, to allow users to differentiate these two cases. And in that case, why not just leave the semantics of isSimple the way it is, and users can use either or both functions as needed? Kevin Neufeld wrote: > On 3/30/2010 11:46 PM, Andrea Peri wrote: >> You can use the ST_IsSimple to know if a geometry is simple-feature. >> >> If true it is simple-feature. >> >> After, if you geometry is ST_IsSimpe = true, >> you can test with ST_IsValid , to detect eventually invalidity for >> geometry. >> >> So you can detect if it is a simple-feature valid geometry. >> > > This is often something that is easily misunderstood. So, to be > clear, according to the OGC specs, simplicity really *only* applies to > point and linear features ([multi]point, [multi]linestrings). > Validity on the other hand *only* applies to areal features > ([multi]polygons). I put together some thoughts [1] a while back on > this. > > The OGC specs aren't totally clear regarding duplicate points in > linestrings, just that "has no anomalous geometric points, such as > self intersection or self tangency" and "is simple if it does not pass > through the same point twice". The developers at the time decided that > this does not include duplicate points. I suppose one could argue > either way, but to me this really does include duplicate points. > > PostGIS also somewhat subscribes to the SQL/MM specifications. In > there I read "is not simple if any interior point has the same > location as another interior point or a point on the boundary". To > me, this is more clear and, Rykov, I think you're right, ST_IsSimple > really should not allow duplicate points. I'll put in a ticket. > > So, simplicity is for lines and points. > A *polygon* is *valid* iff all the underlying linear features are > *simple* (like no figure 8's in the boundary) and also follows several > other rules (like the inner rings being contained within the exterior > ring, etc). > > Rykov, this is why your polygon passes validity - currently PostGIS > does not include duplicate points in linestrings (the boundary of your > polygon) as non-simple. > > Cheers, > Kevin > > [1] http://postgis.refractions.net/docs/ch04.html#OGC_Validity > _______________________________________________ > 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 mgleahy at alumni.uwaterloo.ca Wed Mar 31 10:17:03 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Wed, 31 Mar 2010 13:17:03 -0400 Subject: [postgis-users] Nested loop join = very bad performance In-Reply-To: <4BB30A69.70009@siriusit.co.uk> References: <201003281157.01365.mgleahy@alumni.uwaterloo.ca> <201003292253.42224.mgleahy@alumni.uwaterloo.ca> <4BB30A69.70009@siriusit.co.uk> Message-ID: <201003311317.03397.mgleahy@alumni.uwaterloo.ca> Hi Mark, I set effective_cache_size to 3072mb, and shared_buffers to 1024mb (as my system has a total of 4gb). This only slightly (if at all) improves the performance, maybe reducing the query by somewhere around 500 ms (down to ~14700 ms). All other parameters in the postgresql.conf are defaults. I don't recall exactly what I changed before (I was just tried increasing memory limits and other things pretty much without knowing what I was doing), but none of that really seems to have a significant impact on the performance. The challenge with trying to reduce this query is that the nested loop join only happens with the query as a whole (in general). The briefest example I could put together was presented in the thread last week (see the attachment here: http://postgis.org/pipermail/postgis-users/2010-March/026239.html). If I pull any more parameters or parts out of the query, the nest loop (and the resulting errors/crashes I was encountering at the time) would not happen. Regards, Mike On Wednesday 31 March 2010 04:40:09 Mark Cave-Ayland wrote: > Mike Leahy wrote: > > Mark/List, > > > > I just replaced my postgresql.conf with the default copy that appears in > > /etc/postgresql/8.4/main/ after a fresh install. The performance is > > pretty much the same as before (maybe even about 400 ms worse than > > before). > > > > Is there anything else I should try? > > > > Mike > > Hi Mike, > > Which parameters did you change? effective_cache_size and shared_buffers > should be tweaked to suit the RAM available in your machine but the rest > of the defaults are fairly sensible. > > You probably want to set effective_cache_size to ~75% of your physical > RAM and shared_buffers to ~25%. Does that make any difference at all? > > Otherwise, you'll need to start breaking down your query into parts to > see which bit is causing the slowdown. Start with the innermost query > and then add one join at a time until you find the part which is causing > the slowdown. > > > ATB, > > Mark. > From aperi2007 at gmail.com Wed Mar 31 11:25:35 2010 From: aperi2007 at gmail.com (Andrea Peri 2007) Date: Wed, 31 Mar 2010 20:25:35 +0200 Subject: [postgis-users] Polygon validity Message-ID: <4BB3939F.3090208@gmail.com> In the 6.1.5 paragraph of 06-103r3 is reported: For MultiPoints: >.. >A MultiPoint is simple if no two Points in the MultiPoint are equal (have identical coordinate values in X and Y). >Every MultiPoint is spatially equal under the definition in Clause 6.1.15.3 to a simple Multipoint. >.. For curves: >.. >A Curve is simple if it does not pass through the same Point twice with the possible exception of the two end >points (Reference [1], section 3.12.7.3): >? c ? Curve, [a, b] = c.Domain, c =: f :[a, b] ? ? n >c.IsSimple ? ? x1, x2 ? [a, b]: [ f(x1)=f(x2) ? x1.. So a curve with 2 consecutive point like this linestring (10 10, 20 20, 20 20, 30 30) is violating this definition But even this line is invalid for this definition: linestring (10 10, 20 20, 30 30, 40 40, 50 50, 30 30, 60 60) (where the repeated points are not consecutive). because the definition reporting in document: ? x1, x2 ? [a, b]: [ f(x1)=f(x2) ? x1Kevin Neufeld wrote: >This is often something that is easily misunderstood. So, to be clear, according to the OGC specs, simplicity really >*only* applies to point and linear features ([multi]point, [multi]linestrings). Validity on the other hand *only* >applies to areal features ([multi]polygons). I put together some thoughts [1] a while back on this. > >The OGC specs aren't totally clear regarding duplicate points in linestrings, just that "has no anomalous geometric >points, such as self intersection or self tangency" and "is simple if it does not pass through the same point twice". >The developers at the time decided that this does not include duplicate points. I suppose one could argue either way, >but to me this really does include duplicate points. > >PostGIS also somewhat subscribes to the SQL/MM specifications. In there I read "is not simple if any interior point has >the same location as another interior point or a point on the boundary". To me, this is more clear and, Rykov, I think >you're right, ST_IsSimple really should not allow duplicate points. I'll put in a ticket. > >So, simplicity is for lines and points. >A *polygon* is *valid* iff all the underlying linear features are *simple* (like no figure 8's in the boundary) and also >follows several other rules (like the inner rings being contained within the exterior ring, etc). From aperi2007 at gmail.com Wed Mar 31 11:38:16 2010 From: aperi2007 at gmail.com (Andrea Peri 2007) Date: Wed, 31 Mar 2010 20:38:16 +0200 Subject: [postgis-users] Polygon validity Message-ID: <4BB39698.8010202@gmail.com> I think it would be invalid only in the domain of simple-features. Not in general. So I think is right think that for a geometric linestring selfintersect, or having some consecutive or not consecutive (but always internal) point repeated is invalid for a simple-feature world, but it can be valid for the more huge world of "not simple-feature" geometries. >Another thing to consider - if you change the semantics of isSimple to >report false for linestrings containing duplicate points, then you have >no way of telling the difference between linestrings which contain true, >topological self-intersections and ones which just happen to contain a >topologically irrelevant duplicate point. Why it is irrilevant ? In a topological world 2 polygon in touch between each other can have a line in common on their boundaries of-course. Identically two lines can have a point in common beetween they (on their boundary of course), phisically that point can be is the start point or the end point of the line, but if the start point or the end point are 2 or more point because there are repeated points I think is a problem even topologically. Andrea. From mbdavis at refractions.net Wed Mar 31 12:09:18 2010 From: mbdavis at refractions.net (Martin Davis) Date: Wed, 31 Mar 2010 12:09:18 -0700 Subject: [postgis-users] Polygon validity In-Reply-To: <4BB3939F.3090208@gmail.com> References: <4BB3939F.3090208@gmail.com> Message-ID: <4BB39DDE.7000607@refractions.net> Andrea Peri 2007 wrote: > In the 6.1.5 paragraph of 06-103r3 is reported: > > For MultiPoints: > >> .. >> A MultiPoint is simple if no two Points in the MultiPoint are equal >> (have identical coordinate values in X and Y). >> Every MultiPoint is spatially equal under the definition in Clause >> 6.1.15.3 to a simple Multipoint. >> .. > Yes, this is clear. MultiPoints with duplicate Point values are non-simple. > > For curves: > >> .. >> A Curve is simple if it does not pass through the same Point twice >> with the possible exception of the two end >> points (Reference [1], section 3.12.7.3): >> ? c ? Curve, [a, b] = c.Domain, c =: f :[a, b] ? ? n >> c.IsSimple ? ? x1, x2 ? [a, b]: [ f(x1)=f(x2) ? x1> .. > > So a curve with 2 consecutive point like this > linestring (10 10, 20 20, 20 20, 30 30) is violating this definition I disagree. In the formal definition of Curve above, note the condition that x1 < x2. In any continuous parameterization f of LINESTRING(10 10, 20 20, 20 20, 30 30), if f(x1) = pt[1] (20 20) and f(x2 = pt[2] (20 20), then x1 must = x2. This is why I say that repeated points are topologically irrelevant - they are topologically indistinguishable under any continuous parameterization function. > > But even this line is invalid for this definition: > > linestring (10 10, 20 20, 30 30, 40 40, 50 50, 30 30, 60 60) > (where the repeated points are not consecutive). > > because the definition reporting in document: > ? x1, x2 ? [a, b]: [ f(x1)=f(x2) ? x1 References: <4BB39698.8010202@gmail.com> Message-ID: <4BB39EB8.9010902@refractions.net> Andrea Peri 2007 wrote: > I think it would be invalid only in the domain of simple-features. > > Not in general. > > So I think is right think that for a geometric linestring > selfintersect, or having some consecutive or not consecutive (but > always internal) point repeated is invalid for a simple-feature world, > but it can be valid for the more huge world of "not simple-feature" > geometries. > >> Another thing to consider - if you change the semantics of isSimple >> to report false for linestrings containing duplicate points, then you >> have no way of telling the difference between linestrings which >> contain true, topological self-intersections and ones which just >> happen to contain a topologically irrelevant duplicate point. > > Why it is irrilevant ? > See my previous post. "This is why I say that repeated points are topologically irrelevant - they are topologically indistinguishable under any continuous parameterization function." I think there's some confusion here between the textual and in-memory representation of a LineString, and its topological, point-set meaning. In the textual representation repeated points can occur, but in the topological representation repeated points have no meaning. -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 From lr at pcorp.us Wed Mar 31 12:51:14 2010 From: lr at pcorp.us (Paragon Corporation) Date: Wed, 31 Mar 2010 15:51:14 -0400 Subject: [postgis-users] Nested loop join = very bad performance In-Reply-To: <201003311317.03397.mgleahy@alumni.uwaterloo.ca> References: <201003281157.01365.mgleahy@alumni.uwaterloo.ca><201003292253.42224.mgleahy@alumni.uwaterloo.ca><4BB30A69.70009@siriusit.co.uk> <201003311317.03397.mgleahy@alumni.uwaterloo.ca> Message-ID: Mike, Couple of thoughts. Given you have so many joins, could be you are reaching the join collapse limit and the planner is kicking out before making an optimal plan. Try increasing the join_collapse_limit and from_collapse_limit As was detailed in this thread http://archives.postgresql.org/pgsql-performance/2009-04/msg00258.php Alternatively could be your actual and estimated costs are out of wack and might help upping your default targets and reanalyzing data. You can probably get a sense of this by doing a an explain analyze of your query and comparing the actual cost/row count with the estimated cost/row count where its doing a nested loop. Admittedly this hasn't helped much for us. http://archives.postgresql.org/pgsql-performance/2009-02/msg00336.php Leo and Regina, http:///www.postgis.us -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Mike Leahy Sent: Wednesday, March 31, 2010 1:17 PM To: Mark Cave-Ayland Cc: PostGIS Users Discussion Subject: Re: [postgis-users] Nested loop join = very bad performance Hi Mark, I set effective_cache_size to 3072mb, and shared_buffers to 1024mb (as my system has a total of 4gb). This only slightly (if at all) improves the performance, maybe reducing the query by somewhere around 500 ms (down to ~14700 ms). All other parameters in the postgresql.conf are defaults. I don't recall exactly what I changed before (I was just tried increasing memory limits and other things pretty much without knowing what I was doing), but none of that really seems to have a significant impact on the performance. The challenge with trying to reduce this query is that the nested loop join only happens with the query as a whole (in general). The briefest example I could put together was presented in the thread last week (see the attachment here: http://postgis.org/pipermail/postgis-users/2010-March/026239.html). If I pull any more parameters or parts out of the query, the nest loop (and the resulting errors/crashes I was encountering at the time) would not happen. Regards, Mike On Wednesday 31 March 2010 04:40:09 Mark Cave-Ayland wrote: > Mike Leahy wrote: > > Mark/List, > > > > I just replaced my postgresql.conf with the default copy that > > appears in /etc/postgresql/8.4/main/ after a fresh install. The > > performance is pretty much the same as before (maybe even about 400 > > ms worse than before). > > > > Is there anything else I should try? > > > > Mike > > Hi Mike, > > Which parameters did you change? effective_cache_size and > shared_buffers should be tweaked to suit the RAM available in your > machine but the rest of the defaults are fairly sensible. > > You probably want to set effective_cache_size to ~75% of your physical > RAM and shared_buffers to ~25%. Does that make any difference at all? > > Otherwise, you'll need to start breaking down your query into parts to > see which bit is causing the slowdown. Start with the innermost query > and then add one join at a time until you find the part which is > causing the slowdown. > > > ATB, > > Mark. > _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From mgleahy at alumni.uwaterloo.ca Wed Mar 31 13:13:35 2010 From: mgleahy at alumni.uwaterloo.ca (Mike Leahy) Date: Wed, 31 Mar 2010 16:13:35 -0400 Subject: [postgis-users] Nested loop join = very bad performance In-Reply-To: References: <201003281157.01365.mgleahy@alumni.uwaterloo.ca> <201003311317.03397.mgleahy@alumni.uwaterloo.ca> Message-ID: <201003311613.35254.mgleahy@alumni.uwaterloo.ca> Hi, Thanks again for the suggestions. The default values for join_collapse_limit and from_collapse_limit were set to 8 - I upped these both to 128, with no observable difference. I guess this issue is better suited for the general PostgreSQL mailing lists... Regards, Mike On Wednesday 31 March 2010 15:51:14 Paragon Corporation wrote: > Mike, > > Couple of thoughts. Given you have so many joins, could be you are > reaching the join collapse limit and the planner is kicking out before > making an optimal plan. > > Try increasing the join_collapse_limit and from_collapse_limit > > As was detailed in this thread > > http://archives.postgresql.org/pgsql-performance/2009-04/msg00258.php > > > > Alternatively could be your actual and estimated costs are out of wack and > might help upping your default targets and reanalyzing data. You can > probably get a sense of this by doing a an explain analyze of your query > and comparing the actual cost/row count with the estimated cost/row count > where its doing a nested loop. > > Admittedly this hasn't helped much for us. > > http://archives.postgresql.org/pgsql-performance/2009-02/msg00336.php > > Leo and Regina, > > http:///www.postgis.us > > > > > -----Original Message----- > From: postgis-users-bounces at postgis.refractions.net > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Mike > Leahy > Sent: Wednesday, March 31, 2010 1:17 PM > To: Mark Cave-Ayland > Cc: PostGIS Users Discussion > Subject: Re: [postgis-users] Nested loop join = very bad performance > > Hi Mark, > > I set effective_cache_size to 3072mb, and shared_buffers to 1024mb (as my > system has a total of 4gb). This only slightly (if at all) improves the > performance, maybe reducing the query by somewhere around 500 ms (down to > ~14700 ms). All other parameters in the postgresql.conf are defaults. I > don't recall exactly what I changed before (I was just tried increasing > memory limits and other things pretty much without knowing what I was > doing), but none of that really seems to have a significant impact on the > performance. > > The challenge with trying to reduce this query is that the nested loop join > only happens with the query as a whole (in general). The briefest example > I could put together was presented in the thread last week (see the > attachment here: > http://postgis.org/pipermail/postgis-users/2010-March/026239.html). If I > pull any more parameters or parts out of the query, the nest loop (and the > resulting errors/crashes I was encountering at the time) would not happen. > > Regards, > Mike > > On Wednesday 31 March 2010 04:40:09 Mark Cave-Ayland wrote: > > Mike Leahy wrote: > > > Mark/List, > > > > > > I just replaced my postgresql.conf with the default copy that > > > appears in /etc/postgresql/8.4/main/ after a fresh install. The > > > performance is pretty much the same as before (maybe even about 400 > > > ms worse than before). > > > > > > Is there anything else I should try? > > > > > > Mike > > > > Hi Mike, > > > > Which parameters did you change? effective_cache_size and > > shared_buffers should be tweaked to suit the RAM available in your > > machine but the rest of the defaults are fairly sensible. > > > > You probably want to set effective_cache_size to ~75% of your physical > > RAM and shared_buffers to ~25%. Does that make any difference at all? > > > > Otherwise, you'll need to start breaking down your query into parts to > > see which bit is causing the slowdown. Start with the innermost query > > and then add one join at a time until you find the part which is > > causing the slowdown. > > > > > > ATB, > > > > Mark. > > _______________________________________________ > postgis-users mailing list > postgis-users at postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > From Li.Chen at andrew.com Wed Mar 31 21:28:47 2010 From: Li.Chen at andrew.com (Chen, Li [Contractor]) Date: Thu, 1 Apr 2010 12:28:47 +0800 Subject: [postgis-users] ST_Buffer questions Message-ID: <8FAF8DBABDE6D643926E35A54B67D02033D207647E@SISPE7MB2.commscope.com> Hi Everyone, I am a newbie to this community and I would like to ask a question/s :). Q1. ST_Buffer(g1, range) is able to return a geometry within the range of g1. So, I define two point using lon/lat (SRID=4326) and range 10km. I want to see whether they cross each other by using ST_Crosses(g1, g2). However, I don't know the unit of the range parameter in ST_Buffer(g1,range) as it is not provide in the docs. So is it km or meters? Q2. I want to define many circle sectors around the earth. And I have a column to set the location of the centre and another column to set the shape of the sector (direction, diameter). Is there a function to return a geometry that represents both the location and shape of the sector? ST_Buffer only returns a full circle. Thanks for the help, Li -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at remoteinformation.com.au Wed Mar 31 22:41:36 2010 From: lists at remoteinformation.com.au (Ben Madin) Date: Thu, 1 Apr 2010 13:41:36 +0800 Subject: [postgis-users] ST_Buffer questions In-Reply-To: <8FAF8DBABDE6D643926E35A54B67D02033D207647E@SISPE7MB2.commscope.com> References: <8FAF8DBABDE6D643926E35A54B67D02033D207647E@SISPE7MB2.commscope.com> Message-ID: <83221FC3-EC90-4F14-A049-2EE58519A26A@remoteinformation.com.au> G'day Li, I can't help with Q2, but On 01/04/2010, at 12:28 , Chen, Li [Contractor] wrote: > Q1. > ST_Buffer(g1, range) is able to return a geometry within the range of g1. > > So, I define two point using lon/lat (SRID=4326) and range 10km. I want to see whether they cross each other by using ST_Crosses(g1, g2). > However, I don?t know the unit of the range parameter in ST_Buffer(g1,range) as it is not provide in the docs. So is it km or meters? The same unit as your Geometry - decimal degrees. Obviously due to the change in the value of this unit at differing latitudes, this is not useful, so a more sensible approach is either to transform your point into a projection using metres, and then use metres (off the top of my head it would look like : select st_buffer(st_transform(g1, appropriate_projection_epsg),10000); but you should check the docs) or use the geography type from postgis 1.5? but I haven't tried it yet? cheers Ben From Li.Chen at andrew.com Wed Mar 31 22:47:50 2010 From: Li.Chen at andrew.com (Chen, Li [Contractor]) Date: Thu, 1 Apr 2010 13:47:50 +0800 Subject: [postgis-users] ST_Buffer questions In-Reply-To: <83221FC3-EC90-4F14-A049-2EE58519A26A@remoteinformation.com.au> References: <8FAF8DBABDE6D643926E35A54B67D02033D207647E@SISPE7MB2.commscope.com> <83221FC3-EC90-4F14-A049-2EE58519A26A@remoteinformation.com.au> Message-ID: <8FAF8DBABDE6D643926E35A54B67D02033D2076490@SISPE7MB2.commscope.com> Thanks Ben, I will try what you suggested. We only need to represent mobile cell tower, so geography might be too much for the application. Especially consider there are much more functions for geometry than geography. Happy Easter:) -----Original Message----- From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Ben Madin Sent: Thursday, 1 April 2010 4:42 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] ST_Buffer questions G'day Li, I can't help with Q2, but On 01/04/2010, at 12:28 , Chen, Li [Contractor] wrote: > Q1. > ST_Buffer(g1, range) is able to return a geometry within the range of g1. > > So, I define two point using lon/lat (SRID=4326) and range 10km. I want to see whether they cross each other by using ST_Crosses(g1, g2). > However, I don't know the unit of the range parameter in ST_Buffer(g1,range) as it is not provide in the docs. So is it km or meters? The same unit as your Geometry - decimal degrees. Obviously due to the change in the value of this unit at differing latitudes, this is not useful, so a more sensible approach is either to transform your point into a projection using metres, and then use metres (off the top of my head it would look like : select st_buffer(st_transform(g1, appropriate_projection_epsg),10000); but you should check the docs) or use the geography type from postgis 1.5? but I haven't tried it yet? cheers Ben _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From aperi2007 at gmail.com Wed Mar 31 23:28:30 2010 From: aperi2007 at gmail.com (Andrea Peri) Date: Thu, 1 Apr 2010 08:28:30 +0200 Subject: [postgis-users] Polygon validity Message-ID: first of all: sorry for my poor english ..:( >>* So a curve with 2 consecutive point like this *>>* linestring (10 10, 20 20, 20 20, 30 30) is violating this definition *>I disagree. In the formal definition of Curve above, note the condition >that x1 < x2. In any continuous parameterization f of LINESTRING(10 10, >20 20, 20 20, 30 30), if f(x1) = pt[1] (20 20) and f(x2 = pt[2] (20 20), >then x1 must = x2. Oh no. x1 and x2 report simply a sequence (or a serial of point), for example 1 , 2 , 3 is a sequence of points. but even 1 , 1, 1 is a sequence. (where x1 = 1, x2 = 1 and x3 = 1) So x1 is always differente from x2. x1 < x2 is needed for saying that it is a sequence, or that matemathically there is a sequence of point where the first point come in before of the second point, and the second point com after the first point. the 1 and 2 prefix is a positional index in the sequence. so: is cannot be true that if f(x1) = f(x2) then x1 = x2. Andrea. -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: