Opened 7 years ago

Last modified 13 months ago

#12410 assigned New feature

add support for St_Line_Locate_Point to geodjango postgis backend

Reported by: IanWard Owned by: Sergey Fedoseev
Component: GIS Version: master
Severity: Normal Keywords: St_Line_Locate_Point
Cc: ckesselh Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes 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 7 years ago.

Download all attachments as: .zip

Change History (12)

Changed 7 years ago by IanWard

Attachment: line_locate_point.patch added

comment:1 Changed 7 years ago by Russell Keith-Magee

Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 7 years ago by jbronn

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

comment:3 Changed 7 years ago by wardi

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 Changed 6 years ago by jbronn

milestone: 1.31.4

comment:5 Changed 6 years ago by Matt McClanahan

Severity: Normal
Type: New feature

comment:6 Changed 5 years ago by ckesselh

Easy pickings: unset
UI/UX: unset

comment:7 Changed 5 years ago by ckesselh

Cc: ckesselh added

comment:8 Changed 5 years ago by Jacob

milestone: 1.4

Milestone 1.4 deleted

comment:9 Changed 4 years ago by Aymeric Augustin

Triage Stage: Design decision neededAccepted

comment:10 Changed 2 years ago by Tim Graham

Needs tests: set

comment:11 Changed 13 months ago by Sergey Fedoseev

Owner: changed from jbronn to Sergey Fedoseev
Note: See TracTickets for help on using tickets.
Back to Top