Django

Code

Ticket #10222 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

[patch] Add line_merge to GEOS geometries under django.contrib.gis

Reported by: psmith Assigned to: jbronn
Milestone: 1.1 Component: GIS
Version: 1.0 Keywords: geos linemerge
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description (Last modified by jbronn)

In the C API of GEOS, GEOSLineMerge returns a new geometry that is the result of having merged contiguous line strings in a geometry collection or multi-line string geometry.

Example:

>>> geomcoll = fromstr('MULTILINESTRING((1 1, 3 3), (3 3, 4 2))')
>>> print geomcoll.line_merge()
LINESTRING(1 1, 3 3, 4 2)

Attachments

linemerge.patch (4.1 kB) - added by psmith on 02/09/09 18:22:27.
Patch to add line_merge to geos geometries, with test case

Change History

02/09/09 18:22:27 changed by psmith

  • attachment linemerge.patch added.

Patch to add line_merge to geos geometries, with test case

03/09/09 18:43:49 changed by jbronn

  • status changed from new to assigned.
  • needs_better_patch changed.
  • needs_tests changed.
  • milestone set to 1.1.
  • owner changed from nobody to jbronn.
  • needs_docs changed.
  • stage changed from Unreviewed to Accepted.

03/19/09 13:18:31 changed by jbronn

  • description changed.

Now in the gis-1.1 mercurial repo, see http://geodjango.org/hg/gis-1.1/rev/87b34dce202d.

It is now a merged property that is only available on LineString and MultiLineString instances.

03/23/09 19:12:22 changed by jbronn

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [10131]) Refactored the GEOS interface. Improvements include:

* Geometries now allow list-like manipulation, e.g., can add, insert, delete vertexes (or other geometries in collections) like Python lists. Thanks, Aryeh Leib Taurog. * Added support for GEOS prepared geometries via prepared property. Prepared geometries significantly speed up certain operations. * Added support for GEOS cascaded union as MultiPolygon.cascaded_union property. * Added support for GEOS line merge as merged property on LineString, and MultiLineString geometries. Thanks, Paul Smith. * No longer use the deprecated C API for serialization to/from WKB and WKT. Now use the GEOS I/O classes, which are now exposed as WKTReader, WKTWriter, WKBReader, and WKBWriter (which supports 3D and SRID inclusion) * Moved each type of geometry to their own module, eliminating the cluttered geometries.py. * Internally, all C API methods are explicitly called from a module rather than a star import.

Fixed #9557, #9877, #10222


Add/Change #10222 ([patch] Add line_merge to GEOS geometries under django.contrib.gis)




Change Properties
Action