Opened 15 years ago

Closed 8 years ago

Last modified 8 years ago

#12410 closed New feature (fixed)

add support for St_Line_Locate_Point to geodjango postgis backend

Reported by: IanWard Owned by: Sergey Fedoseev
Component: GIS Version: dev
Severity: Normal Keywords: St_Line_Locate_Point
Cc: ckesselh Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Here's a patch that adds a line_locate_point method to the GeoQuerySet class, allowing a calculation of the closest point along a LineString to a point field. The value returned is a float between 0 and 1. This is useful for estimating addresses and ordering points given a LineString reference.

Attachments (1)

line_locate_point.patch (2.9 KB ) - added by IanWard 15 years ago.

Download all attachments as: .zip

Change History (15)

by IanWard, 15 years ago

Attachment: line_locate_point.patch added

comment:1 by Russell Keith-Magee, 15 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by jbronn, 15 years ago

milestone: 1.3
Owner: changed from nobody to jbronn
Status: newassigned

comment:3 by wardi, 15 years ago

This might be a better API for LineLocatePoint (and possibly other GIS QuerySet methods)

from django.contrib.gis.db import LineLocatePoint
#...
points_of_interest = points_of_interest.annotate(
    line_locate_point=LineLocatePoint('my_point_field', along_path))
points_of_interest = points_of_interest.order_by('line_locate_point')

The current GIS methods behave like annotate, so why not use a similar interface?

comment:4 by jbronn, 14 years ago

milestone: 1.31.4

comment:5 by Matt McClanahan, 14 years ago

Severity: Normal
Type: New feature

comment:6 by ckesselh, 13 years ago

Easy pickings: unset
UI/UX: unset

comment:7 by ckesselh, 13 years ago

Cc: ckesselh added

comment:8 by Jacob, 13 years ago

milestone: 1.4

Milestone 1.4 deleted

comment:9 by Aymeric Augustin, 12 years ago

Triage Stage: Design decision neededAccepted

comment:10 by Tim Graham, 10 years ago

Needs tests: set

comment:11 by Sergey Fedoseev, 9 years ago

Owner: changed from jbronn to Sergey Fedoseev

comment:12 by Sergey Fedoseev, 8 years ago

Needs tests: unset

comment:13 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In ede4f6d4:

Fixed #12410 -- Added LineLocatePoint GIS function.

comment:14 by Tim Graham <timograham@…>, 8 years ago

In 17e078d:

Refs #12410 -- Doc'd LineLocatePoint in functions' summary table.

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