[postgis-devel] [PostGIS] #409: ST_AsSVG - degraded

PostGIS trac at osgeo.org
Fri Feb 5 14:43:10 PST 2010


#409: ST_AsSVG - degraded
-----------------------+----------------------------------------------------
  Reporter:  sdikiy    |       Owner:  colivier
      Type:  defect    |      Status:  new     
  Priority:  critical  |   Milestone:          
 Component:  postgis   |     Version:  1.4.X   
Resolution:            |    Keywords:  AsSVG   
-----------------------+----------------------------------------------------
Comment (by colivier):

 Paul,

 Could you try this patch on your version ?

 On my box it's fix this issue, but i did't have the same error message
 than yours (i don't get why you have a such high memory allocation)


 {{{
 Index: postgis/lwgeom_svg.c
 ===================================================================
 --- postgis/lwgeom_svg.c        (revision 5208)
 +++ postgis/lwgeom_svg.c        (working copy)
 @@ -475,6 +475,8 @@
         if ( i ) /* We have some geometries, so add space for delimiters.
 */
                 size += sizeof(";") * --i;

 +       if (size == 0) size++; /* EMPTY GEOMETRYCOLLECTION */
 +
         return size;
  }

 @@ -486,6 +488,9 @@
         LWGEOM_INSPECTED *subinsp;
         uchar *subgeom;

 +       /* EMPTY GEOMETRYCOLLECTION */
 +       if (insp->ngeometries == 0) *ptr = '\0';
 +
         for (i=0; i<insp->ngeometries; i++)
         {
                 if (i) ptr += sprintf(ptr, ";");

 }}}


 Both 1.4 and trunk are impacted

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