-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 'master'
Develop See merge request !2
- Loading branch information
Showing
20 changed files
with
2,260 additions
and
1,074 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# CoGo plugin for QGIS | ||
|
||
First developed by Afrispatial cc in 2012 | ||
|
||
Sponsored by: SpatialMatrix, Lagos for Ogun State Government, Nigeria. | ||
|
||
Original authors: Robert Moerman, Admire Nyakudya, Gavin Fleming | ||
|
||
Maintained by Kartoza (Pty) Ltd | ||
|
||
Copyright Kartoza 2017 | ||
|
||
2017 update for Niger State, Nigeria and potentially for general release. | ||
|
||
Licence: | ||
|
||
# Description | ||
|
||
This plugin was developed to enable efficient bulk capture of coordinate geometry off survey diagrams. | ||
|
||
It caters for addition, modification and deletion of cadastral properties. | ||
|
||
## Bearings and distances | ||
|
||
Where bearing and distance data are available, they can and should be used to defined property boundaries. An initial beacon coordinate is captured and then bearings and distances are captured to define all other beacons in a chain. | ||
|
||
Then properties are constructed by grouping beacons in a specific order to define a polygon. | ||
|
||
## Coordinates | ||
|
||
Where bearings and distances are not available, coordinates can be used instead to define beacons. | ||
|
||
## Dependencies | ||
|
||
This plugin depends on a PostGIS database with a predefined schema including tables, materialised views and triggers. | ||
|
||
# User manual | ||
|
||
http://goo.gl/CY9TYn | ||
|
||
|
||
# What's Next | ||
(Robert's old note - needs to be updated) | ||
|
||
- Copy the entire directory containing your new plugin to the QGIS plugin directory | ||
- Compile the ui file using pyuic4 | ||
- Compile the resources file using pyrcc4 | ||
- Test the plugin by enabling it in the QGIS plugin manager | ||
- Customize it by editing the implementation file `sml_surveyor.py` | ||
- Create your own custom icon, replacing the default `icon.png` | ||
- Modify your user interface by opening `sml_surveyor.ui` in Qt Designer (don't forget to compile it with pyuic4 after changing it) | ||
- You can use the `Makefile` to compile your Ui and resource files when you make changes. This requires GNU make (gmake) | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
SQL_BEACONS = { | ||
"SELECT":"SELECT beacon FROM beacons WHERE gid = %s;", | ||
"UNIQUE":"SELECT COUNT(*) FROM beacons WHERE %s = %s;", | ||
"EDIT":"SELECT {fields} FROM beacons WHERE gid = %s;", | ||
"DELETE":"DELETE FROM beacons WHERE gid = %s;", | ||
"INSERT":"INSERT INTO beacons({fields}) VALUES ({values}) RETURNING gid;", | ||
"UPDATE":"UPDATE beacons SET {set} WHERE {where};", | ||
"BEARDIST":"SELECT CASE WHEN count(*) = 0 THEN FALSE ELSE TRUE END \ | ||
FROM beardist WHERE beacon_to = (SELECT beacon FROM \ | ||
beacons WHERE gid = %s);", | ||
} | ||
|
||
SQL_PARCELS = { | ||
"SELECT":"SELECT parcel_id FROM parcel_lookup WHERE parcel_id = %s;", | ||
"EDIT":"SELECT l.parcel_id, array_agg(s.gid ORDER BY s.sequence) \ | ||
FROM ( SELECT b.gid, d.parcel_id, d.sequence FROM beacons b \ | ||
INNER JOIN parcel_def d ON d.beacon = b.beacon) s JOIN \ | ||
parcel_lookup l ON s.parcel_id = l.parcel_id WHERE \ | ||
l.parcel_id = %s GROUP BY l.parcel_id;", | ||
"AUTOCOMPLETE":"SELECT parcel_id FROM parcel_lookup WHERE available;", | ||
"UNIQUE":"SELECT COUNT(*) FROM parcel_lookup WHERE parcel_id = %s;", | ||
"AVAILABLE":"SELECT available FROM parcel_lookup WHERE parcel_id = %s;", | ||
"INSERT":"INSERT INTO parcel_def(parcel_id, beacon, sequence) \ | ||
VALUES (%s, %s, %s);", | ||
"INSERT_GENERAL": "INSERT INTO parcel_def(parcel_id, beacon, sequence) \ | ||
VALUES %s;", | ||
"DELETE":"DELETE FROM parcel_def WHERE parcel_id = %s;", | ||
} | ||
|
||
SQL_BEARDIST = { | ||
"AUTO_SURVEYPLAN":"SELECT array_agg(plan_no) FROM survey;", | ||
"AUTO_REFERENCEBEACON":"SELECT array_agg(beacon) FROM beacons \ | ||
WHERE beacon NOT IN (SELECT beacon_to FROM beardist WHERE \ | ||
beacon_to NOT IN (SELECT ref_beacon FROM survey));", | ||
"EXIST_REFERENCEBEACON":"SELECT ref_beacon FROM survey where \ | ||
plan_no = %s;", | ||
"EXIST_BEARDISTCHAINS":"SELECT bd.bearing, bd.distance, \ | ||
bd.beacon_from, bd.beacon_to, b.location, b.name FROM beardist \ | ||
bd INNER JOIN beacons b ON bd.beacon_to = b.beacon WHERE \ | ||
bd.plan_no = %s;", | ||
"INDEX_REFERENCEBEACON":"SELECT i.column_index::integer FROM (SELECT \ | ||
row_number() over(ORDER BY c.ordinal_position) -1 as \ | ||
column_index, c.column_name FROM information_schema.columns c \ | ||
WHERE c.table_name = 'beacons' AND c.column_name NOT IN ('geom', \ | ||
'gid') ORDER BY c.ordinal_position) as i WHERE i.column_name = \ | ||
'beacon';", | ||
"IS_SURVEYPLAN":"SELECT CASE WHEN COUNT(*) <> 0 THEN TRUE ELSE FALSE \ | ||
END FROM survey WHERE plan_no = %s;", | ||
"INSERT_SURVEYPLAN":"INSERT INTO survey(plan_no, ref_beacon) \ | ||
VALUES(%s, %s);", | ||
"UPDATE_LINK":"SELECT beardistupdate(%s, %s, %s, %s, %s, %s, %s, %s);", | ||
"DELETE_LINK":"DELETE FROM beacons WHERE beacon = %s;", | ||
"INSERT_LINK":"SELECT beardistinsert(%s, %s, %s, %s, %s, %s, %s);" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,13 @@ | ||
# This file contains metadata for your plugin. Beginning | ||
# with version 1.8 this is the preferred way to supply information about a | ||
# plugin. The current method of embedding metadata in __init__.py will | ||
# be supported until version 2.0 | ||
|
||
# This file should be included when you package your plugin. | ||
|
||
# Mandatory items: | ||
|
||
; Mandatory items: | ||
|
||
[general] | ||
name=SML Surveyor Plugin | ||
qgisMinimumVersion=1.8 | ||
description=SML Surveyor Plugin | ||
version=0.1 | ||
qgisMinimumVersion=2.0 | ||
version=Version 0.2 | ||
author=AfriSpatial | ||
[email protected] | ||
|
||
# end of mandatory metadata | ||
|
||
# Optional items: | ||
|
||
# Uncomment the following line and add your changelog entries: | ||
# changelog= | ||
|
||
# tags are comma separated with spaces allowed | ||
tags=survey | ||
|
||
homepage= | ||
tracker= | ||
repository= | ||
icon=icon.png | ||
# experimental flag | ||
; Optional items: | ||
experimental=False | ||
|
||
# deprecated flag (applies to the whole plugin, not just a single version | ||
deprecated=False | ||
|
||
icon=icon.png |
Oops, something went wrong.