Comments (9)
We've started working on setting up map in this repository (definitely still a work in progress). Our version of the installation docs is in tilezen/README.md
Still working on styling and interactivity.
from tileserver.
The background on the queries is that they are now organized by table rather than by layer, and we're in a moment of transition now where things will likely be moving around a bit.
Depending on what you're doing, you might find it easier to use the latest release as of this time and the corresponding versions, which have the queries organized by layer. It would probably be easier to add a new layer using that as a base, but we'll be moving away from that ourselves so longer term you'd fall out of sync.
In terms of using the latest code on master, if you're adding a new table you'd want to add it the sources
configuration in queries.yaml, and then you'd have to update the code in tilequeue.process which is what takes that and converts it back into a per layer structure. The layer list itself isn't dynamically set through configuration, and I expect you would have to edit the code in a couple of places to add in a new layer throughout the system. If you're generating a new layer from the existing tables in use, grep for that table in the queries directory to see where it's used.
Eventually we'd like to get to a position where this is more dynamically configurable, but we'd only get to that once all the movement on the pieces has settled down more. It's also worth mentioning that the configuration and apis aren't stable at this point, and we may be making further changes to them in the near future.
Hope that helps! If you have any questions about where something ends up happening now, I can help point you in that direction.
from tileserver.
Hi @rishabhjain30, we're doing this as well. Starting with our city's streets centerline layer. We'll update this thread with our discoveries in the process.
from tileserver.
The simple answer is the transforms are optional. Try it without the transforms, and then try adding a few back in. I'll comment about a few that might be interesting to you:
vectordatasource.transform.tags_name_i18n
- allows / normalizes for English and French names on the same road feature.vectordatasource.transform.parse_layer_as_float
- this is OSM specific to turn a string value into a float value, you probably don't need it.vectordatasource.transform.road_abbreviate_name
- is more optimized for English name abbreviations (like Street to St.), probably useful for you.vectordatasource.transform.route_name
- OSM specific, but generally deals with things like the signed maple leaf route versus province highways.vectordatasource.transform.remove_feature_id
- you probably want to remove. It's helpful to us for simplifying (merging) roads at low- and mid-zooms to reduce file size.vectordatasource.transform.truncate_min_zoom_to_2dp
- probably don't need this.
@rmarianski has been reorganizing the repo a bit. I suspect the roads.jinja file you want to reference is this now:
Did you see it referenced in code or in the documentation?
We generally create tags for things that didn't necessarily start off with tags as they're easier way to pass properties around.
from tileserver.
I have custom layers stored in postgres with geometry. How can I use tileserver to serve mvt from these layers?
We don't have docs for this, but you can get started by looking at queries.yaml. If you pick one of the layers that's already there and look through how it's configured and set up, you should be able to do the same to add in your own layer. You'll need to add a jinja2 template file too that will become the sql that gets used.
Also, Is addition of more layers dynamically supported?
If you mean by being able to add to an already running tileserver, then no. But if you go through the configuration steps and restart then yes.
If you're looking for something more out of the box, have a look at tilestache.
from tileserver.
We also recommend checking out the new PostGIS functionality to export MVT vector tiles directly without (also) making the extra Postgres > Tileserver hop. (Still may make sense for you to use Tilezen stack, but just FYI):
from tileserver.
Woah. Very cool feature from PostGIS.
So we're trying to modify the configs to work with our streets layer based on the ne-roads
layer. I'm a little puzzled about some of the contents of vector-datasource/queries.yaml
. Specifically the following section (commented out lines were me):
layers:
roads:
template: roads.jinja2
geometry_types: [LineString, MultiLineString]
simplify_start: 8
transform:
- vectordatasource.transform.tags_create_dict
# - vectordatasource.transform.tags_name_i18n
# - vectordatasource.transform.add_id_to_properties
# - vectordatasource.transform.detect_osm_relation
- vectordatasource.transform.parse_layer_as_float
# - vectordatasource.transform.road_classifier
# - vectordatasource.transform.road_oneway
- vectordatasource.transform.road_abbreviate_name
- vectordatasource.transform.route_name
# - vectordatasource.transform.normalize_aerialways
# - vectordatasource.transform.normalize_cycleway
# - vectordatasource.transform.add_is_bicycle_related
# - vectordatasource.transform.merge_networks_from_tags
# - vectordatasource.transform.extract_network_information
# - vectordatasource.transform.choose_most_important_network
- vectordatasource.transform.road_trim_properties
- vectordatasource.transform.remove_feature_id
# - vectordatasource.transform.tags_remove
- vectordatasource.transform.truncate_min_zoom_to_2dp
sort: vectordatasource.sort.roads
area-inclusion-threshold: 1
First of all I couldn't find a roads.jinja2
file in that repository. There's a yaml/roads.yaml
file, there's the ne-roads.jinja2
which I modified to fit the our streets layer's schema, but no file I could find with that name.
Second, I found that the lines like:
transform:
- vectordatasource.transform.tags_create_dict
- etc...
Correspond to python functions under vectordatasource/transform.py
and a number seem to be osm property specific. Is there an obvious way to know which should be applied to my data?
Thanks!
from tileserver.
Thanks @rmarianski, I'll come back to this thread when I start tweaking things.
from tileserver.
Closing for inactivity.
from tileserver.
Related Issues (20)
- ImportError: No module named tileserver.cache HOT 2
- ImportError: No module named meta.python HOT 11
- psycopg2.ProgrammingError HOT 15
- Performance question HOT 3
- Tileserver is not accepting remote connections HOT 1
- Error with python setup.py develop, install directory is hard-coded (or sudo is required) HOT 3
- ImportError: cannot import name DataFetcher in v2.1.0, wrong tilequeue version in requirements HOT 10
- Cat readme into setup.py long description HOT 4
- pip intall error HOT 2
- pip install fails HOT 2
- Provide binary via pip. HOT 2
- AssertionError: Missing min_zoom in layer water
- Not seeing any output through tileserver appears to be running. Any advice? HOT 2
- My Server seems very slow in serving tiles,pls explain how to add tilequeue for buffering HOT 6
- CORS problem due to missing min_zoom in layer water HOT 3
- Question about scaling HOT 11
- syntax error HOT 1
- Writing to cache/store after generation HOT 4
- Redis caching problem on last config file HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tileserver.