[Qgis-user] Clipping tool for non-georeferenced data

Blumentrath, Stefan Stefan.Blumentrath at nina.no
Tue Jun 4 03:56:28 PDT 2013


Hi

The problem is the way you specified the "srcwin" parameter.
The syntax is:
-srcwin xoff yoff xsize ysize

So, if you want to clip out the upper left 40x50 cells from a 100x100 raster for example your srcwin should look like this:
-srcwin 0 0 40 50

If you wanted to clip out the lower right 40x50 cells from a 100x100 raster for example your srcwin should look like this:
-srcwin 60 50 40 50


Have a look here:
http://www.gdal.org/gdal_translate.html

As the error message indicates, negative values are not allowed...

Cheers
Stefan



From: qgis-user-bounces at lists.osgeo.org [mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of Alexia Mondot
Sent: 4. juni 2013 12:00
To: Qgis-user at lists.osgeo.org
Subject: [Qgis-user] Clipping tool for non-georeferenced data

Hello,

I've add to QGIS non georeferenced data. It is added in 0,0, north up, south down. So the y is negative.
When I tried to extract a part of my data with the clipper, I get an error :



Error: Computed -srcwin 266 -145 175 -126 has negative width and/or height.

or
Computed -srcwin falls outside raster size of 156x144.


I understand that it is because the coordinate y is negative and the tool can't match it with the real coordinate.
Is there a way to clip a non georeferenced data ?

Thanks by advance,
Alexia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130604/a97829b4/attachment.html>


More information about the Qgis-user mailing list