Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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. 
share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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....

share|improve this answer
    
Is there any possibility that could extract vertices for a geometry_dump(geom,path) row for a point/lineString ex: "({1},0101000080000000000000000000000000000000000000000000001440)" –  SriRamaChandra.G Nov 9 '12 at 11:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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