Re: [QGIS-Developer] [Qgis-user] Confused by Point vs. PointZ and LineString v. LineStringZ
On Wed, 5 Dec 2018 at 01:40, C Hamilton wrote: > > I have been writing some code that maintains the Z dimension for vector > layers. When I create a layer from QGIS points whether it is a point or line > layer and I create the points with QgsPoint(x, y, altitude), I can do this > without using PointZ or LineStringZ layers and it maintains the Z axis. > > What is the purpose of PointZ, LineStringZ, and PolygonZ? Is there a reason I > should be using them when Point, LineString, and Polygon seem to work the > same? Is there a reason I should not use the Z versions? This depends. I gather you mean that you can freely create geometries with z or m dimension, regardless of whether the layer itself has these dimensions? If so, it depends on the underlying layer type. Some are more fussy then others, but some, (eg memory layers) will happily accept any dimensionality without complaining. This *can* cause issues when later converting these layers to other formats though, so it's always best to correctly define the dimensionality of your layer upfront. Nyall > > Thanks, > > Calvin > ___ > Qgis-user mailing list > qgis-u...@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] [Qgis-user] Question About QgsGeometry Static Functions
On Wed, 5 Dec 2018 at 02:52, C Hamilton wrote: > > QgsGeometry has the following static functions > > QgsGeometry.fromPolylineXY( list of QgsPointXY) > QgsGeometry.fromMultiPolylineXY( list of QgsPointXY lists) > > If I am working with QgsPoint rather than QgsPointXY there is > > QgsGeometry.fromPolyline( list of QgsPoint) > > However there is not a similar multi polyline function. Why not? Because there's been no demand for this, until now. But in general all those fromPolylineXY etc methods should be avoided wherever possible. They are very slow (lots of list allocations) and don't handle Z/M dimensions. You're better to work directly with the QGIS geometry subclasses like QgsLineString, QgsMultiLineString instead. Nyall > > QgsGeometry.fromMultiPolyline( list of QgsPoint list) > > What is the proper way to implement this? > > Thanks > ___ > Qgis-user mailing list > qgis-u...@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] MSSQL driver not found & Can't open lib 'SQL Server' - QGIS 2.18 LTR on Debian
On Thu, 6 Dec 2018 at 05:37, kimaidou wrote: > > Thanks for your answers. I managed to connect with QGIS MSSQL native provider > under my Debian box with the following steps > https://gist.github.com/mdouchin/64f7733a3c4ecfe441f65d5529351a30 > > I have a weird behaviour. For some layers, QGIS Desktop cannot display the > features attributes : the attribute table is empty, and the identify tool > returns no feature. BUT I can see the points in my map, so QGIS can query the > geography field from the database. For some other layers, wich seems > identical (same structure for example), I can see the attributes (full > attribute table and identify OK) > Sounds like an issue with fetching by primary key/feature ID. Is there any difference between the primary key setup on these tables vs the ones which work? Nyall > Have anyone seen this behaviour before ? > > Cheers > Michaël > > Le lun. 19 nov. 2018 à 00:12, Nyall Dawson a écrit : >> >> On Sat, 17 Nov 2018 at 02:01, kimaidou wrote: >> > >> > Hi all, >> > >> > I am trying to connect to a MSSQL server from a QGIS installed in a Linux >> > Debian Jessie computer. >> > I have checked that the credentials are ok with the mssql-client from >> > Microsoft: >> > >> > mssql-cli -S myserver -U carto -P *** -d MyBase >> > >> > I installed the following packages from debian and Microsoft repos : >> > >> > curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - >> > curl https://packages.microsoft.com/config/debian/8/prod.list > >> > /etc/apt/sources.list.d/mssql-release.list >> > apt-get update >> > ACCEPT_EULA=Y apt-get install -y mssql-cli unixodbc-dev mssql-tools >> > msodbcsql17 msodbcsql odbcinst libqt4-sql-tds libqt4-sql-odbc >> > >> > When I open QGIS and try to set up a connection, I use not DSN, and I put >> > my server "myserver" as the host. I add the user and password. >> > Then try to list the databases, but I get this error >> > >> > [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found >> >> This is all super-fragile. (Just another symptom of SQL Server's >> inferiority IMO). >> >> Have a look at >> https://github.com/qgis/QGIS/blob/master/.ci/travis/linux/docker-build-test.sh#L128 >> for how the Travis testing environment sets up a connection, there may >> be some clues there. >> >> Nyall >> >> > >> > I tested with >> > >> > root@carto:~# odbcinst -j >> > unixODBC 2.3.1 >> > DRIVERS: /etc/odbcinst.ini >> > SYSTEM DATA SOURCES: /etc/odbc.ini >> > FILE DATA SOURCES..: /etc/ODBCDataSources >> > USER DATA SOURCES..: /root/.odbc.ini >> > SQLULEN Size...: 8 >> > SQLLEN Size: 8 >> > SQLSETPOSIROW Size.: 8 >> > >> > So I checked /etc/odbcinst.ini which seems ok >> > >> > root@carto:~# cat /etc/odbcinst.ini >> > [ODBC Driver 17 for SQL Server] >> > Description=Microsoft ODBC Driver 17 for SQL Server >> > Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1 >> > UsageCount=1 >> > >> > [ODBC Driver 13 for SQL Server] >> > Description=Microsoft ODBC Driver 13 for SQL Server >> > Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2 >> > UsageCount=1 >> > >> > Should I install more packages ? Any help appreciated. >> > >> > Regards, >> > Michaël >> > >> > ___ >> > QGIS-Developer mailing list >> > QGIS-Developer@lists.osgeo.org >> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer >> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] MSSQL driver not found & Can't open lib 'SQL Server' - QGIS 2.18 LTR on Debian
Thanks for your answers. I managed to connect with QGIS MSSQL native provider under my Debian box with the following steps https://gist.github.com/mdouchin/64f7733a3c4ecfe441f65d5529351a30 I have a weird behaviour. For some layers, QGIS Desktop cannot display the features attributes : the attribute table is empty, and the identify tool returns no feature. BUT I can see the points in my map, so QGIS can query the geography field from the database. For some other layers, wich seems identical (same structure for example), I can see the attributes (full attribute table and identify OK) Have anyone seen this behaviour before ? Cheers Michaël Le lun. 19 nov. 2018 à 00:12, Nyall Dawson a écrit : > On Sat, 17 Nov 2018 at 02:01, kimaidou wrote: > > > > Hi all, > > > > I am trying to connect to a MSSQL server from a QGIS installed in a > Linux Debian Jessie computer. > > I have checked that the credentials are ok with the mssql-client from > Microsoft: > > > > mssql-cli -S myserver -U carto -P *** -d MyBase > > > > I installed the following packages from debian and Microsoft repos : > > > > curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - > > curl https://packages.microsoft.com/config/debian/8/prod.list > > /etc/apt/sources.list.d/mssql-release.list > > apt-get update > > ACCEPT_EULA=Y apt-get install -y mssql-cli unixodbc-dev mssql-tools > msodbcsql17 msodbcsql odbcinst libqt4-sql-tds libqt4-sql-odbc > > > > When I open QGIS and try to set up a connection, I use not DSN, and I > put my server "myserver" as the host. I add the user and password. > > Then try to list the databases, but I get this error > > > > [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found > > This is all super-fragile. (Just another symptom of SQL Server's > inferiority IMO). > > Have a look at > https://github.com/qgis/QGIS/blob/master/.ci/travis/linux/docker-build-test.sh#L128 > for how the Travis testing environment sets up a connection, there may > be some clues there. > > Nyall > > > > > I tested with > > > > root@carto:~# odbcinst -j > > unixODBC 2.3.1 > > DRIVERS: /etc/odbcinst.ini > > SYSTEM DATA SOURCES: /etc/odbc.ini > > FILE DATA SOURCES..: /etc/ODBCDataSources > > USER DATA SOURCES..: /root/.odbc.ini > > SQLULEN Size...: 8 > > SQLLEN Size: 8 > > SQLSETPOSIROW Size.: 8 > > > > So I checked /etc/odbcinst.ini which seems ok > > > > root@carto:~# cat /etc/odbcinst.ini > > [ODBC Driver 17 for SQL Server] > > Description=Microsoft ODBC Driver 17 for SQL Server > > Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1 > > UsageCount=1 > > > > [ODBC Driver 13 for SQL Server] > > Description=Microsoft ODBC Driver 13 for SQL Server > > Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2 > > UsageCount=1 > > > > Should I install more packages ? Any help appreciated. > > > > Regards, > > Michaël > > > > ___ > > QGIS-Developer mailing list > > QGIS-Developer@lists.osgeo.org > > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer > > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer > ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[QGIS-Developer] Plugin [1410] ImportPhotos approval notification.
Plugin ImportPhotos approval by pcav. The plugin version "[1410] ImportPhotos 1.8" is now approved Link: http://plugins.qgis.org/plugins/ImportPhotos/ ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer