<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Rob,<br>
      <br>
      Points in a regular interval have always been a pain to create in
      postgis. I hope someone will write a decent linear_reference code
      for this some time soon.<br>
      <br>
      Here's a way to do it:<br>
      <br>
      1) make a line out of your points (ST_SetSrid(ST_MakeLine(pointa,
      pointb), 27700))<br>
      2) add an M value to your line (ST_AddMeasure(geom, start, end))<br>
      3) generate_series of intervals   
      generate_series(0,floor(ST_Length(geom)/25.0))  < please check
      how to deal with that last segment smaller than 25 meter! <br>
      4) now you know how many points you need in every line you can use
      (ST_Line_Interpolate_Point(geom, (N*25)/St_Length(geom))<br>
      when N being the numbers you got from generate series in 3).<br>
      <br>
      Make sure not to put dimensional restrictions to your tables since
      ST_AddMeasure will want to add that extra M dimension.<br>
      <br>
      Good luck!<br>
          Tom<br>
      <br>
      On 25-7-2012 12:50, uk52rob wrote:<br>
    </div>
    <blockquote
      cite="mid:1343213438.99947.YahooMailNeo@web29906.mail.ird.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:times
        new roman, new york, times, serif;font-size:12pt">
        <div style="font-family: 'times new roman', 'new york', times,
          serif; font-size: 12pt; ">Hi,</div>
        <div style="font-family: 'times new roman', 'new york', times,
          serif; font-size: 12pt; "><br>
        </div>
        <div style="font-family: 'times new roman', 'new york', times,
          serif; font-size: 12pt; ">I have two point geometry tables,
          with which I need to compare a single point from the left
          table to all points in the right table.</div>
        <div style="font-family: 'times new roman', 'new york', times,
          serif; font-size: 12pt; "><br>
        </div>
        <div><font face="times new roman, new york, times, serif"
            size="3">I need to extract X and Y co-ordinates (EPSG: 27700
            OSGB36/British National Grid) every 25m along a </font><font
            face="times new roman, new york, times, serif">fictitious</font><font
            face="times new roman, new york, times, serif" size="3"> line
            between the points in order to build a 'profile' of the land
            from a database containing height data.</font></div>
        <div><font face="times new roman, new york, times, serif"
            size="3"><br>
          </font></div>
        <div><font face="times new roman, new york, times, serif">Does
            anyone have any 'best practise' or experience with this sort
            of project?</font></div>
        <div><br>
        </div>
        <div><font face="times new roman, new york, times, serif">Many
            thanks,</font></div>
        <div><font face="times new roman, new york, times, serif"><br>
          </font></div>
        <div><font face="times new roman, new york, times, serif">Rob</font></div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>