dbTalk Databases Forums  

[BUGS] Bug? (geo operator @ )

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Bug? (geo operator @ ) in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Daniel Lau
 
Posts: n/a

Default [BUGS] Bug? (geo operator @ ) - 12-22-2003 , 03:11 AM






Hi all,

I was to extract the '_lines' (path) if the lines are contained or on by a
box-like polygon. The result turns wrong if the box-like polygon is
changed from a square (x_max = y_max) to a rectangle (x_max <> y_max).
Please read the example at the end.

Please also notice that although the _lines #2 is contained by both square
and rectangle, it does not appear in both table.

I am wondering if it is a bug. Perhapes I did something wrong?

regards,
Daniel Lau
Hong Kong University of Science and Technology


Example:
__________________________________________________ ___________________

test=# select * from test;
geoid | _lines
-------+---------------------------------------
0 | ((0,0),(1,1))
1 | ((1,1),(0,0))
2 | ((833749,820999),(844362,821001))
3 | ((1000000,1000000),(1000001,1000001))
4 | ((0,0),(1,1),(3,-1))
(5 rows)

test=# select * from test where polygon(pclose(_lines)) @ polygon
'(-2,-2),(850000,850000)';
geoid | _lines
-------+---------------
0 | ((0,0),(1,1))
1 | ((1,1),(0,0))
(2 rows)

test=# select * from test where polygon(pclose(_lines)) @ polygon
'(-2,-2),(840000,850000)';
geoid | _lines
-------+--------
(0 rows)



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Bug? (geo operator @ ) - 12-22-2003 , 09:37 AM






Daniel Lau <iedaniel (AT) ust (DOT) hk> writes:
Quote:
I was to extract the '_lines' (path) if the lines are contained or on by a
box-like polygon. The result turns wrong if the box-like polygon is
changed from a square (x_max = y_max) to a rectangle (x_max <> y_max).
The examples you give are not "box-like"; they are in fact just line
segments. You need four points to define a box-like polygon.

AFAICS the quoted example is correct behavior.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #3  
Old   
Daniel Lau
 
Posts: n/a

Default Re: [BUGS] Bug? (geo operator @ ) - 12-28-2003 , 10:22 PM



Thank you for answering my question.
I made a careless mistake.

regards,
Daniel

On Mon, 22 Dec 2003, Tom Lane wrote:

Quote:
Daniel Lau <iedaniel (AT) ust (DOT) hk> writes:
I was to extract the '_lines' (path) if the lines are contained or on by a
box-like polygon. The result turns wrong if the box-like polygon is
changed from a square (x_max = y_max) to a rectangle (x_max <> y_max).

The examples you give are not "box-like"; they are in fact just line
segments. You need four points to define a box-like polygon.

AFAICS the quoted example is correct behavior.

regards, tom lane


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.