mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-01-21 20:08:20 +00:00
Crunch out spaces and most punctuation from autogenerated layer names
This commit is contained in:
parent
120809b004
commit
c326762b6f
11
geojson.c
11
geojson.c
@ -620,8 +620,17 @@ next_feature:
|
||||
if (cp != NULL) {
|
||||
*cp = '\0';
|
||||
}
|
||||
printf("using layer name %s\n", trunc);
|
||||
layername = trunc;
|
||||
|
||||
char *out = trunc;
|
||||
for (cp = trunc; *cp; cp++) {
|
||||
if (isalpha(*cp) || isdigit(*cp) || *cp == '_') {
|
||||
*out++ = *cp;
|
||||
}
|
||||
}
|
||||
*out = '\0';
|
||||
|
||||
printf("using layer name %s\n", trunc);
|
||||
}
|
||||
|
||||
qsort(index, indexst.st_size / sizeof(struct index), sizeof(struct index), indexcmp);
|
||||
|
Loading…
Reference in New Issue
Block a user