giscience / ohsome-qgis-plugin Goto Github PK
View Code? Open in Web Editor NEWohsome Qgis plugin
License: MIT License
ohsome Qgis plugin
License: MIT License
The newest buf fixes for the temporal controler enable support for the newest qgis version but are not downward compatible.
Probably best to add a try except and apply the newest first and when it fails the solution for older qgis versions.
I get the following exception when trying to open the dialog window: Python error : An error has occurred while executing Python code: See message log (Python Error) for more details.
. This is the stack trace:
An error has occurred while executing Python code:
AttributeError: 'NoneType' object has no attribute 'provider_combo'
Traceback (most recent call last):
File "/home/…/.local/share/QGIS/QGIS3/profiles/default/python/plugins/OhsomeQgis/gui/OhsomeQgisDialog.py", line 239, in _init_gui_control
self.dlg.provider_combo.currentIndexChanged.disconnect(
AttributeError: 'NoneType' object has no attribute 'provider_combo'
Further information:
Replace the header hex link with https://oqt.ohsome.org
When getting an error it sometimes seems like the error is called 'Geometry shortened', while it is actually something else. To clarify this, a couple of coordinates should be prepended to the message. This referes to the message Geometry shortened. For issue/debug copy from 'View'->'Panels'->'Log Messages'.
in request_core.py
.
As described here, we shouldn't use the requests
-library.
Find a suitable Ohsome support Mail. e.g. ORS Tools got [email protected]
.
This request will return a GeometryCollection:
2022-02-13T22:22:42 INFO Started task "OHSOME task"
2022-02-13T22:22:42 INFO url: https://api.ohsome.org/v1/elementsFullHistory/geometry?
Parameters: {
"clipGeometry": "false",
"properties": "tags,metadata",
"showMetadata": "true",
"filter": "id:relation/48418",
"time": "2007-10-08T00:00:01,2022-02-07",
"bcircles": "id0:8.626937, 49.399239,1000"
}
2022-02-13T22:23:01 INFO The request was successful:
API URL: https://api.ohsome.org/v1
Endpoint: elementsFullHistory/geometry
Preferences: {
"bcircles": "id0:8.626937, 49.399239,1000",
"clipGeometry": "false",
"filter": "id:relation/48418",
"properties": "tags,metadata",
"showMetadata": "true",
"time": "2007-10-08T00:00:01,2022-02-07"
}"
QGis cannot handle GeometryCollections: qgis/QGIS#32747. Therefore these collections need to be exploded before importing them to QGis like ogr2ogr -explodecollections out.geojson ohsome.geojson
(though other output formats would be better suited of course).
The plugin seems to try something but instead saves an invalid .geojson where the geometry is completely missing.
In the FOSS4G community the first question is often: "Is there a QGis-Plugin", and I've been asked this question already >1ce. So there seems to seems to be a user base and it would be a lot more convenient for them to just download it from the repository instead of the current installation process (apart from the increased visibility).
I therefore suggest releasing it to https://plugins.qgis.org/
Automatically adjust the temporal extent in the GUI by getting the correct values from the specified api
To quote @Hagellach37
The mouse icon is always "on" after you used the centroid option, even if you close the plugin --> there seems to be no way to escape this
List of ToDos for the processing algorithms. Not sorted by priority at all.
P1M
After reviewing the UI in the qgis-like-output branch, the following possible improvements came up:
OSM type
(otherwise it feels a bit restless…)Measure
should be outside of simple
, it's used for advanced as wellYears - Months - Days
is a bit unclear - is this the Period for the Time interval below? If so, reorder and add titlekeep geometry less
in the advanced parametersharmon. geom
to harmon geom in output
since it only affects outputAt the moment the name isn't very awesome
... Ba dum tss. 😁
@TheGreatRefrigerator mentioned to name it accordingly to the ORS qgis plugin ORSTools
.
Input needed ;)
Increase the time the popups stay open to give users the possibility to click e.g. resource links in the descriptions.
the plugin has problems querying the metadata backend for the fixed time parameters.
at the moment it queries everytime the provider is changed or the plugin is started or closed.
somehow it hangs at the local api provider and fails if none is available.
a solution could be to only query the metadata parameters when the refresh button is pressed or the provider is changed!
Collect performance information on the following OS variants:
When opening the configuration and its submenus the UI dynamically grows. At one point the UI may grow beyond the sceen an the user has to close configurations to make the lower part accessible. This may be solved by introducing a scroll bar or by automatically closing all other options to prevent overflow.
Ideally, an ohsome QGIS plugin would set a proper User-Agent. If the User-Agent is not set, the User-Agent of the used library is transmitted (e.g. python-requests/1.2.3
). The User-Agent could be set to something like ohsome-qgis-plugin/version
.
Further information on the User-Agent: https://datatracker.ietf.org/doc/html/rfc7231#section-5.5.3
See also GIScience/ohsome-py#72.
Catch all errors when no providers are available in the list.
Layers are currently named 'ohsome_MM-DD-YY:hh-mm-ss enpoint_type' . ISO time format would be a better choice, currently the meaning of these numbers is a bit of a riddle.
when selecting centroids interactively the mouse cursor will not be reset after closing the plugin and remain a hairline cross.
Analogous to GIScience/orstools-qgis-plugin#187.
Add instructions on how to quickly setup a local ohsome instance with docker.
Introduce optional feature to clip the input QGIS layer to the extent of the API to query against.
The time interval currently has to be set by mouse and cannot be written directly.
In addition to the available options the current map canvas could be accepted as bbox input.
Find a nice and suitable logo.
At the moment the generic QGIS development icon is used, which isn't pretty exciting.
Find the logo here: Current Logo
Apply flake8 best practices.
Currently, the UI is a bit too convoluted to be easily usable, and there is no processing algorithm provided.
The road map would be as followed:
Group by key(s) different parameter for different endpoints.
groupbykey
groupbytag
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.