My goal is to create a JSON file that matches the following template. I've been struggling getting the coordinates in the linestring geometry property properly formatted. Note the addition of the "tippecanoe" property.
{
"type" : "Feature",
"tippecanoe" : { "maxzoom" : 9, "minzoom" : 4 },
"properties" : { "FULLNAME" : "N Vasco Rd" },
"geometry" : {
"type" : "LineString",
"coordinates" : [ [ -121.733350, 37.767671 ], [ -121.733600, 37.767483 ], [ -121.733131, 37.766952 ] ]
}
}
Things I tried:
- Basic geojson writer - Writes the maxoom/minzoom property under "properties" instead of "tippecanoe".
- JSONTemplater -
concat('[[',geom:get-points('xy', ', ', '],['),']]')
This method works, but feels hackish; it adds quotation marks (") which I remove later.
geom:get-text-data(geom:get-name())
The second method returns null values. I give the geometry a name with the GeometryPropertySetter, but still returns a null value. If someone can post a working example, I can go from there. The documentation is little light. Thank you!