[gdal-dev] ogr2ogr clipping issue

Frank Warmerdam warmerdam at pobox.com
Fri Apr 15 15:36:27 EDT 2011


On 11-04-15 03:09 PM, edwarddes wrote:
> I am trying to clip a dxf to a region, using the following command:
> ogr2ogr -f DXF -clipdst $w $e $s $n ./tmp/${BASE}_avg_05_unbuffered.dxf
> ./tmp/${BASE}_avg_05.dxf
> where w,e,s,n are defined as follows:
> echo $w $e $s $n
> 225000 229000 902000 906000
>
> The data is properly clipped on the north and west side, but on the south
> and east side, no clipping takes place.  The source file has extents that
> are 100units larger in each direction

Edward,

 From the usage message I see:

   [-clipdst [xmin ymin xmax ymax]|WKT|datasource]

I think you need

   -clipdst $w $s $e $n

That is, you have the arguments in the wrong order.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list