-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create QGIS Plugin #251
Comments
Maybe it would be interesting to make the data available as Web Feature Services (WFS). |
Web Features Services seems to be the right tool to make geobr data available. A tutorial on how it works: I couldn't find a tutorial, though. Does anyone know how to build it? |
I'm not familiar with Web Feature Services (WFS). What is the advanted of WFS instead of the plugin download the geopackage files into QGIS? |
You do not need to develop a graphical interface, as the user will need only to configure how to access the data through the available funcionalities of QGIS. Additionally, the data will be available to any tool that can read this standard. The disadvantage is that you need a server to provide the data. Tipically we use Geoserver. |
This might be a stupid comment from a newbie on the package, so please feel free to educate me. Perhaps we should step back a bit and define which problem exactly the plugin would solve on QGIS? I'd say the typical QGIS user would download the data, merge it with a shapefile and move on with his/her spatial analysis. In the Segreg plugin that I developed, the data is stored locally as a table of features that can be saved with the shapefile and reused later. Do you all have in mind cases where this data would be consumed without a shapefile? |
Hi @sandrofsousa . Thanks for chipping in. The aim of geobr is to help users easily and efficiently download official spatial data sets of Brazil. Currently, each data set is stored as a geopackage file at our server in Ipea. The Python and R packages basically download those geopackge files from the server given parameters of geography, year, etc etc. We currenly have over 3200 data files summing aprox. 16GB. This means that storaing the data set locally or withing the plugin / r/python pacakges is not an option. The idea I have in mind for the QGIS plugin would be a simple interface to the Python package. So the user would select a few parameters (basically the same parameters used in the functions of the Python package), and the pluging would download the geopackage data and read it to memory. |
Oh I see @rafapereirabr, thanks for clarifying. In fact your idea is exactly what I tough, but I failed to articulate it. By downloading I meant only the required data, not the full dataset. The idea proposed by @pedro-andrade-inpe and @JoaoCarabetta seems to be the way, I'll look into it. |
As far as I understood, we have three options: 1. Integrate to QGIS through WFS by creating a geoserver.Advantages:
Drawbacks:
2. Integrate to QGIS through WFS by creating a Flask server on top of Python geobrAdvantages:
Drawbacks:
3. Integrate to QGIS through PluginAdvantages:
Drawbacks:
|
An important thing to note regarding data filters. When the user runs :
the behavior of geobr is to first download one geopackage of all municipalities in the state Not being familiar with WFS nor Flask servers, I would prefer to stick with option 3. Do you guys know any other QGIS plugins that download data that I could have look at? |
With option 3, the following plugins do something similar. They simply provide an interface that allows to navigate the dataset and select which table is needed, then, the data is saved as a QGIS virtual layer. Developing the plugin interface is not a big issue, it's done using Qt I can help with that. I had a few breaking points when I updated my plugin from QGIS 2 to 3, besides that it is quite stable. |
I also think that option 3 might be the easiest to implement and maintain. @sandrofsousa do you mind building a POC that calls a If you can, open a PR and add the plugin on a folder called |
I will work on that @JoaoCarabetta and open a PR when I get a minimal example working, it might take a while though :) |
@sandrofsousa did you manage to work on it? |
No description provided.
The text was updated successfully, but these errors were encountered: