|
From: <pg...@us...> - 2015-10-20 15:08:06
|
Revision: 2987
http://sourceforge.net/p/roadmap/code/2987
Author: pgf
Date: 2015-10-20 15:08:04 +0000 (Tue, 20 Oct 2015)
Log Message:
-----------
buildmap_osm_layers: AREA/PLACE flags only matter at the layer level
Modified Paths:
--------------
trunk/roadmap/src/buildmap_osm_layers.h
trunk/roadmap/src/buildmap_osm_text.c
Modified: trunk/roadmap/src/buildmap_osm_layers.h
===================================================================
--- trunk/roadmap/src/buildmap_osm_layers.h 2015-10-20 15:08:01 UTC (rev 2986)
+++ trunk/roadmap/src/buildmap_osm_layers.h 2015-10-20 15:08:04 UTC (rev 2987)
@@ -35,7 +35,6 @@
typedef struct {
char *osm_tname;
value_info_t *value_list;
- int flags;
} tag_info_t;
@@ -229,20 +228,20 @@
/* set the third column to a specific type only if that table
* contains _only_ that type */
tag_info_t tag_info[] = {
- {0, NULL, 0 },
- {"highway", highway_to_layer, ANY },
- {"cycleway", cycleway_to_layer, ANY },
- {"waterway", waterway_to_layer, ANY },
- {"railway", railway_to_layer, ANY },
- {"leisure", leisure_to_layer, ANY },
- {"amenity", amenity_to_layer, ANY },
- {"tourism", tourism_to_layer, ANY },
- {"historic", historic_to_layer, ANY },
- {"landuse", landuse_to_layer, ANY },
- {"aeroway", aeroway_to_layer, ANY },
- {"natural", natural_to_layer, ANY },
- {"place", place_to_layer, ANY },
- { 0, NULL, 0 },
+ {0, NULL },
+ {"highway", highway_to_layer },
+ {"cycleway", cycleway_to_layer },
+ {"waterway", waterway_to_layer },
+ {"railway", railway_to_layer },
+ {"leisure", leisure_to_layer },
+ {"amenity", amenity_to_layer },
+ {"tourism", tourism_to_layer },
+ {"historic", historic_to_layer },
+ {"landuse", landuse_to_layer },
+ {"aeroway", aeroway_to_layer },
+ {"natural", natural_to_layer },
+ {"place", place_to_layer },
+ { 0, NULL },
};
/**
Modified: trunk/roadmap/src/buildmap_osm_text.c
===================================================================
--- trunk/roadmap/src/buildmap_osm_text.c 2015-10-20 15:08:01 UTC (rev 2986)
+++ trunk/roadmap/src/buildmap_osm_text.c 2015-10-20 15:08:04 UTC (rev 2987)
@@ -458,8 +458,8 @@
* @brief checks to see if the tag and value found in the input data
* corresponds to a layer we're interested in recording in the map.
* the layer is returned if so (but we don't touch it if not). the
- * returned flags indicate what sort of layer this is (PLACE, AREA).
- * @param lookfor limits the search to matching types (PLACE, AREA)
+ * returned flags indicate what sort of layer this is (LINE, PLACE, AREA).
+ * @param lookfor limits the search to matching types (LINE, PLACE, AREA)
*/
int
@@ -470,12 +470,11 @@
value_info_t *value_list;
for (i=1; tag_info[i].osm_tname != 0; i++) {
- if ((lookfor & tag_info[i].flags) &&
- strcmp(tag, tag_info[i].osm_tname) == 0) {
+ if (strcmp(tag, tag_info[i].osm_tname) == 0) {
value_list = tag_info[i].value_list;
if (value_list) {
for (j=1; value_list[j].osm_vname; j++) {
- if ((lookfor & tag_info[i].flags) &&
+ if ((lookfor & value_list[j].flags) &&
strcmp(value, value_list[j].osm_vname) == 0) {
*flags = value_list[j].flags;
if (value_list[j].layerp)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|