I'm trying to sample points along a linestring. The goal is to have the distance between 2 consecutive points to be at most X (eg. 50m).
I'm drawing linestring in openlayers and sending it to a geodjango app. I can do the "segmentization"/sampling in the client (openlayers) or in the server (geodjango: DB API or Geos API). I don't know yet where I will do it, so I'm interested in both solution (if they exist).
I've searched but have not found any simple solution to this really simple problem (at least, it looks very simple).
I've seen this one for example: How to interpolate GPS Positions in PostGIS but it uses complex postgis query to do the interpolation.
Isn't there any 'split(nseg)' function somewhere that would split a segment into nseg sub segments ? Something close to what shapely offers ? (http://gispython.org/shapely/docs/1.2/manual.html#linear-referencing-methods ). I could use shapely, but that would add another dependency (not really justified...).
EDIT: I guess I should have a look at linearref from GEOS (https://code.djangoproject.com/ticket/11948 for the geodjango part)