Re: [Qgis-user] Ordinary Kriging in QGIS

2018-06-28 Thread Nyall Dawson
On Thu, 28 Jun 2018 at 16:51, Falk Huettmann  wrote:

> Like well-shown with home range analysis, kernels, random number generators, 
> optimizations and many predictions and model
> selection tools, one may then ignore those outputs for a serious analysis.
>
> The initial idea of open source was arguably that those things can be tested, 
> and improved, yes ?
>

Sure is - go for it! The source is out there, all projects (including
QGIS) would love you to review their code and algorithms.

For QGIS, you can start here:

https://github.com/qgis/QGIS/tree/master/src/analysis
https://github.com/qgis/QGIS/tree/master/python/plugins/processing/algs/qgis

For SAGA, start here:

https://github.com/johanvdw/SAGA-gis-git-mirror/tree/master/saga-gis/src/tools


Looking forward to the results!

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] Getting file name from parameterAsFile

2018-06-28 Thread Rudi von Staden
On Thu, 28 Jun 2018 at 00:37, Nyall Dawson  wrote:

> If you swap to a QgsProcessingParameterFile then parameterAsFile
> should work as expected.


Thanks Nyall, that did the trick!

Kind regards,
Rudi
___
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] 3D Map Views and XYZM values

2018-06-28 Thread Martin Dobias
Hi Tyler

On Wed, Jun 20, 2018 at 4:01 PM, Tyler Veinot  wrote:
> Hi All;
> I have been experimenting with the 3D viewer in QGIS3 and was wondering how
> the ZM values are interpreted or if they are at all. When I tested with the
> points and polygons it looked like the Z was interpreted as a extrusion or
> height; but when I measure all objects seem to be the same size regardless
> of M value can someone verify if a M value is interpreted at all in the 3D
> view?

Z values are interpreted as elevation - this should work for points,
linestrings and polygons.
M values are not interpreted.


> Another question, for polygons I can use fields to define things like,
> extrusion, elevation, scale, etc...  but I cannot for points or lines in 3D;
> I was sure I could do this in the 3.0.0 build (currently at 3.0.3). Is
> adding this capability something that is being looked into for future
> versions?

Right, this is not implemented yet. Hopefully it will be added
sometime soon, but there is no roadmap for that...

Regards
Martin
___
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] QGIS 3 Processing question

2018-06-28 Thread Frank Broniewski
Hi all,

 

I am getting my feet wet with the new QGIS 3 Processing script syntax. In my
script I want to use some other processing scripts from the toolbox. I think
I got most things right, but I do not get a result back. For testing I just
try to use ‘qgis:pointsalonglines’ on a temporary polygon layer and return
the points as a result. Here’s what I have so far:

 

def initAlgorithm(self, config=None):

self.addParameter(

QgsProcessingParameterFeatureSource(

self.INPUT,

self.tr("Vector Polygon Layer"),

[QgsProcessing.TypeVectorPolygon]

)

)

[…]

self.addParameter(

QgsProcessingParameterFeatureSink(

self.OUTPUT,

self.tr('Center line'),

QgsProcessing.TypeVectorAnyGeometry

)

)

 

 

def processAlgorithm(self, parameters, context, feedback):

source = self.parameterAsSource(parameters, self.INPUT, context)

# turn QgsProcessingParameterFeature - the source -  into a 

# QgsVectorLayer apparently self.parameterAsVectorLayer() does 

# not work on temporary layers so this step is required to use

# the input layer in processing algorithms

source_vl = source.materialize(QgsFeatureRequest())

 

pt_value = […]

 

# qgis:pointsalonglines

params = {

'INPUT': source_vl, 

'DISTANCE': pt_value,

'START_OFFSET': 0,

'END_OFFSET': 0,

'OUTPUT': 'memory:'

}

 

points = processing.run(

'qgis:pointsalonglines', 

params, context=context, feedback=feedback

)['OUTPUT']

return {self.OUTPUT: points}

 

 

running the script gives the following output in the processing window
(including some debug info not included above):

 

Eingabeparameter:

{ 'DISTANCE' : 10, 'INPUT' :
'Polygon?crs=EPSG:31466&uid={e1a2d6cf-0cac-46f5-b1c8-ee208c497d22}',
'OUTPUT' : 'memory:' }

 



Ergebnisse: {'OUTPUT': 'output_953bb179_3f12_4312_89e4_5ffa13e8336b'}



Ausführung nach 0.03 Sekunden abgeschlossen

Ergebisse:

{'OUTPUT': }

 

Lade Ergebnis Layer

Algorithmus 'None' beendet

 

The last output line does not look right to me, any idea what I am doing
wrong here?

 

Many thanks,

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

 



smime.p7s
Description: S/MIME cryptographic signature
___
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] QGIS 3 Processing question

2018-06-28 Thread Nyall Dawson
On Fri, 29 Jun 2018 at 07:14, Frank Broniewski
 wrote:
>
> def processAlgorithm(self, parameters, context, feedback):


You're making this tricky for yourself! Cut out everything in
processAlgorithm related to self.INPUT, and just pass the parameter
value direct to the child algorithm to handle:

> params = {
>
> 'INPUT': parameters[self.INPUT],
>
> 'DISTANCE': pt_value,
>
> 'START_OFFSET': 0,
>
> 'END_OFFSET': 0,
>
> 'OUTPUT': 'memory:'
>
> }


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

[Qgis-user] Conversion of shapefile to GPKG

2018-06-28 Thread Patrick Dunford

Good day all

I have been converting shapefiles to geopackage in a number of Qgis map 
projects I have.


There have been a number of issues encountered. One of these is when 
there is an existing FID field in the data table that does not conform 
to the integrity rules required for the reserved fid field in the 
geopackage data table. The inbuilt conversion is assuming the existing 
FID field will meet data integrity requirements and creates problems if 
it does not.


Is or should this type of issue be covered adequately in documentation.


___
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