4

I have a shapefile with geometries MultiLineString and Point. I have loaded the shapefile into PostGIS. From that table I cannot find any (lon,lat) except geometrical values with some SRID,.... columns.

How about knowing of nodes, edges, start point and end point for a particular layer that has above geometries; and to create a start point and end point from a shape file

I have tried few shapefiles, finally stopped with

Error:Start vertex was not found. 
8

for a linesttring you can use these funcs. more info here.

ST_EndPoint — Returns the last point of a LINESTRING geometry as a POINT.

ST_StartPoint — Returns the first point of a LINESTRING geometry as a POINT.

ST_DumpPoints — Returns a set of geometry_dump (geom,path) rows of all points that make up a geometry.

Example:

SELECT ST_AsEWKT(ST_EndPoint('LINESTRING(1 1 2, 1 2 3, 0 0 5)'));
  st_asewkt
--------------
 POINT(0 0 5)
(1 row)

i hope it helps you....

  • Is there any possibility that could extract vertices for a geometry_dump(geom,path) row for a point/lineString ex: "({1},0101000080000000000000000000000000000000000000000000001440)" – GOVINDA Nov 9 '12 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.