Re: [Qgis-developer] Expression based labeling
> > the direction symbol is important for us. We use it to label the direction > of waste-water pipes. We use them only in single-line labels though. Would it be an OK solution to add the > to the last line and the < to the first line. eg Line 1 Line 2 > or < Line 1 Line 2 At the moment this is the only thing really stopping us from removing the multiline option and just letting the code handle multilines as the default action. - Nathan ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS 1.7.0.1, eVis plugin using Sqlite / Spatialite and Mac OS X
Hi William, Thanks for replying. I just wait for your Qt Extra that includes QSQLITE driver. I don't to break my spatialite in QGIS. Looking forward your new package. Thanks. Noli On 10/29/11, William Kyngesburye wrote: > I'll add it to my list of Qt extras to bundle in the app. Since it's a > requirement, I'll try to get an update out this weekend. > > You could install it yourself, but it's tricky - you don't want to install > Qt and copy qsqlite into Qgis, it'll still reference the now-installed Qt > and cause Qgis to crash because of multiple loaded Qt's. Pacifist would > allow you to extract qsqlite without installing all of Qt. > > On Oct 28, 2011, at 2:33 AM, Noli Sicad wrote: > >> Which version of QGIS and platform has support for Qt sqlite driver >> (i.e. QSQLITE)? >> >> http://doc.qt.nokia.com/stable/sql-driver.html#qsqlite >> >> Noli >> >> On 10/28/11, Noli Sicad wrote: >>> Hi, >>> >>> It seems that it needs - qsqlite. >>> >>> # >>> ... >>> } >>> else if ( QSQLITE == databaseType( ) && !mDatabase.contains( "sqlite" ) >>> ) >>> { >>>mDatabase = QSqlDatabase::addDatabase( "QSQLITE", "sqlite" ); >>> } >>> else if ( QSQLITE == databaseType( ) ) >>> { >>>mDatabase = QSqlDatabase::database( "sqlite" ); >>> } >>> else >>> { >>>setLastError( "No matching DATABASE_TYPE found" ); >>>return false; >>> } >>> >>> https://svn.osgeo.org/qgis/trunk/qgis/src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp >>> >>> >>> >>> Now, how can we install qsqlite driver in Mac OS X? >>> >>> Noli >>> >>> On 10/28/11, Noli Sicad wrote: Hi, What needs to be installed to make eVis plugin works with spatialite db in Mac OS X? The author mentioned about Qt library. "... Qt's library so you don't have to have spatialite." http://osgeo-org.1803224.n2.nabble.com/Qgis-and-sqlite-td4521419.html eVis is now default plugin in QGIS 1.7.x and QGIS 1.8.0. I got this error using spatialite db. ## New Database connection requested... Connection to [./Volumes/MAC_OS_1068/Work/work_d1/Work_11/SImon_GPS_Photos/GPS_Photo.db] failed: Driver not loaded Driver not loaded ## Is eVis plugin sqlite/spatialite working in Linux? Any experience how to hack this to read my db? Thanks. Noli >>> >> ___ >> Qgis-developer mailing list >> Qgis-developer@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/qgis-developer > > - > William Kyngesburye > http://www.kyngchaos.com/ > > "This is a question about the past, is it? ... How can I tell that the past > isn't a fiction designed to account for the discrepancy between my immediate > physical sensations and my state of mind?" > > - The Ruler of the Universe > > > ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Expression based labeling
On Fri, Oct 28, 2011 at 1:57 PM, Sandro Santilli wrote: >> > What happens if you delete a feature from a shapefile ? >> >> Apparently OGR only marks the feature as deleted in DBF, other IDs are >> not changed. > > Note that one advantage of delegating to providers setting up a mapping > is we could finally drop the requirement of an integer identifier in > postgresql. There are real-world cases in which primary key is a text > identifier. Ok now I got where you were heading. Yes, a mechanism for mapping non-int primary keys (or even multiple column primary keys) to int IDs would be nice - but that does not mean that [0,N-1] range has to be enforced. Martin ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Expression based labeling
On Fri, Oct 28, 2011 at 01:53:53PM -0300, Martin Dobias wrote: > On Fri, Oct 28, 2011 at 1:33 PM, Sandro Santilli wrote: > > On Fri, Oct 28, 2011 at 12:23:24PM -0300, Martin Dobias wrote: > >> On Fri, Oct 28, 2011 at 4:15 AM, Sandro Santilli wrote: > >> > Would it make sense to abstract provider-specific IDs so that the > >> > [0, N-1] range holds for everyone ? > >> > >> This is actually done within attribute table - we store feature IDs > >> for the range [0,N-1] so that we can later access the feature data by > >> row number. But that comes at an additional price: the layer has to be > >> scanned first in order to obtain the mapping and it has to be updated > >> whenever some changes to the layer are done. > >> > >> What would be the requirements of such provider-specific IDs? What to > >> do when a feature is deleted? If we recreate the mapping, some IDs > >> stored by users would change, leading to problems if the user stores > >> them as references to features. If we keep the original mapping, then > >> it may contain holes and therefore the convenient [0, N-1] range would > >> not be valid. > > > > What happens if you delete a feature from a shapefile ? > > Apparently OGR only marks the feature as deleted in DBF, other IDs are > not changed. Note that one advantage of delegating to providers setting up a mapping is we could finally drop the requirement of an integer identifier in postgresql. There are real-world cases in which primary key is a text identifier. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Expression based labeling
On Fri, Oct 28, 2011 at 1:33 PM, Sandro Santilli wrote: > On Fri, Oct 28, 2011 at 12:23:24PM -0300, Martin Dobias wrote: >> On Fri, Oct 28, 2011 at 4:15 AM, Sandro Santilli wrote: >> > Would it make sense to abstract provider-specific IDs so that the >> > [0, N-1] range holds for everyone ? >> >> This is actually done within attribute table - we store feature IDs >> for the range [0,N-1] so that we can later access the feature data by >> row number. But that comes at an additional price: the layer has to be >> scanned first in order to obtain the mapping and it has to be updated >> whenever some changes to the layer are done. >> >> What would be the requirements of such provider-specific IDs? What to >> do when a feature is deleted? If we recreate the mapping, some IDs >> stored by users would change, leading to problems if the user stores >> them as references to features. If we keep the original mapping, then >> it may contain holes and therefore the convenient [0, N-1] range would >> not be valid. > > What happens if you delete a feature from a shapefile ? Apparently OGR only marks the feature as deleted in DBF, other IDs are not changed. Martin ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Expression based labeling
On Fri, Oct 28, 2011 at 12:23:24PM -0300, Martin Dobias wrote: > On Fri, Oct 28, 2011 at 4:15 AM, Sandro Santilli wrote: > > On Thu, Oct 27, 2011 at 09:46:11AM -0300, Martin Dobias wrote: > >> That is because not all data providers use ids in interval [0,N-1]. > >> For example, postgres provider uses the column with primary key as ID > >> - so the values may be arbitrary. It is better to do a select() > >> followed by just one nextFeature(). > > > > Would it make sense to abstract provider-specific IDs so that the > > [0, N-1] range holds for everyone ? > > This is actually done within attribute table - we store feature IDs > for the range [0,N-1] so that we can later access the feature data by > row number. But that comes at an additional price: the layer has to be > scanned first in order to obtain the mapping and it has to be updated > whenever some changes to the layer are done. > > What would be the requirements of such provider-specific IDs? What to > do when a feature is deleted? If we recreate the mapping, some IDs > stored by users would change, leading to problems if the user stores > them as references to features. If we keep the original mapping, then > it may contain holes and therefore the convenient [0, N-1] range would > not be valid. What happens if you delete a feature from a shapefile ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Expression based labeling
On Fri, Oct 28, 2011 at 4:15 AM, Sandro Santilli wrote: > On Thu, Oct 27, 2011 at 09:46:11AM -0300, Martin Dobias wrote: >> That is because not all data providers use ids in interval [0,N-1]. >> For example, postgres provider uses the column with primary key as ID >> - so the values may be arbitrary. It is better to do a select() >> followed by just one nextFeature(). > > Would it make sense to abstract provider-specific IDs so that the > [0, N-1] range holds for everyone ? This is actually done within attribute table - we store feature IDs for the range [0,N-1] so that we can later access the feature data by row number. But that comes at an additional price: the layer has to be scanned first in order to obtain the mapping and it has to be updated whenever some changes to the layer are done. What would be the requirements of such provider-specific IDs? What to do when a feature is deleted? If we recreate the mapping, some IDs stored by users would change, leading to problems if the user stores them as references to features. If we keep the original mapping, then it may contain holes and therefore the convenient [0, N-1] range would not be valid. Martin ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] RE: integrate GRASS graph modeler into QGIS?
Hi, > > How can this be handled? Any suggestions/directions would be welcome. > I guess the best choice would be to join the effort to port GRASS into the processing framework and to build the modeller for the same framework. This list is the right place to start tale contact with the people involved/interested :) Cheers -- Giovanni -- ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] RE: integrate GRASS graph modeler into QGIS?
Hi I have built image processing chains with GRASS GIS modelbuilder that performs some advanced image processing based on some user defined input variables. Now I want to make these models available to my GIS users in Quantum GIS, so that they can input the variables and execute the models from QGIS, without opening GRASS GIS. How can this be handled? Any suggestions/directions would be welcome. Best regards, Rasmus ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS 1.7.0.1, eVis plugin using Sqlite / Spatialite and Mac OS X
I'll add it to my list of Qt extras to bundle in the app. Since it's a requirement, I'll try to get an update out this weekend. You could install it yourself, but it's tricky - you don't want to install Qt and copy qsqlite into Qgis, it'll still reference the now-installed Qt and cause Qgis to crash because of multiple loaded Qt's. Pacifist would allow you to extract qsqlite without installing all of Qt. On Oct 28, 2011, at 2:33 AM, Noli Sicad wrote: > Which version of QGIS and platform has support for Qt sqlite driver > (i.e. QSQLITE)? > > http://doc.qt.nokia.com/stable/sql-driver.html#qsqlite > > Noli > > On 10/28/11, Noli Sicad wrote: >> Hi, >> >> It seems that it needs - qsqlite. >> >> # >> ... >> } >> else if ( QSQLITE == databaseType( ) && !mDatabase.contains( "sqlite" ) ) >> { >>mDatabase = QSqlDatabase::addDatabase( "QSQLITE", "sqlite" ); >> } >> else if ( QSQLITE == databaseType( ) ) >> { >>mDatabase = QSqlDatabase::database( "sqlite" ); >> } >> else >> { >>setLastError( "No matching DATABASE_TYPE found" ); >>return false; >> } >> >> https://svn.osgeo.org/qgis/trunk/qgis/src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp >> >> >> >> Now, how can we install qsqlite driver in Mac OS X? >> >> Noli >> >> On 10/28/11, Noli Sicad wrote: >>> Hi, >>> >>> What needs to be installed to make eVis plugin works with spatialite >>> db in Mac OS X? >>> >>> The author mentioned about Qt library. >>> >>> "... Qt's library so you don't have to have spatialite." >>> >>> http://osgeo-org.1803224.n2.nabble.com/Qgis-and-sqlite-td4521419.html >>> >>> eVis is now default plugin in QGIS 1.7.x and QGIS 1.8.0. >>> >>> I got this error using spatialite db. >>> >>> ## >>> New Database connection requested... >>> Connection to >>> [./Volumes/MAC_OS_1068/Work/work_d1/Work_11/SImon_GPS_Photos/GPS_Photo.db] >>> failed: Driver not loaded Driver not loaded >>> >>> ## >>> >>> Is eVis plugin sqlite/spatialite working in Linux? >>> >>> Any experience how to hack this to read my db? >>> >>> Thanks. >>> >>> Noli >>> >> > ___ > Qgis-developer mailing list > Qgis-developer@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-developer - William Kyngesburye http://www.kyngchaos.com/ "This is a question about the past, is it? ... How can I tell that the past isn't a fiction designed to account for the discrepancy between my immediate physical sensations and my state of mind?" - The Ruler of the Universe ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] API proposal: fetching of features
Hi Martin, 2011/10/27 Martin Dobias : > - use flags instead of booleans: e.g. "FetchGeometry | UseIntesect" > flags makes more sense than "true, true" +1 for use flags. This is much readable than current "true, true". Also other proposed changes are reasonable for me. -- Alexander Bruy ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] API proposal: fetching of features
Good thinking Martin, QgsFeatureRequest request; request.setExpression( "type = 5 and $area > 100" ); request.setLimit(10) layer->select( request ); I really like this API style. We can add methods to QgsFeatureRequest for better access without busting the select API, which is good imo. Could even have the setMethods return the QgsFeatureRequest instance so you could do. QgsFeatureRequest request; request.setExpression( "type = 5 and $area > 100" ).setLimit(10).setAttributes( {some list} ); layer->select( request ); A big +1 from me - Nathan On Fri, Oct 28, 2011 at 3:07 AM, Martin Dobias wrote: > ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Re: QGIS 1.7.0.1, eVis plugin using Sqlite / Spatialite and Mac OS X
Which version of QGIS and platform has support for Qt sqlite driver (i.e. QSQLITE)? http://doc.qt.nokia.com/stable/sql-driver.html#qsqlite Noli On 10/28/11, Noli Sicad wrote: > Hi, > > It seems that it needs - qsqlite. > > # > ... > } > else if ( QSQLITE == databaseType( ) && !mDatabase.contains( "sqlite" ) ) > { > mDatabase = QSqlDatabase::addDatabase( "QSQLITE", "sqlite" ); > } > else if ( QSQLITE == databaseType( ) ) > { > mDatabase = QSqlDatabase::database( "sqlite" ); > } > else > { > setLastError( "No matching DATABASE_TYPE found" ); > return false; > } > > https://svn.osgeo.org/qgis/trunk/qgis/src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp > > > > Now, how can we install qsqlite driver in Mac OS X? > > Noli > > On 10/28/11, Noli Sicad wrote: >> Hi, >> >> What needs to be installed to make eVis plugin works with spatialite >> db in Mac OS X? >> >> The author mentioned about Qt library. >> >> "... Qt's library so you don't have to have spatialite." >> >> http://osgeo-org.1803224.n2.nabble.com/Qgis-and-sqlite-td4521419.html >> >> eVis is now default plugin in QGIS 1.7.x and QGIS 1.8.0. >> >> I got this error using spatialite db. >> >> ## >> New Database connection requested... >> Connection to >> [./Volumes/MAC_OS_1068/Work/work_d1/Work_11/SImon_GPS_Photos/GPS_Photo.db] >> failed: Driver not loaded Driver not loaded >> >> ## >> >> Is eVis plugin sqlite/spatialite working in Linux? >> >> Any experience how to hack this to read my db? >> >> Thanks. >> >> Noli >> > ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Re: QGIS 1.7.0.1, eVis plugin using Sqlite / Spatialite and Mac OS X
Hi, It seems that it needs - qsqlite. # ... } else if ( QSQLITE == databaseType( ) && !mDatabase.contains( "sqlite" ) ) { mDatabase = QSqlDatabase::addDatabase( "QSQLITE", "sqlite" ); } else if ( QSQLITE == databaseType( ) ) { mDatabase = QSqlDatabase::database( "sqlite" ); } else { setLastError( "No matching DATABASE_TYPE found" ); return false; } https://svn.osgeo.org/qgis/trunk/qgis/src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp Now, how can we install qsqlite driver in Mac OS X? Noli On 10/28/11, Noli Sicad wrote: > Hi, > > What needs to be installed to make eVis plugin works with spatialite > db in Mac OS X? > > The author mentioned about Qt library. > > "... Qt's library so you don't have to have spatialite." > > http://osgeo-org.1803224.n2.nabble.com/Qgis-and-sqlite-td4521419.html > > eVis is now default plugin in QGIS 1.7.x and QGIS 1.8.0. > > I got this error using spatialite db. > > ## > New Database connection requested... > Connection to > [./Volumes/MAC_OS_1068/Work/work_d1/Work_11/SImon_GPS_Photos/GPS_Photo.db] > failed: Driver not loaded Driver not loaded > > ## > > Is eVis plugin sqlite/spatialite working in Linux? > > Any experience how to hack this to read my db? > > Thanks. > > Noli > ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Expression based labeling
That is because not all data providers use ids in interval [0,N-1]. For example, postgres provider uses the column with primary key as ID - so the values may be arbitrary. It is better to do a select() followed by just one nextFeature(). Would it make sense to abstract provider-specific IDs so that the [0, N-1] range holds for everyone ? Even then, it would still be necessary to do select() followed by nextFeature() as Martin recommended. Because there are some providers without ramdom feature access (only sequential iteration through the features). Examples are 'delimited text' or 'gpx'. Regards, Marco On 28.10.2011 09:15, Sandro Santilli wrote: On Thu, Oct 27, 2011 at 09:46:11AM -0300, Martin Dobias wrote: On Thu, Oct 27, 2011 at 5:28 AM, Nathan Woodrow wrote: Thanks Andreas. Glad you like it. Question 1: the output preview of the label does not seem to work when I use a field - is there something I need to>>do to enable it? I would expect it to pull in the first record or some random record to retrieve values? Ah yes there seems to be a bug with grabbing the first record with some data sources. I get the top feature using layer.featureAt(0) but for some reason not all providers return a record at this index. Writing a patch now. That is because not all data providers use ids in interval [0,N-1]. For example, postgres provider uses the column with primary key as ID - so the values may be arbitrary. It is better to do a select() followed by just one nextFeature(). Would it make sense to abstract provider-specific IDs so that the [0, N-1] range holds for everyone ? --strk; () Free GIS& Flash consultant/developer /\ http://strk.keybit.net/services.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Expression based labeling
On Thu, Oct 27, 2011 at 09:46:11AM -0300, Martin Dobias wrote: > On Thu, Oct 27, 2011 at 5:28 AM, Nathan Woodrow wrote: > > Thanks Andreas. Glad you like it. > >>> Question 1: the output preview of the label does not seem to work when I > >>> use a field - is there something I need to >>do to enable it? I would > >>> expect > >>> it to pull in the first record or some random record to retrieve values? > > > > Ah yes there seems to be a bug with grabbing the first record with some data > > sources. I get the top feature using layer.featureAt(0) but for some reason > > not all providers return a record at this index. Writing a patch now. > > That is because not all data providers use ids in interval [0,N-1]. > For example, postgres provider uses the column with primary key as ID > - so the values may be arbitrary. It is better to do a select() > followed by just one nextFeature(). Would it make sense to abstract provider-specific IDs so that the [0, N-1] range holds for everyone ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] QGIS 1.7.0.1, eVis plugin using Sqlite / Spatialite and Mac OS X
Hi, What needs to be installed to make eVis plugin works with spatialite db in Mac OS X? The author mentioned about Qt library. "... Qt's library so you don't have to have spatialite." http://osgeo-org.1803224.n2.nabble.com/Qgis-and-sqlite-td4521419.html eVis is now default plugin in QGIS 1.7.x and QGIS 1.8.0. I got this error using spatialite db. ## New Database connection requested... Connection to [./Volumes/MAC_OS_1068/Work/work_d1/Work_11/SImon_GPS_Photos/GPS_Photo.db] failed: Driver not loaded Driver not loaded ## Is eVis plugin sqlite/spatialite working in Linux? Any experience how to hack this to read my db? Thanks. Noli ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer