Re: [postgis-users] Feautures omitted from ST_Buffer operation

2009-03-25 Thread Roger André
Ok, here is a way to do it, but it seems a bit ridiculous to have to do a 2-part operation like this: SELECT c.name, geomunion(the_geom) FROM (SELECT name, ST_Buffer((ST_Dump(the_geom)).geom, .12) AS the_geom FROM coastlines) c WHERE c.name LIKE 'Papua%' GROUP BY c.name; -- On Wed, Mar 25, 20

Re: [postgis-users] Feautures omitted from ST_Buffer operation

2009-03-25 Thread Roger André
Hi Chris, I don't think it's a linestring. I checked the sql load file I made, and the table is defined in it as a MULTIPOLYGON: SELECT AddGeometryColumn('','coastlines','the_geom','-1','MULTIPOLYGON',2); Not really sure how else to test though. -- On Wed, Mar 25, 2009 at 8:46 PM, Chris Herma

Re: [postgis-users] Re: Feautures omitted from ST_Buffer operation

2009-03-25 Thread Chris Hermansen
Will st_boundary() help? Perhaps in conjunction with st_buildarea() and / or st_polygonize()? You may Roger André wrote: > So I have a partial solution, but it creates another problem for me. > I'm able to properly buffer all of the features in Papua New Guinea by > doing an ST_Dump and blowing

[postgis-users] Re: Feautures omitted from ST_Buffer operation

2009-03-25 Thread Roger André
So I have a partial solution, but it creates another problem for me. I'm able to properly buffer all of the features in Papua New Guinea by doing an ST_Dump and blowing apart the multipolygon, then buffering the individual polygons: SELECT name, ST_Buffer((ST_Dump(the_geom)).geom, .12) AS the_geo

RE: [postgis-users] ST_Disjoint function

2009-03-25 Thread Paragon Corporation
I think it's a little easier than that. Use COUNT(DISTINCT somekey) to count an record only once even when it is multiplied by the joining process. SELECT a.district, count(DISTINCT b.gid) As num_disjoint FROM planfile AS a INNER JON planfile AS b ON (a.district = b.district) WHERE ST_Disjoin

Re: [postgis-users] Feautures omitted from ST_Buffer operation

2009-03-25 Thread Chris Hermansen
This sounds to me like you might be buffering a linestring and not a polygon. Is that possible? Ie are the countries represented as outlines (linestrings) rather than polygons? Roger André wrote: > Hi All, > > I'm having some problems with features that are being returned from an > ST_Buffer ope

[postgis-users] Feautures omitted from ST_Buffer operation

2009-03-25 Thread Roger André
Hi All, I'm having some problems with features that are being returned from an ST_Buffer operation in PostGIS. When I try to buffer the extents of Papua New Guinea, a large region in the middle of its extents is omitted. You can see a visual representation of this at http://lagerratrobe.blogspot

Re: [postgis-users] ST_Disjoint function

2009-03-25 Thread Mark Leslie
Lee Meilleur wrote: Hello, I'm running a contiguity check using the ST_Disjoint function. The results list the number of distinct polygons for a redistricting plan, some disjoint and some touching on a corner. I need to distinguish between the two and also show the total of all. To test

[postgis-users] ST_Disjoint function

2009-03-25 Thread Lee Meilleur
Hello, I'm running a contiguity check using the ST_Disjoint function. The results list the number of distinct polygons for a redistricting plan, some disjoint and some touching on a corner. I need to distinguish between the two and also show the total of all. To test this, I created a datase

RE: [postgis-users] postgis on postgresql 8.2 vs 8.3

2009-03-25 Thread Paragon Corporation
Steve, Well according to this its already 1 month behind, but I think you can expect it within the next 2-3 months since it is almost in beta release now. http://wiki.postgresql.org/wiki/PostgreSQL_8.4_Development_Plan Bruce's note http://momjian.us/main/blogs/pgblog.html#March_16_2009 Leo ---

RE: [postgis-users] ogr connection problems

2009-03-25 Thread Paragon Corporation
I think you need to use " instead of ' Leo -Original Message- From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Travis Kirstine Sent: Wednesday, March 25, 2009 9:58 AM To: PostGIS Users Discussion Subject: [postgis-use

Re: [postgis-users] PostgreSQLdoesn't see my PostGIS plug-in

2009-03-25 Thread Paul Ramsey
Mark, Since everything you've described and should work, yes, in some matter you're doing something wrong. But you haven't given enough details for anyone to say exactly what. What commands are you running, start to finish? What are the errors that you see? P On Wed, Mar 25, 2009 at 3:30 AM, Mar

Re: [postgis-users] postgis on postgresql 8.2 vs 8.3

2009-03-25 Thread Stephen Woodbridge
Mark, Regina, Thank you for your feedback. I was struggling to get the postgresql-8.2 Debian source package to build, finally got it in the wee hours of the morning. So that gives me the option of staying on 8.2 that I was afraid I might not have. Since this is a new system and only has a tr

[postgis-users] ogr connection problems

2009-03-25 Thread Travis Kirstine
I am trying to test a connection to a postgis db using ogrinfo and am having difficulties. I am running the command on the same server that hosts the postgis db. I checked the pg_hba.config file to see if it allows local connections and everything looks OK but I still get "Failure" when connecti

Re: [postgis-users] reparing invalid geometry (polygon defined byoneor two points)

2009-03-25 Thread Ivan Mincik
Yes, we use on that server very old PostGIS. "POSTGIS="1.1.6" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.6.0, 21 Dec 2007" USE_STATS" The most important reason to repair these geometries is that we want to upgrade to PostgreSQL 8.3 and current PostGIS. According to my tests, it is impossible to dum

RE: [postgis-users] reparing invalid geometry (polygon defined byoneor two points)

2009-03-25 Thread Obe, Regina
Ivan, Which version of PostGIS are you running? Do a: SELECT postgis_full_version(); to have it return. When I run your below query, it returns a polygon that looks like this POLYGON((-266469.87 -1233431.41,-266423.25 -1233425.84,-266423.23 -1233426.17,-266422.74 -1233434.54,-266422.75 -123

RE: [postgis-users] postgis on postgresql 8.2 vs 8.3

2009-03-25 Thread Obe, Regina
Steve, Just to add my 2 cents. I've been running 8.3 on 2 production systems for about 6-8 months now. Aside from the index issue Mark already mentioned, and also a bbox issue (with cached bboxes not always being recalculated -- hmm I think this is fixed in 8.3.6 -- though I'll need to verify)

Re: [postgis-users] Geometry validity details

2009-03-25 Thread strk
On Wed, Mar 25, 2009 at 11:27:11AM +0100, Markus Schneider wrote: > if a geometry is invalid, i.e. isvalid(geometry) equals false, is there a way > to retrieve details about the errors that > have been found? Somebody recently added an isValidReason(geometry) IIRC. --strk; Free GIS & Flash co

[postgis-users] PostgreSQLdoesn't see my PostGIS plug-in

2009-03-25 Thread Mark Fenbers
Hello, I've configured/compiled/installed PostGIS with GEOS, Proj, and pgsql. But how do I get PostgreSQL to know the plug-in now exists? I've run the SQL that creates the geometry_columns and all the geometry functions, but yet whenever I run a query that involves a library function from l

[postgis-users] Geometry validity details

2009-03-25 Thread Markus Schneider
Dear list, if a geometry is invalid, i.e. isvalid(geometry) equals false, is there a way to retrieve details about the errors that have been found? For example, a polygon may intersect itself and contain rings that are not closed. Most convenient would be a report that lists all topological inc

Re: [postgis-users] postgis on postgresql 8.2 vs 8.3

2009-03-25 Thread Mark Cave-Ayland
Stephen Woodbridge wrote: Hi all, I have been holding back on upgrading my postgis installations from postgresql 8.2 to 8.3 because: 1) it seemed like there was a lot of new postgresql stuff to figure out in 8.3. What are the big changes I need to be aware of? 2) it seemed like there were

Re: [postgis-users] reparing invalid geometry (polygon defined byoneor two points)

2009-03-25 Thread Ivan Mincik
Thanks for Simon's blog, I have found very interesting things there. I hope I understand what's going on in that function, but I always get empty geometry result. As test I tried following: SELECT AsText(BuildArea(Collect(b.final_geom))) as filtered_geom FROM (SELECT MakePolygon((/* Get outer r