Coder Social home page Coder Social logo

cadasta / cadasta-qgis-plugin Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 7.0 667 KB

[DEPRECATED] QGIS plugin to create, edit, upload and download Cadasta projects

License: GNU General Public License v3.0

Makefile 2.94% Python 93.69% Batchfile 1.01% Shell 1.27% QML 0.38% CSS 0.55% HTML 0.16%

cadasta-qgis-plugin's People

Contributors

dimasciput avatar gitter-badger avatar ismailsunni avatar meomancer avatar steadycadence avatar wonderchook avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cadasta-qgis-plugin's Issues

Create About or Help Dialog

We need help dialog or at least about dialog to point the user what's the plugin about and how to use it. No need to have a help in the wizard, since it should be self-explanatory.

Update project is greyed

Problem

Oliver's question:

When I download a project, I can change data in the tables and the geometry. But I can never upload the changes to the platform. The menu item “Update project” is always greyed out; I’ve tried that with different user permissions.

Confusing update wizard

Problem

Oliver's question:

The project update wizard is a bit confusing. The wizard starts, then I can update the project details; then the data downloads, I can edit the data and then upload the edited data. But the wizard window needs to open the whole time. I would expect that you download a project edit data in QGIS and then when you're done you upload your changes.

It seems that it is different with mockup
see : #23

Apply gitflow

We need to apply git flow to this repository also. To do:

  • Create develop branch as default
  • Protect master branch from direct push / merge

I don't have permission to do those task, perhaps you can help @cchristelis

Implement search/filtering when downloading

Problem

Oliver's question :

When downloading a project, would it be possible to implement a search, so it's easier to find the right project? (It's probably out of scope, wanted to bring it up anyway in case it's an easy fix.)

Solution

Because api doesn't provide filter (except permission filter), but we can get it based on organization or from it's user

First solution:

  • make input filters for organization and username and add as parameter when check it
  • maybe also add filter using project name using autocomplete to just show matched project

secondly:
get all available projects, then there is inputs that will filter it (based organization, username or project name or maybe other fields

Download and save basic information of project

  • In project downloader menu, user can choose any public project to download.
  • When user download authorized project, the update menu will be visible.
  • Save basic information ( url, desc, etc ).

Party attributes are not downloaded

When I download a project for editing, party attributes don't show up in the parties table. There is a field attributes but it's empty. I used my Leipzig Project for testing.

I would expect that all attributes for a party are present; with each attribute in its own separate field.

"from qgis.PyQt import ..." might be broken

This kind of import of PyQT using from qgis.PyQt. seems to be broken on some machines.

I think we will have to rollback to from PyQt4.

A string replacement from from qgis.PyQt. to from PyQt4. will do the trick

Download and join relationship and party attributes

Oliver's question:

Related to this is the project download option. You can download a project but only look at it, but there's no way to update anything. Also, is there a way to download and join relationship and party attributes?

Login user

Problem

Users need to be logged in to the Cadasta to get access to their data.

Proposed solution

Build a class, that uses the Network mixin to initiate a session to cadasta.

Contact table remove

Problem

When we remove a contact from the middle or beginning of the contact table, an error occurs.

Proposed solution

Fix bug and write tests to catch this error when removing an entry from the top, bottom and middle of the list.

Update the update wizard

  • Remove project downloader in update wizard
  • List downloaded project with update permission
  • Upload basic and spatial information in one page

Memory layers with multiple types

Problem

The cadasta projects have a mix of data. We need to handle point, polygon and multipolygon. In shp export cadasta uses 3 shp files to handle this. We need to handle this in QGIS as well.

Create utilities method for accessing Cadasta

Here are the list of needed utitlities method to make the plugin works:

  • Login / authentication routine
  • Fetch available organisations (dimas)
  • Fetch available projects (irwan)
  • Fetch project
  • Push dataset
  • Pull dataset

Make sure all the methods have unit test.

Icons

We need to create some icon or logo for:

  • plugin logo
  • setting icon
  • project creation icon
  • project update icon
  • project download icon

Password and username seem to be switched in options

screen shot 2016-12-27 at 9 01 23 pm

Entering my password in the username and my username in the password does NOT test successfully either so I think there is more wrong than just needing to switch the controls around....

I did verify my credentials work on the web site.

Can you also confirm which format the URL is expected to be (an example in the tooltip would be great....

Use PyQT from the QGIS package

In order to move quicker to QGIS3 in a few weeks, please use from qgis.PyQt.QtCore/QtGui instead of using from PyQt4.QtCore/QtGui.

Use the fake iface provided by QGIS

instead of using our own internal fake iface, we should use the one provided by QGIS.

from qgis.testing.mocked import get_iface

You may need to run pip install mock.

Dialogs should always have a top level layout

Bad:

qgis

Good:

qgis

To fix:

Open designer
Select the background of the dialog
Apply a grid layout as the top level layout
Resize the dialog to a reasonable default size
Save it
Live long and prosper

Download plugin

Problem

We should host our plugins at plugins.kartoza.com.

We need a license file

License should be GPL V2 or greater I think. License should also be show in the about dialog as well as mention that the work is copyright 2016 to Cadasta.

Plugin error in QGIS version 2.8

Problem

Oliver's question:

Could you provide information about system requirements in the README? Which QGIS version is required? Any dependencies to install? I installed the plugin on QGIS 2.8 and got errors, but everything worked fine with 2.14.

it seems it is related with : #84

Solution

check it in 2.8 and try to fix it

Use get_ui_class for ui file.

For easier development, I suggest we use similar approach to manage the .ui file like in InaSAFE project. In InaSAFE project, we do like this:

By doing this, we can avoid the needs to compile the ui file everytime we change the ui file and less file to be submited to the repository.

cc @dimasciput @meomancer

about attributes in JSON format

Problem

Oliver's question:

The attributes are shown as JSON in the attribute table. Will that be changed, so each field in the JSON is a separate field in the attribute table?

Solution

Yes, we can parse it. Although for geojson, the correct way is bring all of attributes json to just in properties. So it is separate properties.

UX Suggestions

After finishing upload, perhaps we can remove the notes under the progress bar since it gives different information with the one above the progress bar.
Perhaps we can also make the text or progress bar bigger to make it more readable and less wasting space.
screen shot 2017-01-05 at 07 32 18

Is it possible to not choose any field for the non-required one? If so, there should be an option to choose no column and set by default.
screen shot 2017-01-05 at 07 40 24

Trying to upload a project with the user and password in unit test. I got this error.
Perhaps, we can make the error message prettier.
screen shot 2017-01-05 at 07 40 50

QgsNetworkAccess

Problem

We need to access the qgis network interface to make our call through potential firewalls etc.

Proposed solution

Create an abstraction layer of a mixin class that has simple wrappers around the QgsNetworkAccess class.

remove unneeded attribute

Problem

Oliver's question:

There are two fields in the spatial unit attribute table, which are not needed (I believe): relationship_layer_id, party_layer_id)

Can’t select party type

Problem

Oliver's question:

When creating a new project from existing data, I can’t select party type (among others) if they are in a separate table. I have to talk to our programs team if that’s a valid use case at all, there’s a chance that people just have shape files with all information in it. So, there’s nothing to do for you at this point.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.