TransWikia.com

Treating a Vector layer as a file parameter or making sure a vector layer only handles .json files

Geographic Information Systems Asked by ThunderSpark on February 17, 2021

This question is related to this one: https://gis.stackexchange.com/review/suggested-edits/192945.

In that Question I had trouble. Exporting my model as a Python script because I was using a workaround to make sure a certain file was treated as a "vector layer" by using an expression. This JSON file is a feature collection and this has to be modified and filtered out. Which the algorithm is for.

To kind of "solve this problem" I am again using a vector layer input, and if I use the ... button and browse to it the file works fine… kind of I noticed there is not output where there should be.

However to make sure no mistakes are made, I have to clarify that the Vector layer input parameter only as a GEOJSON newline Delimited JSON. How do I do this in this line?

self.addParameter(QgsProcessingParameterVectorLayer('Vectorlaag', 'PMKL', types=[QgsProcessing.TypeVectorAnyGeometry], defaultValue=None))

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP