The background: I've inherited a pretty handy plugin for QGIS and an associated an XML file. The plugin (among other things) when installed, will ensure that each instance of QGIS that you open has a selection of pre-loaded shapefiles - these are saved in various folders on the network drive. (For clarity, these are not loaded in the layer panel. Rather, they're nesting in a newly created 'contents panel' (for lack of a better term). To load them, all one simply has to do is click on the shapefile name in the 'contents panel' and presto, the shapefile will load in the layer panel and the map window.) Below is a screenshot of the 'contents panel':

Contents panel

This all saves time for a lot of the team who are less familiar with QGIS from having to search various network files and folders.

If we receive a new shapefile that would be useful to have pre-loaded, all I have to do is edit the accompanying XML file. (i.e. I don't need to edit any of the plugin code). Screenshot of the XML code header and code that I was intending to use to pre-load GDB data:


enter image description here

As far as I can tell, the syntax and structure are what is specified in the header. (Despite what the screengrab shows, I'd tidied the bracketing and code to match that of the header code so bracketing isn't the issue and I have ensured that the syntax that I've used is correct.)

The issue: Which brings me to the problem that I'm having. I now wish to migrate some of these shapefiles to a geodatabase (I'm trying ESRI's file geodatabase as a proof of concept), however, when I edit the XML file to include for this (or any) geodatabase, the 'contents panel' doesn't update with the new feature class as I'd expect.

What I've tried: I've noticed in the XML file that the FGDB that is referenced is of a raster catalogue type rather than a vector type. I've edited the XML to account for this with no luck.

I've also tried adding the suffix .table' to the desired feature class, but this also doesn't help out.

Lastly, I tried referencing a geodatabase that was on the same network drive as the xml file, still no luck.

I am by no means a code or script person but can tenaciously plug away until something works, but was hoping that someone might have come across this problem before and have a ready solution/ explanation.

  • try adding '-->' at the end of your TESTING line for starters. ie <!--TESTING: Adding in FGDB -->
    – vagvaf
    Jul 10 '19 at 5:46
  • Hey thanks vagvaf. The screenshot I've used is from a reverted copy of the xml file. Following my edits (in which I ensured that bracketing etc was correct), if the xml didn't work, it would cause the plugin to shit itself, so I had to revert back to an earlier version of the xml file. Jul 10 '19 at 5:49
  • I just edited the xml file and updated the screenshot so as to avoid confusion. Jul 10 '19 at 5:56
  • What is the name of the plugin? Is it a public plugin?
    – GreyHippo
    Jul 11 '19 at 14:37
  • I'm afraid not GreyHippo. Our office received a version of the plugin from a government dept who does work similar to us many years ago. Then one of my predecessors (who was much more of a programmer than I) heavily modified it to suit us. I've thought about reaching out to both the government dept and the old employee, but to be honest, it feels a bit weird contacting them out of the blue when they have no idea who i am. Jul 12 '19 at 2:31

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.