**OGR_G_CoordinateDimension**
[https://gdal.org/api/vector_c_api.html#_CPPv428OGR_G_GetCoordinateDimension12OGRGeometryH
OGR_G_CoordinateDimension ] is deprecated in favour of
`OGR_G_CoordinateDimension()`, `OGR_G_Is3D()` and `OGR_G_IsMeasured()`.
**OGRwkbGeometryType**
Support should be added to understand a wider scope of WKT inputs. For
example [https://en.wikipedia.org/wiki/Well-
known_text_representation_of_geometry `POINT ZM (1 1 5 60)`] is valid but
currently results in an error. ( `Invalid OGR Integer Type: 3001`).
I think maybe this is because new WKB types are supported see
OGRwkbGeometryType : https://gdal.org/doxygen/ogr__core_8h.html and
https://github.com/OSGeo/gdal/blob/62c1489feab9312d0468abde0ad13d7b35ce27f7/ogr/ogr_core.h#L529.
This likely needs to be fixed before `OGR_G_CoordinateDimension`. (You
can't write a test for `OGR_G_IsMeasured` without first creating a
geometry with a measure)
**OGR_G_CreateFromWkbEx**
[https://gdal.org/api/vector_c_api.html#_CPPv421OGR_G_CreateFromWkbExPKv20OGRSpatialReferenceHP12OGRGeometryH6size_t
OGR_G_CreateFromWkbEx] is added in GDAL 3.3. I think we should prefer this
over the existing `OGR_G_CreateFromWkb` when available. The difference is
the new method supports large (2gb+) inputs. In 3.3+ the old method now
raises and error suggesting use of the new method, and was unsupported in
previous versions.
--
Ticket URL: <https://code.djangoproject.com/ticket/35058>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted
Comment:
Agreed, we definitely needs some cleaning there.
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:1>
Comment (by GitHub <noreply@…>):
In [changeset:"623597c786e89daae15a52dccfcdded7f808da9f" 623597c7]:
{{{
#!CommitTicketReference repository=""
revision="623597c786e89daae15a52dccfcdded7f808da9f"
Refs #35058 -- Added support for WKB > 2GB with GDAL 3.3+.
GDAL 3.3.0 added OGR_G_WkbSizeEx() and OGR_G_CreateFromWkbEx() to handle
WKB > 2GB. Prefer these new functions when available.
https://github.com/OSGeo/gdal/blob/master/NEWS.md#ogr-330---overview-of-
changes
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:2>
Comment (by GitHub <noreply@…>):
In [changeset:"2a2481f5a2179ac11947d92a097c9042bb57e17c" 2a2481f]:
{{{
#!CommitTicketReference repository=""
revision="2a2481f5a2179ac11947d92a097c9042bb57e17c"
Refs #35058 -- Added __repr__() to OGRGeomType.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:3>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"21b0b23a67ee1aa1a35f7f64cd8fe997e4de89d7" 21b0b23]:
{{{
#!CommitTicketReference repository=""
revision="21b0b23a67ee1aa1a35f7f64cd8fe997e4de89d7"
Refs #35058 -- Made OGRGeomType aware of additional WKB geometry types.
This commit increases OGRGeomType's knowledge of WKB types and allows
for improved error messages when Django doesn't yet have a corresponding
class to wrap a given type.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:4>
* owner: nobody => David Smith
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:5>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/17696 PR] to add support for the
"M" dimension to "POINT" geometries.
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:6>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"cfacd69ab81c37564799a7b8a0a765e3c1f40941" cfacd69]:
{{{
#!CommitTicketReference repository=""
revision="cfacd69ab81c37564799a7b8a0a765e3c1f40941"
Refs #35058 -- Added is_3d and set_3d() to OGRGeometry.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:7>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:8>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"f4c597346453c44769726d2ac061fbc028b2fd5b" f4c59734]:
{{{
#!CommitTicketReference repository=""
revision="f4c597346453c44769726d2ac061fbc028b2fd5b"
Refs #35058 -- Deprecated OGRGeometry.coord_dim setter.
Reflecting a change in the underlying GDAL library (since GDAL 2.1)
using coord_dim to set a geometries dimensions is deprecated in favor
of set_3d().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:9>
In [changeset:"3f6d939c62efd967f548c27a265748cc2cc47ca5" 3f6d939c]:
{{{#!CommitTicketReference repository=""
revision="3f6d939c62efd967f548c27a265748cc2cc47ca5"
Refs #35058 -- Added support for measured geometries to GDAL Point.
Co-authored-by: Nick Pope <ni...@nickpope.me.uk>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:10>
* status: assigned => closed
* needs_better_patch: 1 => 0
* resolution: => fixed
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:11>
* status: closed => new
* resolution: fixed =>
Comment:
[https://github.com/django/django/pull/17777 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:12>
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:13>
[https://github.com/django/django/pull/17786 PR] to promote centroid to
being available on all geometry types.
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:14>
In [changeset:"2005530920e7c290bb1cf7d9ada155250faa81ad" 2005530]:
{{{#!CommitTicketReference repository=""
revision="2005530920e7c290bb1cf7d9ada155250faa81ad"
Refs #35058 -- Made centroid available on all geometry types.
Centroid is available on all geometry types since GDAL 1.8.0.
Previously it was restricted to Polygon.
https://gdal.org/doxygen/classOGRGeometry.html#a91787f669b2a148169667e270e7e40df
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:15>
In [changeset:"1df8983aa3b51bd37a5b9acf92475ad3a9180fe4" 1df8983a]:
{{{#!CommitTicketReference repository=""
revision="1df8983aa3b51bd37a5b9acf92475ad3a9180fe4"
Refs #35058 -- Added support for measured geometries to GDAL LineString.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:16>
* has_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:17>
In [changeset:"d3922e9e5ad045f5408b02216a824f26a50950f0" d3922e9e]:
{{{#!CommitTicketReference repository=""
revision="d3922e9e5ad045f5408b02216a824f26a50950f0"
Refs #35058 -- Added support for measured geometries to GDAL Polygon.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:18>
In [changeset:"222bf2932b55ebc964ffc5f9a6f47bad083e5ac2" 222bf293]:
{{{#!CommitTicketReference repository=""
revision="222bf2932b55ebc964ffc5f9a6f47bad083e5ac2"
Refs #35058 -- Added support for measured geometries to GDAL
GeometryCollection and subclasses.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35058#comment:19>