[QGIS-Developer] Plugin [849] AmigoCloud approval notification.

2018-11-17 Thread noreply

Plugin AmigoCloud approval by pcav.
The plugin version "[849] AmigoCloud 0.11" is now approved
Link: http://plugins.qgis.org/plugins/qgis-amigocloud-plugin/
___
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] Cannot load QGIS source code in QTCreator

2018-11-17 Thread Alessandro Pasotti
On Thu, Nov 15, 2018 at 10:09 AM Andrea Aime 
wrote:

> Thanks everybody for the followup! I'm answering this mail but I'll
> integrate comments about the others too.
>
> On Thu, Nov 15, 2018 at 8:26 AM Alessandro Pasotti 
> wrote:
>
>> Hi Andrea,
>>
>> I've never seen that particular error, I'd look into cmake installation
>> and/or version.
>>
>
> See below
>
>
>> The vast majority of QGIS C++ developers uses Qt Creator on a daily basis
>> on different platforms, what work for me here is:
>>
>> Ubuntu xenial
>>
>> QtCreator: 4.7.2 installed from https://www.qt.io/download
>> cmake version 3.10.2 self-built from sources
>> Qt 10.0.1 self-built from sources
>>
>> Notice that none of the above was installed with apt, the main reason is
>> that xenial is a little bit old, but IIRC that was also to avoid some
>> problems in the integration of the different components.
>>
>
> I see... on my machine I have everything installed from apt instead,
> versions are:
>
>- QT Creator 4.5.2
>- cmake 3.10.2
>- QT is 5.9.5 (you have QT 10 instead??)
>
>
You should be good with 5.9, I have several kits with different QT versions
in release or debug mode, this is the script I use to build them:
http://termbin.com/froy



>  In other comments I've been invited to build from sources using cmake,
> which I did, worked, but then trying to start qgis as built results in this:
>
> aaime@colossus ~/devel/qgis/build-master (master) $ export
> LD_LIBRARY_PATH=/home/aaime/apps/lib
>
>
[...]

You might need some more env vars, here is an example of a run script of
mines: http://termbin.com/us9x note that I never run make/ninja install but
I run everything directly from the output dir under the build dir.


> I'm starting to think I'd be better of using a virtual machine where one
> can do any custom setup required.
> Someone was hinting at a video showing how to do that, using a vagrant
> setup. Is the same also documented anywhere, like,
> in text form?
>
>
Not that I'm aware of, but depending on your needs, you might find it
useful a docker recipe to build qgis from sources:
https://github.com/qgis/QGIS/blob/master/.docker/qgis.dockerfile

Btw, a Vagrant recipe to build a QGIS development environment ready to go
would be IMO very welcome and would low barriers for new developers.

Cheers

--
Alessandro Pasotti
w3:   www.itopen.it
___
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

2018-11-17 Thread Jorge Gustavo Rocha
Hi Michaël,

My first guest is that you need to update your GDAL. I was able to
import MSSQL tables with GDAL 2.3.2. With previous versions, I was
getting those hieroglyphs too.

I've imported a MSSQL Server database to Postgresql that was written by
Geomedia.

To recover the geometry, I had to use the MSSQL function:
geometry_spa.STAsBinary()

Example of the script:

(...)
#Export using ogr2ogr
ogr2ogr -overwrite -skipfailures -preserve_fid -f "PostgreSQL"
PG:"host=$pghost user=$pguser dbname=$pgdb password=$pgpwd
active_schema=$pgschema" -nln $table_name /vsistdin/ <


MSSQL:driver={ODBC 
Driver 17 for SQL
Server};server=$msserver,59228;database=$mssqlschema;tables=$table_name;UID=$msuser;PWD=$mspassword
EPSG:3763
SELECT *, 
geometry_spa.STAsBinary() as the_geom FROM
$table_name


EOF

I hope it helps.

Regards,

Jorge

Às 16:55 de 16/11/18, kimaidou escreveu:
> Ok, I have progressed a little bit.
> You have to rename the section in the odbcinst.ini file. QGIS and
> ogr2ogr expects the section [SQL Server] and not [ODBC Driver 17 for SQL
> Server] as written by Microsoft package.
> 
> Then I can use ogr2ogr to connect to my database and convert some table
> with this:
> ogr2ogr -f "ESRI Shapefile" "/tmp/Carto.vPole"
> "MSSQL:server=myserver;database=MyBase;uid=carto;pwd=***;"
> -overwrite -sql "SELECT id, position FROM Carto.vPole"
> 
> Now I need to understand the SQL Server syntax, and understand why I
> have hieroglyphs in my text fields (encoding I presume...)
> 
> 
> 
> 
> 
> Le ven. 16 nov. 2018 à 17:00, kimaidou  > a écrit :
> 
> 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
> 
> 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
> 

J. Gustavo
-- 
Jorge Gustavo Rocha
Departamento de Informática
Universidade do Minho
4710-057 Braga
Tel: +351 253604480
Fax: +351 253604471
Móvel: +351 910333888
skype: nabocudnosor
___
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] What is the way to get all items of a QgsLayout?

2018-11-17 Thread Raymond Nijssen

Hi Song,

It is simply: layout.items()

For example, you can do this:


p = QgsProject.instance()
lom = p.layoutManager()
lo = lom.layoutByName(u'a4')
print(lo.items())


And then this to get all the labels:


for item in lo.items():
if isinstance(item, QgsLayoutItemLabel):
print(item)


There was a bug in the item classes recently but it has been fixed in v3.4

Good luck!
Raymond




On 17-11-18 07:56, Song Wendong wrote:
We want to make a function that send all items (mainly labels) to 
browser and let user set the cotent, then send it back to server and 
export as pdf.
I can only find |itemById| 
and 
|itemByUuid| 
, 
but there are all kinds of layouts.

Is there a way to get all items and their ids?


___
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



--
Terglobo
Fahrenheitstraat 1
5223 BJ 's-Hertogenbosch
The Netherlands
+31 (0) 6 25 31 49 83
___
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