<html style="direction: ltr;">
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body style="direction: ltr;"
    bidimailui-detected-decoding-type="latin-charset" bgcolor="#FFFFFF"
    text="#000000">
    Two additional options, if you want to expand beyond QGIS:<br>
    In Spatialite there are the functions ST_StartPoint() and
    ST_EndPoint(). (Same in PostGIS). So you could do a query such as:<br>
    <tt><br>
      SELECT line_id, ST_StartPoint(geometry) AS StartPoint,
      ST_EndPoint(geometry) AS EndPoint </tt><tt><br>
    </tt><tt>FROM lines</tt><tt>;<br>
      <br>
    </tt><tt></tt>THis returns just the geometry (POINTS), so if you
    want them in a separate point table, you might do something like:<br>
    <br>
    <tt>CREATE TABLE end_points (pkuid primary key  autoincrement,
      line_id integer);</tt><tt><br>
    </tt><tt>SELECT AddGeometryColumn('end_points','geometry',<EPSG
      code of your CRS>, 'POINT,2); </tt><tt><br>
    </tt><tt>INSERT INTO end_points (line_id, geometry) SELECT line_id,
      ST_StartPoint(geometry) FROM lines;</tt><tt><br>
    </tt><tt>INSERT INTO end_points (line_id, geometry) SELECT line_id,
      ST_EndPoint(geometry) FROM lines;</tt><tt><br>
    </tt><tt><br>
    </tt><tt>
    </tt>Alternately, if you need the coordinates of the endpoints:<br>
    <br>
    <tt>SELECT line_id, AsWKT(ST_StartPoint(geometry)),
      AsWKT(ST_EndPoint(geometry)) </tt><tt><br>
    </tt><tt>FROM lines;</tt><tt><br>
    </tt><br>
    And in addition you can also go to GRASS and use the v.to.points
    module with the "use=node" in order to create a point vector of
    nodes only from a GRASS line vector.<br>
    <br>
    So there are several ways to choose...<br>
    <br>
    <div class="moz-cite-prefix">On 07/01/2015 06:01 PM, CONTI Tonino
      wrote:<br>
    </div>
    <blockquote
cite="mid:7D9132CB72671B4D8A7DB82AE416CF01FA279332BD@exchange.comune.jesi.an.it"
      type="cite">
      <pre wrap="">THANKS RICHARD.
DO I HAVE TO SELECT THE MAXIMUM AND MINIMUM VALUE FOR EACH ELEMENT AND DELETE THE OTHERS.
YOU KNOW IF THERE IS A FUNCTION SELECTING THE FIRST AND LAST POINT OF EACH ITEM?
TANKS
TONINO

Tonino Conti
Comune di Jesi
Sistema Informativo Territoriale
 Tel 0731538312 - fax 0731538513
<a class="moz-txt-link-abbreviated" href="mailto:t.conti@comune.jesi.an.it">t.conti@comune.jesi.an.it</a>
<a class="moz-txt-link-abbreviated" href="http://www.comune.jesi.an.it/sit">www.comune.jesi.an.it/sit</a>
________________________________________
Da: Richard McDonnell [<a class="moz-txt-link-abbreviated" href="mailto:richard.mcdonnell@opw.ie">richard.mcdonnell@opw.ie</a>]
Inviato: martedì 30 giugno 2015 16.43
A: CONTI Tonino
Cc: <a class="moz-txt-link-abbreviated" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>
Oggetto: Re: [Qgis-user] extracting the starting point and end point from a linear geometry

Tonino,
 From the toolbar...Vector, Geometry Tools, Extract Nodes.
This I think should help!

Regards,

Richard McDonnell

OPW - Ag féachaint don am atá le teacht - Ag caomhnú ón am atá thart
OPW - Looking to the future - Caring for the past

**********************************************************************
Email Disclaimer: <a class="moz-txt-link-freetext" href="http://www.opw.ie/en/disclaimer/">http://www.opw.ie/en/disclaimer/</a>
**********************************************************************
_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>

This mail was received via Mail-SeCure System.


</pre>
    </blockquote>
    <br>
  </body>
</html>