Re: [Django] #29239: GEOSGeometry treats WKB and WKT input differently (former fails)

2018-03-19 Thread Django
#29239: GEOSGeometry treats WKB and WKT input differently (former fails)
+
 Reporter:  MatBurnham  |Owner:  Jani Tiainen
 Type:  Bug |   Status:  assigned
Component:  GIS |  Version:  2.0
 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 Jani Tiainen):

 * owner:  nobody => Jani Tiainen
 * status:  new => assigned


Comment:

 Django passes geometries to GEOS library so error originates from there.

 Now few notes about WKT geometry is it XYZM geometry since it seems to
 contain 4 values per point?

 Django supports only 3D geometries so you may lose data here. Also tried
 to decode WKB but from the quick look it looked like WKB from postgis
 (because AFAIK it uses geos as well as underlying library).

 Few points from geometry.
 {{{
 -0.45747735963738   51.4742768635629 0 -1.79769313486232e+308,
 -0.457470821752906 51.474364454451   0 -1.79769313486232e+308,
 }}}

 Version of installed GEOS libraries would be useful information here.

-- 
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.25ac1af04af5ad6ec95084e8c454ae3d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29239: GEOSGeometry treats WKB and WKT input differently (former fails)

2018-03-19 Thread Django
#29239: GEOSGeometry treats WKB and WKT input differently (former fails)
+--
 Reporter:  MatBurnham  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  GIS |  Version:  2.0
 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 MatBurnham):

 * status:  closed => new
 * resolution:  invalid =>


Comment:

 The geometry IS valid. Formatted as WKT it is accepted. The same geometry
 formatted as hex encoded WKB is misinterpreted as LinearRing when it
 should be a MultiPolygon.

-- 
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.c0e790fb2aa751094495aa2ba3a9f029%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29239: GEOSGeometry treats WKB and WKT input differently (former fails)

2018-03-19 Thread Django
#29239: GEOSGeometry treats WKB and WKT input differently (former fails)
+--
 Reporter:  MatBurnham  |Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  GIS |  Version:  2.0
 Severity:  Normal  |   Resolution:  invalid
 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 Jani Tiainen):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Problem seems to originate from GEOS library itself (native library) which
 apparently treats different types of data slightly differently.

 In any case, you geometry is not valid thus Django is not at fault. If
 problem persists with a valid geometry please reopen the ticket.

-- 
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.4a1c619aba1b351aff3617df8d9b919e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29239: GEOSGeometry treats WKB and WKT input differently (former fails)

2018-03-18 Thread Django
#29239: GEOSGeometry treats WKB and WKT input differently (former fails)
--+
   Reporter:  MatBurnham  |  Owner:  nobody
   Type:  Bug | Status:  new
  Component:  GIS |Version:  2.0
   Severity:  Normal  |   Keywords:
   Triage Stage:  Unreviewed  |  Has patch:  0
Needs documentation:  0   |Needs tests:  0
Patch needs improvement:  0   |  Easy pickings:  0
  UI/UX:  0   |
--+
 I've been trying to load an OpenStreetMap-derived multipolygon geometry
 from PostGIS but it fails due to trying to incorrectly load a non-closed
 shape into GeoDjango as a LinearRing. In trying to create a GEOSGeometry
 object manually from the same data, I identified a difference depending on
 the format presented - hex-encoded WKB fails in the way described; the
 same shape pre-converted in PostGIS to WKT works fine.

 {{{
 >>> from django.contrib.gis.geos import GEOSGeometry
 >>> wkt = 'MULTIPOLYGON(((-0.45747735963738 51.4742768635629 0
 -1.79769313486232e+308,-0.457470821752906 51.474364454451 0
 -1.79769313486232e+308,-0.452403039275168 51.4743796256958 0
 -1.79769313486232e+308,-0.452246046228737 51.4742687331168 0
 -1.79769313486232e+308,-0.452112857787284 51.4742487841872 0
 -1.79769313486232e+308,-0.451990649639015 51.4742207886306 0
 -1.79769313486232e+308,-0.451845642714119 51.4741605227468 0
 -1.79769313486232e+308,-0.451582534773507 51.4742741813538 0
 -1.79769313486232e+308,-0.451456303311716 51.4741789629338 0
 -1.79769313486232e+308,-0.450938804609791 51.4744128180323 0
 -1.79769313486232e+308,-0.450789858190376 51.4743100558994 0
 -1.79769313486232e+308,-0.450504957301519 51.4744324316858 0
 -1.79769313486232e+308,-0.450413426918857 51.474364454451 0
 -1.79769313486232e+308,-0.450372439412348 51.4743808829813 0
 -1.79769313486232e+308,-0.450428346706502 51.4744274863629 0
 -1.79769313486232e+308,-0.450302031425679 51.4744810467242 0
 -1.79769313486232e+308,-0.450105475796278 51.4743131572036 0
 -1.79769313486232e+308,-0.449894754750488 51.4744009995489 0
 -1.79769313486232e+308,-0.44991193765199 51.4744175957171 0
 -1.79769313486232e+308,-0.449809762252301 51.4744640314607 0
 -1.79769313486232e+308,-0.449963905451682 51.4746087869285 0
 -1.79769313486232e+308,-0.449909674538134 51.4746315857052 0
 -1.79769313486232e+308,-0.450032469419625 51.4746683822601 0
 -1.79769313486232e+308,-0.449577751172455 51.4748623394995 0
 -1.79769313486232e+308,-0.448971236658821 51.4748638482421 0
 -1.79769313486232e+308,-0.448931925532946 51.4748438993126 0
 -1.79769313486232e+308,-0.448518949163599 51.4748311588197 0
 -1.79769313486232e+308,-0.448473100153223 51.4748489284545 0
 -1.79769313486232e+308,-0.447686709997498 51.4748498504638 0
 -1.79769313486232e+308,-0.447684782159769 51.4748206814408 0
 -1.79769313486232e+308,-0.448265983325825 51.4748150655657 0
 -1.79769313486232e+308,-0.448188869816619 51.4747476750641 0
 -1.79769313486232e+308,-0.44829791241 51.4747361918568 0
 -1.79769313486232e+308,-0.448208148193913 51.4747211882501 0
 -1.79769313486232e+308,-0.448329434332834 51.4746639398514 0
 -1.79769313486232e+308,-0.448478213114157 51.4747982179402 0
 -1.79769313486232e+308,-0.448560355765267 51.4748005648731 0
 -1.79769313486232e+308,-0.448630512294841 51.4747671210795 0
 -1.79769313486232e+308,-0.44869547204442 51.4747617566615 0
 -1.79769313486232e+308,-0.448988754836478 51.4746377883135 0
 -1.79769313486232e+308,-0.448919436497221 51.4745831383048 0
 -1.79769313486232e+308,-0.448959082899222 51.4745629379182 0
 -1.79769313486232e+308,-0.448913736803064 51.4745073659001 0
 -1.79769313486232e+308,-0.448979702381024 51.4744776939629 0
 -1.79769313486232e+308,-0.44899328106419 51.4744893448083 0
 -1.79769313486232e+308,-0.449082129237809 51.474446178007 0
 -1.79769313486232e+308,-0.449221352649516 51.4745348585425 0
 -1.79769313486232e+308,-0.449859718395231 51.4742688169358 0
 -1.79769313486232e+308,-0.449742120293706 51.4741538172243 0
 -1.79769313486232e+308,-0.450747781036455 51.4737123423841 0
 -1.79769313486232e+308,-0.450597912607719 51.4735824228849 0
 -1.79769313486232e+308,-0.450489450780651 51.4736291939047 0
 -1.79769313486232e+308,-0.450386101914518 51.4735359871414 0
 -1.79769313486232e+308,-0.450340169085138 51.4734947481778 0
 -1.79769313486232e+308,-0.450237071676099 51.4734032177951 0
 -1.79769313486232e+308,-0.450144451646025 51.4734446243968 0
 -1.79769313486232e+308,-0.449599963215888 51.4729609885837 0
 -1.79769313486232e+308,-0.44955746696678 51.4729753216381 0
 -1.79769313486232e+308,-0.449539948789152 51.4730110285456 0
 -1.79769313486232e+308,-0.449296622140025 51.4729859666551 0
 -1.79769313486232e+308,-0.449317409259891 51.4729425483967 0
 -1.79769313486232e+308,-0.449414304060582 51.4729481642718 0
 -1.79769313486