mapnik.Query.property_names lacks Python converter #1762

Closed
migurski opened this Issue Mar 14, 2013 · 4 comments

Comments

Projects
None yet
2 participants
Member

migurski commented Mar 14, 2013

I get one of these when attempting to read property names from a query: TypeError: No to_python (by-value) converter found for C++ type: std::set<std::string, std::less<std::string>, std::allocator<std::string> >

Owner

springmeyer commented Mar 14, 2013

thanks! fixed in master and backported to 2.1.x branch

Member

migurski commented Mar 14, 2013

Woop! thanks. I'm realizing that the Python Datasource features() function wants to be cacheable, so Query needs to provide more info. Is resolution equivalent to scale-denominator, or are they different when the scale changes?

Owner

springmeyer commented Mar 14, 2013

they are different. resolution is simply map width/query bbox width while scale_denominator embeds the "standard pixel size"

resolution is set up here: https://github.com/mapnik/mapnik/blob/master/include/mapnik/feature_style_processor_impl.hpp#L395-L398

query also stores scale_denom: https://github.com/mapnik/mapnik/blob/master/include/mapnik/query.hpp

looks like the python binding overall to query is pretty lacking....

Member

migurski commented Mar 15, 2013

Ah cool, the scale denominator would be super useful, and much preferable to the resolution. I’ve not really bumped into Query until now so I feel like it’s getting its first workout. How do the standard pixel and the overall map scale factor interact?

@PetrDlouhy PetrDlouhy added a commit to PetrDlouhy/mapnik that referenced this issue Aug 22, 2013

@PetrDlouhy Dane Springmeyer + PetrDlouhy fix access to mapnik::query::property_names in python - closes #1762 484cfa9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment