attribute_function: how to go from geojson -> shp -> mbtiles #552
-
Hi Richard, I'm working on a specific mbtiles built from an initial geojson that has a few properties such as
I've checked that my .shp is correctly converted and contains the exact same information as the .geojson, by using an online tool such as mapshaper. I also confirm that the .dbf has the expected column "name", "id" and "bbox" (via https://www.dbfopener.com/) My tilemaker_process file has the following
and my tilemaker_config is:
I can confirm that the mbtiles is successfully generated, but when I query data I only see the "class" properties, and none of my other properties. So I suspect there's something wrong in my declaration of my data, such as The definition states: Limited Lua transformations are available for shapefiles. You can supply an I believe I'm not sure to fully understand this part of this sentence ...as already filtered by |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
See https://github.com/systemed/tilemaker/blob/master/docs/CONFIGURATION.md#shapefiles, in particular:
In other words, the |
Beta Was this translation helpful? Give feedback.
-
Also today it seems that the
If you set
I'd need to dig into the code to understand how it generates an ID (w in the example above) without any OSM object provided as input, and if those ID are unique and if the code is indempotent. If that's the case, then I would not need my .shp ID (z in the example above) as my objective was to re-create a similar mbtiles object whatever the source:
Today with my current method, and include_ids = false, I would have:
hence my query function would need to be different depending on the source |
Beta Was this translation helpful? Give feedback.
See https://github.com/systemed/tilemaker/blob/master/docs/CONFIGURATION.md#shapefiles, in particular:
In other words, the
source_columns
parameter in the JSON controls which attributes from the shapefile are "let through". If you want attribute_function to be able to access all attributes, you need to set"source_columns": true
.