[postgis-tickets] [PostGIS] #3031: "POINT EMPTY" as WKB defaults to "MULTIPOINT EMPTY" when restoring with copy and failing validation

PostGIS trac at osgeo.org
Fri Mar 20 03:27:54 PDT 2015


#3031: "POINT EMPTY" as WKB defaults to "MULTIPOINT EMPTY" when restoring with
copy and failing validation
--------------------------------------------+-------------------------------
 Reporter:  jeanchristophesaville           |       Owner:  pramsey      
     Type:  defect                          |      Status:  new          
 Priority:  medium                          |   Milestone:  PostGIS 2.1.6
Component:  postgis                         |     Version:  2.1.x        
 Keywords:  POINT EMPTY , MULTIPOINT EMPTY  |  
--------------------------------------------+-------------------------------

Comment(by strk):

 Looking at the currently expected output, I see issues with both point and
 multipoint.

 A sane expectance, for a (polygon) typmoded geometry/geography,
 is to accept only 2d polygons, of any srid:
 {{{
 polygon|0|Polygon|0|OK-BOK-GOK-BGOK
 polygon|4326|Polygon|0|OK-BOK-GOK-BGOK
 polygon||COUNT|4|
 polygon||GCOUNT|4|
 }}}

 But we're also expecting (insanely, I'd say) that for a (multipoint)
 typmoded geometry/geography,
 to accept both 2d multipoints AND points:
 {{{
 multipoint|0|Point|0|OK-BOK-GOK-BGOK
 multipoint|0|MultiPoint|0|OK-BOK-GOK-BGOK
 multipoint|4326|Point|0|OK-BOK-GOK-BGOK
 multipoint|4326|MultiPoint|0|OK-BOK-GOK-BGOK
 multipoint||COUNT|8|
 multipoint||GCOUNT|8|
 }}}

 And (again insanely) that for a (point) typmoded geometry/geography,
 to accept NOTHING:
 {{{
 point||COUNT|0|
 point||GCOUNT|0|
 }}}

 By "accept" here we mean by stepping trough WKB.
 The wrong failures in the point case are due to WKB converting the point
 into a multipoint.
 The wrong successes I'm not sure about (why is a point accepted in a
 multipoint?)

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3031#comment:23>
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