Bug report #8978

loading an sld without uom attribute should set ouptput units to mapunits

Added by Harm Olthof over 10 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Symbology
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17639

Description

When loading an sld where in the sizes no uom attribute is given, it can be assumed that the output units are "MapUnits". However the output units are by default mm, so this should be adjusted manually.

Since it the output setting can be inferred from the sld, imho it should be automatically set.

Associated revisions

Revision 87736387
Added by Blottiere Paul almost 7 years ago

[bugfix] Fix unit of sizes when reading a SLD file (fixes #8978)

Revision 4beeb31a
Added by Luigi Pirelli over 6 years ago

[bugfix] backport from 3.0 Fix unit of sizes when reading a SLD file (fixes #8978)

Revision 1d702d29
Added by Alessandro Pasotti over 6 years ago

Merge pull request #5144 from boundlessgeo/Backport_Fix_uom_reading

[bugfix] backport from 3.0 Fix unit of sizes when reading a SLD file (fixes #8978)

History

#1 Updated by Giovanni Manghi about 10 years ago

  • Category set to Symbology
  • Priority changed from High to Normal

There is no crash or data corruption, so I'm lowering the priority.

#2 Updated by Harm Olthof almost 9 years ago

  • Target version set to Future Release - High Priority

#3 Updated by Jukka Rahkonen almost 9 years ago

Hi,

I checked the SLD 1.1.0 document "05-077r4_OpenGIS_Symbology_Encoding_Implementation_Specification.pdf"

From the page 14:

"If no uom is set inside of Symbolizer, all units are measured in pixel, the behaviour used by SLD 1.0.0."

#4 Updated by Harm Olthof almost 9 years ago

Exactly! So why has the QGIS-GUI set the ouput to mm?
It should be set to "map units" when you load such an sld.

#5 Updated by Pierre-Yves Abalain over 7 years ago

Hi,

I support your request, because I'm facing this problem when developping a program to export styles from ArcGIS to QGis, passing by a SLD file.
QGis should accept pixel as default unit when loading a SLD.

Different way to do this I Think :
  • offer the possibility to have a global parameter in QGis to set default units for everything : pixel/millimeter/map units
  • treat unit as pixel by default when loading SLD
  • when loading a SLD, propose the user to choose the unit

#6 Updated by Koen DeBaets over 7 years ago

At AIV , the Flemish Agency of (Geographic) Information, we would like to provide our geospatial data with
an SLD as (software independent) symbolisation file. This is a request from many of our users (government institutions, businesses and citizens)

But we face the same problem: all measures in our SLD's use the default unit 'pixel', but when loading the SLD in QGis (2.16), the assigned units are 'mm'. I would expect QGis to accept pixel as default unit.

#7 Updated by Giovanni Manghi almost 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#8 Updated by Anonymous almost 7 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF