Opened 4 years ago

Closed 22 months ago

#282 closed defect (wontfix)

PNG encoding does not recognize band labeling

Reported by: pcampalani Owned by: pcampalani
Priority: trivial Milestone:
Component: petascope Version: 8.3
Keywords: png labels range construct Cc: dmisev, abeccati, arezaeim, mase
Complexity: Medium

Description

It seems that when encoding a PNG with a WCPS query with explicit definition of the single bands, the order of the bands is fixed to R, then G, then B, independently of which label is set in the query.

This means that the following queries are equivalent:

for c in (rgb) return encode({
  red:   c.red;
  green: c.green;
  blue:  c.blue}, "png")
for c in (rgb) return encode({
  green: c.red;
  red:   c.green;
  blue:  c.blue}, "png")

Change History (8)

comment:1 Changed 4 years ago by dmisev

  • Resolution set to invalid
  • Status changed from new to closed

yes there's no semantics attached to the band labels as far as I know, i.e. it's just some random name for query documentation I guess. So I'd close this ticket as invalid.

comment:2 Changed 4 years ago by abeccati

  • Priority changed from minor to trivial
  • Resolution invalid deleted
  • Status changed from closed to reopened

This is at least quite confusing from an user perspective and should be addressed somehow (with "trivial" priority) e.g. at least clearly documented.

Labeling determines the name of the range field in the created coverage and they are clearly not interpreted by the PNG formatter (which is not part of the WCPS standard itself).

Something that would nicely fit into the user manual in something like "supported formats"

comment:3 Changed 4 years ago by abeccati

  • Owner changed from abeccati to pcampalani
  • Status changed from reopened to assigned

comment:4 Changed 4 years ago by pcampalani

I agree, it should be addressed: do we want to specify this in the user manual, or do we want to enable assignment by label in the WCPS?

comment:5 Changed 4 years ago by dmisev

Which user manual? I only know of the WCPS standard 08-068r2

What matters is the order of the range components -> PNG obviously expects them in RGB(A) order, so if you want to switch red and green you'd do

for c in (rgb) return encode({
  R: c.green;
  G: c.red;
  B: c.blue},
"png")

comment:6 Changed 3 years ago by mase

  • Cc mase added
  • Complexity set to Very Hard

comment:7 Changed 3 years ago by pcampalani

  • Complexity changed from Very Hard to Medium
  • Keywords png labels range construct added

comment:8 Changed 22 months ago by dmisev

  • Resolution set to wontfix
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.