Re: [Qgis-user] use autogenerated form in Qgis for same table in different postgres databases
Hello Bernhard, Thanks for the suggestion. I just installed the plugin. When selecting a table and trying to initialise the layer I get a Database Error: syntax error at or near ( LINE1: EXECUTE ('public'.'T_network_geometry') (followed by more, I can send the screenshot). When I click OK the python error window shows: Traceback (most recent call last): File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\datadriveninputmask.py, line 188, in initializeLayer inputUi = None, searchUi = None, helpText = ) # set the defaults here because somehow some of the values persist File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddmanager.py, line 176, in initLayer readConfigTables = readConfigTables) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 371, in createUi showParents, showChildren, readConfigTables, createAction) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 200, in __createForms n2mAttributes = self.getN2mAttributes(db, thisTable, anAtt.name, anAtt.num, labels, showChildren, skip) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 635, in getN2mAttributes configList = self.configureLayer(ddRelationTable, [], {}, [], {}, {}, [], db, True, ) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 184, in configureLayer DbError(query) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\dderror.py, line 54, in __init__ raise FatalError(DBError exiting) FatalError: 'DBError exiting' Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] QGIS version: 2.6.1-Brighton Brighton, e2a51df Should I do something else before initialising the layer? thanks, Janneke On 22/12/2014 10:14, Bernhard Ströbl wrote: Hi Janneke, this is not answering your question... but, have you tried the DataDrivenInputMask plugin [1]. It auto-generates input masks for PostgreSQL layers. Only prerequisite is a properly designed database in respect to constraints, default values, data types. regards Bernhard [1] http://plugins.qgis.org/plugins/DataDrivenInputMask/ Am 21.12.2014 15:44, schrieb Janneke van Dijk: Dear all, I have set up a form in QGIS 2.6 using the attribute editor layout 'autogenerate', to edit an editable view in a postgres database. This works nicely. I would like to use this form to edit data in other databases that have an identical structure. Ideally, I would set up a project file with all properties set where I could choose to load layers either from one or another database (with identical structures), and when I edit a layer the correct form opens. If I save it as a .qml file (from project1 connected to database1), then load it in project2 (connected to database2 with identical tables loaded) through propertiesfieldsload style it appears to load it (the edit widgets get changed to the same as in project1), but when I click a value relation widget the layer, key column and value column fields are empty. When I open the attribute table all fields that have a value relation that refers to a lookup table that contains different values than the original lookup table will show their values between brackets (at least, those values that do not appear in the original table). It looks as if the .qml retains a link to the original database and lookup tables (and not just to layer names as they are loaded in the project). Is there a way to configure a form based on a table structure that can be re-used for other tables with the same structure? Thanks, Janneke ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user __ Information from ESET Mail Security, version of virus signature database 10911 (20141221) __ The message was checked by ESET Mail Security. http://www.eset.com __ Information from ESET Mail Security, version of virus signature database 10912 (20141221) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] use autogenerated form in Qgis for same table in different postgres databases
Hi Janneke, sorry for that... I have already fixed it but did not make a new release yet. The plugin provides a means to configure your masks see [1]. This configuration is stored in database tables and if they do not exist, you get this error. Try to configure any of your layers, which should create the configuration tables for you. You do not need to configure your tables, though. Bernhard [1] https://github.com/bstroebl/DataDrivenInputMask/wiki/Usage Am 22.12.2014 09:09, schrieb Janneke van Dijk: Hello Bernhard, Thanks for the suggestion. I just installed the plugin. When selecting a table and trying to initialise the layer I get a Database Error: syntax error at or near ( LINE1: EXECUTE ('public'.'T_network_geometry') (followed by more, I can send the screenshot). When I click OK the python error window shows: Traceback (most recent call last): File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\datadriveninputmask.py, line 188, in initializeLayer inputUi = None, searchUi = None, helpText = ) # set the defaults here because somehow some of the values persist File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddmanager.py, line 176, in initLayer readConfigTables = readConfigTables) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 371, in createUi showParents, showChildren, readConfigTables, createAction) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 200, in __createForms n2mAttributes = self.getN2mAttributes(db, thisTable, anAtt.name, anAtt.num, labels, showChildren, skip) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 635, in getN2mAttributes configList = self.configureLayer(ddRelationTable, [], {}, [], {}, {}, [], db, True, ) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 184, in configureLayer DbError(query) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\dderror.py, line 54, in __init__ raise FatalError(DBError exiting) FatalError: 'DBError exiting' Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] QGIS version: 2.6.1-Brighton Brighton, e2a51df Should I do something else before initialising the layer? thanks, Janneke On 22/12/2014 10:14, Bernhard Ströbl wrote: Hi Janneke, this is not answering your question... but, have you tried the DataDrivenInputMask plugin [1]. It auto-generates input masks for PostgreSQL layers. Only prerequisite is a properly designed database in respect to constraints, default values, data types. regards Bernhard [1] http://plugins.qgis.org/plugins/DataDrivenInputMask/ Am 21.12.2014 15:44, schrieb Janneke van Dijk: Dear all, I have set up a form in QGIS 2.6 using the attribute editor layout 'autogenerate', to edit an editable view in a postgres database. This works nicely. I would like to use this form to edit data in other databases that have an identical structure. Ideally, I would set up a project file with all properties set where I could choose to load layers either from one or another database (with identical structures), and when I edit a layer the correct form opens. If I save it as a .qml file (from project1 connected to database1), then load it in project2 (connected to database2 with identical tables loaded) through propertiesfieldsload style it appears to load it (the edit widgets get changed to the same as in project1), but when I click a value relation widget the layer, key column and value column fields are empty. When I open the attribute table all fields that have a value relation that refers to a lookup table that contains different values than the original lookup table will show their values between brackets (at least, those values that do not appear in the original table). It looks as if the .qml retains a link to the original database and lookup tables (and not just to layer names as they are loaded in the project). Is there a way to configure a form based on a table structure that can be re-used for other tables with the same structure? Thanks, Janneke __ Information from ESET Mail Security, version of virus signature database 10912 (20141221) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] use autogenerated form in Qgis for same table in different postgres databases
Hi Janneke, I published a new version of the plugin which includes the fix I mentionend. Please check it out and call back if the problem is still arising. Bernhard Am 22.12.2014 09:09, schrieb Janneke van Dijk: Hello Bernhard, Thanks for the suggestion. I just installed the plugin. When selecting a table and trying to initialise the layer I get a Database Error: syntax error at or near ( LINE1: EXECUTE ('public'.'T_network_geometry') (followed by more, I can send the screenshot). When I click OK the python error window shows: Traceback (most recent call last): File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\datadriveninputmask.py, line 188, in initializeLayer inputUi = None, searchUi = None, helpText = ) # set the defaults here because somehow some of the values persist File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddmanager.py, line 176, in initLayer readConfigTables = readConfigTables) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 371, in createUi showParents, showChildren, readConfigTables, createAction) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 200, in __createForms n2mAttributes = self.getN2mAttributes(db, thisTable, anAtt.name, anAtt.num, labels, showChildren, skip) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 635, in getN2mAttributes configList = self.configureLayer(ddRelationTable, [], {}, [], {}, {}, [], db, True, ) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 184, in configureLayer DbError(query) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\dderror.py, line 54, in __init__ raise FatalError(DBError exiting) FatalError: 'DBError exiting' Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] QGIS version: 2.6.1-Brighton Brighton, e2a51df Should I do something else before initialising the layer? thanks, Janneke On 22/12/2014 10:14, Bernhard Ströbl wrote: Hi Janneke, this is not answering your question... but, have you tried the DataDrivenInputMask plugin [1]. It auto-generates input masks for PostgreSQL layers. Only prerequisite is a properly designed database in respect to constraints, default values, data types. regards Bernhard [1] http://plugins.qgis.org/plugins/DataDrivenInputMask/ Am 21.12.2014 15:44, schrieb Janneke van Dijk: Dear all, I have set up a form in QGIS 2.6 using the attribute editor layout 'autogenerate', to edit an editable view in a postgres database. This works nicely. I would like to use this form to edit data in other databases that have an identical structure. Ideally, I would set up a project file with all properties set where I could choose to load layers either from one or another database (with identical structures), and when I edit a layer the correct form opens. If I save it as a .qml file (from project1 connected to database1), then load it in project2 (connected to database2 with identical tables loaded) through propertiesfieldsload style it appears to load it (the edit widgets get changed to the same as in project1), but when I click a value relation widget the layer, key column and value column fields are empty. When I open the attribute table all fields that have a value relation that refers to a lookup table that contains different values than the original lookup table will show their values between brackets (at least, those values that do not appear in the original table). It looks as if the .qml retains a link to the original database and lookup tables (and not just to layer names as they are loaded in the project). Is there a way to configure a form based on a table structure that can be re-used for other tables with the same structure? Thanks, Janneke __ Information from ESET Mail Security, version of virus signature database 10912 (20141221) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] poligonal entity copied from a layer to another appears in the table, not in the view
It appears to be a problem with your Qgis installation. You are right: it really is a problem with the installation of Qgis under Windows 8.1. Now I am working with Qgis Brighton under Ubuntu and everything works perfectly! I want to specify that, when I installed Windows Qgis Brighton, before I removed the previous version (Chugiak) and I deleted all folders and registry keys related to Qgis and, only later, I installed Brighton. As soon as possible I'll just make the reinstallation in the same way and will inform you of the result. Thanks again and best wishes. Alessio Il 21/12/2014 16:45, nicolas.cadi...@archeotec.ca ha scritto: Hi, It appears to be a problem with your Qgis installation. I was able to open both file and modify them both ways. I assumed the CRS was wgs84 (it is not). I would do a complete reinstall and make sure you remove the registry keys in the windows registry. You can also backup then erase the .qgis2 folder (your plugins). I have sent you back both files plus a project plus file I did the Save as (they are in the wrong projection). You can see that you are missing some files for yours layers but it does not appear to be a problem for now. Did you try to modify the files on a server or from your hard drive? Nicolas Le 2014-12-21 07:16, Alessio Degioannini a écrit : send me the files if you can attached shapefiles: * target layer: where to past the new polygon * layer containing the polygon to be added to target layer. Try to do, and wonder... Thank you and best regards. Alessio Il 20/12/2014 17:32, Nicolas Cadieux ha scritto: Yes that could be it... Sometime simple is better... But if he did a cut in paste in an empty file, then the file should not have styling properties Alessio, check out to make sure its not a styling issue an send me the files if you can. Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc. 8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112 Fax: 514.381.4995 Le 2014-12-20 08:21, Joris Hintjens [via OSGeo.org] [hidden email] /user/SendEmail.jtp?type=nodenode=5178688i=0 a écrit : Hi Nicolas, I have had same issues. In my case the problem was that the target layer had styling properties. The new added elements had no style and appeared blank. My advise; check the styling in the layer properties. Greets Joris Op 20-dec.-2014, om 11:22 heeft Alessio Degioannini [hidden email] /user/SendEmail.jtp?type=nodenode=5178669i=0 het volgende geschreven: Hi Nicolas, Try copying the content of the second file to an empty file to see what happens. If that works, try copying the content of the first file in that new file and see what happens. Nothing Same issue: new record ok, no new entity in view. Could it be a projection problem? Look to see if both files are in the same projection. I usually use cut and paste between two file with the same CRS. Every layer is in the same projection. Every layer is polygonal. Weird a lot! Thank you, Alessio Il 19/12/2014 15:06, Nicolas Cadieux ha scritto: Hi, Sounds weird. Try copying the content of the second file to an empty file to see what happens. If that works, try copying the content of the first file in that new file and see what happens. Could it be a projection problem? Look to see if both files are in the same projection. I usually use cut and paste between two file with the same CRS. Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc. 8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112 Fax: 514.381.4995 Le 2014-12-19 04:49, Alessio Degioannini [via OSGeo.org http://OSGeo.org] a moz-do-not-send=true href=x-msg://3/user/SendEmail.jtp?type=nodeamp;node=5178555amp;i=0 target=_top rel=nofollow link=external class=[hidden email] a écrit : Hi, I've just copied an entity from a poligonal layer to another. No geometry or topology error in the source layer, no geo/top errror in the target layer before pasting the new entity. After pasting: in the target layer table appears the espected new record, in the view: nothing. No reply to zoom to selected command. Check geometry freezes. Check topology ok. Help me, please. Thanks in advance. Alessio ___ Qgis-user mailing list a moz-do-not-send=true href=x-msg://3/user/SendEmail.jtp?type=nodeamp;node=5178522amp;i=0 target=_top rel=nofollow link=external class=[hidden email] http://lists.osgeo.org/mailman/listinfo/qgis-user If you reply to this email, your message will be added to the discussion below:
[Qgis-user] Filtering QGIS Server/Web Client using URL Filter command
Hi everyone, I'm trying to use the following URL to apply a filter to the qgis web client, specifically to the Site layer. I know the filters work with the print request (I have that working without an issue). Can someone confirm that Filters work with the map request and whether the following URL is constructed correctly? http://gis.idn12.com/qgiswebclient.html?map=C:/projects/elements/eis/general.qgssrid=4326startExtent=-132.8456813111856718,49,-118.28192983618565393,58Layers=SiteFilter=Site:%22operation_code%22=93 Operation_code = 43 refers to the Kitsault River/Homestake Creek record in the Site layer. Thanks! Carlos -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Filtering-QGIS-Server-Web-Client-using-URL-Filter-command-tp5178866.html Sent from the Quantum GIS - User mailing list archive at Nabble.com. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] use autogenerated form in Qgis for same table in different postgres databases
Hi Bernhard, with the new plugin I was able to configure a mask for a table (it doesn't work for a postgres view, even if the view is editable? Would that not be possible to adjust?), and initialise the layer, and open the dataform. I did have to enter the databasename and password several times in a row. I have not tried using it yet but it at least opens and it looks promising! Things that I have working in the autogenerated form but don't see here (yet), I would like to know if it's already possible or if I would have to modify this using Python: - Is it possible to have the comboboxes show the descriptions of the corresponding lookup table, in stead of the ids that will be stored in the table? (the autogenerated form worked on the view that already provided the descriptions) - Do I understand it correctly that it can only be used for editing existing data, not for adding new records? I'll look at it in more detail tomorrow, see if this can do what I would need it to do. Thanks! Janneke On 22/12/2014 12:12, Bernhard Ströbl wrote: Hi Janneke, I published a new version of the plugin which includes the fix I mentionend. Please check it out and call back if the problem is still arising. Bernhard Am 22.12.2014 09:09, schrieb Janneke van Dijk: Hello Bernhard, Thanks for the suggestion. I just installed the plugin. When selecting a table and trying to initialise the layer I get a Database Error: syntax error at or near ( LINE1: EXECUTE ('public'.'T_network_geometry') (followed by more, I can send the screenshot). When I click OK the python error window shows: Traceback (most recent call last): File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\datadriveninputmask.py, line 188, in initializeLayer inputUi = None, searchUi = None, helpText = ) # set the defaults here because somehow some of the values persist File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddmanager.py, line 176, in initLayer readConfigTables = readConfigTables) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 371, in createUi showParents, showChildren, readConfigTables, createAction) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 200, in __createForms n2mAttributes = self.getN2mAttributes(db, thisTable, anAtt.name, anAtt.num, labels, showChildren, skip) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 635, in getN2mAttributes configList = self.configureLayer(ddRelationTable, [], {}, [], {}, {}, [], db, True, ) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py, line 184, in configureLayer DbError(query) File C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\dderror.py, line 54, in __init__ raise FatalError(DBError exiting) FatalError: 'DBError exiting' Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] QGIS version: 2.6.1-Brighton Brighton, e2a51df Should I do something else before initialising the layer? thanks, Janneke On 22/12/2014 10:14, Bernhard Ströbl wrote: Hi Janneke, this is not answering your question... but, have you tried the DataDrivenInputMask plugin [1]. It auto-generates input masks for PostgreSQL layers. Only prerequisite is a properly designed database in respect to constraints, default values, data types. regards Bernhard [1] http://plugins.qgis.org/plugins/DataDrivenInputMask/ Am 21.12.2014 15:44, schrieb Janneke van Dijk: Dear all, I have set up a form in QGIS 2.6 using the attribute editor layout 'autogenerate', to edit an editable view in a postgres database. This works nicely. I would like to use this form to edit data in other databases that have an identical structure. Ideally, I would set up a project file with all properties set where I could choose to load layers either from one or another database (with identical structures), and when I edit a layer the correct form opens. If I save it as a .qml file (from project1 connected to database1), then load it in project2 (connected to database2 with identical tables loaded) through propertiesfieldsload style it appears to load it (the edit widgets get changed to the same as in project1), but when I click a value relation widget the layer, key column and value column fields are empty. When I open the attribute table all fields that have a value relation that refers to a lookup table that contains different values than the original lookup table will show their values between brackets (at least, those values that do not appear in the original table). It looks as if the .qml retains a link to the original database and lookup tables (and not just to layer names as they are loaded in the project). Is there a way to configure a form based on a table structure that can be re-used for other tables with the same structure? Thanks, Janneke __ Information