Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stringify complex properties #94

Open
nvkelso opened this issue Aug 15, 2017 · 5 comments
Open

Stringify complex properties #94

nvkelso opened this issue Aug 15, 2017 · 5 comments

Comments

@nvkelso
Copy link
Member

nvkelso commented Aug 15, 2017

We currently drop properties that are lists (or any complex property including nested properties like found in Who's On First features) on conversion from native GeoJSON like format to MVT format.

The convention that is generally followed is to stringify the complex properties.

The following Tilezen properties would be affected:

roads layer lists:

  • all_networks
  • all_shield_texts
  • all_walking_networks
  • all_walking_shield_texts
  • all_bicycle_networks
  • all_bicycle_shield_texts
  • all_bus_networks
  • all_bus_shield_texts

pois layer lists:

Each station has several (optional) lists of routes per transport type:

  • train_routes a list of train routes, generally above-ground and commuter or inter-city “heavy” rail.
  • subway_routes a list of subway or underground routes, generally underground commuter rail.
  • light_rail_routes a list of light rail or rapid-transit passenger train routes.
  • tram_routes a list of tram routes.
@rmarianski
Copy link
Member

Just confirming, stringify here means encode as a json string right?

@nvkelso
Copy link
Member Author

nvkelso commented Aug 15, 2017

I believe so, yes.

Tippecanoe should act as good reference:

@matteblair
Copy link
Collaborator

What's an example of styling with a "complex" property that can't be replaced with simple properties? The properties named here are all lists, so maybe there's a simpler way to represent this data (rather than allowing properties to be arbitrarily complex JSON objects).

@matkoniecz
Copy link

matkoniecz commented Aug 15, 2017

@matteblair I Imagine that map displaying bus routes or hiking routes or displaying separate shields on roads where multiple refs apply would use this kind of data.

I was thinking about displaying hiking routes, each in its associated colour - but I have yet to check is this data currently available (if provided it would be a list).

Note for people confused about colours for hiking routes - in some countries hiking routes have assigned colours and typical hiking map look like this:

Mapsme displays each ref separately (see roads with both European code like e77 and assigned by country). All shield texts are already available as lists.

@nvkelso
Copy link
Member Author

nvkelso commented Aug 16, 2017

That's a handsome map!
I fixed display by wrapping in Markdown syntax of ![](url)

Yes, it's mostly about displaying additional labels.

For most the complex properties there's a basic property to use. In the case of transit we could do something similar, maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants