Re: [Qgis-user] QGIS-User Digest, Vol 218, Issue 10 Moving many project files - bulk updating

2024-04-11 Thread Reginald Carlier via QGIS-User
Hi,

Just reading about a script to bulk change qgz and other files.
A couple of years ago I needed this functionality when the servernames changed, 
so I wrote this script:

import os
import zipfile
import ntpath

# Wijzig deze map zonodig
startdir = "C:/"

newserver = "somenewserver"
oldserver = "10.195.6.122"
oldserver2 = "10.195.5.110"
oldserver3 = "10.195.5.101"

def path_leaf(path):
head, tail = ntpath.split(path)
return tail or ntpath.basename(head)

def replace_servername(fl, svname):
print("opening file " + fl)
f = open(fl,'r')
filedata = f.read()
f.close()
newdata = filedata.replace(oldserver,newserver)
data2 = newdata.replace(oldserver2,newserver)
data = data2.replace(oldserver3,newserver)
f = open(fl,'w')
f.write(data)
f.close()


def change_servername(fname, zonder_ext, ext):
if ext == '.qlr':
replace_servername(fname, newserver)
if ext == '.qgz':
with zipfile.ZipFile(fname, 'r') as zip_ref:
zip_ref.extractall(os.path.dirname(fname))
qgsfile = zonder_ext + '.qgs'
qgdfile = zonder_ext + '.qgd'
replace_servername(qgsfile, newserver)
os.remove(fname)
zipObj = zipfile.ZipFile(fname, 'w')
zipObj.write(qgsfile)
if os.path.isfile(qgdfile):
zipObj.write(qgdfile)
os.remove(qgdfile)
zipObj.close()
os.remove(qgsfile)




for (root, dirs, files) in os.walk(startdir, topdown=True):
if files:
for f in files:
fl = os.path.join(root,  f)
zonder, extension = os.path.splitext(fl)
if extension == '.qgz' or extension == '.qlr':
change_servername(fl, zonder, extension)

print("klaar")


##



Reginald Carlier
Deskundige GIS
Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T+32 51 33 74 39www.ingelmunster.be
0207.485.473 (gemeente) - 0212.221.845 (OCMW)
​RPR Rechtbank van eerste aanleg West-Vlaanderen afdeling Kortrijk

Wij werken enkel op afspraak
Schrijf je in op onze nieuwsbrief!
Raadpleeg onze disclaimer
-Oorspronkelijk bericht-
Van: QGIS-User  Namens 
qgis-user-requ...@lists.osgeo.org
Verzonden: vrijdag 5 april 2024 9:58
Aan: qgis-user@lists.osgeo.org
Onderwerp: QGIS-User Digest, Vol 218, Issue 10

Send QGIS-User mailing list submissions to
qgis-user@lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.osgeo.org/mailman/listinfo/qgis-user
or, via email, send a message with subject or body 'help' to
qgis-user-requ...@lists.osgeo.org

You can reach the person managing the list at
qgis-user-ow...@lists.osgeo.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of QGIS-User digest..."


Today's Topics:

   1. Re: Moving many project files - bulk updating paths to
  tables? (Tony Shepherd (FarmMaps NZ))
   2. Re: Announce - migrate our mailing lists to Discourse
  (DancesWithCars)
   3. Re: Announce - migrate our mailing lists to Discourse
  (Michael Shand)
   4. Re: Announce - migrate our mailing lists to Discourse
  (David Strip)
   5. Re: Moving many project files - bulk updating paths to
  tables? (Gordon Wakelin-King)


--

Message: 1
Date: Fri, 5 Apr 2024 08:06:48 +1300
From: "Tony Shepherd \(FarmMaps NZ\)" 
To: "'Jorge Gustavo Rocha'" ,

Subject: Re: [Qgis-user] Moving many project files - bulk updating
paths to tables?
Message-ID: <004301da86c3$41fb3da0$c5f1b8e0$@farmmaps.nz>
Content-Type: text/plain; charset="utf-8"

Thanks Jorge



Yes, I toyed with that, but somewhat painful with thousands to process.



Has anybody scripted or coded something for this?



Cheers



From: QGIS-User  On Behalf Of Jorge Gustavo 
Rocha via QGIS-User
Sent: Friday, April 5, 2024 7:53 AM
To: qgis-user@lists.osgeo.org
Subject: Re: [Qgis-user] Moving many project files - bulk updating paths to 
tables?



Hi Tony,

You can unzip the qgz file and change the text in the qgs files. qgs are text 
files. Afterwards, you can create the zip again with the qgz extension or open 
the qgs file directly.

I hope it helps,

Jorge

On 04/04/24 19:28, Tony Shepherd (FarmMaps NZ) via QGIS-User wrote:

Hi All



I am sure I am not the first to ponder how to deal with this.  I have loads, 
thousands likely, of project files in a series of folders and subfolders.  I 
need to move those files and folders to a new location to enable other staff to 
use the project files and their associated shp files, geo packages, rasters etc.




[Qgis-user] Get the translation of a core string in Python

2023-10-05 Thread Reginald Carlier via QGIS-User
Hi Michel,

I think the easiest way to use the translationdata would be a dictionary.
You could try to parse the ts file and load the values from the source and 
translation tags into a dictionary (BeautifulSoup lxml parser for example)
https://realpython.com/python-dicts/

Met vriendelijke groet,

Reginald Carlier,


Reginald Carlier
Deskundige GIS
Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T+32 51 33 74 39www.ingelmunster.be
0207.485.473 (gemeente) - 0212.221.845 (OCMW)
​RPR Rechtbank van eerste aanleg West-Vlaanderen afdeling Kortrijk

Wij werken enkel op afspraak
Schrijf je in op onze nieuwsbrief!
Raadpleeg onze disclaimer
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Couldn't load SIP module

2020-11-05 Thread Reginald
Hi,

I had the same issue on PopOs. Launching QGIS 3.16 I had a sip error.
Strange thing was that when i opened a terminal and ran qgis from in there
QGIS 3.10 launched without any sip problem and fully functional. I think the
sip problem is a path problem and I suspect that the path is not properly
set for ubuntu systems.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] no package for ubuntu groovy gorilla

2020-10-26 Thread Reginald
Hi,

I have recently upgraded to ubuntu 20.10 but I noticed that the QGIS version
that was installed (3.14.16) was removed during the upgrade. When I
activated the QGIS repo and adjusted the settings I was still out of luck.
I see that "https://ubuntu.pkgs.org/20.10/qgis-amd64/"; contains no package.
In groovy gorilla I can install QGIS 3.10 but when I want to do this there
is a dialog that pops up that says that postgis has to be removed. As I
don't want my postgresql database to be altered I wonder if anyone can tell
me when there will be a package for groovy gorilla.

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] remove highlights from map canvas

2020-08-19 Thread Reginald
Hi,

I figured out how to get it working with QgsRubberBand. I don't know what is
exact the difference between QgsHighlight and QgsRubberBand but I wanted to
share this with anyone needing this functionality:

___
--

from qgis.gui import QgsRubberBand
from PyQt5.QtGui import QColor
from PyQt5.QtCore import QTimer


h_dict = {}
layer = iface.activeLayer()
timer = QTimer()


# function that does the work of highlighting selected features
def highlight_features():
# create highlight geometries for selected objects
for i in layer.selectedFeatures(): 
fid = i.id()
h_dict[fid] = QgsRubberBand(iface.mapCanvas(),
QgsWkbTypes.PolygonGeometry)
# set highlight symbol properties
h_dict[fid].setColor(QColor(255,0,0,255))
h_dict[fid].setWidth(3)
h_dict[fid].setFillColor(QColor(255,255,255,0))
h_dict[fid].addGeometry(i.geometry(), None)
timer.start(3)

def dim_feature():
if bool(h_dict):
for feat in h_dict:
iface.mapCanvas().scene().removeItem(h_dict[feat])


timer.timeout.connect(dim_feature)
# connect the function to the layer signal
layer.selectionChanged.connect(highlight_features)

--
Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] remove highlights from map canvas

2020-08-17 Thread Reginald
Hello again,

I am using a script and the plugin go2nexfeature3 to iterate over a layer of
buildingpermissions in order to adapt each feature to new cadastral features
and changes. It works well but at some point I want to clear the highlighted
features because the distinction becomes unclear as the previous highlights
are all still visible. I tried to work with a timer and using the technique
described here:
https://ipfs-sec.stackexchange.cloudflare-ipfs.com/gis/A/question/174664.html
but none of this seems to work.
As I understand it the highlights belong to a separate layer. Is there any
way to delete all the features of this invisible layer, so all the red
shapes dissapear from my map canvas again?
At the moment I have to close qgis and reopen my project to get rid of them.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Closest Distance of a point within a polygon to the closest part of that polygon and the name of the adjacent polygon with the common boarder

2020-07-10 Thread Reginald
Hi,

Yes the easiest way is to densify your polygons. With the desify algo you
can do this and specify how dense you want them to be.
processing.run("native:densifygeometries",
{'INPUT':'C:\\Users\\reginaldc\\Documents\\testdensify.gpkg|layername=testdensify','VERTICES':1000,'OUTPUT':'TEMPORARY_OUTPUT'})
Next you can create a line from your polygon. This line will contain the
same amount of vertexes as your polygon.
processing.run("native:polygonstolines",
{'INPUT':'memory://Polygon?crs=EPSG:31370&field=fid:long(0,0)&uid={8ed5e288-ec55-4630-aaf8-8f26a1e1c5cc}','OUTPUT':'TEMPORARY_OUTPUT'})
Next you create points from your line.
processing.run("native:extractvertices",
{'INPUT':'memory://MultiLineString?crs=EPSG:31370&field=fid:long(0,0)&uid={1b672349-4d50-44b6-b4b4-98bb6218d3ce}','OUTPUT':'TEMPORARY_OUTPUT'})
Then you look for the distance of the closest vertex
processing.run("qgis:distancetonearesthubpoints",
{'INPUT':'C:\\Users\\reginaldc\\Documents\\testdensify.gpkg|layername=testpunten','HUBS':'memory://Point?crs=EPSG:31370&field=fid:long(0,0)&field=vertex_index:integer(10,0)&field=vertex_part:integer(10,0)&field=vertex_part_index:integer(10,0)&field=distance:double(20,14)&field=angle:double(20,14)&uid={629995db-9019-47f2-9c4b-72523ff6fc9e}','FIELD':'vertex_index','UNIT':0,'OUTPUT':'TEMPORARY_OUTPUT'})
Finally you make a buffer a little bit greater than this distance in the
direction of the closest vertex (angle is also in the attribute table.

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Error starting up QGIS 3.10.2

2020-01-28 Thread Reginald
Hi,

Today I downloaded and installed QGIS 3.10.2 (64bit) on windows 7.
After installing QGIS 3.10.2 I installed Visual Studio Code. The
installation informed me that visual studio code was added to the path.
When starting up QGIS 3.10.2 I got a message saying that something was
missing in qgis.core dll and that I had to look into a env file to correct
this. I opened the file but I couldn't see what was wrong.
So I uninstalled QGIS 3.10.2 thinking that Visual Studio Code had screwed
somewhere the PATH variable.
I reinstalled QGIS 3.10.2 (64bit) thinking that this would correct a path
issue, but to no avail: same problem. 
Finally I reinstalled QGIS 3.10.1 and there was no problem starting up.
Is the installer broken for windows 7?
Anybody has more information about this startup issue?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] export to dxf problem

2019-12-11 Thread Reginald
Hi Boaz,

When you open the dxf in autocad you need to connect to the geographical
data of the area of the drawing. In the taskpane there is a data icon. Click
on it and choose 'connect to data'. Next add a connection (shapefile or
postgres or wms or whatever is available for the area of your drawing.
Eventually after entering the correct information for your data (check if
CRS is corrrect), click connect, and next 'add to map'.
In autocad you will see your shapefile (or other dataprovider) data. Most
likely your drawing will not show up but if you zoom out untill you see the
x-y cross and zoom overthere that's most likely the place of your drawing.
Enter move, select basepoint and move the drawing to the right place. Rotate
and scale until your drawing fits in the right place. Save your dxf. Import
it in QGIS via the Project menu and it shows up in QGIS in the right place.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Export to MSSQL from QGIS = Different SRID in ArcGIS

2019-08-27 Thread Reginald
Hi Steven,

Do you mean that after importing the shape in Arcgis you are using a tool
(SSMS) to check the CRS?
I have always been baffled about ArcGis trying to transform correct CRSes.
I can only guess that the geometry is transformed in memory but not written
to the actual data.
That way if you check the CRS of the data with another tool you see the
original CRS.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] OSGeo4W64 installer stalls at error

2019-08-23 Thread Reginald
Hi users,

When I install or upgrade my qgis installation (windows7 osgeo4W64
installer) I always install from a local directory. At home I download the
complete osgeo4W64 packages on a usb stick (about 30 gig).
The reason I do this is because the download always fails at work because of
an unknown setting in the network somewhere.
While installing from this local directory the installer always stops with a
popup saying:
Unable to extract /apps/Qt5/bin/Qt5WebEngineCored.pdf--corrupt package?
When clicking OK the installation continues.
Is it possible to remove this package from the osgeo4W64 installation or is
it useful for something?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] exporting tiff to geospatial pdf fails

2019-08-21 Thread Reginald
Hi,

Some additional info:
The tiff is 825MB.
When opening the tiff with Gimp it renders black.
Exporting in gimp to a pdf creates a pdf with a white square on it.
When I add the pdf to QGIS i get the expected map.

Reginald,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] exporting tiff to geospatial pdf fails

2019-08-20 Thread Reginald
Hello qgisusers,

Using QGIS 3.8.1-Zanzibar on Windows with OSGeo4W.
When I try to export a georeferenced tiff to a geospatial pdf I get a
progresbar in the statusbar and after about 15 seconds I get a notification
in the messagebar that the pdf was rendered with a hyperlink to the file.
When I click on the hyperlink or look in the folder there is no file to be
found. I tried to save the output on my C drive to a file containing no
whitespace or special characters but also no luck.
When I tried to use pyramids the process keeps hanging.
Can anybody verify that this functionality is not working?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] html widget : entering < or > fails

2019-08-14 Thread Reginald
Hi,

Sorry for the noise.
I found that somehow the language settings of QGIS 3.8 had changed.
When setting them back to dutch/belgium everything worked as expected.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] html widget : entering < or > fails

2019-08-14 Thread Reginald
Hi,

I was reading in the changelog for 3.8 there was a new html widget so I was
going to try it.
When I entered > or < the editor changed it to / or |. I opened notepad to
see if my keyboard layout had changed but there I got the usual characters.
As you need both < and > to write tags it seems odd that they are not
working.
Am I missing something?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] exporting layout to pdf changes output of locked maps

2019-06-20 Thread Reginald
Hi,

I implemented the workflow you mentioned but it appears that locking has no
effect.
This looks like a bug.
Working with themes does work.
Maybe locking should be removed?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] encoding csv to windows-1252 does not work

2019-06-18 Thread Reginald
Hi Tobias,

If I understand you correctly the table in QGIS is in utf-8.
When I open the table I see that the french characters show up correct.
In stead of setting my database to 1252 West-Europees Windows I should set
it up in utf-8.
I created a test database from pgadmin and the defaults where alright.
Now I see the correct characters in my table.

Thanks a lot!

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] encoding csv to windows-1252 does not work

2019-06-18 Thread Reginald
Hi users and devs,

I used 'import text separated layer' in the menu 'Add layer' from 'Layers'
menuitem to add a txt file.
 

The text files are in Windows 1252 encoding. When importing them I chose
this encoding but as you can see from the screenshot it shows an encoding of
utf-8. When I import this layer in a Windows 1252 encoded database on
Postgresql I get no french characters.
Is this a bug?
Any idea how to get this text files imported in postgresql so that french
characters are shown?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] exporting layout to pdf changes output of locked maps

2019-06-04 Thread Reginald
Hi,

Using a different map theme works!
Good to know.
I'm still a little bit puzzled why the locking didn't work.

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] exporting layout to pdf changes output of locked maps

2019-06-04 Thread Reginald
hi Karl,

I will try that and report back.
thanks for the tip

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] exporting layout to pdf changes output of locked maps

2019-06-04 Thread Reginald
Hello users and devs,

I've been trying to create a A1 maplayout containing two A2 maps.
One of the maps I put on the layout shows an aereal photo, the other shows a
topographical map on another scale.
When my layout was ready I locked all the items and clicked on the export to
pdf icon.
The result is that both maps on the layout get refreshed and the pdf shows
the same topographical map in each A2 map window.
Is it not posible to use two different maps in one layout?
I tried different strategies but no luck.
I'm using the latest version of QGIS on windows 7 (OSGeo4W).

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Unable to find driver ECW and JP2ECW

2019-05-16 Thread Reginald
Hi,

Today I copied the georeferenced tiffs into a new project.
When configuring QGIS server options I checked all tiff layers to be
published in the WCS section.
Now I can acces the WMS again and it renders as it should.
In the layerpanel there is just a warning that the legend could not be
rendered (probably because I put the tiffs in a group).

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Unable to find driver ECW and JP2ECW

2019-05-10 Thread Reginald
Hi list,

I have a qgis server project in which I serve several tiffs. It used to work
fine but after updating to the latest version of QGIS 3 and QGIS 3 server it
fails.
When trying to connect via the Data Source Manager I get this error:

Het downloaden van capabilities is mislukt:
Downloaden van capabilities mislukt: Error transferring
http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=Projecten/Waterlopen/Waterlopen.qgz&VERSION=1.3.0&SERVICE=WMS&REQUEST=GetCapabilities
- server replied: Internal Server Error

The Apache log shows:

[Thu May 09 08:56:15.589184 2019] [cgi:error] [pid 2712:tid 1628] [client
::1:60271] AH01215: Warning 1: Unable to find driver ECW to unload from
GDAL_SKIP environment variable.:
C:/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi.exe
[Thu May 09 08:56:15.589184 2019] [cgi:error] [pid 2712:tid 1628] [client
::1:60271] AH01215: Warning 1: Unable to find driver JP2ECW to unload from
GDAL_SKIP environment variable.:
C:/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi.exe

It is kind of strange because other projects in which I serve tiffs are
still working.

When I test the configuration of qgis server everything seems ok but it is
not working.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] problem with gdal after upgrading from QGIS 3.6 to 3.6.1

2019-04-10 Thread Reginald
Hello qgis users and devs,

Today I upgraded my OSGeo4W64 install on windows 7 from QGIS 3.6 to 3.6.1
I use a bat file to copy WFS features into a postgis layer.
This has always worked before but now I'm getting an error:
Unable to open datasource
'WFS:http://crab.agiv.be/OGC/Service.svc/wfs?service=WFS&version=1.1.0&request=GetFeature&typeName=Adressen:Adrespos&srsName=EPSG:31370&bbox=69961.6870727539062500,176815.3339233398437500,74662.8850708007812500,182466.0850830078125000";
with the following drivers.
-> here is a list of several drivers (one of them is WFS and another is
WFS3)

I noticed during the upgrade that a lot of GDAL dev things have changed.
Could this have broken the WFS as it was before?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] qlr of spatialite database layer not showing when database is on network drive

2019-03-22 Thread Reginald
Thanks Robert,

I tried loading a gpkg layer from a qlr file and it succeeds but the styling
is messed up.
 
Using simple styling it renders ok.

Regards,





--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] qlr of spatialite database layer not showing when database is on network drive

2019-03-21 Thread Reginald
Hello list,

Exporting a spatialite layer to a qlr file when the layer resides in a
database on a network drive fails every time I try it.
When I copied this database to my C drive in windows the qlr file shows up
as it should.
I have compared the two files and the only difference was the drive letter
(in this case C was F).
I tried different notations to acces the network drive (backward slashes ,
double backward slashes, network acces notation ...) no luck .

Any ideas why this is not working?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] problem with authcfg

2019-03-19 Thread Reginald
Hi,

I tried removing the configuration by removing all the cached
configurations. This didn't work.
Then I wiped the database for authentication. This didn't work neither.
Finally I started with a new profile an now it works.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] problem with authcfg

2019-03-19 Thread Reginald
Hi users,

I have a problem concerning authcfg. On the local network there are about 5
clients that share qlr files.
These qlr files  are accessed via the qlrplugin and reside in a  folder on a
network drive (windows network).
I use QGIS 3.6 on windows 7 and noticed that in the qlrfile that is created
via export, there is a parameter authcfg=1321551. My colleague could not
acces the qlr layer with this parameter being present. So I figured out that
it was created when I converted my postgis credentials to a configuration.
I decided to remove this configuration in the dialogue
Extra>Options>Authentication. There I selected the configuration and clicked
on the minus sign. A QGIS crash followed. 
I opened a new QGIS instance and in the Authentication dialogue I saw that
the configuration was gone.
So I added a layer from postgis and exported it to a qlr file.
When I opened the qlr layer with notepad++ I saw that there was still
authcfg=1321551.
How can I remove this configuration so that I can create qlr files without
this parameter?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] applying qml to vector layer with pyqgis

2019-03-01 Thread Reginald
Hi,

Sorry for the noise.
After double checking the filename I noticed that the filenames for the qml
files were wrong 

Thanks for checking

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] applying qml to vector layer with pyqgis

2019-03-01 Thread Reginald
Hello list,

I have a whole series of shapefiles and qml files residing in the same
directory.
The shapefiles and the qmlfiles have according names: eg.
Adp36007.shp --> Adp36007.qml
I have read somewhere that those qml files would be applied automaticaly
when I load the shapefiles in the map. That doesn't happen.
So I wrote a quick script:

from qgis.PyQt.QtCore import *
from qgis.PyQt.QtGui import *
from qgis.PyQt.QtWidgets import *
from qgis.utils import iface
from qgis.core import *

layers = [layer for layer in QgsProject.instance().mapLayers().values()]
dirname = "F:/GRB/Recent/"
for lay in layers:
qmlname = dirname + lay.name() + ".qml"
lay.loadNamedStyle(qmlname)
print("processed " + qmlname)
lay.triggerRepaint()
print("done")

But that doesn't work. Applying the qml via the GUI works so there is
nothing wrong with the qml files.
Has anything changed in QGIS 3.4 with loadNamedStyle?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] python qgis 3 adding features fails partly

2019-02-28 Thread Reginald
Thanks Michel for this explanation.
I can now indeed add the table to QGIS.

I used MultiPolygon in stead of Point and created the test table.
I changed my code to:


from qgis.PyQt.QtCore import *
from PyQt5.QtGui import *

perceellayer=None
premielayer=None
layers = [layer for layer in QgsProject.instance().mapLayers().values()]
for lyr in layers:
if lyr.name() == "Adpf1836007": #layer we use to copy existing geometry
perceellayer = lyr
if lyr.name() == "test":
premielayer = lyr
features = perceellayer.selectedFeatures()
geom = None
for f in features:
if geom == None:
geom = f.geometry()
else:
geom = geom.combine(f.geometry())

caps = premielayer.dataProvider().capabilities()
if caps & premielayer.dataProvider().AddFeatures:
# de laag is editeerbaar
feat = QgsFeature(premielayer.fields())
feat.setGeometry(geom)
result = iface.openFeatureForm(premielayer, feat, showModal=False)
print(result)
premielayer.addFeature(feat)
premielayer.updateFields()
print("klaar")
else:
print("Gelieve de laag met betreffende premies editeerbaar te maken door
op het potloodje te klikken")

When I select a parcel and run the code with the test layer set as editable
I get this error when I click OK:

2019-02-28T12:43:18 CRITICALLaag test : PostGIS fout bij het
toevoegen van objecten: ERROR: null value in column "id" violates not-null
constraint
 DETAIL: Failing row contains (null, null,
0106208A7A0100010300010008FE43FAC654...).

I used 'testwaarde' as naam and 1 as id.

Any idea what is going wrong here?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] python qgis 3 adding features fails partly

2019-02-28 Thread Reginald
Hi,

I'm still scratching my head over this one.
As a test I created a table 'test' in postgis:
id: pkey type oid
naam: type text
geom: type geometry

select updateGeometrySrid('test','geom',31370) # assigning projected CRS to
geometry

When I try to add this table to qgis using the database explorer I get an
error because there is no geometry in the table.
So I was wondering if it is impossible to add an empty postgis table to
qgis?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] python qgis 3 adding features fails partly

2019-02-12 Thread Reginald
Hello list,

Using the python console in QGIS 3.4.4 with the following code:

from qgis.PyQt.QtCore import *
from PyQt5.QtGui import *

perceellayer=None
premielayer=None
layers = [layer for layer in QgsProject.instance().mapLayers().values()]
for lyr in layers:
if lyr.name() == "Adpf1836007":
perceellayer = lyr
if lyr.name() == "premies_zwaluwen":
premielayer = lyr
features = perceellayer.selectedFeatures()
geom = None
for f in features:
if geom == None:
geom = f.geometry()
else:
geom = geom.combine(f.geometry())

feat = QgsFeature(premielayer.fields())
feat.setGeometry(geom)
result = iface.openFeatureForm(premielayer, feat, showModal=False)

print(result)
premielayer.addFeature(feat)
premielayer.updateFields()
print("klaar")


- when premies_zwaluwen is a postgis layer trying to save the edit fails
with the message that id cannot be NULL altough in the featureform I put
another value
- when premies_zwaluwen is a shapefile the geometry gets added but all the
fields of the new feature are empty altough I put a value in every field
from the featureform.

Any idea what I am doing wrong?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] model that runs bat file to obtain vector layer

2019-02-04 Thread Reginald
Thanks Nicolas and Nyall,

That makes sense.
I will try to wrap the call to the bat file in the template.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] model that runs bat file to obtain vector layer

2019-02-04 Thread Reginald
Thanks Nicolas,

You have me some hints on how to do it.
The bat file was created according to the code of Michel Stuyts.
I adapted it to work with SSL and I guess I only have to do
call C:\Osgeo4W64\bin\py3_env.bat # this will make the GDAL SRS database
available
os.system([("cmd", "extractwfsdata.bat")])
My question was in fact if it is posible to run a bat file or a python
script from within the QGIS modeler tool.

Any idea?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] model that runs bat file to obtain vector layer

2019-02-03 Thread Reginald
Hello list,

I am running QGIS 3.4 on windows 7 and I have a bat file that uses ogr2ogr
to get a layer of points from a WFS service. The bat file works when I run
it in the OSGeo4W shell but not if I run it in the windows cmd shell. Then
it complains about not finding the SRS.
Now I want to make a model to fetch the points and to do an intersection
with the polygon of an area.
The model also needs to style the points.
Doing the intersection and the styling can be done in the model.
My question is if I can run a bat file in the osgeo4W shell from within a
model?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Vector layer is disappeared after opening Event Browser window

2019-01-20 Thread Reginald
Hi,

Could it be that Bug #3053 is still unresolved?
I'm using QGIS 3.4.3 and experiencing the behaviour described in bug #3053
which is closed.
Anyone else experiencing this?
For the record the vector file is a shapefile.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Unable to make qgis server work in QGIS 3.4.3

2019-01-16 Thread Reginald
Hi,

I found the solution about isue about the transparancy.
I was serving jpg in stead of png files. 

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Unable to make qgis server work in QGIS 3.4.3

2019-01-16 Thread Reginald
Thanks Andreas,

You put me on the right track.
I tried setting environment variables in httpd.conf:
FcgidInitialEnv QGIS_DEBUG 1
FcgidInitialEnv QGIS_SERVER_LOG_FILE "C:\OSGeo4W64\var\log\qgisserver.log"
FcgidInitialEnv QGIS_SERVER_LOG_LEVEL 0
but apache wouldn't start anymore
As I'm using Windows7 I am running XAMMP.
In XAMPP I could see output to the error.log indicating that :
Unable to find driver ECW to unload from GDAL_SKIP
Unable to find driver JP2ECW to unload from GDAL_SKIP
So I thought there might be something wrong with my GDAL installation, also
because the day before I reinstalled postgis and had to set a GDAL variable.
So I reinstalled GDAL en GDAL-dev.
Now I am able to show the layers in the wms but I don't know yet how I can
set the white colour as transparant as it covers the other layers. In the
dialogue of the layer properties > Transparancy the checkbox is greyed out.
Any idea how to solve this?

Regards,







--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Unable to make qgis server work in QGIS 3.4.3

2019-01-16 Thread Reginald
Hello,

When I try to make a new project for qgis server in QGIS 3.4.3 I get
following error:

 Opvragen kaart mislukt [Fout: Error transferring
http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=Projecten/Zoneringsplan/vmm.qgz&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=63863.5,174278,78357.300291,185638&CRS=EPSG:31370&WIDTH=120&HEIGHT=120&LAYERS=vmm&STYLES=&FORMAT=image/jpeg&DPI=120&MAP_RESOLUTION=120&FORMAT_OPTIONS=dpi:120
- server replied: Bad Request; URL:
http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=Projecten/Zoneringsplan/vmm.qgz&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=63863.5,174278,78357.300291,185638&CRS=EPSG:31370&WIDTH=120&HEIGHT=120&LAYERS=vmm&STYLES=&FORMAT=image/jpeg&DPI=120&MAP_RESOLUTION=120&FORMAT_OPTIONS=dpi:120]

Older projects made with a previous QGIS version still work as expected.
Has something changed in the way that webservices should be made?
I tried making a service with spatialite layers and with postgis layers but
no succes on QGIS 3.4.3.
How can I debug the service? When I use 'test configuration' everything is
fine.

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Error when using poligonize (raster to vector)

2018-12-31 Thread Reginald
Thanks Andre,

I reinstalled GDAL and I also installed SAGA and now it's working ;-)

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Error when using poligonize (raster to vector)

2018-12-28 Thread Reginald
Hi,

I have a heatmap mask tif file that I want to polygonize.
I use qgis 3.4.2 on Windows 7.
Every time I run the processing tool I get the message:
gdal_polygonize.bat is not recognised as an internal or external command
Seems like something about the path is missing?
I can't find gdal_polygonize in C:\OSGeo4W64\bin.
Any idea?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] How to define generic VectorFileWriter

2018-12-24 Thread Reginald
The code above was not really tested profoundly.
I found that in case that there are fields without value in the FeatureForm
a value is picked from the attribute table that has no relation to the
edited feature.
I dont't know how to prevent this.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] How to define generic VectorFileWriter

2018-12-21 Thread Reginald
Update 

#capabilities doesn't mean the editortool is toggled

from qgis.PyQt.QtCore import *
from qgis.core import QgsWkbTypes

perceellayer=None
editlayer=None
layers = [layer for layer in QgsProject.instance().mapLayers().values()]
for lyr in layers:
if lyr.name() == "Parcels":
perceellayer = lyr
if lyr.name() == "layername_of_layer_you_want_to_edit":
editlayer = lyr
if not editlayer.isEditable():
editlayer.startEditing()

percelen = []
features = perceellayer.selectedFeatures()
geom = None
for f in features:
if geom == None:
geom = f.geometry()
else:
geom = geom.combine(f.geometry())
velden = editlayer.fields()
prov = editlayer.dataProvider()
feat = QgsFeature(velden)
feat.setGeometry(geom)
iface.openFeatureForm(editlayer,feat,updateFeatureOnly=True,showModal=False)
(res, outFeats) = editlayer.dataProvider().addFeatures([feat])
print("done")

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] How to define generic VectorFileWriter

2018-12-21 Thread Reginald
Hi,

For those who are interrested in the result I post this script:


#script uses selected features of parcellayer as geometry for editable other
vector layer
#make sure there is only one layer editable, otherwise only the first
occuring layer will be used

from qgis.PyQt.QtCore import *
from qgis.core import QgsWkbTypes

perceellayer=None
editlayer=None
layers = [layer for layer in QgsProject.instance().mapLayers().values()]
for lyr in layers:
if lyr.name() == "parcels":
perceellayer = lyr
if lyr.type() == QgsMapLayer.VectorLayer:
cap = lyr.dataProvider().capabilities()
if cap & QgsVectorDataProvider.AddFeatures:
editlayer = lyr
percelen = []
features = perceellayer.selectedFeatures()
geom = None
for f in features:
if geom == None:
geom = f.geometry()
#perc = f["primarynum"] + f["bisnumber"] + f["expletter"] +
f["expnum"]
else:
geom = geom.combine(f.geometry())   

velden = editlayer.fields()
prov = editlayer.dataProvider()
feat = QgsFeature(velden)
feat.setGeometry(geom)
iface.openFeatureForm(editlayer,feat,updateFeatureOnly=True)
(res, outFeats) = editlayer.dataProvider().addFeatures([feat])
print("done")

///

Regards, 



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] How to define generic VectorFileWriter

2018-12-21 Thread Reginald
Thanks Nyall,

I found some other information here:

https://gis.stackexchange.com/questions/279734/understanding-qgis-api-documentation

now I'm trying to find out how to print the FileWriter Error object as a
string.

Regards



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] How to define generic VectorFileWriter

2018-12-21 Thread Reginald
Hi,

I'm trying to implement a way to copy the geometry of selected parcels to an
editable layer in a qgs project.
I'm using QGIS 3.4.2.

My code looks like this:

from qgis.PyQt.QtCore import *
from qgis.core import WKB

perceellayer=None
editlayer=None
layers = [layer for layer in QgsProject.instance().mapLayers().values()]
for lyr in layers:
if lyr.name() == "Adpf1836007":
perceellayer = lyr
if lyr.type() == QgsMapLayer.VectorLayer:
cap = lyr.dataProvider().capabilities()
if cap & QgsVectorDataProvider.AddFeatures:
editlayer = lyr
percelen = []
features = perceellayer.selectedFeatures()
geom = None
for f in features:
if geom == None:
geom = f.geometry()
else:
geom = geom.combine(f.geometry())   

velden = editlayer.fields()
fpad = editlayer.dataProvider().dataSourceUri()
feat = QgsFeature(velden)
feat.setGeometry(geom)
fout = QgsVectorFileWriter.writeAsVectorFormat(editlayer, fpad, "31370",
WKB.Polygon, "ESRI Shapefile")
if fout == QgsVectorFileWriter.NoError:
print("succes")
print("done")

In this example I try to write to a shapefile, but it fails complaining it
can not import WKB. I would like to write to any kind of Vectorfile
depending of the vectorfile that was set writeable. Any ideas on how to do
this? The cookbook is kind of short concerning writing features.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] spatialite layer does not show

2018-12-19 Thread Reginald
Thanks for the reply,

Jay M Johnson advised me this link:

https://gis.stackexchange.com/questions/131996/shapefile-layers-in-qgis-dont-display-unless-i-zoom-out

Meanwhile I solved the problem by saving the features in a postgresql layer.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] spatialite layer does not show

2018-12-19 Thread Reginald
Update,

In the logmessages I found this message:

2018-12-19T13:34:13 WARNINGKon geen stijlen laden uit
F:/QGIS/dev/notarisattest/inlichtingen.sqlite (Query: SELECT styleQML FROM
layer_styles WHERE f_table_schema IS NULL AND f_table_name='uittreksels' AND
f_geometry_column ='geom' ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2
END,update_time DESC LIMIT 1)

It says it can not load any style from the sqlite database.
Maybe I should save my style in the database?

Any idea?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] spatialite layer does not show

2018-12-19 Thread Reginald
Hi qgis users,

I have a model in which i use a parcellayer. From this parcellayer I get the
selected features.
In order to obtain one geometry I convert from singlepart to multipart
geometry.
In order to query the layers that overlay this parcels I make a buffer of
-0.3m.
The last step the model does is import the result in a spatialite database.
The layer of this spatialite database is included in a qgis project where I
run my script that generates a large report.
The problem that I get is that sometimes the spatialite layer is shown on
the map, and sometimes it's not.
By moments the layer shows up at certain scale but when you zoom in or out
the layer disappears.
Should I add something to my model so that the buffered features keep
visible?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Resolution problem with small laptop connected to external monitors

2018-12-14 Thread Reginald
Hi,

We have a problem with a small laptop that is connected with two external
monitors.
All programs  on the laptop show up in a sharp resolution.
When using QGIS the resolution is granular. Even the aerial photo which is
very sharp has a granular appearance.
According to the person using the laptop QGIS showed up fine with the
previous (2.18) version of QGIS.
Does anyone know if there has been a change to QGIS in that area or what can
be done to increase the resolution?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Print composer not locking layers in 2.18.17 and crashing in 3.4.2

2018-12-03 Thread Reginald
Hello qgis users,

I needed to make a A4 pdf of a parcel with as underground the aerial
photographs of distinct years.
 
When I used qgis 3.4.2 the application crashed during the proces of making
the printcomposer.
The aerial photographs are jp2 files of a size ranging from 2 GB to 9
kb. I used the qlrbrowser to add them to the project.
The memory usage of qgis escalated to 10 GB and more and eventually qgis
crashed.
After trying two times more with the same result I decided to use qgis
2.18.17.
With this version of qgis I could compose the print layout but every time I
wanted to export the composer to pdf  the individual maps that were locked
were lost and four identical maps are shown.
 
For all the maps I have these item properties:
   
How can I export the printcomposer so that I obtain 4 different maps in one
layout?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] OSGEO4W64 installs after failed download

2018-11-07 Thread Reginald
Update

I found out that the invalid download was caused by internal network
filtering or blocking.
Some of the applications that the installer downloads were allowed some were
blocked.
Do they come from other URL?
Luckely there is an option to install from a local directory. The sys admin
downloaded the needed files with his phone as USB thetering device to a
network directory.
After that I could install the newest LTR version.
OSGeo4W is great software.
Just a messagebox that allows the installation to be interrupted would make
it greater ;-)

Ciao,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] OSGEO4W64 installs after failed download

2018-10-30 Thread Reginald
Hi,

Today I noticed that there was a new version of QGIS.
I decided to update.
During the update process the installer informed me that the download was
incomplete. I choosed to try again but again it ended up incomplete so I
choosed no the second time.
I expected the installation to STOP because the download was INCOMPLETE.
But no: immediately the installer began uninstalling the existing and
working QGIS installation :-(
I ended up with a QGIS 3.4 installation without python support which I need
a lot.
This is the failure:
Problemen bij het laden van de SIP module.
Python-ondersteuning wordt uitgeschakeld.

Traceback (most recent call last):
  File "", line 1, in 
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\__init__.py", line 72, in 
from qgis.PyQt import QtCore
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\PyQt\QtCore.py", line 26, in 
from PyQt5.QtCore import *
ModuleNotFoundError: No module named 'PyQt5.QtCore'

So I hope the devs that make the installer read this and when the download
is incomplete they show a message that says: Downloading all the needed
files failed. Try again installing later.

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] unable to install QGIS with OSGEO4W on windows 7

2018-10-18 Thread Reginald
Hi,

When trying to install QGIS with OSGEO4W64 installer on the PC of a fellow
worker, everytime I get an error:
crssync.exe : zip.dll is missing. you need to install it again
Then when restarting and trying to run QGIS I get a dialogue that says: 
you need to check qgis-bin.env and correct invalid entries or something like
that How can I completely remove qgis on a windows 7 pc and install qgis 3?
I uninstalled qgis with software panel from windows.
Then I deleted the OSGEO4W folder.
Then I tried deleting qgis instances in regedit but that failed.
Is there a way to copy the zip.dll from somewhere and paste it in the right
place?
Why isn't OSGEO4W installer setting the right env variables?
You see, a lot of questions, but QGIS is a big program and has a lot of
possibilities ;-)

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] no python support when installing QGIS 3.2 on ubuntu Bionic

2018-09-06 Thread Reginald
Yes, I probably will have to wait till the Beaver dies and I can upgrade.
By the way, python-qgis got installed but cannot function due to incorrect
bindings I guess...

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] no python support when installing QGIS 3.2 on ubuntu Bionic

2018-09-06 Thread Reginald
Hello,

When I try to install qgis 3.2 on Bionic I get following message after
installation:

PyQt4 kon niet worden geladen.
Python-ondersteuning wordt uitgeschakeld.


Traceback (most recent call last):
  File "", line 1, in 
ImportError: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.10'
not found (required by
/home/reginald/.local/lib/python3.6/site-packages/PyQt5/QtCore.so)


Python versie:
3.6.5 (default, Apr  1 2018, 05:46:30) 
[GCC 7.3.0]

QGIS versie:
3.2.2-Bonn 'Bonn', 2684216

Python pad:
['/usr/share/qgis/python',
'/home/reginald/.local/share/QGIS/QGIS3/profiles/default/python',
'/home/reginald/.local/share/QGIS/QGIS3/profiles/default/python/plugins',
'/usr/share/qgis/python/plugins', '/usr/lib/python36.zip',
'/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload',
'/home/reginald/.local/lib/python3.6/site-packages',
'/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']

Any idea how to solve this without breaking ubuntu?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] How to refresh image in python QGIS 3

2018-09-06 Thread Reginald
Hi,

I have the following code:



For some reason the image always shows the memlayer without transparancy so
the underlaying buildings are not visible. Later in the code a word document
is generated and when I close this document I see the memlayer as it should
be. The image I save, and that I use in the document is wrong as it is not
transparent.

Any advice?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] putting a script that doesn't involve GUI in scripts toolbox

2018-08-30 Thread Reginald Carlier
Thanks Nyall,

This will get me on the right track. :)

Regards,


Reginald Carlier
Deskundige GIS
Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T+32 51 33 74 39www.ingelmunster.be
Raadpleeg onze disclaimer
Van: Nyall Dawson [via OSGeo.org] [mailto:ml+s1560n5375927...@n6.nabble.com]
Verzonden: dinsdag 28 augustus 2018 11:45
Aan: Reginald Carlier
Onderwerp: Re: putting a script that doesn't involve GUI in scripts toolbox

On Tue, 28 Aug 2018 at 18:43, Reginald <[hidden 
email]> wrote:
>
> Thanks Havard,
>
> So I guess this means that it is impossible to use python scripts without
> opening a dialog?

That's not correct - the dialog is shown if your algorithm defines any
input parameters which require user interaction. If you remove all the
input parameters from your algorithm, then no dialog is shown and the
algorithm/script is run immediately.

Nyall
___
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

If you reply to this email, your message will be added to the discussion below:
http://osgeo-org.1560.x6.nabble.com/putting-a-script-that-doesn-t-involve-GUI-in-scripts-toolbox-tp5375911p5375927.html
To start a new topic under QGIS - User, email ml+s1560n4125267...@n6.nabble.com
To unsubscribe from QGIS, click 
here<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4099105&code=UmVnaW5hbGQuQ2FybGllckBpbmdlbG11bnN0ZXIuYmV8NDA5OTEwNXw3OTAxNjMzMzQ=>.
NAML<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] putting a script that doesn't involve GUI in scripts toolbox

2018-08-28 Thread Reginald
Thanks Havard,

So I guess this means that it is impossible to use python scripts without
opening a dialog?
As my script doesn't fit in the template I pasted it in the editor of the
pythonconsole and there it works :-)

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] putting a script that doesn't involve GUI in scripts toolbox

2018-08-28 Thread Reginald
Hello,

In QGIS 2.18 I made a script that created a feature from the selected
Cadastral Parcels. That way I didn't have to draw them manualy.
I want to use this script in QGIS 3 and put it in the Toolbox Processing.
I did some changes to the script like replacing MapLayerRegistry with
QgsProject and such, but at a point when I wanted to test my script I only
get a notice saying "There seems to be no valid script in the file".
I looked at the Python Errors and Warnings dialog but could not find any
log.
How can I put this script in the toolbox? I know there is a template for a
script available but I want to use a script that doesn't open a window: just
click on the script so it executes.
Is this still posible in QGIS 3?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] WMS Request step size

2018-08-20 Thread Reginald
Hi Bo,

I think you get more responses if you post this as a separate topic.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] WFS created with geoserver not showing style in QGIS

2018-08-20 Thread Reginald
Thanks Jonathan for this clarification.
I guess I can style the vectorlayers in a QGIS project and serve this as a
QGIS service.






--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] WFS created with geoserver not showing style in QGIS

2018-08-10 Thread Reginald
The resulting xml is accesable here:

https://drive.google.com/open?id=130mbfAT9gtQhU-z_NsA1vT11EGytO9xD

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] WFS created with geoserver not showing style in QGIS

2018-08-09 Thread Reginald
Hi,

In an earlier topic in this list there was a mentioning of SLD's being a
styling that is layer based in stead of feature based. In geoserver I
created a sld style for a layer that is inside my postgis database. The
layer contains information about projects concerning sewersystem, an
features are categorised accorcing to the value of some field. This style is
saved in the database. When I import my layer and style in geoserver it
shows a correct styling in the openlayers client. When I use the wfs url in
qgis 3.2 I get a notification that WFS version 1.2.0 is not supported. The
URL of the WFS mentions WFS version 1.0.0.
What is going on here?
I also tried to use the GMLAS plugin but this fails too:

2018-08-10T08:28:46 WARNINGbuilding WFS
http://localhost:8080/geoserver/Ingelmunst/ows?version=1.0.0&typeName=Ingelmunst:gup_projecten&maxFeatures=50
2018-08-10T08:28:47 WARNINGbuilding WFS
http://localhost:8080/geoserver/Ingelmunst/ows?version=1.0.0&typeName=Ingelmunst:gup_projecten&maxFeatures=50
2018-08-10T08:29:34 WARNINGSELECT COUNT(*) FROM pg_proc WHERE
proname = 'postgis_version'
2018-08-10T08:29:34 WARNINGSELECT oid, nspname,
pg_get_userbyid(nspowner), nspacl FROM pg_namespace WHERE nspname !~ '^pg_'
AND nspname != 'information_schema'
2018-08-10T08:29:42 WARNINGbuilding WFS
http://localhost:8080/geoserver/Ingelmunst/ows?version=1.0.0&typeName=Ingelmunst:gup_projecten&maxFeatures=500
2018-08-10T08:32:22 WARNINGbuilding WFS
http://localhost:8080/geoserver/Ingelmunst/ows?version=1.0.0&typeName=Ingelmunst:gup_projecten&maxFeatures=500
2018-08-10T08:32:23 WARNINGbuilding WFS
http://localhost:8080/geoserver/Ingelmunst/ows?version=1.0.0&typeName=Ingelmunst:gup_projecten&maxFeatures=500
2018-08-10T08:32:39 WARNINGbuilding WFS
http://localhost:8080/geoserver/Ingelmunst/ows?version=1.0.0&typeName=Ingelmunst:gup_projecten&maxFeatures=500
2018-08-10T08:32:40 WARNINGbuilding WFS
http://localhost:8080/geoserver/Ingelmunst/ows?version=1.0.0&typeName=Ingelmunst:gup_projecten&maxFeatures=500

Is it possible to show a categorised style in a WFS service?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] localisation of date fails in QGIS 3.2

2018-08-09 Thread Reginald Carlier
Thanks a lot Alessandro,

That works perfectly.


Reginald Carlier
Deskundige GIS
Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T+32 51 33 74 39www.ingelmunster.be
Raadpleeg onze disclaimer
Van: Alessandro Pasotti [mailto:apaso...@gmail.com]
Verzonden: donderdag 9 augustus 2018 9:10
Aan: Reginald Carlier
CC: Nyall Dawson [via OSGeo.org]; qgis-user@lists.osgeo.org
Onderwerp: Re: [Qgis-user] localisation of date fails in QGIS 3.2


Reginald,





Using QT:



locale = QLocale(QLocale.Japanese)

locale.toString(QDate.currentDate())



And, if you want to use the same settings that you set in QGIS, just use the 
default locale:



locale = QLocale() # Default locale from QGIS options/settings

locale.toString(QDate.currentDate())





On Thu, Aug 9, 2018 at 8:54 AM, Reginald Carlier 
mailto:reginald.carl...@ingelmunster.be>> 
wrote:
I forgot to mention that I import datetime as follows:

from datetime import datetime

In the console I get the same result as from my script.
Maybe I should use QCoreApplication.translate or some other explicit way to 
tell python to translate a string from English to Dutch?

Regards,

Reginald Carlier​


Deskundige GIS




Fout! Bestandsnaam niet opgegeven.<https://www.ingelmunster.be/>


Gemeente Ingelmunster

,

Oostrozebekestraat 4

,

8770



Ingelmunster



T

+32 51 33 74 39

www.ingelmunster.be<http://www.ingelmunster.be/>




Fout! Bestandsnaam niet opgegeven.<https://www.facebook.com/Ingelmunster/>

Fout! Bestandsnaam niet opgegeven.<https://www.instagram.com/ingelmunster/>

Fout! Bestandsnaam niet opgegeven.<https://www.pinterest.com/ingelmunster/>

Fout! Bestandsnaam niet opgegeven.<https://twitter.com/ingelmunster>



Raadpleeg onze disclaimer <http://www.ingelmunster.be/email-disclaimer.html>

Van: Nyall Dawson [via OSGeo.org] 
[mailto:ml+s1560n5373899...@n6.nabble.com<mailto:ml%2bs1560n5373899...@n6.nabble.com>]
Verzonden: donderdag 9 augustus 2018 8:43
Aan: Reginald Carlier
Onderwerp: Re: localisation of date fails in QGIS 3.2

On Thu, 9 Aug 2018 at 16:39, Reginald Carlier
<[hidden email]<http://user/SendEmail.jtp?type=node&node=5373899&i=0>> wrote:

>
> Hi Nyall,
>
> Somehow my post shows the code but my previous post doesn't.
> Anyway this is how the code looks:
>
> vandaag = datetime.now()
> dag = vandaag.day
> maand = vandaag.strftime("%B")
> jaar = vandaag.year
> datum = str(dag) + " " + maand + " " + str(jaar)
>
> I suspect that maybe strftime changed in python 3.6?

Do you see the same from a standalone python console? (I'm not sure
that this issue is related to QGIS at all or whether it's a Python
specific thing).

Nyall
___
Qgis-user mailing list
[hidden email]<http://user/SendEmail.jtp?type=node&node=5373899&i=1>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

If you reply to this email, your message will be added to the discussion below:
http://osgeo-org.1560.x6.nabble.com/localisation-of-date-fails-in-QGIS-3-2-tp5372703p5373899.html
To start a new topic under QGIS - User, email 
ml+s1560n4125267...@n6.nabble.com<mailto:ml%2bs1560n4125267...@n6.nabble.com>
To unsubscribe from QGIS, click 
here<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4099105&code=UmVnaW5hbGQuQ2FybGllckBpbmdlbG11bnN0ZXIuYmV8NDA5OTEwNXw3OTAxNjMzMzQ=>.
NAML<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



--
Alessandro Pasotti
w3:   www.itopen.it<http://www.itopen.it>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] localisation of date fails in QGIS 3.2

2018-08-08 Thread Reginald Carlier
I forgot to mention that I import datetime as follows:

from datetime import datetime

In the console I get the same result as from my script.
Maybe I should use QCoreApplication.translate or some other explicit way to 
tell python to translate a string from English to Dutch?

Regards,


Reginald Carlier
Deskundige GIS
Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T+32 51 33 74 39www.ingelmunster.be
Raadpleeg onze disclaimer
Van: Nyall Dawson [via OSGeo.org] [mailto:ml+s1560n5373899...@n6.nabble.com]
Verzonden: donderdag 9 augustus 2018 8:43
Aan: Reginald Carlier
Onderwerp: Re: localisation of date fails in QGIS 3.2

On Thu, 9 Aug 2018 at 16:39, Reginald Carlier
<[hidden email]> wrote:

>
> Hi Nyall,
>
> Somehow my post shows the code but my previous post doesn't.
> Anyway this is how the code looks:
>
> vandaag = datetime.now()
> dag = vandaag.day
> maand = vandaag.strftime("%B")
> jaar = vandaag.year
> datum = str(dag) + " " + maand + " " + str(jaar)
>
> I suspect that maybe strftime changed in python 3.6?

Do you see the same from a standalone python console? (I'm not sure
that this issue is related to QGIS at all or whether it's a Python
specific thing).

Nyall
___
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

If you reply to this email, your message will be added to the discussion below:
http://osgeo-org.1560.x6.nabble.com/localisation-of-date-fails-in-QGIS-3-2-tp5372703p5373899.html
To start a new topic under QGIS - User, email ml+s1560n4125267...@n6.nabble.com
To unsubscribe from QGIS, click 
here<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4099105&code=UmVnaW5hbGQuQ2FybGllckBpbmdlbG11bnN0ZXIuYmV8NDA5OTEwNXw3OTAxNjMzMzQ=>.
NAML<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] localisation of date fails in QGIS 3.2

2018-08-08 Thread Reginald Carlier
Hi Nyall,

Somehow my post shows the code but my previous post doesn't.
Anyway this is how the code looks:

vandaag = datetime.now()
dag = vandaag.day
maand = vandaag.strftime("%B")
jaar = vandaag.year
datum = str(dag) + " " +  maand + " " + str(jaar)

I suspect that maybe strftime changed in python 3.6?

Regards,


Reginald Carlier
Deskundige GIS
Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T+32 51 33 74 39www.ingelmunster.be
Raadpleeg onze disclaimer
-Oorspronkelijk bericht-
Van: Nyall Dawson [mailto:nyall.daw...@gmail.com]
Verzonden: donderdag 9 augustus 2018 8:36
Aan: Reginald Carlier
CC: qgis-user
Onderwerp: Re: [Qgis-user] localisation of date fails in QGIS 3.2

On Mon, 30 Jul 2018 at 19:22, Reginald  wrote:
>
> Hi,
>
> I have a script that was adapted to python 3.6 and runs fine on QGIS 3.2.
> The problem I'm having is that the date shows up in english.
> Under Extra > Options > Algemeen i have:
> Vertaling gebruikers-interface --> Nederlands
> Locale Dutch Belgium (nl_BE)
>
> Also if I choose for "Systeemlocale negeren" (ignore system locale) I still
> get the date in english.
> My code looks like this and works fine in QGIS 2.18:
>
>

I think you forgot to include the code? Can you re-share?

Nyall
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] localisation of date fails in QGIS 3.2

2018-08-08 Thread Reginald
nobody has issues with localisation in QGIS 3.2?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Add processing script to toolbox

2018-07-31 Thread Reginald
No, but previously I made a couple of scripts based on the template. These
scripts resided in the default scripts directory and I guess there is some
logic that loads them in the toolbox on startup?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Add processing script to toolbox

2018-07-31 Thread Reginald
>Hi Reginald,

>I had a quick look at this. The issue here is that your script doesn't
follow the QGIS 3 API for scripts, and >will need to be ported/upgraded.

>I'd suggest a good approach would be to start from the template given when
you select "Create New Script >from Template" from the processing toolbox
toolbar. You basically put all your code into the >"processAlgorithm"
function, so it only runs when the algorithm is executed, not when the
script file is first >loaded. A quick scan shows that you use some
deprecated 2.x api which will need to be fixed too - e.g.
>iface.legendInterface() no longer exists. You can see a list of API breaks
from 2.x to 3.x here: >https://qgis.org/api/api_break.html. There's also
quite a lot of resources available via a quick google >search.

>Hope that helps!
>Nyall

Hi Nyall,

Thanks for looking in to this. Yesterday I installed qgis full from OSGEO4W
installer and installed it in the default directory.
When I opened QGIS 3.2 it showed the scripts that were adapted to the
template were imported in the toolbox.
So I guess there is some bug concerning changing the default directory
“OSGEO4W64” to something else.

Regards,





--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Add processing script to toolbox

2018-07-30 Thread Reginald
Hi Nyall,

I have opened the options dialogue and clicked OK but everything remains the
same.
On a fresh install on another PC I still get the same behaviour.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] localisation of date fails in QGIS 3.2

2018-07-30 Thread Reginald
Hi,

I have a script that was adapted to python 3.6 and runs fine on QGIS 3.2.
The problem I'm having is that the date shows up in english.
Under Extra > Options > Algemeen i have:
Vertaling gebruikers-interface --> Nederlands
Locale Dutch Belgium (nl_BE)

Also if I choose for "Systeemlocale negeren" (ignore system locale) I still
get the date in english.
My code looks like this and works fine in QGIS 2.18:








--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Add processing script to toolbox

2018-07-30 Thread Reginald
Hi Jean-Baptiste,

I get the following warning:

 WARNINGKon script niet kopiëren:
C:/Users/reginaldc/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/scripts/notarisrapport3.py

'C:/Users/reginaldc/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/scripts/notarisrapport3.py'
and
'C:\\Users\\reginaldc\\AppData\\Roaming\\QGIS\\QGIS3\\profiles\\default\\processing\\scripts\\notarisrapport3.py'
are the same file

The problem is that the script doesn't show up in the treeview. I can open
it using 'open existing script'.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Streetview is opening html page in text editor

2018-07-27 Thread Reginald
Hello,

When I use the streetview plugin in QGIS 3.2 I noticed that it opens the
page in a text editor in stead of opening the page in a browser. I tested
QGIS 2.18.21 and there the plugin opens the page in the browser, so it has
nothing to do with some default opening of html pages.
Can this be confirmed by other users?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Add processing script to toolbox

2018-07-25 Thread Reginald
Hi,

I'm trying to add some scripts to the toolbox of QGIS-versie
3.2.1-Bonn. Whatever I do to import the script in the toolbox fails.
I use the python icon that is in the menubar of Toolbox Processing.
I have run the scripts and they work with QGIS 3.21.
Any help?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Use of processing in order to run model from script

2018-06-21 Thread Reginald
Hi,

I have build a model that works perfectly, and I want to wrap this in a
script.
In processing history I can see the command that gets executed:

processing.runalg("modeler:bufferedselectionmodel","F:/Gis/Cadmap/Recent/Cadmap_Kadastrale_Percelen.shp",None)

When I make a script were I import processing and put the above line in, it
gives me an error while executing:

Uncaught error while executing algorithm
Traceback (most recent call last):
  File
"C:/OsGeo/apps/qgis-ltr/./python/plugins\processing\core\GeoAlgorithm.py",
line 204, in execute
progress.setPercentage(100)
  File
"C:/OsGeo/apps/qgis-ltr/./python/plugins\processing\gui\MessageBarProgress.py",
line 55, in setPercentage
self.progress.setValue(i)
RuntimeError: wrapped C/C++ object of type QProgressBar 
has been deleted

How could I solve this? I would like to run the model from inside another
script.

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] click on raster outline to make it visible

2018-05-25 Thread Reginald
Found the solution for defining the action:

from PyQt4.QtCore import QFileInfo;
fileName ="[%"Locatie"%]";
fraw = fileName.encode('string_escape').replace('','\\')
fileInfo = QFileInfo(fileName);
baseName = fileInfo.baseName();
qgis.utils.iface.addRasterLayer(fraw, baseName);

With this code I can click in the combobox in the attributetable and the
rasterlayer loads in the layerpanel.
It would be nice if I could just click on the outline in the map and get the
same result 



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] click on raster outline to make it visible

2018-05-25 Thread Reginald
My code now looks like this :


 
resulting in the following error:
 
Ongeldige Laag: GDAL provider Cannot open GDAL dataset
'F:\\Ingelmunster\riolering\\infraxscans\tif2/333-Meulebekestraat_Lammekensknokstraat_Bollewerpstraat_Leon_Bekaertstraat_Ringlaan_Mandesweg_GP_deel2.tif':
`'F:\\Ingelmunster\riolering\\infraxscans\tif2/333-Meulebekestraat_Lammekensknokstraat_Bollewerpstraat_Leon_Bekaertstraat_Ringlaan_Mandesweg_GP_deel2.tif''
does not exist in the file system, and is not recognized as a supported
dataset name



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] click on raster outline to make it visible

2018-05-25 Thread Reginald
Hi Michel,

It would be a solution to escape all the suspicous characters, but I would
prefer it if the string could be treated as a raw string. I tried placing r
in front of it but that didn't work. I guess it is the way that the actions
are implemented that creates this problem.
The location path was the result of the raster> Index tiles algorithm.

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] click on raster outline to make it visible

2018-05-25 Thread Reginald
Hello,

I have defined an action with the following python code:

from PyQt4.QtCore import QFileInfo
fileName ="[%"Locatie"%]";
fileInfo = QFileInfo(fileName);
baseName = fileInfo.baseName();
qgis.utils.iface.addRasterLayer(fileName, baseName);

The problem that I’m having is that the string stored in the Locatie field
gets interpreted.
In a path name like
F:\Ingelmunster\riolering\infraxscans\tif2/331-Meulebekestraat_Leon_Bekaertstraat_Mandesweg_GP_deel2.tif
 
\t creates a tab spacing and \r removes a character.

Ongeldige Laag: GDAL provider Cannot open GDAL dataset F:\Ingelmunster
iolering\infraxscans
if2/335-Meulebekestraat_Lammekensknokstraat_Bollewerpstraat_Bekaertstraat_Ringlaan_GP_deel3.tif:
`F:\Ingelmunster iolering\infraxscans
if2/335-Meulebekestraat_Lammekensknokstraat_Bollewerpstraat_Bekaertstraat_Ringlaan_GP_deel3.tif'
does not exist in the file system, and is not recognized as a supported
dataset name.

How can I load the rasterfile with the filename that is stored in the
Locatie field into qgis?
Is there any comprehensive tutorial on actions?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] click on raster outline to make it visible

2018-05-24 Thread Reginald
A little update:

I created a raster tile index wich is a vector layer with one field named
"location".
Location stores the path of the rasterfile.
Now I'm trying to add a new python action for this file.
I need to find the coordinates of the place where I clicked on the map.

Any suggestions?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] click on raster outline to make it visible

2018-05-24 Thread Reginald
Hi,

I have over 500 tif raster files that are georeferenced.
I  want to present them with QGIS server.
I have changed the scale visibility so that they only get rendered when the
user zooms in to a scale smaller than 1/2000.
The problem I'm having is that several of the tiffs overlap each other.
I would like only to show the outlines of the tiff files and when the user
clicks on a particular outline, only the tiffs that lay under the clicking
point are shown.
Is there a way to do this?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] no python console in QGIS 3 Ubuntu 17.10

2018-04-14 Thread Reginald
Thanks Jurgen,

That sorted it out.
I now have a working version of qgis with python support.
Seems like the download page of QGIS should be adapted ;-)

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] no python console in QGIS 3 Ubuntu 17.10

2018-04-14 Thread Reginald
Hi Patrick,

I had added this repo but to no avail.
It also gave an error:

Fout:6 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu artful 
> Release 
>404  Not Found 

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] no python console in QGIS 3 Ubuntu 17.10

2018-04-14 Thread Reginald
Hi,

An update of the situation:

First I was using:

deb https://qgis.org/debian-nightly-release artful

resulted in : installation of qgis without python support

Then I did following command :

sudo apt-get purge --auto-remove qgis

which should remove qgis completely
Strange:
In synaptic I saw that there were several packages with qgis in their name
--> removed them

next I put this in sources.list:

deb https://qgis.org/debian jessie main
deb-src https://qgis.org/debian jessie main

result: a lot of packages that can't be installed because of broken packages
In synaptic I see no broken packages
rebooted into recovery --> fix broken packages : nothing to fix

changed sources.list:

deb https://qgis.org/debian artful main
deb-src https://qgis.org/debian artful main

result : qgis gets installed without python support 


changed sources.list:

deb https://qgis.org/ubuntugis artful main
deb-src https://qgis.org/ubuntugis artful main


Fout:6 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu artful
Release 


  404  Not Found

Fout:10 https://qgis.org/ubuntugis artful Release  
  404  Not Found [IP: 2400:cb00:2048:1::681b:8adc 443]

It seems that the release file is not installed in this repo.

How can I install qgis with python support?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] no python console in QGIS 3 Ubuntu 17.10

2018-04-13 Thread Reginald Carlier
Thanks Luke ☺


Reginald Carlier
Deskundige GIS
Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T+32 51 33 74 39www.ingelmunster.be
Raadpleeg onze disclaimer
Van: Luke Pinner [mailto:lukepinne...@gmail.com]
Verzonden: vrijdag 13 april 2018 12:48
Aan: Reginald Carlier
Onderwerp: Re: [Qgis-user] no python console in QGIS 3 Ubuntu 17.10

It's the 1st one in the list - https://qgis.org/debian

Luke

On Fri., 13 Apr. 2018, 20:42 Reginald Carlier, 
mailto:reginald.carl...@ingelmunster.be>> 
wrote:
Hi Luke,

I have this repo installed:

https://qgis.org/debian-nightly-release/

What is the repo for 3.01? I can’t seem to find it on the qgis website.

Regards,

Reginald Carlier​


Deskundige GIS




[http://www.ingelmunster.be/ingelmunster.gif]<https://www.ingelmunster.be/>


Gemeente Ingelmunster

,

Oostrozebekestraat 4

,

8770



Ingelmunster



T

+32 51 33 74 39

www.ingelmunster.be<http://www.ingelmunster.be/>




[Facebook]<https://www.facebook.com/Ingelmunster/>

[instagram]<https://www.instagram.com/ingelmunster/>

[pinterest]<https://www.pinterest.com/ingelmunster/>

[twitter]<https://twitter.com/ingelmunster>



Raadpleeg onze disclaimer <http://www.ingelmunster.be/email-disclaimer.html>

Van: Luke Pinner [mailto:lukepinne...@gmail.com<mailto:lukepinne...@gmail.com>]
Verzonden: vrijdag 13 april 2018 12:29
Aan: Reginald Carlier
Onderwerp: Re: [Qgis-user] no python console in QGIS 3 Ubuntu 17.10

Completely uninstall testing, remove testing repo and add the release repo and 
install 3.01 and it should work fine. I have 3.01 installed on multiple ubuntu 
1710 pcs with no python problems.

https://www.qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu

On Fri., 13 Apr. 2018, 20:00 Reginald, 
mailto:reginald.carl...@ingelmunster.be>> 
wrote:
Hi,

On ubuntu 17.10 I added the nightly release to sources.list.
I got to install QGIS 3, but I noticed there is no python console.
I get an error of Qt 5.10 not being available.
In synaptic I see that Qt 5.09 is used everywhere.
I tried to install two snap versions of QGIS but every time that failed.
When will python support be added to QGIS 3 on ubuntu?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] no python console in QGIS 3 Ubuntu 17.10

2018-04-13 Thread Reginald Carlier
Hi Luke,

I have this repo installed:

https://qgis.org/debian-nightly-release/

What is the repo for 3.01? I can’t seem to find it on the qgis website.

Regards,


Reginald Carlier
Deskundige GIS
Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T+32 51 33 74 39www.ingelmunster.be
Raadpleeg onze disclaimer
Van: Luke Pinner [mailto:lukepinne...@gmail.com]
Verzonden: vrijdag 13 april 2018 12:29
Aan: Reginald Carlier
Onderwerp: Re: [Qgis-user] no python console in QGIS 3 Ubuntu 17.10

Completely uninstall testing, remove testing repo and add the release repo and 
install 3.01 and it should work fine. I have 3.01 installed on multiple ubuntu 
1710 pcs with no python problems.

https://www.qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu

On Fri., 13 Apr. 2018, 20:00 Reginald, 
mailto:reginald.carl...@ingelmunster.be>> 
wrote:
Hi,

On ubuntu 17.10 I added the nightly release to sources.list.
I got to install QGIS 3, but I noticed there is no python console.
I get an error of Qt 5.10 not being available.
In synaptic I see that Qt 5.09 is used everywhere.
I tried to install two snap versions of QGIS but every time that failed.
When will python support be added to QGIS 3 on ubuntu?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] no python console in QGIS 3 Ubuntu 17.10

2018-04-13 Thread Reginald
Hi,

On ubuntu 17.10 I added the nightly release to sources.list.
I got to install QGIS 3, but I noticed there is no python console.
I get an error of Qt 5.10 not being available.
In synaptic I see that Qt 5.09 is used everywhere.
I tried to install two snap versions of QGIS but every time that failed.
When will python support be added to QGIS 3 on ubuntu?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Unable to load qgisserver wms in qgis when more than 120 rasters

2018-04-12 Thread Reginald
Hi,

I succeeded in copying the errormessage:

Ongeldige Laag: WMS provider Kan het bereik niet berekenen Raster layer
Provider is ongeldig (provider: wms, URI:
contextualWMSLegend=0&crs=EPSG:31370&dpiMode=7&featureCount=10&format=image/jpeg&layers=atlas_der_buurtwegen&styles=&url=http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP%3DProjecten/buurtwegen/abw.qgs)

It says that it cannot calculate the extent

Someone has an idea how to resolve this?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Unable to load qgisserver wms in qgis when more than 120 rasters

2018-04-12 Thread Reginald
Thanks a lot Andreas,

That worked!
Altough, using the vrt succeeded the first time, but when I opened the
project again qgis crashed (2.18.18)
I tried several times, even loading the vrt file in a new project made qgis
crash.
Building the raster with gdal_merge worked. First I have build a vrt file,
and then I created the merged file.
I succeeded in serving the project in qgisserver and opening it in qgis.
Then I adjusted the OWS settings (just filled in title, extent etc. -->
tested it: result was ok).
Now when I try to load the wmsservice in qgis, it shows the layer in the WMS
dialog but when I add it I get an error. The problem is that I cannot read
the error as it is shown above the mapwindow but the text is not readable,
it is below the area that is visible.
Any suggestions?

Thanks a lot by the way :-)



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Unable to load qgisserver wms in qgis when more than 120 rasters

2018-04-12 Thread Reginald
Hi,

I have a problem when I try to make a wmsservice for qgis server.
When I load the wmsservice in another instance of qgis everything works as
long as there are no more than about 120 rasters in my project. When I try
to add more tiffs to my project I get a timeout when trying to load the wms
in qgis.
Are there any parameters I can set so the timeout doesn't happen or should I
make multiple wms instances for the other tiles?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] unable to install external packages

2018-04-05 Thread Reginald Carlier
Hi,

It's not an option to install a virtualbox or other virtual machine on the PC's 
of the users. Besides that the script wouldn't work in a virtual environment 
because it has no access then to the resources it needs.

Regards,

Reginald Carlier
Deskundige GIS
Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T+32 51 33 74 39www.ingelmunster.be
Raadpleeg onze disclaimer
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] unable to deploy pythonscript

2018-04-05 Thread Reginald Carlier
Hi Frank,

The problem is that the system administrator prefers just one  version of QGIS 
without installing OSGEO4W on every PC.
So I'm stuck with this version of QGIS.

Regards,


Reginald Carlier
Deskundige GIS
Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T+32 51 33 74 39www.ingelmunster.be
Raadpleeg onze disclaimer
-Oorspronkelijk bericht-
Van: Frank Broniewski [mailto:ha...@frankbroniewski.com]
Verzonden: donderdag 5 april 2018 9:34
Aan: Reginald Carlier; qgis-user@lists.osgeo.org
Onderwerp: AW: [Qgis-user] unable to deploy pythonscript

Hi Reginald,

pip and setuptools are both available through the OSGeo4W installer. You might 
as well try to use the OSGeo4W-Shell and not the default Windows CMD to install 
further python modules through pip or setuptools. Using the OSGeo4W-Shell takes 
care for setting up the right environment for Python.

HTH
Frank

Dipl. Geogr. Frank Broniewski
Waldhölzbacher Str. 51
66679 Losheim am See
06872 509 068 4
0176 611 26 9 2 6
www.frankbroniewski.com

-Ursprüngliche Nachricht-
Von: Qgis-user  Im Auftrag von Reginald
Gesendet: Donnerstag, 5. April 2018 08:26
An: qgis-user@lists.osgeo.org
Betreff: [Qgis-user] unable to deploy pythonscript

Hi,

Maybe this question should be posted to the development mailinglist but as I am 
not subscribed there I post it here.
I have written a python script that depends on external python packages 
(python-docx, pymssq, and others). When I am trying to deploy it on other 
computers, where there is a standalone installation of 
QGIS-OSGeo4W-2.18.17-1-Setup-x86_64.exe  on Windows 7 and where I have opened a 
cmd window as administrator, executed a bat file that sets the path right for 
the python environment of the installed qgis, I get an error when I try to 
execute pip commands.
I execute them as : python -m pip install python-docx Then I get a mentioning 
of setuptools that are not installed.
I tried to install setuptools with pip but then I got a mentioning of there not 
being a version of setuptools.
The python version is 2.75. I downloaded setuptools and unzipped it and 
executed easy_install.py but then I got a mentioning that I might have no 
rights to write to this directory. As I am administrator this can not be the 
case.
How can I install setuptools or use pip to download external python packages 
for the qgis python installation?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] unable to deploy pythonscript

2018-04-04 Thread Reginald
Hi,

Maybe this question should be posted to the development mailinglist but as I
am not subscribed there I post it here.
I have written a python script that depends on external python packages
(python-docx, pymssq, and others). When I am trying to deploy it on other
computers, where there is a standalone installation of
QGIS-OSGeo4W-2.18.17-1-Setup-x86_64.exe  on Windows 7 and where I have
opened a cmd window as administrator, executed a bat file that sets the path
right for the python environment of the installed qgis, I get an error when
I try to execute pip commands.
I execute them as : python -m pip install python-docx Then I get a
mentioning of setuptools that are not installed.
I tried to install setuptools with pip but then I got a mentioning of there
not being a version of setuptools.
The python version is 2.75. I downloaded setuptools and unzipped it and
executed easy_install.py but then I got a mentioning that I might have no
rights to write to this directory. As I am administrator this can not be the
case.
How can I install setuptools or use pip to download external python packages
for the qgis python installation?

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] qlrbrowser not working in QGIS 2.18.15

2017-12-20 Thread Reginald
Hi,

I just updated my osgeo qgis 2.18.14 installation to 2.18.15.
I noticed that all my qlr layers in the plugin qlrbrowser are not working.
Can someone notify Asger Petersen about this?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Calculate age in years with expressionbuilder

2017-12-19 Thread Reginald Carlier
Thanks Stefan,

I finally got the age by using this code:

(2017 - year(to_date("GDate")))

Year(to_date(now()) seems to fail as there are missing brackets but I can't 
figure out where.

Regards,


Reginald Carlier
Deskundige GIS
Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T+32 51 33 74 39www.ingelmunster.be
Raadpleeg onze disclaimer
-Oorspronkelijk bericht-
Van: Stefan Giese (WhereGroup) [mailto:stefan.gi...@wheregroup.com]
Verzonden: dinsdag 19 december 2017 8:58
Aan: Reginald Carlier
CC: qgis-user@lists.osgeo.org
Onderwerp: Re: [Qgis-user] Calculate age in years with expressionbuilder

I forgot: and as a workaround you can use:
year(todate(now()) - year(todate("GDate")) which will produce correct ages, or 
you can use your own python function (expression builder->functions->new file):

from qgis.core import *
from qgis.gui import *

from datetime import datetime
from dateutil.relativedelta import relativedelta

@qgsfunction(args=2, group='Python')
def GetAge(values,feature,parent):
 '''
 call this function GetAge("fromdate","todate")
 in years
 '''
 d1 =datetime.strptime(values[0],"%Y-%m-%d")
 d2 =datetime.strptime(values[1],"%Y-%m-%d")
 difference = relativedelta(d2, d1)
 return difference


Am 2017-12-19 07:48, schrieb Stefan Giese (WhereGroup):
> it seems, that this is a bug, see:
> https://issues.qgis.org/issues/17681
>
> best regards
> Stefan
>
>
> Am 2017-12-18 15:26, schrieb Reginald:
>> hello,
>>
>> I am calculating the age of persons with the expression builder.
>> My formulae looks like this:
>> year(age( to_date(now()) , "GDate" )) The result looks alright for
>> people who are younger than 68 years.
>> People who are born in 1949 or before get negative ages and the age
>> goes from -68 to -31 (for someone born in 1913) What is wrong with my
>> formulae?
>>
>> Regards,
>>
>>
>>
>>
>>
>>
>> --
>> Sent from:
>> http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Calculate age in years with expressionbuilder

2017-12-18 Thread Reginald
hello,

I am calculating the age of persons with the expression builder.
My formulae looks like this:
year(age( to_date(now()) , "GDate" ))
The result looks alright for people who are younger than 68 years.
People who are born in 1949 or before get negative ages and the age goes
from -68 to -31 (for someone born in 1913)
What is wrong with my formulae? 

Regards,






--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] minidump after running script

2017-10-20 Thread Reginald
thanks for this solution.
My script now looks like this and works :-)

from qgis.PyQt.QtCore import *
from qgis.PyQt.QtGui import *
from qgis.PyQt.QtWidgets import *
import processing

layer=None
for lyr in QgsMapLayerRegistry.instance().mapLayers().values():
if lyr.name() == "selectiepolygoon":
layer = lyr
break

# Get the first feature from the layer
feature = layer.getFeatures().next()
# fetch geometry
geom = QgsGeometry(feature.constGeometry())
#request = QgsFeatureRequest()
#request.setFilterRect(geom)
my_id = layer.id()
QgsMapLayerRegistry.instance().removeMapLayers(my_id)

layers = iface.legendInterface().layers()

for layer in layers:
layerType = layer.type()
if layerType == QgsMapLayer.VectorLayer:
for feature in layer.getFeatures():
if feature.geometry().intersects(geom):
attrs = feature.attributes()
for att in attrs:
print (str(att))



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] minidump after running script

2017-10-20 Thread Reginald
Hi,

I am trying to make a report by using a script.
The script looks as follows:

from qgis.PyQt.QtCore import *
from qgis.PyQt.QtGui import *
from qgis.PyQt.QtWidgets import *
import processing
# selectiepolygoon layer contains one multipolygone
layer=None
for lyr in QgsMapLayerRegistry.instance().mapLayers().values():
if lyr.name() == "selectiepolygoon":
layer = lyr
break

# Get the first feature from the layer
feature = layer.getFeatures().next()
# fetch geometry
geom = feature.geometry()
# remove selectiepolygoon from legend
my_id = layer.id()
QgsMapLayerRegistry.instance().removeMapLayers(my_id)

layers = iface.legendInterface().layers()

for layer in layers:
layerType = layer.type()
if layerType == QgsMapLayer.VectorLayer:
for feature in layer.getFeatures():
if feature.geometry().intersects(geom):
attr =feature.attributes()
for att in attr:
print (att.value)

When I run this script in my project it terminates with a minidump.
I suspect that the geom is empty at some point?
Any idea what is wrong with this script?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

  1   2   >