Browse Source

CMakeLists.txt in scripts folder to generate data files

Phyks (Lucas Verney) 4 years ago
parent
commit
2b05728859
3 changed files with 7 additions and 2 deletions
  1. 1
    0
      CMakeLists.txt
  2. 4
    0
      scripts/CMakeLists.txt
  3. 2
    2
      scripts/skimap.py

+ 1
- 0
CMakeLists.txt View File

@@ -2,3 +2,4 @@ cmake_minimum_required (VERSION 2.8.11)
2 2
 project (SkiMap)
3 3
 
4 4
 add_subdirectory(src)
5
+add_subdirectory(scripts)

+ 4
- 0
scripts/CMakeLists.txt View File

@@ -0,0 +1,4 @@
1
+add_custom_target (vars
2
+    COMMAND [ -d "data" ] || mkdir data
3
+    COMMAND ../scripts/skimap.py --lat-min 44.00092 --lng-min 6.60909 --lat-max 44.60190 --lng-max 6.73767 --out data/vars /home/phyks/OpenData/BD\ Alti\ 75m/BDALTIV2-75M_ASC_LAMB93_FXX_2013-10-01/1_DONNEES_LIVRAISON_2013-10-00130/BDALTIV2_MNT_75M_LAMB93_IGN69_FRANCEMETRO20130920
4
+    WORKING_DIRECTORY ${PROJECT_BINARY_DIR})

+ 2
- 2
scripts/skimap.py View File

@@ -102,7 +102,7 @@ if __name__ == "__main__":
102 102
     parser.add_argument("--out-geometadata", dest="out_geometadata",
103 103
                         action="store", required=False, default="",
104 104
                         help="Ouptut geographic metadata file name " +
105
-                        "(defaults to osm_(--out arg).json file).")
105
+                        "(defaults to (--out arg)_osm.json file).")
106 106
     parser.add_argument("in_files", action="store", nargs="+",
107 107
                         help="Input dataset files or folder containing input" +
108 108
                         "files.")
@@ -120,7 +120,7 @@ if __name__ == "__main__":
120 120
     if out_geometadata is "":
121 121
         root_filename = (args.out[:args.out.rfind('.')] if '.' in args.out
122 122
                          else args.out)
123
-        out_geometadata = "osm_" + root_filename + ".json"
123
+        out_geometadata = root_filename + "_osm.json"
124 124
 
125 125
     # Call main functions with arguments from command line
126 126
     main(args.lat_min, args.lng_min, args.lat_max, args.lng_max,