[GENERAL] How to calculate length of path data without diagonals?

2010-12-23 Thread Romain Billoir
Hi, i need to calculate some length of path without diagonal. Some examples: length((5,5),(6,6))) returns 1.41. I need 2: 5,5 to 5,6 + 5,6 to 6,6. Is that possible?

[GENERAL] "IN" in a geometric database using data type "point"

2010-09-26 Thread Romain Billoir
Hi, i'm trying to request a database using data type "point" using keyword "IN" with a list of point generated by PHP, like this: 'SELECT * FROM map WHERE position IN ((point(-1,-1), (point(1,-1), point(1,1), point(-1,1))' but this request returns me an error: operator doesn't exist point = point.