[postgis-devel] [PostGIS] #1232: Exception when calling isValid on multilinestring with only 1 point

PostGIS trac at osgeo.org
Mon Oct 10 01:15:16 PDT 2011


#1232: Exception when calling isValid on multilinestring with only 1 point
-------------------------+--------------------------------------------------
 Reporter:  hopfgartner  |       Owner:  pramsey      
     Type:  defect       |      Status:  new          
 Priority:  medium       |   Milestone:  PostGIS 1.5.4
Component:  postgis      |     Version:  1.5.X        
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by strk):

 I was wrong about the new ST_IsValid support being available in 1.5.3.
 It is in 2.0, togheter with ST_MakeValid:

 {{{

 strk=# select postgis_full_version();
                        postgis_full_version
 -------------------------------------------------------------------------------------------------------------
  POSTGIS="2.0.0SVN" GEOS="3.4.0dev-CAPI-1.8.0" PROJ="Rel. 4.7.1, 23
 September 2009" LIBXML="2.7.6" USE_STATS
 (1 row)

 strk=# select gid, st_isvalid(the_geom) from geosbug;
   gid  | st_isvalid
 -------+------------
  12202 | f
 (1 row)

 strk=# select gid, st_isvalidreason(the_geom) from geosbug;
   gid  |                          st_isvalidreason
 -------+---------------------------------------------------------------------
  12202 | IllegalArgumentException: point array must contain 0 or >1
 elements
        :
 (1 row)

 strk=# select gid, st_astext(st_makevalid(the_geom)) from geosbug;
   gid  |             st_astext
 -------+-----------------------------------
  12202 | MULTIPOINT(1737689.37 5082819.07)
 (1 row)

 }}}

 I don't know if this is worth backporting to 1.5 (the ST_IsValid part)

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1232#comment:4>
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-devel mailing list