[postgis-users] segmenting the roads using ST_MakeLine
Stephen Woodbridge
woodbri at swoodbridge.com
Tue Jan 22 05:53:10 PST 2013
On 1/22/2013 4:06 AM, tasha dewasi wrote:
> Hello,
>
> I have table with following columns
>
> CREATE TABLE Receiver
> (
> utc_time double precision,
> latitude double precision,
> longitude double precision,
> velocity double precision,
> rec_geom geometry(Point,4326)
> )
>
> using lat/lon points (which is actually a road network travelled by a
> vehicle), i need to divide this road network into 10m segment,
> either, road network should be a connected link of segments, with a
> fixed segment size of 10m.
>
> i tried to do it using ST_MakeLine, but it is not giving me any
> appropriate result. It is giving me whole lot of points, while i just
> need starting and ending co-ordinates of segment.
>
> I am using C# and my postgre,postgis versions are
>
> "PostgreSQL 8.4.14, compiled by Visual C++ build 1400, 32-bit"
> "POSTGIS="2.0.1 r9979" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.8.0, 6 March
> 2012" GDAL="GDAL 1.9.1, released 2012/05/15" LIBXML="2.7.8"
> LIBJSON="UNKNOWN" TOPOLOGY RASTER"
The steps for solving this problem are:
1. create you points into track polyline
2. node your track polylines at all intersections
3. chop your noded segments into 10m segments
So you have three separate task to perform. You should be able to google
for some examples of how to node a network. You might start here:
http://trac.osgeo.org/postgis/wiki/UsersWikiExamplesNetworkTopology
http://postgis.17.n6.nabble.com/Break-lines-at-intersections-td4663814.html
Look at the linear referencing for documentation for how to do this.
-Steve
More information about the postgis-users
mailing list