bluemodel / BlueM.QGISInterface

QGIS plugin for creating input files for a BlueM.Sim model from GIS data
GNU General Public License v3.0
3 stars 3 forks source link

Geopackage export: layer geometry types #5

Closed jamaa closed 2 years ago

jamaa commented 2 years ago

The geopackage export function is a very good idea, I think as a modeller I would always use this as the basis for creating a new BlueM dataset.

I was wondering about the geometry types of the different layers, though. Any particular reason for the current definitions, where most layers are polygon layers, @MartinGrosshaus ? In my view, it would make sense to change most layers to point layers or layers with no geometry and make the TRS layer a line layer.

MartinGrosshaus commented 2 years ago

Good question - my idea behind the current definitions was to be ready for the best-case-scenario for the input data.

For example: It would be great to get data about soil types (for BOA and BOD) as polygons. Then every polygon in the subject area could be transferred to the corresponding new layer from the GeoPackage. In this case polygons of the same soil type in different locations could even be joined into so-called "multi-polygons".

Sadly you don't always get such nice data - but I thought it would be good to be ready for it. The important thing is, that although (for example) the BOA and BOD layers are formatted as "multi-polygon", you do not need any geometry to create an entry in that layer. In fact, every layer of the GeoPackage can technically be used as a "NoGeometry"-layer. But if you are in the lucky position to have the geometries for some of your entries - you can put them in :-)

Obviously all TRS entities would be lines... you are right! I must have overlooked that - or at least I can't remember the good reasons I might have had ;-) I'm going to create a line definition for the TRS.

Please let me know if you have any other suggestions about which geometry definition would fit better to a particular file type.

jamaa commented 2 years ago

I agree that BOD and BOA could also be (multi-)polygons, even though they do not really have a physical location in BlueM. I guess the same logic applies to LNZ.

Other than changing TRS to line, I suggest changing BEK, RUE, URB and VER to point geometries. TAL is technically also a point, but it may make sense to delineate the reservoir surface as a polygon. HYA should either not have any geometry at all (HYA elements are always part of a TAL) or also be a point layer.