I am trying to create a memory layer, I followed the directions from the page below but no points appeared on my map. First I tried typing each line into the python console and I also create a plugin with the same code and still nothing appeared on the map. At some point while I was typing the code into the console, it asked for the projection, so I specified my typical projection (epsg 2272, a state plane coordinate system)
How to create a new empty vector layer programmatically?
I also reviewed
http://www.qgis.org/pyqgis-cookbook/vector.html#memory-provider
I am experimenting with memory layers because I want to include it into a plugin I am developing.
Best Answer
I needed to add the layer to the interface using:
QgsMapLayerRegistry.instance().addMapLayer(vl)