Opened 7 years ago

Closed 4 years ago

#11948 closed New feature (fixed)

Linear referencing for Django

Reported by: novalis Owned by: nobody
Component: GIS Version: master
Severity: Normal Keywords:
Cc: novalis, ckarrie@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I created some patches to GEOS to do linear referencing. If you have a linestring (a bus route, say), and a point (a gps reading), and you want to find out where along the linestring the point is, you need linear referencing.

Here is a patch for Django which allows GeoDjango apps to use the new linear referencing code, when it is available. For now, you'll need SVN GEOS to test, but eventually version 3.2.0 of GEOS will be released and you'll be able to use the release version.

Attachments (3)

contrib-gis-linearref.patch (5.5 KB) - added by novalis 7 years ago.
08_contrib-gis-linearref.patch (5.7 KB) - added by anonymous 5 years ago.
refresh patch for 1.3
11948-3.diff (7.9 KB) - added by claudep 4 years ago.
Docs included

Download all attachments as: .zip

Change History (13)

Changed 7 years ago by novalis

comment:1 Changed 7 years ago by thejaswi_puthraya

  • Component changed from Uncategorized to GIS
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 6 years ago by russellm

  • Triage Stage changed from Unreviewed to Design decision needed

comment:3 Changed 6 years ago by emka

What is missing to get this into GeoDjango? I would really like to have it in the default installation.

comment:4 Changed 5 years ago by julien

  • Severity set to Normal
  • Type set to New feature

comment:5 Changed 5 years ago by anonymous

  • Easy pickings unset
  • UI/UX unset

I needed to use linearref feature from my application and so patched my django code. The patch targets an older version of django, so a little refresh was needed, but now it works nicely.

I attach the patch used for building a 1.3 for ubuntu maverick (

Changed 5 years ago by anonymous

refresh patch for 1.3

comment:6 Changed 5 years ago by ckarrie

  • Cc ckarrie@… added

comment:7 Changed 5 years ago by aaugustin

  • Needs documentation set
  • Triage Stage changed from Design decision needed to Accepted

This looks useful.

comment:8 Changed 4 years ago by anonymous

What's the status on this patch? Do I need to apply it myself for latest django?

Changed 4 years ago by claudep

Docs included

comment:9 Changed 4 years ago by claudep

  • Needs documentation unset

In this latest patch, I moved some things around and added the docs. Would appreciate a review (also for the wording of the docs).

The patch is also available as a pull request:

comment:10 Changed 4 years ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 2f6e00a840176f95c836f25a41cc1a7d31941ba5:

Fixed #11948 -- Added interpolate and project linear referencing methods

Thanks novalis for the report and the initial patch, and Anssi
Kääriäinen and Justin Bronn for the review.

Note: See TracTickets for help on using tickets.
Back to Top