#25665: deprecate public getters/setters for properties of `GEOSGeometry` and 
its
subclasses
-------------------------------------+-------------------------------------
     Reporter:  sir-sigurd           |                    Owner:  sir-
         Type:                       |  sigurd
  Cleanup/optimization               |                   Status:  assigned
    Component:  GIS                  |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Old description:

> I'd prefer to deprecate them because I see no benefit in having them, I
> think they just litter class namespace.

New description:



--

Comment (by sir-sigurd):

 I was motivated to deprecate `num_points` and `crs` because number of
 `GEOSGeometry` members looks disturbing for me.
 {{{
 In [2]: GEOSGeometry.
 In [2]: from django.contrib.gis.geos import GEOSGeometry as Geometry

 In [3]: Geometry.
 Geometry.append            Geometry.geojson           Geometry.prepared
 Geometry.area              Geometry.geom_type         Geometry.ptr
 Geometry.boundary          Geometry.geom_typeid       Geometry.ptr_type
 Geometry.buffer            Geometry.get_srid          Geometry.relate
 Geometry.centroid          Geometry.has_cs
 Geometry.relate_pattern
 Geometry.clone             Geometry.hasz              Geometry.remove
 Geometry.contains          Geometry.hex               Geometry.reverse
 Geometry.convex_hull       Geometry.hexewkb           Geometry.ring
 Geometry.coord_seq         Geometry.index             Geometry.set_srid
 Geometry.count             Geometry.insert            Geometry.simple
 Geometry.crosses           Geometry.intersection      Geometry.simplify
 Geometry.crs               Geometry.intersects        Geometry.sort
 Geometry.difference        Geometry.json              Geometry.srid
 Geometry.dims              Geometry.kml               Geometry.srs
 Geometry.disjoint          Geometry.length
 Geometry.sym_difference
 Geometry.distance          Geometry.mro               Geometry.touches
 Geometry.empty             Geometry.normalize         Geometry.transform
 Geometry.envelope          Geometry.num_coords        Geometry.union
 Geometry.equals            Geometry.num_geom          Geometry.valid
 Geometry.equals_exact      Geometry.num_points
 Geometry.valid_reason
 Geometry.ewkb              Geometry.ogr               Geometry.within
 Geometry.ewkt              Geometry.overlaps          Geometry.wkb
 Geometry.extend            Geometry.point_on_surface  Geometry.wkt
 Geometry.extent            Geometry.pop
 }}}

 I'll change ticket summary because there are also getters/setters for
 coordinates of `Point` and probably there are others.

--
Ticket URL: <https://code.djangoproject.com/ticket/25665#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.99960c5904b5fa2fb735fcd55a5233b5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to