[postgis-users] Traverse set distance along a multiline?

Aren Cambre aren at arencambre.com
Sun Dec 26 16:35:49 PST 2010


I am trying to determine mile markers along Texas highways. My starting
point is the ShapeFile TxDOT Roadways 2010 at
http://www.tnris.state.tx.us/datadownload/download.jsp. I've used shp2pgsql
to get it into a PostGIS 1.52-enabled Postgres 9.01 database.

I naively thought I could just figure out the number of miles per unit of
latitude and then traverse each roadway, one mile at a time, using *
ST_Line_Interpolate_Point*. However, predictably, the more "longitudinal" a
route, the more error it shows when I compare my calculated mile markers to
what Google Maps shows.

Again, this is because I was using a consistent ratio of degrees to miles,
so any route E-W component introduces errors.

So here's the question--does PostGIS allow any way to traverse a route a set
distance at a time? Specifically, is there a way I can traverse a route a
mile at a time and then record the points at the end of each mile?

I reviewed the functions available at
http://postgis.refractions.net/documentation/manual-1.5/reference.html and
am not seeing anything clear.

In case it matters, the SHP's PRJ file says NAD83.

Aren Cambre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20101226/875639e8/attachment.html>


More information about the postgis-users mailing list