0

Let's say I have some metadata about a layer stored in some custom application, and I would like to open or view the layer in QGIS.

What, if any, are my options?

Edit: formats include shp, wms, wfs, geotiff.

  • 1
    Which layer format would you like to open? Your question should be more accurate to be able to help... – wiltomap Apr 9 '15 at 9:21
1

I would suggest to call a python script to open QGIS and add a layer, the general code logic would go something like this:

import os, time
from qgis.core import *

os.startfile('C:/Program Files/QGIS Brighton/bin/qgis.bat')
time.sleep(30) # sleep script for 30sec to wait for QGIS to open

vlayer = QgsVectorLayer("C:/path/to/shapefile/file.shp", "layer_name_you_like", "ogr")
QgsMapLayerRegistry.instance().addMapLayer(vlayer)
1

Call QGIS and pass the layer

qgis yourlayer.shp

that will load QGIS and load the layer.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.