bugpktools - Bugs: bug #56785, pkcrop results on 0 raster

 
 

bug #56785: pkcrop results on 0 raster

Submitter:  None
Submitted:  Wed 21 Aug 2019 10:20:06 AM UTC
   
 
Category:  command line utility Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  kempenep
Open/Closed:  Open Operating System:  * GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 23 Aug 2019 09:59:29 AM UTC, comment #2: 

Hi Pietr,

I understand. My images come from a hyperspectral camera, so there is no CRS (I do not know how to state an arbitrary euclidean space and maybe that would create other problems, so I use to define a fake utm CRS for display in QGIS). 
I cannot use your workaround regularly as the images are huge (that one was just an example). I will modify my scripts so that I work in envi format where it is easy to just edit the hdr file (have tried modifying the GTiff with gdal_edit.py but found lots of complications). 
The problem is for all the images I already have. I will keep doing the cropping in R whenever I need it (although croping in R is unbearably slow and pkcrop is fast). 
Thanks a lot for pktools!
(BTW, please think on https://savannah.nongnu.org/bugs/?56332)

Agustin Lobo <alobo>
Wed 21 Aug 2019 08:44:10 PM UTC, comment #1: 

Hi Agus,

Thanks for your interesti in pktools. I checked your input raster file. The problem is that it is not georegistered. pkcrop cannot handle it and therefore I have set the status of this issue to Invalid.

Just as a test:

1) open testin2.tif in QGIS, selecting epsg:25831 as projection
2) right click on opened raster layer and "save as"
3) select a file name and set both Resolution Horizontal and Vertical to 2 -> OK

try to do the crop now and you will not have the 0 image

Can you make your input image iregistered?

Pieter.

Pieter kempeneers <kempenep>
Group administrator
Wed 21 Aug 2019 10:20:06 AM UTC, original submission:  

I have a geotif raster with no projection that I display in QGIS stating epsg:25831. I then digitize a polygon in epsg: 25831
(see attached screenshot). 
I then run pkcrop: 
pkcrop -i testin2.tif -sband 1 -eband 4 -e test.shp -of "ENVI" -o test2out.raw 
which results on an ENVI raster file that is all 0 (same for any format) 

Same problem even for selecting bands: 
pkcrop -i testin2.tif -sband 1 -eband 3  -of GTiff -o test2out2.tif 
All 0

I've put the necessary input files here: 
https://www.dropbox.com/sh/xnhute0nnsvdpet/AAC1ZHzSgFOVN7QouL2XZhWda

Best,
Agus
-email is unavailable-

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #47375:  Screenshot_2019-08-21_12-08-00.png added by None (339KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by alobo (Posted a comment)
  • -email is unavailable- added by kempenep (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-08-21 kempenep StatusNone Invalid
        Assigned toNone kempenep
    2019-08-21 None Attached File- Added Screenshot_2019-08-21_12-08-00.png, #47375

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code