Git Product home page Git Product logo

cartogrify's People

Contributors

ianthetechie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cartogrify's Issues

Investigate label placement/collision issues

This may be a core Tangram issue, but currently generated styles seem to have huge areas where labels are initially rendered but then disappear, presumably due to Tangram's label placement or collision constraints. Additionally, the precedence/priority does not seem to be quite right. This is probably an implementation error on my part.

Here is the source GL JSON style that exhibits the issue: https://tiles.stadiamaps.com/styles/alidade_smooth_dark.json (you can run a server on localhost to test; see https://docs.stadiamaps.com/ for auth info). Below is an example of such a "hole" at a particular zoom level in Germany.

image

Support more complex text source expressions

Mapbox has a simple format language for specifying a text label in terms of multiple fields (it's very much like a Python f-string). Currently we just ignore this unless the source is just a single field. We shouldn't ;)

Automatically find referenced fonts

Currently, cartogrify does not generate a fonts section. However, with a bit of work, we could probably look up many fonts using the Google Fonts API.

First we need to investigate whether this is possible. If yes, we can implement it with the API key as a command line switch. A bit of parsing to separate font families and names out may also be necessary in the process.

Support exponential stop functions

Mapbox GL supports stops (for width, colors, etc.) that follow both a linear and exponential progression. Tangram does not appear to support this directly, but cartogrify could reasonably fake it by computing the intermediate stop values.

Current status:

Support for icons

MBGL allows for icons with a specific symbol placement etc. from a sprite definition file. Some further investigation is needed on my part, but I believe the following is a general rough outline of what needs to happen:

  • Generate a sprites block from the JSON sprite file referenced in the MBGL JSON style
  • Generate a points drawing layer for any MBGL symbol layers that have sprites
  • Offset the text drawing layer as necessary
  • Support complex icon-image expressions (not used in any Stadia Maps styles; can wait unless someone else wants this... see https://docs.mapbox.com/mapbox-gl-js/style-spec/types/#resolvedimage for specifics)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.