[Qgis-developer] QGIS 3.0: Plans to support librttopo?

Nyall Dawson nyall.dawson at gmail.com
Mon Mar 6 16:40:51 PST 2017


On 6 March 2017 at 23:45, Mark Johnson <mj10777 at googlemail.com> wrote:
> The spatialite function 'ST_Project' is based on the librttopo functionality
> (formally LWGEOM)
> - and is only available when compiled with '--enable-rttopo'
>
> https://git.osgeo.org/gogs/rttopo/librttopo
>
> So if a support for 'Meters as Map units' was desired, in the case of
> degrees
> - the use the librttopo functionality as a part of the 'QgsGeos' would be
> the most effective way to deal with this
>
> This would be a new dependency, but would also offer many other
> functionalities (such as Topology).

Hi Mark,

This shouldn't be implemented using an external dependency -- instead
you'll need to use the existing QGIS classes like
QgsCoordinateTransform. You'd just need to modify:

QgsRenderContext::convertToPainterUnits
QgsRenderContext::convertToMapUnits
QgsRenderContext::convertFromMapUnits

Everything you need should already be encapsulated in QgsRenderContext
(and the QgsMapToPixel member).

Nyall


More information about the Qgis-developer mailing list