[postgis-users] Problems using buffer() and operador &&

Gustavo Oliveira gustavo.oliveira at 3WT.com.br
Thu Oct 28 07:38:18 PDT 2004


I have a problem when trying to use && operator with buffer().

I tried something like this:

ae=# SELECT arco
ae-# FROM vw_arcos
ae-# WHERE BUFFER (GeometryFromText('LINESTRING(200509.7414
7564876.6272,201884.7341 7563144.9198)', -1), CAST (1000.01 as double
precision)) && caminho;
ERROR:  operator does not exist: geometry && lseg
HINT:  No operator matches the given name and argument type(s). You may need
to add explicit type casts.

and like this one:

ae=# SELECT arco
ae-# FROM vw_arcos
ae-# WHERE BUFFER (GeometryFromText('LINESTRING(200509.7414
7564876.6272,201884.7341 7563144.9198)', -1), CAST (1000.01 as double
precision)) && caminho::geometry;
ERROR:  cannot cast type lseg to geometry

I tried the same statements with ~ operator but the errors are the same.

Caminho is a lseg type as you can see:

 arco | sentido |   custo   |                         caminho
------+---------+-----------+-----------------------------------------------
----------
    1 |       0 |   81.2678 |
[(201781.9537,7565503.6469),(201758.1738,7565425.9361)]
    2 |       0 |   26.8538 |
[(201758.1738,7565425.9361),(201769.1282,7565401.4182)]
    4 |       0 |   109.652 |
[(198967.4184,7561052.1535),(199047.7745,7561126.7623)]
    5 |       0 |   20.5885 |
[(199047.7745,7561126.7623),(199033.7658,7561141.8501)]
   23 |       2 |   98.9721 |
[(201014.4548,7561980.7571),(201078.5089,7561905.3081)]


Could someone help me?

[]s

---
Gustavo Borges de Oliveira
PIPE - FAPESP
3WT - Wireless Web World Tech
gustavo.oliveira at 3WT.com.br
tel: +55 16 3371-4343
fax: +55 16 3371-9847





More information about the postgis-users mailing list