Re: [postgis-users] Polygon validity

2010-03-31 Thread Andrea Peri
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 o

Re: [postgis-users] ST_Buffer questions

2010-03-31 Thread Chen, Li [Contractor]
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-boun...@post

Re: [postgis-users] ST_Buffer questions

2010-03-31 Thread Ben Madin
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 us

[postgis-users] ST_Buffer questions

2010-03-31 Thread Chen, Li [Contractor]
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,

Re: [postgis-users] Nested loop join = very bad performance

2010-03-31 Thread Mike Leahy
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 Ma

Re: [postgis-users] Nested loop join = very bad performance

2010-03-31 Thread Paragon Corporation
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/

Re: [postgis-users] Polygon validity

2010-03-31 Thread Martin Davis
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-featu

Re: [postgis-users] Polygon validity

2010-03-31 Thread Martin Davis
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 si

Re: [postgis-users] Polygon validity

2010-03-31 Thread Andrea Peri 2007
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 va

Re: [postgis-users] Polygon validity

2010-03-31 Thread Andrea Peri 2007
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

Re: [postgis-users] Nested loop join = very bad performance

2010-03-31 Thread Mike Leahy
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 def

Re: [postgis-users] Polygon validity

2010-03-31 Thread Martin Davis
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 lin

Re: [postgis-users] Polygon validity

2010-03-31 Thread Kevin Neufeld
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 si

Re: [postgis-users] Polygon validity

2010-03-31 Thread Martin Davis
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 - f

Re: [postgis-users] Nested loop join = very bad performance

2010-03-31 Thread Mark Cave-Ayland
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