[postgis-users] [pgrouting-users] How to join Two points (latitudes and langitudes) in postgis?
Stephen Woodbridge
woodbri at swoodbridge.com
Tue Mar 2 11:43:43 PST 2010
Siddhesh,
This is probably more of a postGIS list query than a pgRouting query.
1) you did not say what error messages you might have gotten!
2) is the line in the database after you insert it?
3) what constraints to you have on the table for SRID?
4) you might want to ask on the QGIS list also
-Steve
SIDDHESH GANDHI wrote:
> Hi all,
> I am trying to join 2 points on earth (SRID 4326) by a line but somehow
> I m not able to see that in QGIS.
>
> I have taken some latitudes and longitudes and created points. When I
> create POINT column and load these points, I can see them on QGIS at
> exact same locations. (Boston, MA will be at same position where it is
> now wrt MA state shapefile)
>
> Now when i try to join two points (E.g. Boston and Some other place in
> MA), it does not appear on QGIS.
>
> I tried following queries for linestring construction -
> 1) insert into sridline (the_geom) values
> (ST_setSRID(ST_MakeLine(ST_MakePoint(42.5667212,
> -70.987212),ST_MakePoint(44.5667212, -70.987212)),4326));
> Other thing I tried is :
> 2) insert into sridline (the_geom) values
> (GeomFromText('Linestring(42.342305 -71.04858,42.278325 -70.874176)',4326));
>
> For generating POINT :
> UPDATE sridpoint
> SET the_geom = ST_SetSRID(ST_Point( longitude,latitude),4326);
>
> I can draw linestring when SRID = -1 but with SRID, I am facing problems.
> Please let me know if someone is aware of how to generate linestring
> when SRID is specified.
>
> Thanks
> Siddhesh
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.postlbs.org
> http://lists.postlbs.org/mailman/listinfo/pgrouting-users
More information about the postgis-users
mailing list