Ignore:
Timestamp:
Feb 20, 2010 11:09:30 AM (6 years ago)
Author:
colivier
Message:

Fix computed string length in Polygon with several rings for ST_AsGML with GML3. Related to #421

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/postgis/lwgeom_gml.c

    r5181 r5269  
    775775        int i;
    776776
    777         size = sizeof("<gml:Polygon>");
    778 
    779         size += sizeof("<gml:exterior><gml:LinearRing><gml:posList srsDimension='x'>");
    780         size += sizeof("</gml:posList></gml:LinearRing></gml:exterior>");
    781 
    782         size += sizeof("<gml:interior><gml:LinearRing><gml:posList>") * (poly->nrings - 1);
    783         size += sizeof("</gml:posList></gml:LinearRing></gml:interior>") * (poly->nrings - 1);
    784 
    785         size += sizeof("</gml:Polygon>");
    786 
     777        size = sizeof("<gml:Polygon><gml:exterior><gml:LinearRing>///") * 2;
     778        size += sizeof("<gml:interior><gml:LinearRing>//") * 2 * (poly->nrings - 1);
     779        size += sizeof("<gml:posList srsDimension='x'></gml:posList>") * poly->nrings;
    787780        if ( srs ) size += strlen(srs) + sizeof(" srsName=..");
    788781
Note: See TracChangeset for help on using the changeset viewer.