#10222 closed (fixed)
[patch] Add line_merge to GEOS geometries under django.contrib.gis
Reported by: | psmith | Owned by: | jbronn |
---|---|---|---|
Component: | GIS | Version: | 1.0 |
Severity: | Keywords: | geos linemerge | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
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 (1)
Change History (5)
by , 16 years ago
Attachment: | linemerge.patch added |
---|
comment:1 by , 16 years ago
milestone: | → 1.1 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
Description: | modified (diff) |
---|
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.
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(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 onLineString
, andMultiLineString
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
, andWKBWriter
(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.
Note:
See TracTickets
for help on using tickets.
Patch to add line_merge to geos geometries, with test case