@@ -19,25 +19,37 @@ Using the following Python packages:
1919	1) Fiona (1.4+) [1]  
2020	2) Shapely (1.3+) [2] 
2121
22- I propose to follow the steps outlined in M. Bostock's "How To Infer Topology" [ 3]  to design 
23- a 'PreserveTopology' module that will identify topological elements in a LineString or 
24- MultiLineString shapefile (and possibly Polygon/Multipolygons...time allowing).
22+ Final Project (12/12/14) Update: I followed the steps outlined in M. Bostock's "How To Infer Topology" [ 3]  
23+ to design a 'PreserveTopology' module that will identify topological elements in a LineString and/or 
24+ MultiLineString shapefile. Combined with two other classes (written by me awhile ago) called GeomSimplify()
25+ and TriangleCalculator(), a user can call my simplify_topology.py library from command line and
26+ create a simplified version of any LineString or MultiLineString shapefile.  
2527
26- As described in the article, the  primary work that I will undertake will include :
28+ The  primary work that I completed includes :
2729
2830	1) identify junctions (intersection points) in LineString/MultiLineString shapefiles 
29- 	2) split (and rotate) geometric 'arcs' at their junction points. 
30- 	3) delete duplicate geometric 'arcs' that have no junction points but lie directly 
31- 	   on top of an identical geometric feature. 
31+ 	2) split geometric 'arcs' at their junction points (note: I decided for MultilineStrings and Linestrings 
32+        the need to de-duplicate geometric 'arcs' was unnecessary. However, it will have to be done  
33+ 	   in order to complete the code for Polygon and MultiPolygon shape types).  
34+ 	3) complete 10 unittests which tested the functionality of the PreserveTopology() class. 
3235
3336
3437Key points to note:
3538
36- 	- Other work that M. Bostock notes as being necessarary 
37- 	 (...namely: "extract - decompose shapes into lines and rings"...) has already been  
38- 	  undertaken in a previous code I wrote here: [4]. 
39- 	- All functions will include test code.    
40- 	- to run from command line: python simplify_topology.py <input file>  
39+ 	- All the code within the GeomSimplify() and TriangleCalculator() classes was undertaken  
40+ 	  in a previous code I wrote here: [4] and should NOT be counted as part of my class project. 
41+ 	- All functions that were drafted as part of this class project have test functions. Test 
42+       functions for code that WASN'T part of the project (i.e. the GeomSimplify() and TriangleCalculator() 
43+       class is included at this repo [4].	   
44+ 	- to run from command line: python simplify_topology.py <input file path> <output file path> <threshold> Topology=<True> or <False> 
45+ 	- the 'sample_lines.shp' included is a test file. When ran through this code with the Topology  
46+ 	  flag set to 'True' it created 'sample_lines_TopoTrue': 
47+ 	   
48+ 	  python .\simplify_topology.py .\sample_lines.shp .\sample_lines_TopoTRUE 10000000 True 
49+ 	   
50+ 	  When ran with this code with the flag set to 'False' it created 'sample_lines_TopoFALSE': 
51+ 	   
52+ 	  Python .\simplify_topology.py .\sample_lines.shp .\sample_lines_TopoTRUE 10000000 False 
4153
4254References:
4355
@@ -46,7 +58,7 @@ References:
4658	3: http://bost.ocks.org/mike/topology/ 
4759	4: https://github.com/ARSimmons/Shapely_Fiona_Visvalingam_Simplify 
4860
49- * NOTE: THIS PROJECT IS STILL  in progress as of 11/23 /2014* 
61+ * NOTE: THIS PROJECT IS turned  in for code review on 12/12 /2014* 
5062
5163</body >
5264</html >
0 commit comments