X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=map.c;h=8f502006324660fe42329f89a797452652c040d3;hb=0f9c9a716fe7c552e4156325d4f1a803ab40a71e;hp=8f318e23e9427bafa5a65a7baf5417a2d1ed68ad;hpb=af80b4c6ce10632dfda42b6f93634c4ad5f5e3f5;p=leo.git diff --git a/map.c b/map.c index 8f318e2..8f50200 100644 --- a/map.c +++ b/map.c @@ -15,6 +15,7 @@ #include "leo.h" #include "osm.h" +#include "shp.h" #include "map.h" #include "css.h" #include "sym.h" @@ -44,6 +45,7 @@ static const char * const map_formats[] = { "invalid", "osmxml", "fixed", + "shape", }; static struct cf_section map_source_cf = { @@ -236,6 +238,13 @@ static void map_load_source(struct data_source *ds) msg(L_INFO, "Adding fixed objects"); fixed_add(); break; + case DATA_SOURCE_SHAPE: + msg(L_INFO, "Parsing %s as shape file", ds->file); + if (!ds->file) + die("Shape data sources must have a file name"); + shp_parse(ds->file); + need_proj = 1; + break; default: die("Invalid data source format"); }