Skip to content

Commit 12d935d

Browse files
committed
update
0 parents  commit 12d935d

21 files changed

+809
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Antoine Fourmy
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Introduction
2+
3+
A Geographic Information System (GIS) software is a software designed to import, analyze and visualize geographic data.
4+
PyGISS is a lightweight GIS software based on the standard Python library for GUI programming: tkinter.
5+
It allows users to create maps by importing shapefiles (.shp files), a format that describes maps as a set of polygons.
6+
7+
![extended pyGISS](https://github.com/afourmy/PyGISS/blob/master/images/extended_pyGISS.PNG)
8+
9+
# PyGISS dependencies
10+
11+
PyGIS relies on three Python libraries:
12+
13+
* pyshp, used for reading shapefiles.
14+
* shapely, used for converting a multipolygon into a set of polygons
15+
* pyproj, used for translating geographic coordinates (longitude and latitude) into projected coordinates
16+
17+
Before using PyGISS, you must make sure all these libraries are properly installed:
18+
19+
```
20+
pip install pyshp
21+
pip install shapely
22+
pip install pyproj
23+
```
24+
25+
The extended PyGISS version also uses ImageTk from Pillow:
26+
27+
```
28+
sudo apt-get install python3-tk (unix)
29+
sudo apt-get install python3-pil.imagetk (unix)
30+
pip install pillow (windows & unix)
31+
```
32+
33+
# PyGISS versions
34+
35+
## Standard version (pyGISS.py, < 100 lines)
36+
37+
![pyGISS](https://github.com/afourmy/PyGISS/blob/master/images/pyGISS.PNG)
38+
39+
The standard version implements PyGISS in less than 100 lines of code.
40+
41+
It contains:
42+
* a menu 'Import shapefile' for the user to choose a shapefile and draw the map.
43+
* a menu 'Switch projection' to switch between the mercator and azimuthal orthographic projection.
44+
45+
The following bindings are implemented:
46+
* the right-click button allows the user to move the display in any direction
47+
* the scroll wheel can be used for zooming in and out.
48+
* pressing the left-click button on the map will print the associated geographical coordinates (longitude, latitude).
49+
50+
A few shapefiles are available for testing in the 'PyGISS/shapefiles' folder (world countries, continents, France, US).
51+
52+
## Extended version (extended_pyGISS.py, < 500 lines)
53+
54+
![extended pyGISS](https://github.com/afourmy/PyGISS/blob/master/images/extended_pyGISS.PNG)
55+
56+
The extended version shows how to use PyGISS to create a full-on GIS software.
57+
Besides the import of shapefiles, nodes can be created with a "Drag & Drop" system, moved on the map, and deleted.
58+
They can also be imported by creating an Excel file that contains the longitude and latitude of the nodes. (an example is available in the 'PyGISS/import' folder).
59+
60+
To create a node, press the left-click button on the Python Software Foundation icon in the menu, and hold it down until you've reached the desired location on the canvas.
61+
Pressing the left-click button on the canvas allows the user to either select one or several nodes, or move all selected nodes.
62+
The right-click button and the scroll wheel work like in PyGISS standard version.
63+
64+
The menu on the left allows the user to import a shapefile and draw the associated map ("Import map"), erase the map or a selection of nodes, and switch between the mercator and azimuthal orthographic projections.
65+
66+
For each node on the canvas, the geographical coordinates (longitude and latitude) are displayed under the node, and the position is updated in real-time upon moving the node.
67+
68+
## Golf version (golf_pyGISS.py, 5 lines)
69+
70+
![pyGISS](https://github.com/afourmy/PyGISS/blob/master/images/golf_pyGISS.PNG)
71+
72+
The golf version implements the core feature of PyGISS (import of shapefiles) in 5 lines of code.
73+
Upon running golf_GISS.py, a window pops up for the user to choose a shapefile.
74+
The shapefile is then imported and drawn on the canvas.
75+
The mouse wheel allows the user to move on the map by zooming in and zooming out.

0 commit comments

Comments
 (0)