anitagraser / QGIS-Processing-tools

This is a collection of scripts and models for QGIS Processing
89 stars 55 forks source link

Missing output for some tiles #16

Closed ktjaco closed 7 years ago

ktjaco commented 7 years ago

Hi,

Thank you again for this tool. I was able to get a model to generate an output on QGIS 2.18.3 for the positional accuracy on road networks (buffer analysis), although some of my regions of interest did not calculate the inBufPerc.

Here is an output using 5m buffers. As you can tell tiles 203 and 223 did not perform buffers around the reference road networks or calculate line length for inBufPerc. I was wondering what may cause this? Would it be the "Remove Null Geometries" algorithm?

I've also attached my .model file.

screenshot from 2017-03-28 14-58-09

{
    "values": {
        "inputs": {
            "regions": {
                "values": {
                    "pos": {
                        "values": {
                            "y": 42.0, 
                            "x": 599.0
                        }, 
                        "class": "point"
                    }, 
                    "param": {
                        "values": {
                            "isAdvanced": false, 
                            "name": "regions", 
                            "shapetype": [
                                -1
                            ], 
                            "default": null, 
                            "value": null, 
                            "exported": null, 
                            "hidden": false, 
                            "optional": false, 
                            "description": "Regions"
                        }, 
                        "class": "processing.core.parameters.ParameterVector"
                    }
                }, 
                "class": "processing.modeler.ModelerAlgorithm.ModelerParameter"
            }, 
            "graph": {
                "values": {
                    "pos": {
                        "values": {
                            "y": 41.0, 
                            "x": 838.0
                        }, 
                        "class": "point"
                    }, 
                    "param": {
                        "values": {
                            "isAdvanced": false, 
                            "name": "graph", 
                            "shapetype": [
                                -1
                            ], 
                            "default": null, 
                            "value": null, 
                            "exported": null, 
                            "hidden": false, 
                            "optional": false, 
                            "description": "Graph"
                        }, 
                        "class": "processing.core.parameters.ParameterVector"
                    }
                }, 
                "class": "processing.modeler.ModelerAlgorithm.ModelerParameter"
            }, 
            "referencegraph": {
                "values": {
                    "pos": {
                        "values": {
                            "y": 42.0, 
                            "x": 128.0
                        }, 
                        "class": "point"
                    }, 
                    "param": {
                        "values": {
                            "isAdvanced": false, 
                            "name": "referencegraph", 
                            "shapetype": [
                                -1
                            ], 
                            "default": null, 
                            "value": null, 
                            "exported": null, 
                            "hidden": false, 
                            "optional": false, 
                            "description": "Reference Graph"
                        }, 
                        "class": "processing.core.parameters.ParameterVector"
                    }
                }, 
                "class": "processing.modeler.ModelerAlgorithm.ModelerParameter"
            }, 
            "regionidfield": {
                "values": {
                    "pos": {
                        "values": {
                            "y": 448.0, 
                            "x": 392.0
                        }, 
                        "class": "point"
                    }, 
                    "param": {
                        "values": {
                            "isAdvanced": false, 
                            "name": "regionidfield", 
                            "parent": "regions", 
                            "default": null, 
                            "value": null, 
                            "datatype": -1, 
                            "hidden": false, 
                            "optional": false, 
                            "description": "Region ID Field"
                        }, 
                        "class": "processing.core.parameters.ParameterTableField"
                    }
                }, 
                "class": "processing.modeler.ModelerAlgorithm.ModelerParameter"
            }, 
            "buffersize": {
                "values": {
                    "pos": {
                        "values": {
                            "y": 45.0, 
                            "x": 369.0
                        }, 
                        "class": "point"
                    }, 
                    "param": {
                        "values": {
                            "isAdvanced": false, 
                            "name": "buffersize", 
                            "min": 0, 
                            "default": 0, 
                            "max": 50, 
                            "value": 0, 
                            "hidden": false, 
                            "isInteger": true, 
                            "optional": false, 
                            "description": "Buffer Size"
                        }, 
                        "class": "processing.core.parameters.ParameterNumber"
                    }
                }, 
                "class": "processing.modeler.ModelerAlgorithm.ModelerParameter"
            }
        }, 
        "helpContent": {}, 
        "group": "Masters", 
        "name": "Road Network Positional Accuracy - Remove Null", 
        "algs": {
            "QGISFIELDCALCULATOR_1": {
                "values": {
                    "name": "QGISFIELDCALCULATOR_1", 
                    "paramsFolded": true, 
                    "outputs": {
                        "OUTPUT_LAYER": {
                            "values": {
                                "description": "Output", 
                                "pos": {
                                    "values": {
                                        "y": 689.0, 
                                        "x": 825.0
                                    }, 
                                    "class": "point"
                                }
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ModelerOutput"
                        }
                    }, 
                    "outputsFolded": true, 
                    "pos": {
                        "values": {
                            "y": 644.0, 
                            "x": 625.0
                        }, 
                        "class": "point"
                    }, 
                    "dependencies": [], 
                    "params": {
                        "FIELD_TYPE": 0, 
                        "NEW_FIELD": true, 
                        "INPUT_LAYER": {
                            "values": {
                                "alg": "QGISJOINATTRIBUTESTABLE_1", 
                                "output": "OUTPUT_LAYER"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }, 
                        "FIELD_PRECISION": 3.0, 
                        "FIELD_LENGTH": 10.0, 
                        "FORMULA": "inBufLEN / totalLEN * 100", 
                        "FIELD_NAME": "inBufPERC"
                    }, 
                    "active": true, 
                    "consoleName": "qgis:fieldcalculator", 
                    "description": "Field calculator"
                }, 
                "class": "processing.modeler.ModelerAlgorithm.Algorithm"
            }, 
            "QGISDIFFERENCE_1": {
                "values": {
                    "name": "QGISDIFFERENCE_1", 
                    "paramsFolded": true, 
                    "outputs": {}, 
                    "outputsFolded": true, 
                    "pos": {
                        "values": {
                            "y": 230.0, 
                            "x": 433.0
                        }, 
                        "class": "point"
                    }, 
                    "dependencies": [], 
                    "params": {
                        "INPUT": {
                            "values": {
                                "alg": "QGISREPROJECTLAYER_2", 
                                "output": "OUTPUT"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }, 
                        "IGNORE_INVALID": true, 
                        "OVERLAY": {
                            "values": {
                                "alg": "QGISFIXEDDISTANCEBUFFER_1", 
                                "output": "OUTPUT"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }
                    }, 
                    "active": true, 
                    "consoleName": "qgis:difference", 
                    "description": "Difference"
                }, 
                "class": "processing.modeler.ModelerAlgorithm.Algorithm"
            }, 
            "QGISDIFFERENCE_2": {
                "values": {
                    "name": "QGISDIFFERENCE_2", 
                    "paramsFolded": true, 
                    "outputs": {}, 
                    "outputsFolded": true, 
                    "pos": {
                        "values": {
                            "y": 345.0, 
                            "x": 604.0
                        }, 
                        "class": "point"
                    }, 
                    "dependencies": [], 
                    "params": {
                        "INPUT": {
                            "values": {
                                "alg": "QGISREPROJECTLAYER_2", 
                                "output": "OUTPUT"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }, 
                        "IGNORE_INVALID": true, 
                        "OVERLAY": {
                            "values": {
                                "alg": "QGISDIFFERENCE_1", 
                                "output": "OUTPUT"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }
                    }, 
                    "active": true, 
                    "consoleName": "qgis:difference", 
                    "description": "Difference"
                }, 
                "class": "processing.modeler.ModelerAlgorithm.Algorithm"
            }, 
            "QGISREMOVENULLGEOMETRIES_1": {
                "values": {
                    "name": "QGISREMOVENULLGEOMETRIES_1", 
                    "paramsFolded": true, 
                    "outputs": {}, 
                    "outputsFolded": true, 
                    "pos": {
                        "values": {
                            "y": 480.0, 
                            "x": 925.0
                        }, 
                        "class": "point"
                    }, 
                    "dependencies": [], 
                    "params": {
                        "INPUT_LAYER": {
                            "values": {
                                "alg": "QGISSUMLINELENGTHS_2", 
                                "output": "OUTPUT"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }
                    }, 
                    "active": true, 
                    "consoleName": "qgis:removenullgeometries", 
                    "description": "Remove null geometries"
                }, 
                "class": "processing.modeler.ModelerAlgorithm.Algorithm"
            }, 
            "QGISSUMLINELENGTHS_1": {
                "values": {
                    "name": "QGISSUMLINELENGTHS_1", 
                    "paramsFolded": true, 
                    "outputs": {}, 
                    "outputsFolded": true, 
                    "pos": {
                        "values": {
                            "y": 290.0, 
                            "x": 804.0
                        }, 
                        "class": "point"
                    }, 
                    "dependencies": [], 
                    "params": {
                        "COUNT_FIELD": "COUNT1", 
                        "LINES": {
                            "values": {
                                "alg": "QGISREPROJECTLAYER_3", 
                                "output": "OUTPUT"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }, 
                        "LEN_FIELD": "totalLEN", 
                        "POLYGONS": {
                            "values": {
                                "alg": "QGISREPROJECTLAYER_2", 
                                "output": "OUTPUT"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }
                    }, 
                    "active": true, 
                    "consoleName": "qgis:sumlinelengths", 
                    "description": "Sum line lengths"
                }, 
                "class": "processing.modeler.ModelerAlgorithm.Algorithm"
            }, 
            "QGISSUMLINELENGTHS_2": {
                "values": {
                    "name": "QGISSUMLINELENGTHS_2", 
                    "paramsFolded": true, 
                    "outputs": {}, 
                    "outputsFolded": true, 
                    "pos": {
                        "values": {
                            "y": 392.0, 
                            "x": 927.0
                        }, 
                        "class": "point"
                    }, 
                    "dependencies": [], 
                    "params": {
                        "COUNT_FIELD": "COUNT2", 
                        "LINES": {
                            "values": {
                                "alg": "QGISREPROJECTLAYER_3", 
                                "output": "OUTPUT"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }, 
                        "LEN_FIELD": "inBufLEN", 
                        "POLYGONS": {
                            "values": {
                                "alg": "QGISDIFFERENCE_2", 
                                "output": "OUTPUT"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }
                    }, 
                    "active": true, 
                    "consoleName": "qgis:sumlinelengths", 
                    "description": "Sum line lengths"
                }, 
                "class": "processing.modeler.ModelerAlgorithm.Algorithm"
            }, 
            "QGISREPROJECTLAYER_1": {
                "values": {
                    "name": "QGISREPROJECTLAYER_1", 
                    "paramsFolded": true, 
                    "outputs": {}, 
                    "outputsFolded": true, 
                    "pos": {
                        "values": {
                            "y": 118.0, 
                            "x": 129.0
                        }, 
                        "class": "point"
                    }, 
                    "dependencies": [], 
                    "params": {
                        "INPUT": {
                            "values": {
                                "name": "referencegraph"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromInput"
                        }, 
                        "TARGET_CRS": "EPSG:32189"
                    }, 
                    "active": true, 
                    "consoleName": "qgis:reprojectlayer", 
                    "description": "Reproject layer"
                }, 
                "class": "processing.modeler.ModelerAlgorithm.Algorithm"
            }, 
            "QGISREPROJECTLAYER_2": {
                "values": {
                    "name": "QGISREPROJECTLAYER_2", 
                    "paramsFolded": true, 
                    "outputs": {}, 
                    "outputsFolded": true, 
                    "pos": {
                        "values": {
                            "y": 134.0, 
                            "x": 598.0
                        }, 
                        "class": "point"
                    }, 
                    "dependencies": [], 
                    "params": {
                        "INPUT": {
                            "values": {
                                "name": "regions"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromInput"
                        }, 
                        "TARGET_CRS": "EPSG:32189"
                    }, 
                    "active": true, 
                    "consoleName": "qgis:reprojectlayer", 
                    "description": "Reproject layer"
                }, 
                "class": "processing.modeler.ModelerAlgorithm.Algorithm"
            }, 
            "QGISREPROJECTLAYER_3": {
                "values": {
                    "name": "QGISREPROJECTLAYER_3", 
                    "paramsFolded": true, 
                    "outputs": {}, 
                    "outputsFolded": true, 
                    "pos": {
                        "values": {
                            "y": 134.0, 
                            "x": 842.0
                        }, 
                        "class": "point"
                    }, 
                    "dependencies": [], 
                    "params": {
                        "INPUT": {
                            "values": {
                                "name": "graph"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromInput"
                        }, 
                        "TARGET_CRS": "EPSG:32189"
                    }, 
                    "active": true, 
                    "consoleName": "qgis:reprojectlayer", 
                    "description": "Reproject layer"
                }, 
                "class": "processing.modeler.ModelerAlgorithm.Algorithm"
            }, 
            "QGISFIXEDDISTANCEBUFFER_1": {
                "values": {
                    "name": "QGISFIXEDDISTANCEBUFFER_1", 
                    "paramsFolded": true, 
                    "outputs": {}, 
                    "outputsFolded": true, 
                    "pos": {
                        "values": {
                            "y": 117.0, 
                            "x": 363.0
                        }, 
                        "class": "point"
                    }, 
                    "dependencies": [], 
                    "params": {
                        "INPUT": {
                            "values": {
                                "alg": "QGISREPROJECTLAYER_1", 
                                "output": "OUTPUT"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }, 
                        "SEGMENTS": 5.0, 
                        "DISSOLVE": false, 
                        "DISTANCE": {
                            "values": {
                                "name": "buffersize"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromInput"
                        }
                    }, 
                    "active": true, 
                    "consoleName": "qgis:fixeddistancebuffer", 
                    "description": "Fixed distance buffer"
                }, 
                "class": "processing.modeler.ModelerAlgorithm.Algorithm"
            }, 
            "QGISJOINATTRIBUTESTABLE_1": {
                "values": {
                    "name": "QGISJOINATTRIBUTESTABLE_1", 
                    "paramsFolded": true, 
                    "outputs": {}, 
                    "outputsFolded": true, 
                    "pos": {
                        "values": {
                            "y": 535.0, 
                            "x": 719.0
                        }, 
                        "class": "point"
                    }, 
                    "dependencies": [], 
                    "params": {
                        "INPUT_LAYER_2": {
                            "values": {
                                "alg": "QGISSUMLINELENGTHS_1", 
                                "output": "OUTPUT"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }, 
                        "TABLE_FIELD": {
                            "values": {
                                "name": "regionidfield"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromInput"
                        }, 
                        "TABLE_FIELD_2": {
                            "values": {
                                "name": "regionidfield"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromInput"
                        }, 
                        "INPUT_LAYER": {
                            "values": {
                                "alg": "QGISREMOVENULLGEOMETRIES_1", 
                                "output": "OUTPUT_LAYER"
                            }, 
                            "class": "processing.modeler.ModelerAlgorithm.ValueFromOutput"
                        }
                    }, 
                    "active": true, 
                    "consoleName": "qgis:joinattributestable", 
                    "description": "Join attributes table"
                }, 
                "class": "processing.modeler.ModelerAlgorithm.Algorithm"
            }
        }
    }, 
    "class": "processing.modeler.ModelerAlgorithm.ModelerAlgorithm"
}