and to get the number found, just use count() /Nicklas
On Mon, 2011-01-10 at 11:23 +0100, Nicklas Avén wrote: > Hallo Nicholas > > I assume you mean that you hae your data in a postgis table not in > shapefile. > > to find all roads that doesn't intersect any other road you find all > roads that do intersect and than catch the ones didn't find any > intersecton. > > something like > > SELECT a.gid, a.the_geom FROM mytable a LEFT JOIN mytable b on > ST_Intersects(a.the_geom, b.the_geom) WHERE a.gid != b.gid and b.gid IS > NULL; > > Because of the left join you will get the records in table a that has no > intersection with any other road. And those cases can be detected > because then there will be only null in id field from table b. > > > HTH > > Nicklas > > > On Mon, 2011-01-10 at 15:11 +0530, Nicholas I wrote: > > Hi, > > > > I am trying to find the roads, where the roads does not intersect > > with any other roads in the shapefile. > > Can some one help me. > > > > thank you > > _______________________________________________ > > postgis-users mailing list > > [email protected] > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users > _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
