diff --git a/roads/13590000000-palawan/13591213000-san_vicente/base-network-osm.py b/roads/13590000000-palawan/13591213000-san_vicente/base-network-osm.py new file mode 100644 index 0000000..2f74373 --- /dev/null +++ b/roads/13590000000-palawan/13591213000-san_vicente/base-network-osm.py @@ -0,0 +1,55 @@ +''' +A translation function for ogr2osm for the OpenRoads project: + +Admin area +name: San Vicente +type: municipality +id: 13591213000 +data: Basic road network + +Data +files: FV_010_Geoprocessed_fin.shp +notes: Provided by OpenRoads team on August 10 + +''' + +def filterTags(attrs): + if not attrs: return + + tags = {} + + # Map the road type to the OSM highway classification + if attrs['or_respons'] and attrs['or_respons'] == "barangay": + tags.update({'or_responsibility':'barangay', 'highway': attrs['Type']}) + elif attrs['or_respons'] and attrs['or_respons'] == "municipal": + tags.update({'or_responsibility':'municipal', 'highway': attrs['Type']}) + elif attrs['or_respons'] and attrs['or_respons'] == "municipal;barangay": + tags.update({'or_responsibility': attrs['or_respons'], 'highway': attrs['Type']}) + elif attrs['or_respons'] and attrs['or_respons'] == "municipal;provincial": + tags.update({'or_responsibility': attrs['or_respons'], 'highway': attrs['Type']}) + elif attrs['or_respons'] and attrs['or_respons'] == "national": + tags.update({'or_responsibility':'national', 'highway': attrs['Type']}) + elif attrs['or_respons'] and attrs['or_respons'] == "provincial": + tags.update({'or_responsibility':'provincial', 'highway': attrs['Type']}) + elif attrs['or_respons'] and attrs['or_respons'] == "private": + tags.update({'or_responsibility':'private', 'highway': attrs['Type']}) + else: + tags.update({'highway':'road'}) + + # Add surface type + if attrs['Surface_Ty']: + tags.update({'surface': attrs['Surface_Ty'].lower()}) + + # Add condition + if attrs['Surface_Co']: + tags.update({'or_condition': attrs['Surface_Co'].lower()}) + + # Add width + if attrs['Width']: + tags.update({'or_width': attrs['Width']}) + + # Add the source + if attrs['Source']: + tags.update({'source': attrs['Source']}) + + return tags \ No newline at end of file diff --git a/roads/13590000000-palawan/13591213000-san_vicente/source/FV_010_Geoprocessed_fin_4326.dbf b/roads/13590000000-palawan/13591213000-san_vicente/source/FV_010_Geoprocessed_fin_4326.dbf new file mode 100644 index 0000000..7a654b7 Binary files /dev/null and b/roads/13590000000-palawan/13591213000-san_vicente/source/FV_010_Geoprocessed_fin_4326.dbf differ diff --git a/roads/13590000000-palawan/13591213000-san_vicente/source/FV_010_Geoprocessed_fin_4326.prj b/roads/13590000000-palawan/13591213000-san_vicente/source/FV_010_Geoprocessed_fin_4326.prj new file mode 100644 index 0000000..a30c00a --- /dev/null +++ b/roads/13590000000-palawan/13591213000-san_vicente/source/FV_010_Geoprocessed_fin_4326.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/roads/13590000000-palawan/13591213000-san_vicente/source/FV_010_Geoprocessed_fin_4326.shp b/roads/13590000000-palawan/13591213000-san_vicente/source/FV_010_Geoprocessed_fin_4326.shp new file mode 100644 index 0000000..bf897aa Binary files /dev/null and b/roads/13590000000-palawan/13591213000-san_vicente/source/FV_010_Geoprocessed_fin_4326.shp differ diff --git a/roads/13590000000-palawan/13591213000-san_vicente/source/FV_010_Geoprocessed_fin_4326.shx b/roads/13590000000-palawan/13591213000-san_vicente/source/FV_010_Geoprocessed_fin_4326.shx new file mode 100644 index 0000000..226d6e0 Binary files /dev/null and b/roads/13590000000-palawan/13591213000-san_vicente/source/FV_010_Geoprocessed_fin_4326.shx differ