Feature request #515
Thoroughly use OGR
|Pull Request or Patch supplied:||Resolution:||fixed|
|Easy fix?:||No||Copied to github as #:||10574|
The Add Vector Layer interface could be enhanced to thoroughly use OGR features.
OGR has lots of options that remain hidden in QGIS.
First of all, more formats. File formats but also database formats. QGIS doesn't even make any use of SQLite for spatial storage. It could. It's a practical format, only one file instead of 3 for shapefiles and 4 for MapInfo. Nor it makes any use of other spatial repositories, mainly Oracle Spatial and OGR makes it very easy.
Second, and maybe more important if you don't have data inside Grass, make use of the "-sql" and "-where" options. Managing and filtering datafiles before viewing them in a map is very important.
Third, not so important, an "advanced" mode could make use of recent "enhancements" of OGR which request a more precise description of the data source.
Fourth, and this is finally a minor glitch, OGR lets the user access graphical features which are common in DGN and MapInfo files. It's not necessary for GIS operations, but sometimes this carry some implicit data...
#3 Updated by Redmine Admin over 11 years ago
I have been working in a patch for open vector layer dialog to improve it and extend it to support database, protocol and directory connections in addition to the already implemented file support.
I have tested the patch with the following drivers:
Mysql,Oracle,Postgres,ODBC,Esri Personal Geodatabase
UK. NTF.,US Census Tiger/Line,Arc Info Binary Coverage
Atlas BNA,Esri Personal Geodatabase,Esri Shapefile,GML,GPX,KML,Mapinfo File,Microstation DGN,S-57,X-PLANE,
The supported drivers are not limited to the ones in the list, I have coded the uri
translation for most drivers mentioned in gdal/ogr site.
#4 Updated by Tim Sutton over 11 years ago
- Status changed from Open to In Progress
I tested your patch here. The dialog has some layout issues making the upper frame impossible to see here on Ubuntu. I can fix this for you. Also the encoding selector has gone from the open dialog which may cause people in some locales issues - is there a way to reinstate that?
Also note that for sake of clarity, new methods added to the 1.x api should state which version they were added
virtual QString fileVectorFilters() const; + /** return a string containing the available database drivers */ + virtual QString databaseDrivers() const; + /** return a string containing the available directory drivers */ + virtual QString directoryDrivers() const; + /** return a string containing the available protocol drivers */ + virtual QString protocolDrivers() const;
Should have comments added like:
/** return a string containing the available protocol drivers ** @note this method was added in QGIS 1.1 */
so that it is obvious to programmers when they will be deviating from the stable supported 1.0.x api.
I am really looking forward to the new functionality introduced by your patch making its way into SVN!