1

I'm modifying QuickWKT plugin by elpaso, which is available on github: https://github.com/elpaso/quickwkt/blob/master/QuickWKT.py

This plugin stores 'layer' data inside memory layer (scratch memory)

What I'd like to do is storing the 'layer' data for later use (Qgis project) instead of scratch memory, so user can input new coordinates and generate geometry through the plugin

When I changed the vector data providers atributes of QgsVectorLayer from 'memory' (Line:121):

layer = QgsVectorLayer(typeString, layerTitle, "memory") 

to 'ogr':

layer = QgsVectorLayer(typeString, layerTitle, "ogr")

After changing to 'ogr', the program doesn't output anything when running QuickWKT (see screenshot). I'm not sure whether the probem was caused from QgsVectorLayer's attribute doesn't support ogr, or the code block which invokes 'layer' doesn't support ogr.

Is it possible to change the vector data providers atributes from 'memory' to something else?

After I Changed to OGR

and this is the output I got

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.