Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

This is my current code segment:

QString myPluginsDir = 
"c:/osgeo4w/apps/lib/qgis";
QString myLayerPath = 
"c:/users/tygh/gisdata/farms/";
QString myLayerBaseName = 
"potash";
QString myProviderName = 
"ogr";

// Instantiate Provider Registry
QgsProviderRegistry::instance(myPluginsDir);
QgsVectorLayer * mypLayer = 
new QgsVectorLayer(myLayerPath, myLayerBaseName, myProviderName);
QgsSingleSymbolRenderer *mypRenderer = 
new QgsSingleSymbolRenderer(mypLayer->geometryType());
QList <QgsMapCanvasLayer> myLayerSet;
mypLayer->setRenderer(mypRenderer);

// Add the Vector Layer to the Layer Registry
QgsMapLayerRegistry::instance()->addMapLayer(mypLayer, TRUE);

// Add the Layer to the Layer Set
myLayerSet.append(QgsMapCanvasLayer(mypLayer, TRUE));

// Run QGIS disolve
QgsGeometryAnalyzer Qga;
Qga.dissolve(mypLayer, (LPTSTR)bstrFilename);
share|improve this question
I am still trying to get it linked as my other question posted here refers to. – Tygh Porak Dec 12 '12 at 6:50

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.