Changes between Version 23 and Version 24 of CookBook Postgis


Ignore:
Timestamp:
Feb 9, 2010 2:22:34 PM (15 years ago)
Author:
cedric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CookBook Postgis

    v23 v24  
    4646 * Min() 
    4747 * Distance() 
     48 
     49Reprojecting / snapping point-geometries onto a given line-geometry using PostGIS 
     50http://62.160.92.241:8066/trac/wiki/CookBook%20Postgis?action=edit 
     51{{{ 
     52SELECT ST_Line_Interpolate_Point( 
     53                line_to_project_onto.the_geom, 
     54                ST_Line_Locate_Point( 
     55                        line_to_project_onto.the_geom, 
     56                        points_to_project_onto_line.the_geom 
     57                ) 
     58        ) 
     59FROM line_to_project_onto, points_to_project_onto_line; 
     60}}} 
     61which translates into 
     62{{{ 
     63{{{ 
     64SELECT ST_Line_Interpolate_Point( 
     65                line_to_project_onto.the_geom, 
     66                ST_Line_Locate_Point( 
     67                        line_to_project_onto.the_geom, 
     68                        points_to_project_onto_line.the_geom 
     69                ) 
     70        ) 
     71FROM line_to_project_onto, points_to_project_onto_line; 
     72}}} 
     73}}}