OK I found
http://postgis.refractions.net/documentation/manual-svn/reference.html#Linear_Referencing

So I should:
1. Learn how to import my vector roads from .kmz into postgis. (I'll Google 
that.)

2. Use http://postgis.net/docs/ST_Length.html to get the length (L in meters) 
of each
of my roads.

3. Write the equivalent of perl:
for($i=0; $i <= 1; $address++, $i += 25/$L){print ST_Line_Interpolate_Point $i;}

4. Make / print a label ($address) at that point.

5. For extra bonus, figure out to offset the label:
perpendicular to the road at 3 * ($address % 2 ? -1 : 1) meters.

Thanks.

>>>>> "RH" == Régis Haubourg <[email protected]> writes:

RH> Hi Dan, 

RH> Usually, I solve this with postgis or sqlite view, using Linear
RH> Referencing functions. I just create a view or a query of
RH> spatialised vertices. Some SQL magic could also calculate rotation
RH> and offset in additional fields to align labels with the lines. 
RH> Cheers Régis 
_______________________________________________
Qgis-user mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to