Changeset 11694

Show
Ignore:
Timestamp:
06/22/07 11:56:49 (1 year ago)
Author:
mloskot
Message:

Fixed closeRings() operation, so now it respects coordinate dimension (Ticket #1673).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/ogr/ogrlinearring.cpp

    r10645 r11694  
    372372        || getZ(0) != getZ(nPointCount-1) ) 
    373373    { 
    374         addPoint( getX(0), getY(0), getZ(0) ); 
     374        /* Avoid implicit change of coordinate dimensionality 
     375         * if z=0.0 and dim=2 
     376         */ 
     377        if( getCoordinateDimension() == 2 ) 
     378            addPoint( getX(0), getY(0) ); 
     379        else 
     380            addPoint( getX(0), getY(0), getZ(0) ); 
     381             
    375382    } 
    376383}