Trailing commas in CSVs are now treated as empty fields.

Empty fields are now treated as empty strings rather than nulls
in tippecanoe-json-tool, for consistency with tile-join.
This commit is contained in:
Eric Fischer
2018-05-24 13:54:00 -07:00
parent 32b3a15406
commit 54532795f6
10 changed files with 35 additions and 25 deletions
File diff suppressed because one or more lines are too long
@@ -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\"} } ]}",
"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\": \"Mixed\"} } ]}",
"maxzoom": "12",
"minzoom": "0",
"name": "tests/join-population/tabblock_06001420.mbtiles",
@@ -472,7 +472,7 @@
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "3017", "population": 12, "NAME10": "Block 3017", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 6343, "AWATER10": 0, "INTPTLAT10": "+37.884079", "INTPTLON10": "-122.290980" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.290878, 37.885693 ], [ -122.290878, 37.884609 ], [ -122.292252, 37.884609 ], [ -122.292252, 37.885693 ], [ -122.290878, 37.885693 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "3018", "population": 32, "NAME10": "Block 3018", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 14557, "AWATER10": 0, "INTPTLAT10": "+37.884369", "INTPTLON10": "-122.290441" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.290192, 37.884067 ], [ -122.290192, 37.882983 ], [ -122.291565, 37.882983 ], [ -122.291565, 37.884067 ], [ -122.290192, 37.884067 ] ] ] } }
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "3018", "population": "", "NAME10": "Block 3018", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 14557, "AWATER10": 0, "INTPTLAT10": "+37.884369", "INTPTLON10": "-122.290441" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.290192, 37.884067 ], [ -122.290192, 37.882983 ], [ -122.291565, 37.882983 ], [ -122.291565, 37.884067 ], [ -122.290192, 37.884067 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "1023", "population": 41, "NAME10": "Block 1023", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 15260, "AWATER10": 0, "INTPTLAT10": "+37.884009", "INTPTLON10": "-122.289530" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.288818, 37.885151 ], [ -122.289505, 37.883525 ], [ -122.290192, 37.883525 ], [ -122.290192, 37.885151 ], [ -122.288818, 37.885151 ] ] ] } }
,
@@ -880,7 +880,7 @@
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420500", "BLOCKCE10": "2016", "NAME10": "Block 2016", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 5264, "AWATER10": 0, "INTPTLAT10": "+37.883995", "INTPTLON10": "-122.291315" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.291565, 37.885151 ], [ -122.291222, 37.883254 ], [ -122.291908, 37.884880 ], [ -122.291565, 37.885151 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "3018", "population": 32, "NAME10": "Block 3018", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 14557, "AWATER10": 0, "INTPTLAT10": "+37.884369", "INTPTLON10": "-122.290441" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.290192, 37.885422 ], [ -122.289848, 37.884609 ], [ -122.290535, 37.883254 ], [ -122.291222, 37.885151 ], [ -122.290192, 37.885422 ] ] ] } }
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "3018", "population": "", "NAME10": "Block 3018", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 14557, "AWATER10": 0, "INTPTLAT10": "+37.884369", "INTPTLON10": "-122.290441" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.290192, 37.885422 ], [ -122.289848, 37.884609 ], [ -122.290535, 37.883254 ], [ -122.291222, 37.885151 ], [ -122.290192, 37.885422 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "2016", "NAME10": "Block 2016", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 1094, "AWATER10": 0, "INTPTLAT10": "+37.885399", "INTPTLON10": "-122.289471" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.289162, 37.886235 ], [ -122.289162, 37.885693 ], [ -122.289848, 37.885693 ], [ -122.289848, 37.886235 ], [ -122.289162, 37.886235 ] ] ] } }
,
@@ -1344,7 +1344,7 @@
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420500", "BLOCKCE10": "2016", "NAME10": "Block 2016", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 5264, "AWATER10": 0, "INTPTLAT10": "+37.883995", "INTPTLON10": "-122.291315" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.291565, 37.885015 ], [ -122.290878, 37.883389 ], [ -122.291222, 37.883254 ], [ -122.291393, 37.883254 ], [ -122.291908, 37.884880 ], [ -122.291565, 37.885015 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "3018", "population": 32, "NAME10": "Block 3018", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 14557, "AWATER10": 0, "INTPTLAT10": "+37.884369", "INTPTLON10": "-122.290441" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.290192, 37.885286 ], [ -122.289848, 37.884609 ], [ -122.290363, 37.883119 ], [ -122.290535, 37.883254 ], [ -122.291222, 37.885015 ], [ -122.290192, 37.885286 ] ] ] } }
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "3018", "population": "", "NAME10": "Block 3018", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 14557, "AWATER10": 0, "INTPTLAT10": "+37.884369", "INTPTLON10": "-122.290441" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.290192, 37.885286 ], [ -122.289848, 37.884609 ], [ -122.290363, 37.883119 ], [ -122.290535, 37.883254 ], [ -122.291222, 37.885015 ], [ -122.290192, 37.885286 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "2016", "NAME10": "Block 2016", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 1094, "AWATER10": 0, "INTPTLAT10": "+37.885399", "INTPTLON10": "-122.289471" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.289677, 37.885964 ], [ -122.289333, 37.885964 ], [ -122.289333, 37.885557 ], [ -122.289677, 37.885557 ], [ -122.289677, 37.885964 ] ] ] } }
,
@@ -1856,7 +1856,7 @@
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420500", "BLOCKCE10": "2016", "NAME10": "Block 2016", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 5264, "AWATER10": 0, "INTPTLAT10": "+37.883995", "INTPTLON10": "-122.291315" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.291565, 37.884948 ], [ -122.290878, 37.883322 ], [ -122.291136, 37.883254 ], [ -122.291307, 37.883254 ], [ -122.291822, 37.884880 ], [ -122.291565, 37.884948 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "3018", "population": 32, "NAME10": "Block 3018", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 14557, "AWATER10": 0, "INTPTLAT10": "+37.884369", "INTPTLON10": "-122.290441" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.290192, 37.885219 ], [ -122.289848, 37.884541 ], [ -122.290363, 37.883051 ], [ -122.290449, 37.883254 ], [ -122.291222, 37.885015 ], [ -122.290192, 37.885219 ] ] ] } }
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "3018", "population": "", "NAME10": "Block 3018", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 14557, "AWATER10": 0, "INTPTLAT10": "+37.884369", "INTPTLON10": "-122.290441" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.290192, 37.885219 ], [ -122.289848, 37.884541 ], [ -122.290363, 37.883051 ], [ -122.290449, 37.883254 ], [ -122.291222, 37.885015 ], [ -122.290192, 37.885219 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "2016", "NAME10": "Block 2016", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 1094, "AWATER10": 0, "INTPTLAT10": "+37.885399", "INTPTLON10": "-122.289471" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.289333, 37.885896 ], [ -122.289677, 37.884880 ], [ -122.289762, 37.884948 ], [ -122.289333, 37.885896 ] ] ] } }
,
@@ -2380,7 +2380,7 @@
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420500", "BLOCKCE10": "2016", "NAME10": "Block 2016", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 5264, "AWATER10": 0, "INTPTLAT10": "+37.883995", "INTPTLON10": "-122.291315" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.291522, 37.884914 ], [ -122.290835, 37.883322 ], [ -122.291093, 37.883254 ], [ -122.291265, 37.883254 ], [ -122.291780, 37.884880 ], [ -122.291522, 37.884914 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "3018", "population": 32, "NAME10": "Block 3018", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 14557, "AWATER10": 0, "INTPTLAT10": "+37.884369", "INTPTLON10": "-122.290441" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.290192, 37.885219 ], [ -122.289848, 37.884507 ], [ -122.290320, 37.883051 ], [ -122.290320, 37.883220 ], [ -122.290406, 37.883220 ], [ -122.291179, 37.884981 ], [ -122.290192, 37.885219 ] ] ] } }
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "3018", "population": "", "NAME10": "Block 3018", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 14557, "AWATER10": 0, "INTPTLAT10": "+37.884369", "INTPTLON10": "-122.290441" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.290192, 37.885219 ], [ -122.289848, 37.884507 ], [ -122.290320, 37.883051 ], [ -122.290320, 37.883220 ], [ -122.290406, 37.883220 ], [ -122.291179, 37.884981 ], [ -122.290192, 37.885219 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420600", "BLOCKCE10": "2016", "NAME10": "Block 2016", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 1094, "AWATER10": 0, "INTPTLAT10": "+37.885399", "INTPTLON10": "-122.289471" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.289333, 37.885998 ], [ -122.289290, 37.885862 ], [ -122.289634, 37.884880 ], [ -122.289720, 37.884914 ], [ -122.289333, 37.885998 ] ] ] } }
,
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -160,4 +160,4 @@ GEOID10, population
"060014206003014",66
"060014206003015",15
"060014206003017",12
"060014206003018",32
"060014206003018",
1 GEOID10 population
160 060014206003014 66
161 060014206003015 15
162 060014206003017 12
163 060014206003018 32
@@ -257,4 +257,4 @@
{"type":"Feature","properties":{"STATEFP10":"06","COUNTYFP10":"001","TRACTCE10":"420600","BLOCKCE10":"3015","GEOID10":"060014206003015","NAME10":"Block 3015","MTFCC10":"G5040","UR10":"U","UACE10":"78904","UATYP10":"U","FUNCSTAT10":"S","ALAND10":10776.000000,"AWATER10":0.000000,"INTPTLAT10":"+37.886322","INTPTLON10":"-122.291817","population":15},"geometry":{"type":"Polygon","coordinates":[[[-122.292106,37.887778],[-122.29117,37.884974],[-122.291516,37.884897],[-122.291677,37.885275],[-122.291733,37.885447],[-122.292038,37.886378],[-122.292198,37.886874],[-122.292278,37.887138],[-122.29245,37.887705],[-122.292381,37.887719],[-122.292174,37.887763],[-122.292106,37.887778]]]}}
{"type":"Feature","properties":{"STATEFP10":"06","COUNTYFP10":"001","TRACTCE10":"420600","BLOCKCE10":"3016","GEOID10":"060014206003016","NAME10":"Block 3016","MTFCC10":"G5040","UR10":"U","UACE10":"78904","UATYP10":"U","FUNCSTAT10":"S","ALAND10":253.000000,"AWATER10":0.000000,"INTPTLAT10":"+37.887776","INTPTLON10":"-122.292289"},"geometry":{"type":"Polygon","coordinates":[[[-122.292473,37.887775],[-122.292129,37.887848],[-122.292106,37.887778],[-122.292174,37.887763],[-122.292381,37.887719],[-122.29245,37.887705],[-122.292473,37.887775]]]}}
{"type":"Feature","properties":{"STATEFP10":"06","COUNTYFP10":"001","TRACTCE10":"420600","BLOCKCE10":"3017","GEOID10":"060014206003017","NAME10":"Block 3017","MTFCC10":"G5040","UR10":"U","UACE10":"78904","UATYP10":"U","FUNCSTAT10":"S","ALAND10":6343.000000,"AWATER10":0.000000,"INTPTLAT10":"+37.884079","INTPTLON10":"-122.290980","population":12},"geometry":{"type":"Polygon","coordinates":[[[-122.29117,37.884974],[-122.291107,37.884764],[-122.290933,37.884357],[-122.290817,37.88414],[-122.290383,37.883205],[-122.290831,37.883311],[-122.291152,37.883996],[-122.291358,37.884474],[-122.291516,37.884897],[-122.29117,37.884974]]]}}
{"type":"Feature","properties":{"STATEFP10":"06","COUNTYFP10":"001","TRACTCE10":"420600","BLOCKCE10":"3018","GEOID10":"060014206003018","NAME10":"Block 3018","MTFCC10":"G5040","UR10":"U","UACE10":"78904","UATYP10":"U","FUNCSTAT10":"S","ALAND10":14557.000000,"AWATER10":0.000000,"INTPTLAT10":"+37.884369","INTPTLON10":"-122.290441","population":32},"geometry":{"type":"Polygon","coordinates":[[[-122.290383,37.883205],[-122.290817,37.88414],[-122.290933,37.884357],[-122.291107,37.884764],[-122.29117,37.884974],[-122.290166,37.885213],[-122.290031,37.884888],[-122.289845,37.884492],[-122.290151,37.883572],[-122.290231,37.883308],[-122.29028,37.883025],[-122.290283,37.883037],[-122.290316,37.883189],[-122.290383,37.883205]]]}}
{"type":"Feature","properties":{"STATEFP10":"06","COUNTYFP10":"001","TRACTCE10":"420600","BLOCKCE10":"3018","GEOID10":"060014206003018","NAME10":"Block 3018","MTFCC10":"G5040","UR10":"U","UACE10":"78904","UATYP10":"U","FUNCSTAT10":"S","ALAND10":14557.000000,"AWATER10":0.000000,"INTPTLAT10":"+37.884369","INTPTLON10":"-122.290441","population":""},"geometry":{"type":"Polygon","coordinates":[[[-122.290383,37.883205],[-122.290817,37.88414],[-122.290933,37.884357],[-122.291107,37.884764],[-122.29117,37.884974],[-122.290166,37.885213],[-122.290031,37.884888],[-122.289845,37.884492],[-122.290151,37.883572],[-122.290231,37.883308],[-122.29028,37.883025],[-122.290283,37.883037],[-122.290316,37.883189],[-122.290383,37.883205]]]}}