X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=map.c;h=bbcd7463b1f33de9864a3becb632b2b8c2c3f50e;hb=69501dc691564f350581115ee49d61ef39858e62;hp=8f318e23e9427bafa5a65a7baf5417a2d1ed68ad;hpb=af80b4c6ce10632dfda42b6f93634c4ad5f5e3f5;p=leo.git diff --git a/map.c b/map.c index 8f318e2..bbcd746 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 = { @@ -234,12 +236,22 @@ static void map_load_source(struct data_source *ds) break; case DATA_SOURCE_FIXED: msg(L_INFO, "Adding fixed objects"); + if (!ds->file) + ds->file = "fixed"; 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"); } + osm_stats(); if (debug_dump_source) { puts("=== Source data ===");