[postgis-users] [RE]: Intersection of point and linestring. still bad results...
ksa
ksa-nil5 at yandex.ru
Tue Nov 30 00:08:50 PST 2004
Hi, strk.
search=# select gid, geom from t_table_46;
gid |
geom
-----+----------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------
1 |
SRID=2000;MULTILINESTRING((-346.39495192 -32.22278924,-346.39495192 -32.2227
8924,-347.01462094 37.18014143,-261.50029565 23.54742291,-271.41500003
93.5700226,-187.14001279 74.36028286,-195.1957101 155.53692498,-118.97642017
141.90420646))
2 | SRID=2000;MULTILINESTRING((-268.94877508 161.46993124,-268.94877508
161.46993124,-236.16352798 88.61382659,-238.34921112 24.5004545))
(2 rows)
search=# select setsrid(intersection(t1.geom, t2.geom), 2000) from
t_table_46 t1, t_table_46 t2 where t1.gid = 1 and t2.gid = 2;
setsrid
----------------------------------------------------
SRID=2000;POINT(-236.267686750346 85.558502660642)
(1 row)
So, I have one point that intersects with both multilinestrings.
But I still have bad results...
Pleace, help me...
search=# select
intersection('SRID=2000;MULTILINESTRING((-346.39495192 -32.22278924,-346.394
95192 -32.22278924,-347.01462094 37.18014143,-261.50029565
23.54742291,-271.41500003 93.5700226,-187.14001279 74.36028286,-195.1957101
155.53692498,-118.97642017 141.90420646))',
'SRID=2000;POINT(-236.267686750346 85.558502660642)');
intersection
-----------------------------------
SRID=-1;GEOMETRYCOLLECTION(EMPTY)
(1 row)
search=# select
intersection(transform('SRID=2000;MULTILINESTRING((-346.39495192 -32.2227892
4,-346.39495192 -32.22278924,-347.01462094 37.18014143,-261.50029565
23.54742291,-271.41500003 93.5700226,-187.14001279 74.36028286,-195.1957101
155.53692498,-118.97642017 141.90420646))', 2000),
transform('SRID=2000;POINT(-236.267686750346 85.558502660642)', 2000));
intersection
-----------------------------------
SRID=-1;GEOMETRYCOLLECTION(EMPTY)
(1 row)
And why intersection() returns geometry with -1 SRID? All parameters have
srid=2000.
search=# select intersection(t1.geom, t2.geom) from t_table_46 t1,
t_table_46 t2 where t1.gid = 1 and t2.gid = 2;
intersection
--------------------------------------------------
SRID=-1;POINT(-236.267686750346 85.558502660642)
(1 row)
ksa.
More information about the postgis-users
mailing list