- Select your area to cover and prepare a base map of that area in QGIS (to capture admin boundaries not in OSM).
- Prepare field papers for this area.
- Do one day pass through the area with field papers and GPS, mapping only roads, landuses, major points of interest and other features that will help orient map users.
- Input this data into OSM.
- After the data has been synchronized and reflected in the OSM map, prepare new Field Papers, OMK maps and OMK data after the data has been processed and the OSM map updated (this may take several hours).
| import os | |
| import fnmatch | |
| import json | |
| import shutil | |
| source_folder = 'your/survey/folder/directory' | |
| osm_files = '/your/osm/files/folder' | |
| fixed_folders = '/where/to/put/rescued/survey/folders' | |
| def out(f, arr, name): |
| -- You update the SRID for your table first. Then you reverse that update within a SQL query so you can transform the actual coordinates to their new EPSG. | |
| -- Otherwise you'll have Lat/Long coordinates for a metric projection or vice-versa. | |
| SELECT Updategeometry_columnetrySRID('table','geometry_column',new_EPSG); | |
| ALTER TABLE table | |
| ALTER COLUMN geometry_column TYPE geometry(geometry_type,new_EPSG) USING ST_Transform(ST_SetSRID(geometry_column,old_EPSG),new_EPSG); | |
| SELECT ST_AsText(geometry_column) FROM table; |
| # easy way | |
| https://github.com/AmericanRedCross/OpenMapKitServer/blob/master/docs/api.md | |
| and then | |
| http://everygoodusernameistaken.tumblr.com/post/52805666711/exporting-openstreetmap-roads-to-shapefile | |
| # longer way | |
| ## tar the folder |
| CREATE TABLE comparison AS | |
| select aug29_clean.cluster, | |
| count(*) as total, | |
| sum(case when aug29_clean.b_materials=exposure_matching.b_materials then 1 else 0 end) as building_materials, | |
| sum(case when aug29_clean.b_levels=exposure_matching.b_levels then 1 else 0 end) as building_levels, | |
| sum(case when aug29_clean.b_category=exposure_matching.b_category then 1 else 0 end) as building_type, | |
| sum(case when aug29_clean.b_foundation=exposure_matching.b_foundation then 1 else 0 end) as building_foundation, | |
| sum(case when aug29_clean.b_age=exposure_matching.b_age then 1 else 0 end) as building_age, | |
| sum(case when aug29_clean.r_shape=exposure_matching.r_shape then 1 else 0 end) as roof_shape, | |
| sum(case when aug29_clean.r_materials=exposure_matching.r_material then 1 else 0 end) as roof_materials |
QGIS's Atlas feature and ArcGIS's Data Driven Pages allow you to create a series of maps, one per geography, based off a single map style. Titles, labels, and styles within the maps can be created based on the attributes of key layers and/or the scale of the map, imparting some customization and flexibility to an otherwise automated process. Atlas geographies can be points, polygons, and scales can be adjusted.
But what if you want to create multiple maps for a single geography, or multiple maps for multiple geographies? How can you vary not just the extent but the contents of what's shown?
This walkthrough will detail two complementary methods for filtering the display of datasets across multiple geographies using QGIS's Atlas Tool. This is a deep dive into a few specific Atlas techniques that I thought were poorly documented elsewhere and useful, not an exhaustive guide to the Atlas Tool. I have no idea if any or all of these techniques can be replicated using ArcGIS's Data Driven Pages.