bugpktools - Bugs: bug #52597, Bug with proportion rule in...

 
 

bug #52597: Bug with proportion rule in pkextractogr

Submitted by:  Daniel McInerney <dmci>
Submitted on:  Wed 06 Dec 2017 11:26:23 AM UTC  
 
Category: command line utilitySeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Pieter kempeneers <kempenep>
Open/Closed: ClosedOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 08 Dec 2017 10:01:50 AM UTC, comment #2:

Tested and should work now with abbreviated field names

Pieter kempeneers <kempenep>
Project AdministratorIn charge of this item.
Wed 06 Dec 2017 02:43:32 PM UTC, comment #1:

Thanks for the report. Fixed in 2.6.7.3. Extracted field names renamed to max 10 characters to support ESRI Shp files.

Pieter kempeneers <kempenep>
Project AdministratorIn charge of this item.
Wed 06 Dec 2017 11:26:23 AM UTC, original submission:

There is a bug in pkextractogr (version 2.6.7) when the -proportion is used. Currently, pkextractogr does not calculate the proportion of all classes of the raster located within the polygon. The example below provides further information relating to the bug.

pkextractogr -i test.tif -s clipped_segments.shp -o
clipped_segments_props.sqlite -r proportion -polygon -c 1 -c 4 -c 5

(note that test.tif only has 3 classes: 1, 4, 5

I would have expected to get a proportion (%) for each class in each polygon, but currently it's only returning the proportions for class 5 in three polys:

sqlite> select ogc_fid, "1","4","5" from clipped_segments;
ogc_fid 1 4 5
---------- ---------- ---------- ----------------
1 18.3838383838384
2 19.5854181558256
3 35.0963798777621
4 0.0
5 0.0
6 0.0
7 0.0
8 0.0
9 0.0

Similar results are obtained when the classes (-c ..) are omitted, while this bug is also occurring with '-r maxvote'. Example files attached.

Daniel McInerney <dmci>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #42580:  test.tif added by dmci (91KiB - image/tiff)
file #42581:  clipped_segments_props.sqlite added by dmci (27KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kempenep (Posted a comment)
  • -unavailable- added by dmci (Submitted the item)
  • -unavailable- added by dmci
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 08 Dec 2017 10:01:50 AM UTCkempenepOpen/ClosedOpen=>Closed
    Wed 06 Dec 2017 02:43:32 PM UTCkempenepStatusNone=>Fixed
      Assigned toNone=>kempenep
    Wed 06 Dec 2017 11:26:23 AM UTCdmciAttached File-=>Added test.tif, #42580
      Attached File-=>Added clipped_segments_props.sqlite, #42581
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1