#16231 closed New feature (fixed)
add support for AsGML() and AsKML() for the Spatialite backend
Reported by: | Stefano Costa | Owned by: | Stefano Costa |
---|---|---|---|
Component: | GIS | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | john@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Spatialite supports AsGML() and AsKML() since version 2.4.0-RC4, that is largely used in production environments.
This trivial patch adds support for these two output formats to the Spatialite backend in GeoDjango.
I've also made the small changes one would expect to both the test suite and to the documentation.
Tests seem to pass, but this is my first Django patch ever and I'm not very familiar with running the test suite.
Attachments (5)
Change History (10)
by , 14 years ago
Attachment: | spatialite-kml-gml.diff added |
---|
comment:1 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 14 years ago
Needs tests: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
Overall the patch looks good, but I think it needs actual tests.
comment:3 by , 13 years ago
Cc: | added |
---|---|
Needs tests: | unset |
I attached a tweak to the patch, spatialite-kml-gml.2.diff (assertRaises was still called for sqlite due to a bug in the if statement).
I am new to the GeoDjango, so this may be irrelevant, but it appears that the version of Spatialite that supports AsGML and AsKML is not considered "stable" (2.4.0-RC4). The GeoDjango docs still include instructions on installing the stable version of Spatialite, 2.3.1. Ubuntu 11.04 & 11.10 (not yet released) appear to only have 2.4.0-RC2--so even on the bleading edge versions of Ubuntu these functions will not be available.
by , 13 years ago
Attachment: | spatialite-kml-gml.3.diff added |
---|
Only add AsGML and AsKML if SpatialLite >= 2.4.0
comment:4 by , 13 years ago
The latest patch, spatialite-kml-gml.3.diff, checks the Spatialite version before adding AsKML and AsGML. It works for Spatialite 2.4.0-RC4+, but fails for the default Ubuntu libspatialite2 package (2.4.0-RC2). Not sure how to detect RC2 vs RC4 given that spatialite_version() returns for 2.4.0 regardless of RC2 or RC4.
by , 13 years ago
Attachment: | spatialite-kml-gml.4.diff added |
---|
Feature detection of AsGML to detect 2.4.0 RC2 vs RC4
by , 13 years ago
Attachment: | spatialite-kml-gml.5.diff added |
---|
Rebase patch after big changes in [16749]
git diff style patch