Re: [postgis-users] Spatial linking or selection

2020-05-15 Thread Shaozhong SHI
sts.osgeo.org] *On > Behalf Of *Shaozhong SHI > *Sent:* Friday, May 15, 2020 8:35 AM > *To:* PostGIS Users Discussion > *Subject:* Re: [postgis-users] Spatial linking or selection > > > > Hi, Friends, > > > > I am a little bit confused. > > > > If I

Re: [postgis-users] Spatial linking or selection

2020-05-15 Thread Regina Obe
gis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of Shaozhong SHI Sent: Friday, May 15, 2020 8:35 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] Spatial linking or selection Hi, Friends, I am a little bit confused. If I use geometry as data type, do I

Re: [postgis-users] Spatial linking or selection

2020-05-15 Thread Shaozhong SHI
Hi, Friends, I am a little bit confused. If I use geometry as data type, do I put something like 5 metres and use_spheroid=false? Is that correct? Regards, Shao On Fri, 15 May 2020 at 13:00, Giuseppe Broccolo wrote: > Hi Shao, > > Il giorno ven 15 mag 2020 alle ore 11:56 Shaozhong SHI < > s

Re: [postgis-users] Spatial linking or selection

2020-05-15 Thread Giuseppe Broccolo
Hi Shao, Il giorno ven 15 mag 2020 alle ore 11:56 Shaozhong SHI < shishaozh...@gmail.com> ha scritto: > Hi, Nicolas, > > Thanks. > > That is very interesting. I will test it. > > I could not find information on how distance is defined. 0.01 stands on > what unit? > > https://postgis.net/docs/ST

Re: [postgis-users] Spatial linking or selection

2020-05-15 Thread Bo Victor Thomsen
It is explained on the same web page you're referring to: https://postgis.net/docs/ST_DWithin.html For geometry: the distance unit of the geometries's srid (Coordinate reference system) . The line and point geometry must have the same srid for geography: meters. Den 15-05-2020 kl. 12:50 skre

Re: [postgis-users] Spatial linking or selection

2020-05-15 Thread Nicolas Ribot
On Fri, 15 May 2020 at 12:56, Shaozhong SHI wrote: > Hi, Nicolas, > > Thanks. > > That is very interesting. I will test it. > > I could not find information on how distance is defined. 0.01 stands on > what unit? > > In the unit of your spatial reference system (see its wkt or proj4 definition

Re: [postgis-users] Spatial linking or selection

2020-05-15 Thread Shaozhong SHI
Hi, Nicolas, Thanks. That is very interesting. I will test it. I could not find information on how distance is defined. 0.01 stands on what unit? https://postgis.net/docs/ST_DWithin.html Regards, Shao On Fri, 15 May 2020 at 11:32, Nicolas Ribot wrote: > Hi, > > You can test for proximity

Re: [postgis-users] Spatial linking or selection

2020-05-15 Thread Nicolas Ribot
Hi, You can test for proximity between start and end points Create spatial indexes on st_startpoint(geom) and st_endpoint(geom) on your line features table (also index starting and ending points column in table one) select t.id, r.id, r.geom from start_end_table t join roads r on st_dwithin(t.sta

[postgis-users] Spatial linking or selection

2020-05-15 Thread Shaozhong SHI
Given 2 tables. One has the starting and ending points of roads, and the other has line features. How best to do spatial linking or selection of road features? Can anyone enlighten me? Regards, Shao ___ postgis-users mailing list postgis-users@lists.