Re: [Django] #26789: ORM produces query with NULL instead of empty geometry

2016-12-06 Thread Django
#26789: ORM produces query with NULL instead of empty geometry
-+-
 Reporter:  Sergey Fedoseev  |Owner:  Sergey
 |  Fedoseev
 Type:  Bug  |   Status:  assigned
Component:  GIS  |  Version:  1.9
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"b90d72facf1e4294df1c2e6b51b26f6879bf2992" b90d72fa]:
 {{{
 #!CommitTicketReference repository=""
 revision="b90d72facf1e4294df1c2e6b51b26f6879bf2992"
 Refs #26789 -- Fixed output of WKBWriter for empty points and polygons.
 }}}

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.89ee9d930483d2ac88f248d0178f28ce%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26789: ORM produces query with NULL instead of empty geometry

2016-12-06 Thread Django
#26789: ORM produces query with NULL instead of empty geometry
-+-
 Reporter:  Sergey Fedoseev  |Owner:  Sergey
 |  Fedoseev
 Type:  Bug  |   Status:  closed
Component:  GIS  |  Version:  1.9
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"183f5015408ffe0d3a22203ddaf7a3a56da025fd" 183f501]:
 {{{
 #!CommitTicketReference repository=""
 revision="183f5015408ffe0d3a22203ddaf7a3a56da025fd"
 Fixed #26789 -- Fixed handling of empty geometries in
 BaseSpatialField.get_db_prep_save().
 }}}

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.76a34c210355f2db2398ad78487924ff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26789: ORM produces query with NULL instead of empty geometry

2016-11-30 Thread Django
#26789: ORM produces query with NULL instead of empty geometry
-+-
 Reporter:  Sergey Fedoseev  |Owner:  Sergey
 |  Fedoseev
 Type:  Bug  |   Status:  assigned
Component:  GIS  |  Version:  1.9
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * stage:  Accepted => Ready for checkin


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.ecf072a84201add39210ad19b7cd250a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26789: ORM produces query with NULL instead of empty geometry

2016-10-24 Thread Django
#26789: ORM produces query with NULL instead of empty geometry
-+-
 Reporter:  Sergey Fedoseev  |Owner:  Sergey
 |  Fedoseev
 Type:  Bug  |   Status:  assigned
Component:  GIS  |  Version:  1.9
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Sergey Fedoseev):

 * needs_better_patch:  1 => 0


Comment:

 [https://github.com/django/django/pull/7428 PR]

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.1f7139a9cf037e97ec975d9fd26e5120%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26789: ORM produces query with NULL instead of empty geometry

2016-07-28 Thread Django
#26789: ORM produces query with NULL instead of empty geometry
+--
 Reporter:  sir-sigurd  |Owner:  sir-sigurd
 Type:  Bug |   Status:  assigned
Component:  GIS |  Version:  1.9
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+--
Changes (by timgraham):

 * needs_better_patch:  0 => 1


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.a79f3b76228ae5ea655a09cffc345a53%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26789: ORM produces query with NULL instead of empty geometry

2016-07-19 Thread Django
#26789: ORM produces query with NULL instead of empty geometry
+--
 Reporter:  sir-sigurd  |Owner:  sir-sigurd
 Type:  Bug |   Status:  assigned
Component:  GIS |  Version:  1.9
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Changes (by rcoup):

 * has_patch:  0 => 1


Comment:

 WIP pull request at https://github.com/django/django/pull/6934

 Current approach passes empty to the DB and lets it decide whether to
 accept it.

 Issues for discussion here:
 * `POINT EMPTY`  has a GEOS error on save for me w/ GEOS3.5.0 on OSX. We
 could workaround that.
 * `POLYGON EMPTY` has a PostGIS error on save for me w/ Postgis 2.2.2
 (Postgres 9.5) on OSX
 * Should we delegate to backends to "check" whether a geometry is save-
 able, or pass it through to the DB?
 * Need to test on the other DB backends, @jitai is that possible for you
 to do Oracle? Might need a `@no_oracle` on the test.

 I considered an alternative approach of "fixing" falsey/truthy evaluation
 of geometries and use that as a proxy to save. Though IMO an empty geom
 could quite logically evaluate to False though it should be saved.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.02a4e742231cb53ed72e3402b3d6388e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26789: ORM produces query with NULL instead of empty geometry

2016-07-15 Thread Django
#26789: ORM produces query with NULL instead of empty geometry
+--
 Reporter:  sir-sigurd  |Owner:  sir-sigurd
 Type:  Bug |   Status:  assigned
Component:  GIS |  Version:  1.9
 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
+--

Comment (by rcoup):

 Simplistic fix could be something like (`BaseSpatialField`):

 {{{
 def get_db_prep_save(self, value, connection):
 """
 Prepare the value for saving in the database.
 """
 if value or isinstance(value, Geometry):
 return connection.ops.Adapter(self.get_prep_value(value))
 else:
 return None
 }}}

 A test case I used to track down the issue
 (`gis_tests/geoapp/test_regress.py`):
 {{{
 def test_empty_assignment(self):
 c = Country.objects.get(name='Texas')
 c.mpoly = 'SRID=4326;MULTIPOLYGON EMPTY'
 self.assertIsInstance(c.mpoly, geos.MultiPolygon)
 self.assertTrue(c.mpoly.empty)
 c.save()

 c.refresh_from_db()
 self.assertIsInstance(c.mpoly, geos.MultiPolygon)
 self.assertTrue(c.mpoly.empty)
 }}}

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.bdf8b996ef0a268eff501c2b44923487%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26789: ORM produces query with NULL instead of empty geometry

2016-07-15 Thread Django
#26789: ORM produces query with NULL instead of empty geometry
+--
 Reporter:  sir-sigurd  |Owner:  sir-sigurd
 Type:  Bug |   Status:  assigned
Component:  GIS |  Version:  1.9
 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
+--
Changes (by rcoup):

 * cc: robert.coup@… (added)


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.32aa03ab655c5d2e5b7ef1ccc70bb846%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26789: ORM produces query with NULL instead of empty geometry

2016-07-05 Thread Django
#26789: ORM produces query with NULL instead of empty geometry
+--
 Reporter:  sir-sigurd  |Owner:  sir-sigurd
 Type:  Bug |   Status:  assigned
Component:  GIS |  Version:  1.9
 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
+--

Comment (by jtiai):

 Root cause it that geometry value begin nothing is tested with clause {{{
 if not value }}}. Which in turn calls {{{ __len__ }}} on a geometry,
 having a following responses in different geometries:

 For an empty point number of coordinates is returned. In case of empty 0
 (zero) is returned (false).

 For a linestring empty tuple is returned {{{ () }}} (false)

 For an polygon empty tuple of tuple is returned {{{ ((),) }}} (true)

 For a geometry collection length of 0 (zero) is returned (false)

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.e61a57dd194622d1a85804bd281cab07%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26789: ORM produces query with NULL instead of empty geometry

2016-06-22 Thread Django
#26789: ORM produces query with NULL instead of empty geometry
+--
 Reporter:  sir-sigurd  |Owner:  sir-sigurd
 Type:  Bug |   Status:  assigned
Component:  GIS |  Version:  1.9
 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
+--
Changes (by timgraham):

 * type:  Uncategorized => Bug
 * stage:  Unreviewed => Accepted


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.8b387c7fbf365b25a9149b04a0b9a270%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26789: ORM produces query with NULL instead of empty geometry

2016-06-21 Thread Django
#26789: ORM produces query with NULL instead of empty geometry
---+--
 Reporter:  sir-sigurd |Owner:  sir-sigurd
 Type:  Uncategorized  |   Status:  assigned
Component:  GIS|  Version:  1.9
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by sir-sigurd):

 * status:  new => assigned
 * needs_better_patch:   => 0
 * component:  Uncategorized => GIS
 * needs_tests:   => 0
 * owner:  nobody => sir-sigurd
 * needs_docs:   => 0


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.003b3f3284e3e930fbbaa860ec6800d4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.