Ticket #114 (closed defect: fixed)

Opened 2 years ago

Last modified 12 months ago

Not all PointSymbolizer attributes accessible

Reported by: samueltc Owned by: springmeyer
Priority: major Milestone: 0.7.0
Component: Boost.Python Binding Version: SVN Trunk
Severity: Major Keywords:
Cc: mishok13 Patch Needs Improvement: yes
Needs Docmentation: no Has Patch?: yes
Design Decision Needed: no

Description

File, width, height and type should be accessible.

p = PointSymbolizer() dir(p)

['class', 'delattr', 'dict', 'doc', 'getattribute', 'hash', 'init', 'instance_size', 'module', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'str', 'weakref', 'allow_overlap']

Attachments

issue114-filename_property.patch (0.8 kB) - added by mishok13 16 months ago.
filename property patch

Change History

Changed 2 years ago by springmeyer

  • priority set to major

Changed 2 years ago by springmeyer

r743 added:

PointSymbolizer().get_opacity
PointSymbolizer().set_opacity

What remains to be exposed in the python properties are the symbol file path, and sizes AFAICT.

Changed 20 months ago by springmeyer

  • patch_need_improvement unset
  • version set to SVN Trunk
  • need_documentation unset
  • milestone set to 0.6.0
  • has_patch unset
  • design_decision_needed unset

Changed 20 months ago by springmeyer

  • owner changed from artem to springmeyer

Changed 19 months ago by springmeyer

  • milestone changed from 0.6.0 to 1.0.0

Non essential properties, so I'm pushing off to 1.0.0

Changed 17 months ago by springmeyer

  • milestone changed from 1.0.0 to 0.7.0

Changed 16 months ago by mishok13

filename property patch

Changed 16 months ago by mishok13

  • cc mishok13 added
  • has_patch set
  • patch_need_improvement set

Tada! Added filename property to PointSymbolizer. Dane, could you take a look at the patch? It looks kinda hackish to me.

Changed 16 months ago by springmeyer

Ya, the normal boost way would be to do something like:

        .add_property("filename",
            make_function(&point_symbolizer::get_filename,return_value_policy<copy_const_reference>()),
            &point_symbolizer::set_filename)

but that does not seem to work ad I'd expect due to the subclassing going on with symbolizer_with_image. So I'll need to look into this a bit more.

Changed 14 months ago by springmeyer

  • milestone changed from 0.7.0 to 0.6.1

Changed 14 months ago by springmeyer

  • milestone changed from 0.6.1 to 0.6.2

Changed 12 months ago by springmeyer

  • status changed from new to closed
  • resolution set to fixed

I still don't understand why the normal method mentioned above does not work, but your patch does and the set method does as well, so let's go with it.

applied your patch in r1295 - thanks!

Note: See TracTickets for help on using tickets.