Skip to content

Commit d68507e

Browse files
committed
Remove phstore flag from style and replace ist by a generic hstore flag
which is also usable for points and lines. This is useful in conjunction with the --hstore-match-only option
1 parent 901a996 commit d68507e

4 files changed

Lines changed: 42 additions & 42 deletions

File tree

default.style

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#
2525
# linear - Create a column for this tag
2626
#
27-
# phstore - Don't create a column for this tag, but objects with the tag are areas
27+
# hstore - add tag to hstore only instead of its own column
2828
#
2929
# delete - Drop this tag completely and don't create a column for it. This also
3030
# prevents the tag from being added to hstore columns
@@ -148,12 +148,12 @@ way way_area real # This is calculated during import
148148
# Area tags
149149
# We don't make columns for these tags, but objects with them are areas.
150150
# Mainly for use with hstore
151-
way abandoned:aeroway text phstore
152-
way abandoned:amenity text phstore
153-
way abandoned:building text phstore
154-
way abandoned:landuse text phstore
155-
way abandoned:power text phstore
156-
way area:highway text phstore
151+
way abandoned:aeroway text polygon,hstore
152+
way abandoned:amenity text polygon,hstore
153+
way abandoned:building text polygon,hstore
154+
way abandoned:landuse text polygon,hstore
155+
way abandoned:power text polygon,hstore
156+
way area:highway text polygon,hstore
157157

158158
# Deleted tags
159159
# These are tags that are generally regarded as useless for most rendering.

empty.style

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@
55
# See default.style for documentation on all the flags
66

77
# OsmType Tag Type Flags
8-
# Insert your own columns here, or change phstore to polygon below
9-
way abandoned:aeroway text phstore
10-
way abandoned:amenity text phstore
11-
way abandoned:building text phstore
12-
way abandoned:landuse text phstore
13-
way abandoned:power text phstore
14-
way area:highway text phstore
15-
node,way aeroway text phstore
16-
node,way amenity text phstore
17-
node,way building text phstore
18-
way building:part text phstore
19-
node,way harbour text phstore
20-
node,way historic text phstore
21-
node,way landuse text phstore
22-
node,way leisure text phstore
23-
node,way man_made text phstore
24-
node,way military text phstore
25-
node,way natural text phstore
26-
node,way office text phstore
27-
node,way place text phstore
28-
node,way power text phstore
29-
node,way public_transport text phstore
30-
node,way shop text phstore
31-
node,way sport text phstore
32-
node,way tourism text phstore
33-
node,way water text phstore
34-
node,way waterway text phstore
35-
node,way wetland text phstore
8+
# Insert your own columns here, or remove hstore option below
9+
way abandoned:aeroway text polygon,hstore
10+
way abandoned:amenity text polygon,hstore
11+
way abandoned:building text polygon,hstore
12+
way abandoned:landuse text polygon,hstore
13+
way abandoned:power text polygon,hstore
14+
way area:highway text polygon,hstore
15+
node,way aeroway text polygon,hstore
16+
node,way amenity text polygon,hstore
17+
node,way building text polygon,hstore
18+
way building:part text polygon,hstore
19+
node,way harbour text polygon,hstore
20+
node,way historic text polygon,hstore
21+
node,way landuse text polygon,hstore
22+
node,way leisure text polygon,hstore
23+
node,way man_made text polygon,hstore
24+
node,way military text polygon,hstore
25+
node,way natural text polygon,hstore
26+
node,way office text polygon,hstore
27+
node,way place text polygon,hstore
28+
node,way power text polygon,hstore
29+
node,way public_transport text polygon,hstore
30+
node,way shop text polygon,hstore
31+
node,way sport text polygon,hstore
32+
node,way tourism text polygon,hstore
33+
node,way water text polygon,hstore
34+
node,way waterway text polygon,hstore
35+
node,way wetland text polygon,hstore
3636
node,way z_order int4 linear # This is calculated during import
3737
way way_area real # This is calculated during import
3838

output-pgsql.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static struct flagsname {
7676
{ .name = "linear", .flag = FLAG_LINEAR },
7777
{ .name = "nocache", .flag = FLAG_NOCACHE },
7878
{ .name = "delete", .flag = FLAG_DELETE },
79-
{ .name = "phstore", .flag = FLAG_PHSTORE }
79+
{ .name = "hstore", .flag = FLAG_HSTORE }
8080
};
8181
#define NUM_FLAGS ((signed)(sizeof(tagflags) / sizeof(tagflags[0])))
8282

@@ -526,7 +526,7 @@ static int pgsql_out_node(osmid_t id, struct keyval *tags, double node_lat, doub
526526
for (i=0; i < exportListCount[OSMTYPE_NODE]; i++) {
527527
if( exportList[OSMTYPE_NODE][i].flags & FLAG_DELETE )
528528
continue;
529-
if( (exportList[OSMTYPE_NODE][i].flags & FLAG_PHSTORE) == FLAG_PHSTORE)
529+
if( (exportList[OSMTYPE_NODE][i].flags & FLAG_HSTORE) == FLAG_HSTORE)
530530
continue;
531531
if ((tag = getTag(tags, exportList[OSMTYPE_NODE][i].name)))
532532
{
@@ -584,7 +584,7 @@ static void write_wkts(osmid_t id, struct keyval *tags, const char *wkt, enum ta
584584
for (j=0; j < exportListCount[OSMTYPE_WAY]; j++) {
585585
if( exportList[OSMTYPE_WAY][j].flags & FLAG_DELETE )
586586
continue;
587-
if( (exportList[OSMTYPE_WAY][j].flags & FLAG_PHSTORE) == FLAG_PHSTORE)
587+
if( (exportList[OSMTYPE_WAY][j].flags & FLAG_HSTORE) == FLAG_HSTORE)
588588
continue;
589589
if ((tag = getTag(tags, exportList[OSMTYPE_WAY][j].name)))
590590
{
@@ -887,7 +887,7 @@ static int pgsql_out_start(const struct output_options *options)
887887
for (j=0; j < numTags; j++) {
888888
if( exportTags[j].flags & FLAG_DELETE )
889889
continue;
890-
if( (exportTags[j].flags & FLAG_PHSTORE ) == FLAG_PHSTORE)
890+
if( (exportTags[j].flags & FLAG_HSTORE ) == FLAG_HSTORE)
891891
continue;
892892
sprintf(tmp, ",\"%s\" %s", exportTags[j].name, exportTags[j].type);
893893
if (strlen(sql) + strlen(tmp) + 1 > sql_len) {
@@ -936,7 +936,7 @@ static int pgsql_out_start(const struct output_options *options)
936936
for (j=0; j < numTags; j++) {
937937
if( exportTags[j].flags & FLAG_DELETE )
938938
continue;
939-
if( (exportTags[j].flags & FLAG_PHSTORE) == FLAG_PHSTORE)
939+
if( (exportTags[j].flags & FLAG_HSTORE) == FLAG_HSTORE)
940940
continue;
941941
sprintf(tmp, "\"%s\"", exportTags[j].name);
942942
if (PQfnumber(res, tmp) < 0) {
@@ -962,7 +962,7 @@ static int pgsql_out_start(const struct output_options *options)
962962
for (j=0; j < numTags; j++) {
963963
if( exportTags[j].flags & FLAG_DELETE )
964964
continue;
965-
if( (exportTags[j].flags & FLAG_PHSTORE ) == FLAG_PHSTORE)
965+
if( (exportTags[j].flags & FLAG_HSTORE ) == FLAG_HSTORE)
966966
continue;
967967
sprintf(tmp, ",\"%s\"", exportTags[j].name);
968968

output-pgsql.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define FLAG_LINEAR 2 /* For lines table */
1313
#define FLAG_NOCACHE 4 /* Optimisation: don't bother remembering this one */
1414
#define FLAG_DELETE 8 /* These tags should be simply deleted on sight */
15-
#define FLAG_PHSTORE 17 /* polygons without own column but listed in hstore this implies FLAG_POLYGON */
15+
#define FLAG_HSTORE 16 /* objects without column but should be listed in hstore */
1616

1717
/* Table columns, representing key= tags */
1818
struct taginfo {

0 commit comments

Comments
 (0)