diff --git a/decode.cpp b/decode.cpp index 1871dd2a..dd3cc36e 100644 --- a/decode.cpp +++ b/decode.cpp @@ -24,7 +24,6 @@ int maxzoom = 32; bool force = false; void handle(std::string message, int z, unsigned x, unsigned y, int describe, std::set const &to_decode, bool pipeline) { - int within = 0; mvt_tile tile; bool was_compressed; @@ -80,7 +79,6 @@ void handle(std::string message, int z, unsigned x, unsigned y, int describe, st printf(", \"features\": [\n"); first_layer = false; - within = 0; } } diff --git a/tests/join-population/joined-i.mbtiles.json b/tests/join-population/joined-i.mbtiles.json index f3aa93ed..aa2c6091 100644 --- a/tests/join-population/joined-i.mbtiles.json +++ b/tests/join-population/joined-i.mbtiles.json @@ -3,7 +3,7 @@ "center": "-122.299805,37.892187,12", "description": "tests/join-population/tabblock_06001420.mbtiles", "format": "pbf", -"json": "{\"vector_layers\": [ { \"id\": \"tabblock_06001420\", \"description\": \"\", \"minzoom\": 3, \"maxzoom\": 12, \"fields\": {\"ALAND10\": \"Number\", \"AWATER10\": \"Number\", \"BLOCKCE10\": \"String\", \"COUNTYFP10\": \"String\", \"FUNCSTAT10\": \"String\", \"INTPTLAT10\": \"String\", \"INTPTLON10\": \"String\", \"MTFCC10\": \"String\", \"NAME10\": \"String\", \"STATEFP10\": \"String\", \"TRACTCE10\": \"String\", \"UACE10\": \"String\", \"UATYP10\": \"String\", \"UR10\": \"String\", \"population\": \"Number\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"tabblock_06001420\",\"count\": 1000,\"geometry\": \"Polygon\",\"attributeCount\": 15,\"attributes\": [{\"attribute\": \"ALAND10\",\"count\": 162,\"type\": \"number\",\"values\": [10019,10125,10320,10339,10769,10776,10975,11206,11297,11306,11372,11825,11928,11997,1201,12044,12062,12213,12579,12945,13013,13106,13452,13985,14000,14042,14044,14053,14087,14101,14158,14169,14185,14193,14219,14237,14270,14291,14449,14452,14523,14541,14557,1457,14593,14639,14791,14799,14980,15100,15240,15260,15494,15574,15665,15730,15921,15930,15974,16117,16120,16165,16183,16238,16246,16253,16332,16353,16431,16453,16535,16537,16605,16635,16691,16994,17210,17230,17265,17308,17581,17622,17780,17893,18064,18095,18377,18586,18637,1878,18897,19453,19544,19676,19773,19818,19896,20277,20386,20486],\"min\": 280.000000,\"max\": 412555.000000},{\"attribute\": \"AWATER10\",\"count\": 1,\"type\": \"number\",\"values\": [0],\"min\": 0.000000,\"max\": 0.000000},{\"attribute\": \"BLOCKCE10\",\"count\": 72,\"type\": \"string\",\"values\": [\"1000\",\"1001\",\"1002\",\"1003\",\"1004\",\"1005\",\"1006\",\"1007\",\"1008\",\"1009\",\"1010\",\"1011\",\"1012\",\"1013\",\"1014\",\"1015\",\"1016\",\"1017\",\"1018\",\"1019\",\"1020\",\"1021\",\"1022\",\"1023\",\"1024\",\"1026\",\"1029\",\"1030\",\"1031\",\"2000\",\"2001\",\"2002\",\"2003\",\"2004\",\"2005\",\"2006\",\"2007\",\"2008\",\"2009\",\"2010\",\"2011\",\"2012\",\"2013\",\"2014\",\"2015\",\"3000\",\"3001\",\"3002\",\"3003\",\"3004\",\"3005\",\"3006\",\"3007\",\"3008\",\"3009\",\"3010\",\"3012\",\"3013\",\"3014\",\"3015\",\"3016\",\"3017\",\"3018\",\"3019\",\"3020\",\"3021\",\"3023\",\"3024\",\"3026\",\"3027\",\"3028\",\"3031\"]},{\"attribute\": \"COUNTYFP10\",\"count\": 1,\"type\": \"string\",\"values\": [\"001\"]},{\"attribute\": \"FUNCSTAT10\",\"count\": 1,\"type\": \"string\",\"values\": [\"S\"]},{\"attribute\": \"INTPTLAT10\",\"count\": 162,\"type\": \"string\",\"values\": [\"+37.8827246\",\"+37.8828579\",\"+37.8829654\",\"+37.8832245\",\"+37.8833234\",\"+37.8834620\",\"+37.8834818\",\"+37.8834939\",\"+37.8835272\",\"+37.8835363\",\"+37.8835790\",\"+37.8836932\",\"+37.8837071\",\"+37.8838362\",\"+37.8838753\",\"+37.8839739\",\"+37.8840099\",\"+37.8840797\",\"+37.8843388\",\"+37.8843696\",\"+37.8846770\",\"+37.8847438\",\"+37.8847470\",\"+37.8848967\",\"+37.8849195\",\"+37.8853070\",\"+37.8853080\",\"+37.8854489\",\"+37.8854914\",\"+37.8856461\",\"+37.8858112\",\"+37.8859970\",\"+37.8861594\",\"+37.8861944\",\"+37.8861973\",\"+37.8863229\",\"+37.8863390\",\"+37.8864607\",\"+37.8864950\",\"+37.8865962\",\"+37.8866087\",\"+37.8868308\",\"+37.8872385\",\"+37.8875706\",\"+37.8877891\",\"+37.8879459\",\"+37.8880279\",\"+37.8882387\",\"+37.8883323\",\"+37.8883405\",\"+37.8884164\",\"+37.8884185\",\"+37.8884410\",\"+37.8884411\",\"+37.8884580\",\"+37.8885408\",\"+37.8886165\",\"+37.8886345\",\"+37.8887349\",\"+37.8887826\",\"+37.8888488\",\"+37.8888596\",\"+37.8888638\",\"+37.8889080\",\"+37.8889300\",\"+37.8889340\",\"+37.8890070\",\"+37.8890495\",\"+37.8891261\",\"+37.8891773\",\"+37.8892518\",\"+37.8893267\",\"+37.8894113\",\"+37.8895187\",\"+37.8895455\",\"+37.8896695\",\"+37.8898284\",\"+37.8899556\",\"+37.8900585\",\"+37.8901108\",\"+37.8901660\",\"+37.8901726\",\"+37.8902095\",\"+37.8902144\",\"+37.8902784\",\"+37.8906969\",\"+37.8908584\",\"+37.8910287\",\"+37.8911018\",\"+37.8912006\",\"+37.8912058\",\"+37.8913200\",\"+37.8914257\",\"+37.8915386\",\"+37.8916581\",\"+37.8917135\",\"+37.8917853\",\"+37.8918042\",\"+37.8918093\",\"+37.8918237\"]},{\"attribute\": \"INTPTLON10\",\"count\": 162,\"type\": \"string\",\"values\": [\"-122.2823713\",\"-122.2826890\",\"-122.2830673\",\"-122.2834249\",\"-122.2836511\",\"-122.2837239\",\"-122.2837979\",\"-122.2844715\",\"-122.2845719\",\"-122.2848310\",\"-122.2850205\",\"-122.2851750\",\"-122.2856099\",\"-122.2859011\",\"-122.2859716\",\"-122.2863490\",\"-122.2863663\",\"-122.2866366\",\"-122.2868653\",\"-122.2869139\",\"-122.2870976\",\"-122.2871259\",\"-122.2872058\",\"-122.2872753\",\"-122.2873239\",\"-122.2873798\",\"-122.2875836\",\"-122.2876349\",\"-122.2877473\",\"-122.2877578\",\"-122.2878360\",\"-122.2879267\",\"-122.2879697\",\"-122.2883823\",\"-122.2886022\",\"-122.2886289\",\"-122.2886965\",\"-122.2887646\",\"-122.2887874\",\"-122.2889102\",\"-122.2890200\",\"-122.2892190\",\"-122.2894724\",\"-122.2895305\",\"-122.2895702\",\"-122.2896635\",\"-122.2897641\",\"-122.2899595\",\"-122.2901174\",\"-122.2903402\",\"-122.2904413\",\"-122.2905229\",\"-122.2906157\",\"-122.2909643\",\"-122.2909809\",\"-122.2911376\",\"-122.2912175\",\"-122.2913917\",\"-122.2914745\",\"-122.2918172\",\"-122.2919263\",\"-122.2920141\",\"-122.2921539\",\"-122.2923093\",\"-122.2923947\",\"-122.2926742\",\"-122.2927567\",\"-122.2927774\",\"-122.2928119\",\"-122.2928245\",\"-122.2929060\",\"-122.2932964\",\"-122.2933649\",\"-122.2934559\",\"-122.2934770\",\"-122.2935084\",\"-122.2935928\",\"-122.2936333\",\"-122.2941575\",\"-122.2942136\",\"-122.2943382\",\"-122.2944181\",\"-122.2944569\",\"-122.2945038\",\"-122.2949725\",\"-122.2950398\",\"-122.2951842\",\"-122.2952863\",\"-122.2953196\",\"-122.2953591\",\"-122.2955660\",\"-122.2958883\",\"-122.2960301\",\"-122.2960835\",\"-122.2961445\",\"-122.2961756\",\"-122.2962204\",\"-122.2964053\",\"-122.2964744\",\"-122.2967302\"]},{\"attribute\": \"MTFCC10\",\"count\": 1,\"type\": \"string\",\"values\": [\"G5040\"]},{\"attribute\": \"NAME10\",\"count\": 72,\"type\": \"string\",\"values\": [\"Block 1000\",\"Block 1001\",\"Block 1002\",\"Block 1003\",\"Block 1004\",\"Block 1005\",\"Block 1006\",\"Block 1007\",\"Block 1008\",\"Block 1009\",\"Block 1010\",\"Block 1011\",\"Block 1012\",\"Block 1013\",\"Block 1014\",\"Block 1015\",\"Block 1016\",\"Block 1017\",\"Block 1018\",\"Block 1019\",\"Block 1020\",\"Block 1021\",\"Block 1022\",\"Block 1023\",\"Block 1024\",\"Block 1026\",\"Block 1029\",\"Block 1030\",\"Block 1031\",\"Block 2000\",\"Block 2001\",\"Block 2002\",\"Block 2003\",\"Block 2004\",\"Block 2005\",\"Block 2006\",\"Block 2007\",\"Block 2008\",\"Block 2009\",\"Block 2010\",\"Block 2011\",\"Block 2012\",\"Block 2013\",\"Block 2014\",\"Block 2015\",\"Block 3000\",\"Block 3001\",\"Block 3002\",\"Block 3003\",\"Block 3004\",\"Block 3005\",\"Block 3006\",\"Block 3007\",\"Block 3008\",\"Block 3009\",\"Block 3010\",\"Block 3012\",\"Block 3013\",\"Block 3014\",\"Block 3015\",\"Block 3016\",\"Block 3017\",\"Block 3018\",\"Block 3019\",\"Block 3020\",\"Block 3021\",\"Block 3023\",\"Block 3024\",\"Block 3026\",\"Block 3027\",\"Block 3028\",\"Block 3031\"]},{\"attribute\": \"STATEFP10\",\"count\": 1,\"type\": \"string\",\"values\": [\"06\"]},{\"attribute\": \"TRACTCE10\",\"count\": 6,\"type\": \"string\",\"values\": [\"420100\",\"420200\",\"420300\",\"420400\",\"420500\",\"420600\"]},{\"attribute\": \"UACE10\",\"count\": 1,\"type\": \"string\",\"values\": [\"78904\"]},{\"attribute\": \"UATYP10\",\"count\": 1,\"type\": \"string\",\"values\": [\"U\"]},{\"attribute\": \"UR10\",\"count\": 1,\"type\": \"string\",\"values\": [\"U\"]},{\"attribute\": \"population\",\"count\": 73,\"type\": \"number\",\"values\": [1,10,11,1118,113,116,12,13,133,145,15,16,17,18,19,2,21,212,22,23,24,27,28,29,30,31,32,33,34,35,36,37,38,39,4,40,41,414,42,43,44,45,46,47,49,50,51,53,54,55,56,57,58,60,62,63,64,65,66,68,69,7,70,73,82,83,84,86,87,9,90,91,98],\"min\": 1.000000,\"max\": 1118.000000}]}]}}", +"json": "{\"vector_layers\": [ { \"id\": \"tabblock_06001420\", \"description\": \"\", \"minzoom\": 4, \"maxzoom\": 12, \"fields\": {\"ALAND10\": \"Number\", \"AWATER10\": \"Number\", \"BLOCKCE10\": \"String\", \"COUNTYFP10\": \"String\", \"FUNCSTAT10\": \"String\", \"INTPTLAT10\": \"String\", \"INTPTLON10\": \"String\", \"MTFCC10\": \"String\", \"NAME10\": \"String\", \"STATEFP10\": \"String\", \"TRACTCE10\": \"String\", \"UACE10\": \"String\", \"UATYP10\": \"String\", \"UR10\": \"String\", \"population\": \"Number\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"tabblock_06001420\",\"count\": 1000,\"geometry\": \"Polygon\",\"attributeCount\": 15,\"attributes\": [{\"attribute\": \"ALAND10\",\"count\": 162,\"type\": \"number\",\"values\": [10019,10125,10320,10339,10769,10776,10975,11206,11297,11306,11372,11825,11928,11997,1201,12044,12062,12213,12579,12945,13013,13106,13452,13985,14000,14042,14044,14053,14087,14101,14158,14169,14185,14193,14219,14237,14270,14291,14449,14452,14523,14541,14557,1457,14593,14639,14791,14799,14980,15100,15240,15260,15494,15574,15665,15730,15921,15930,15974,16117,16120,16165,16183,16238,16246,16253,16332,16353,16431,16453,16535,16537,16605,16635,16691,16994,17210,17230,17265,17308,17581,17622,17780,17893,18064,18095,18377,18586,18637,1878,18897,19453,19544,19676,19773,19818,19896,20277,20386,20486],\"min\": 280.000000,\"max\": 412555.000000},{\"attribute\": \"AWATER10\",\"count\": 1,\"type\": \"number\",\"values\": [0],\"min\": 0.000000,\"max\": 0.000000},{\"attribute\": \"BLOCKCE10\",\"count\": 72,\"type\": \"string\",\"values\": [\"1000\",\"1001\",\"1002\",\"1003\",\"1004\",\"1005\",\"1006\",\"1007\",\"1008\",\"1009\",\"1010\",\"1011\",\"1012\",\"1013\",\"1014\",\"1015\",\"1016\",\"1017\",\"1018\",\"1019\",\"1020\",\"1021\",\"1022\",\"1023\",\"1024\",\"1026\",\"1029\",\"1030\",\"1031\",\"2000\",\"2001\",\"2002\",\"2003\",\"2004\",\"2005\",\"2006\",\"2007\",\"2008\",\"2009\",\"2010\",\"2011\",\"2012\",\"2013\",\"2014\",\"2015\",\"3000\",\"3001\",\"3002\",\"3003\",\"3004\",\"3005\",\"3006\",\"3007\",\"3008\",\"3009\",\"3010\",\"3012\",\"3013\",\"3014\",\"3015\",\"3016\",\"3017\",\"3018\",\"3019\",\"3020\",\"3021\",\"3023\",\"3024\",\"3026\",\"3027\",\"3028\",\"3031\"]},{\"attribute\": \"COUNTYFP10\",\"count\": 1,\"type\": \"string\",\"values\": [\"001\"]},{\"attribute\": \"FUNCSTAT10\",\"count\": 1,\"type\": \"string\",\"values\": [\"S\"]},{\"attribute\": \"INTPTLAT10\",\"count\": 162,\"type\": \"string\",\"values\": [\"+37.8827246\",\"+37.8828579\",\"+37.8829654\",\"+37.8832245\",\"+37.8833234\",\"+37.8834620\",\"+37.8834818\",\"+37.8834939\",\"+37.8835272\",\"+37.8835363\",\"+37.8835790\",\"+37.8836932\",\"+37.8837071\",\"+37.8838362\",\"+37.8838753\",\"+37.8839739\",\"+37.8840099\",\"+37.8840797\",\"+37.8843388\",\"+37.8843696\",\"+37.8846770\",\"+37.8847438\",\"+37.8847470\",\"+37.8848967\",\"+37.8849195\",\"+37.8853070\",\"+37.8853080\",\"+37.8854489\",\"+37.8854914\",\"+37.8856461\",\"+37.8858112\",\"+37.8859970\",\"+37.8861594\",\"+37.8861944\",\"+37.8861973\",\"+37.8863229\",\"+37.8863390\",\"+37.8864607\",\"+37.8864950\",\"+37.8865962\",\"+37.8866087\",\"+37.8868308\",\"+37.8872385\",\"+37.8875706\",\"+37.8877891\",\"+37.8879459\",\"+37.8880279\",\"+37.8882387\",\"+37.8883323\",\"+37.8883405\",\"+37.8884164\",\"+37.8884185\",\"+37.8884410\",\"+37.8884411\",\"+37.8884580\",\"+37.8885408\",\"+37.8886165\",\"+37.8886345\",\"+37.8887349\",\"+37.8887826\",\"+37.8888488\",\"+37.8888596\",\"+37.8888638\",\"+37.8889080\",\"+37.8889300\",\"+37.8889340\",\"+37.8890070\",\"+37.8890495\",\"+37.8891261\",\"+37.8891773\",\"+37.8892518\",\"+37.8893267\",\"+37.8894113\",\"+37.8895187\",\"+37.8895455\",\"+37.8896695\",\"+37.8898284\",\"+37.8899556\",\"+37.8900585\",\"+37.8901108\",\"+37.8901660\",\"+37.8901726\",\"+37.8902095\",\"+37.8902144\",\"+37.8902784\",\"+37.8906969\",\"+37.8908584\",\"+37.8910287\",\"+37.8911018\",\"+37.8912006\",\"+37.8912058\",\"+37.8913200\",\"+37.8914257\",\"+37.8915386\",\"+37.8916581\",\"+37.8917135\",\"+37.8917853\",\"+37.8918042\",\"+37.8918093\",\"+37.8918237\"]},{\"attribute\": \"INTPTLON10\",\"count\": 162,\"type\": \"string\",\"values\": [\"-122.2823713\",\"-122.2826890\",\"-122.2830673\",\"-122.2834249\",\"-122.2836511\",\"-122.2837239\",\"-122.2837979\",\"-122.2844715\",\"-122.2845719\",\"-122.2848310\",\"-122.2850205\",\"-122.2851750\",\"-122.2856099\",\"-122.2859011\",\"-122.2859716\",\"-122.2863490\",\"-122.2863663\",\"-122.2866366\",\"-122.2868653\",\"-122.2869139\",\"-122.2870976\",\"-122.2871259\",\"-122.2872058\",\"-122.2872753\",\"-122.2873239\",\"-122.2873798\",\"-122.2875836\",\"-122.2876349\",\"-122.2877473\",\"-122.2877578\",\"-122.2878360\",\"-122.2879267\",\"-122.2879697\",\"-122.2883823\",\"-122.2886022\",\"-122.2886289\",\"-122.2886965\",\"-122.2887646\",\"-122.2887874\",\"-122.2889102\",\"-122.2890200\",\"-122.2892190\",\"-122.2894724\",\"-122.2895305\",\"-122.2895702\",\"-122.2896635\",\"-122.2897641\",\"-122.2899595\",\"-122.2901174\",\"-122.2903402\",\"-122.2904413\",\"-122.2905229\",\"-122.2906157\",\"-122.2909643\",\"-122.2909809\",\"-122.2911376\",\"-122.2912175\",\"-122.2913917\",\"-122.2914745\",\"-122.2918172\",\"-122.2919263\",\"-122.2920141\",\"-122.2921539\",\"-122.2923093\",\"-122.2923947\",\"-122.2926742\",\"-122.2927567\",\"-122.2927774\",\"-122.2928119\",\"-122.2928245\",\"-122.2929060\",\"-122.2932964\",\"-122.2933649\",\"-122.2934559\",\"-122.2934770\",\"-122.2935084\",\"-122.2935928\",\"-122.2936333\",\"-122.2941575\",\"-122.2942136\",\"-122.2943382\",\"-122.2944181\",\"-122.2944569\",\"-122.2945038\",\"-122.2949725\",\"-122.2950398\",\"-122.2951842\",\"-122.2952863\",\"-122.2953196\",\"-122.2953591\",\"-122.2955660\",\"-122.2958883\",\"-122.2960301\",\"-122.2960835\",\"-122.2961445\",\"-122.2961756\",\"-122.2962204\",\"-122.2964053\",\"-122.2964744\",\"-122.2967302\"]},{\"attribute\": \"MTFCC10\",\"count\": 1,\"type\": \"string\",\"values\": [\"G5040\"]},{\"attribute\": \"NAME10\",\"count\": 72,\"type\": \"string\",\"values\": [\"Block 1000\",\"Block 1001\",\"Block 1002\",\"Block 1003\",\"Block 1004\",\"Block 1005\",\"Block 1006\",\"Block 1007\",\"Block 1008\",\"Block 1009\",\"Block 1010\",\"Block 1011\",\"Block 1012\",\"Block 1013\",\"Block 1014\",\"Block 1015\",\"Block 1016\",\"Block 1017\",\"Block 1018\",\"Block 1019\",\"Block 1020\",\"Block 1021\",\"Block 1022\",\"Block 1023\",\"Block 1024\",\"Block 1026\",\"Block 1029\",\"Block 1030\",\"Block 1031\",\"Block 2000\",\"Block 2001\",\"Block 2002\",\"Block 2003\",\"Block 2004\",\"Block 2005\",\"Block 2006\",\"Block 2007\",\"Block 2008\",\"Block 2009\",\"Block 2010\",\"Block 2011\",\"Block 2012\",\"Block 2013\",\"Block 2014\",\"Block 2015\",\"Block 3000\",\"Block 3001\",\"Block 3002\",\"Block 3003\",\"Block 3004\",\"Block 3005\",\"Block 3006\",\"Block 3007\",\"Block 3008\",\"Block 3009\",\"Block 3010\",\"Block 3012\",\"Block 3013\",\"Block 3014\",\"Block 3015\",\"Block 3016\",\"Block 3017\",\"Block 3018\",\"Block 3019\",\"Block 3020\",\"Block 3021\",\"Block 3023\",\"Block 3024\",\"Block 3026\",\"Block 3027\",\"Block 3028\",\"Block 3031\"]},{\"attribute\": \"STATEFP10\",\"count\": 1,\"type\": \"string\",\"values\": [\"06\"]},{\"attribute\": \"TRACTCE10\",\"count\": 6,\"type\": \"string\",\"values\": [\"420100\",\"420200\",\"420300\",\"420400\",\"420500\",\"420600\"]},{\"attribute\": \"UACE10\",\"count\": 1,\"type\": \"string\",\"values\": [\"78904\"]},{\"attribute\": \"UATYP10\",\"count\": 1,\"type\": \"string\",\"values\": [\"U\"]},{\"attribute\": \"UR10\",\"count\": 1,\"type\": \"string\",\"values\": [\"U\"]},{\"attribute\": \"population\",\"count\": 73,\"type\": \"number\",\"values\": [1,10,11,1118,113,116,12,13,133,145,15,16,17,18,19,2,21,212,22,23,24,27,28,29,30,31,32,33,34,35,36,37,38,39,4,40,41,414,42,43,44,45,46,47,49,50,51,53,54,55,56,57,58,60,62,63,64,65,66,68,69,7,70,73,82,83,84,86,87,9,90,91,98],\"min\": 1.000000,\"max\": 1118.000000}]}]}}", "maxzoom": "12", "minzoom": "0", "name": "tests/join-population/tabblock_06001420.mbtiles", diff --git a/tile-join.cpp b/tile-join.cpp index 36cb3663..ebfed4f7 100644 --- a/tile-join.cpp +++ b/tile-join.cpp @@ -92,12 +92,6 @@ void handle(std::string message, int z, unsigned x, unsigned y, std::map(layer.name, layermap_entry(layermap.size()))); - auto file_keys = layermap.find(layer.name); - file_keys->second.minzoom = z; - file_keys->second.maxzoom = z; - } auto file_keys = layermap.find(layer.name); for (size_t f = 0; f < layer.features.size(); f++) { @@ -207,6 +201,13 @@ void handle(std::string message, int z, unsigned x, unsigned y, std::map(layer.name, layermap_entry(layermap.size()))); + file_keys = layermap.find(layer.name); + file_keys->second.minzoom = z; + file_keys->second.maxzoom = z; + } + // To keep attributes in their original order instead of alphabetical for (auto k : key_order) { auto fa = attributes.find(k); diff --git a/tile.cpp b/tile.cpp index 03a6858f..a495ee43 100644 --- a/tile.cpp +++ b/tile.cpp @@ -1468,8 +1468,8 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s FILE *prefilter_fp = NULL; pthread_t prefilter_writer; run_prefilter_args rpa; // here so it stays in scope until joined - FILE *prefilter_read_fp; - json_pull *prefilter_jp; + FILE *prefilter_read_fp = NULL; + json_pull *prefilter_jp = NULL; if (prefilter != NULL) { setup_filter(prefilter, &prefilter_write, &prefilter_read, &prefilter_pid, z, tx, ty);