[postgis-tickets] [PostGIS] #3332: PostGIS 2.x doesn't allow to store some invalid polygon kinds

PostGIS trac at osgeo.org
Wed Nov 25 13:26:28 PST 2015


#3332: PostGIS 2.x doesn't allow to store some invalid polygon kinds
------------------------+------------------------------
  Reporter:  fcaa       |      Owner:  strk
      Type:  defect     |     Status:  new
  Priority:  high       |  Milestone:  PostGIS 2.2.1
 Component:  liblwgeom  |    Version:  2.2.x
Resolution:             |   Keywords:  invalid geometry
------------------------+------------------------------

Comment (by pramsey):

 So this is pretty narrowly an issue with SQL functions handling invalid
 inputs. GeomFrom*. We don't like invalid WKT, and we don't like invalid
 WKB, *IF* we find it in the context of a function.

 This doesn't work:
 {{{
 select
 st_astext(st_geomfromwkb(decode('01060000000100000001030000000100000015000000BABCF3EDEFA61EC0F50E96F40EDE45405727A222F4A61EC04875A8E10EDE45400FA0F07506A71EC0A975B0420FDE454007A3506D09A71EC027768CC00FDE45406CA390D209A71EC08743825310DE4540A7A4900D0BA71EC0D51098D510DE4540A1A4F0070BA71EC0F4DECD2712DE4540DCA5F0420CA71EC039ACA39E12DE45404DA670B30CA71EC0AFACC31413DE454036A6F09C0CA71EC0E679F17E13DE454050A550B60BA71EC02D474BF913DE45408EA350F409A71EC0B547B38114DE4540E2A1D04808A71EC0D414F9D314DE4540C334828F01A71EC0CD479B9914DE4540FEBBF330EFA61EC02E47B3FA13DE45409655352FEFA61EC0FA13A3FA13DE45406BEF9E6BEFA61EC06412AB6312DE45400A89806FEFA61EC04912B44812DE45405356C5ECEFA61EC096A867FC0EDE4540BABCF3EDEFA61EC0274294F40EDE4540BABCF3EDEFA61EC08EA87EF40EDE4540','hex')));
 }}}
 And this does work
 {{{
 select
 '01060000000100000001030000000100000015000000BABCF3EDEFA61EC0F50E96F40EDE45405727A222F4A61EC04875A8E10EDE45400FA0F07506A71EC0A975B0420FDE454007A3506D09A71EC027768CC00FDE45406CA390D209A71EC08743825310DE4540A7A4900D0BA71EC0D51098D510DE4540A1A4F0070BA71EC0F4DECD2712DE4540DCA5F0420CA71EC039ACA39E12DE45404DA670B30CA71EC0AFACC31413DE454036A6F09C0CA71EC0E679F17E13DE454050A550B60BA71EC02D474BF913DE45408EA350F409A71EC0B547B38114DE4540E2A1D04808A71EC0D414F9D314DE4540C334828F01A71EC0CD479B9914DE4540FEBBF330EFA61EC02E47B3FA13DE45409655352FEFA61EC0FA13A3FA13DE45406BEF9E6BEFA61EC06412AB6312DE45400A89806FEFA61EC04912B44812DE45405356C5ECEFA61EC096A867FC0EDE4540BABCF3EDEFA61EC0274294F40EDE4540BABCF3EDEFA61EC08EA87EF40EDE4540'::geometry;
 }}}
 I can load the attached shape file without incident, since the loading is
 not using GeomFrom* functions. Presumably ogr2ogr can load the sqlite
 database too. I'm not sure who this inconsistency is inconveniencing, and
 I am loath to change a behaviour we've now had for quite some time.

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3332#comment:9>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list