1

I am trying to add many layers to a project in QGIS. After adding approximately 80 layers, QGIS returns this error: "not a valid or recognized data source". There is nothing wrong with the shapefiles themselves, they will all open if done individually. It seems to just be after a certain number that it won't allow any more. The error message seems strange to me.

Is there a limit to the number of layers a single project can have?

1

2 Answers 2

3

UPDATE: This issue has been addressed with the following commit to QGIS master branch. The fix may soon be backported to the 2.0.x branch as well.

Since the issue stems from how many files an application can have open at once on a Mac, try moving your data to a database instead.

You can import your shapefiles into Spatialite or PostgreSQL/PostGIS databases (db). Spatialite is file-based and built on top of SQLite, allowing for easier portability and offers many advantages over shapefiles. You could import all of your shapefiles into one Spatialite db file, thereby circumventing the Mac limit.

PostgreSQL/PostGIS is more complicated but worth the investment of time and effort, and is available via Mac installers from Kyngchaos.com.

NOTE (June, 2013): Spatialite 4 offers many of the features of PostgreSQL/PostGIS and seems to be quite a bit faster than version 3, but is not currently fully functional in the master branch of QGIS. There is an effort to have it ready for QGIS 2.0 release.

0
0

I've encountered the same problem loading a bunch of raster files with QGIS 2.0 and Mac but using QGIS 1.8 solved the problem for me.

4
  • This issue is not a regression in version 2.0. The issue has been present in every version of QGIS up until the noted commit in my answer. If you get the "not a valid or recognized data source" error in 2.0, it may be for a different reason.
    – dakcarto
    Nov 3, 2013 at 20:36
  • @dakcarto I'm using a project whit many raster files that works only in QGIS 1.8!
    – G M
    Nov 3, 2013 at 20:39
  • Exactly how many layers, and are any layers of the same raster file (i.e. imported multiple times)?
    – dakcarto
    Nov 3, 2013 at 20:47
  • @dakcarto now I've uninstall QGIS 2.0 but they where 149 different raster files (average dimension 4MB, RGB or single band image) I think it stop loading them in the middle...
    – G M
    Nov 3, 2013 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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