Support exporting vectorLayer to qgis#390
Conversation
|
Integration tests report: appsharing.space |
Co-authored-by: martinRenou <martin.renou@gmail.com>
| symbol = QgsMarkerSymbol() | ||
| elif geometry_type == "line": | ||
| symbol = QgsLineSymbol() | ||
| symbol.setOutputUnit(Qgis.RenderUnit.Pixels) |
There was a problem hiding this comment.
We should probably set the output unit to pixels for all the symbol types.
There was a problem hiding this comment.
Done, for categorised rendering there's a long list for radius for some reason than categories itself in case of earthquakes.jgis
There was a problem hiding this comment.
lol yea that file is actually in an impossible state from when I was doing the symbology stuff, I should probably fix that 🙃 .
Co-authored-by: Greg Mooney <gregory.mooney@quantstack.net>
| symbol_layer.setStrokeColor(stroke_color) | ||
|
|
||
| stroke_width = color_params.get("stroke-width", 1) | ||
| symbol_layer.setStrokeWidth(stroke_width) |
There was a problem hiding this comment.
QgsLineSymbol has a setWidth instead of a setStrokeWidth and circles use circle-stroke-width (all the circle symbology has a circle- prefix.
|
I've removed those properties which I'm unable to test (write in jGIS from QGIS) at the moment, I posted this message in relation and would greatly appreciate any input |
| components = source.split("/") | ||
| file_name = components[-1] | ||
| file_name = file_name.split("|")[0] |
There was a problem hiding this comment.
Does this actually work when the local file is not in the same folder as the JGIS file?
e.g. if the JGIS file points to the geojson file in another folder ../path/to/my.geo.json?
I understand from the code only my.geo.json will be kept
There was a problem hiding this comment.
Let's track this in an issue!
Co-authored-by: martinRenou <martin.renou@gmail.com>
| color["fill-color"] = symbol.color().name() | ||
| color["stroke-color"] = symbol.color().name() |
There was a problem hiding this comment.
| color["fill-color"] = symbol.color().name() | |
| color["stroke-color"] = symbol.color().name() | |
| color["fill-color"] = symbol.color().name() + alpha | |
| color["stroke-color"] = symbol.color().name() + alpha |
I'm assuming we want this to have the alpha values like the Marker and Line symbols?
There was a problem hiding this comment.
I removed these alpha values because it was resulting in these hex strings which were resulting in Assertion Error
martinRenou
left a comment
There was a problem hiding this comment.
Thanks for the hard work!!
* Try exporting vectorLayer to qgis * add index * Needed for testing * add layer_id[4] to layertree * Update python/jupytergis_qgis/jupytergis_qgis/tests/test_qgis.py Co-authored-by: martinRenou <martin.renou@gmail.com> * vector layer exports * update test * remove eq.json from test * add example for geojson from url * try fixing tests * stroke color for polygon * Make graduated symbology work * Make categorised symbology work * GUI working * examples for testing * use types from jgis, use pixel as units * circles work nicely * All ranges in graduated symbology * make categorised work for fill * Working for lines too * some cleanup * Apply suggestions from code review Co-authored-by: Greg Mooney <gregory.mooney@quantstack.net> * Condense export logic into methods * fix to fill * fix to line * Apply suggestions from code review Co-authored-by: Greg Mooney <gregory.mooney@quantstack.net> * Avoid setting opacity, stroke_color again * In fill too * circle stroke color * correct path * try fixing tests * Give some consideration to circle-radius * try lean test for now * Simplify test more for now * Update python/jupytergis_qgis/jupytergis_qgis/qgis_loader.py Co-authored-by: martinRenou <martin.renou@gmail.com> * non intentional typecasting --------- Co-authored-by: martinRenou <martin.renou@gmail.com> Co-authored-by: Greg Mooney <gregory.mooney@quantstack.net>



Description
Shall close #388
Fill Graduated:

Single Symbol Renderer:

Categorised Symbology:

Graduated Symbology:

Line Single Symbol:



Line Graduated:
Line Categorised:
📚 Documentation preview: https://jupytergis--390.org.readthedocs.build/en/390/
💡 JupyterLite preview: https://jupytergis--390.org.readthedocs.build/en/390/lite