-
Notifications
You must be signed in to change notification settings - Fork 649
news_june.md
CartoDB core team (and people outside CartoDB!) does a lot of things (sometimes too many at the same time) and most of them don't get enough attention. That's a pitty since some of them are really useful, I collected some of the most important/interesting for you.
Each map in cartodb has an associated named map in Maps API, that's the way cartodb.js renders tiles for a visualization. Maps API had support to blend http layers with data from the user database but we were not using it, we were only creating the named map with user layers (mapnik and torque ones).
With this improvement base layers are being added to the named map so you can have nice previews of your visualizations, for example a preview for this map:
We are working for providing nicer urls for this. You can also check the development ticket if you are curious
As I said before Maps API has the possibility of blending layers so we added support for this in cartodb.js:
cartodb.createLayer(map, {
user_name: 'examples',
type: 'cartodb',
sublayers: [
{
type: "http",
urlTemplate: "http://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}.png",
subdomains: [ "a", "b", "c" ]
},
{
sql: 'select * from country_boundaries',
cartocss: '#layer { polygon-fill: #F00; polygon-opacity: 0.3; line-color: #F00; }'
}
]
}).addTo(map)
urls:
http://{s}.basemaps.cartocdn.com/light_only_labels/{z}/{x}/{y}.png)
http://{s}.basemaps.cartocdn.com/dark_only_labels/{z}/{x}/{y}.png)
This version contains a lot of improvements in CartoDB driver, check the CartoDB GDAL driver and the blog post with some example usages. Some other things are being included in 2.1 to improve CSV loading, will talk about this next time.
Python client for CartoDB was able to fetch data form our SQL API, with this addiction you can also upload files to CartoDB, as easy as:
cl = CartoDBAPIKey(API_KEY, cartodb_domain)
fi = FileImport("test.csv", cl)
fi.run()
Check the full example
Instead of having to login to login in CartoDB and drag a file you can just import using command line. Kudos to Calvin from App Geo
https://www.npmjs.com/package/cartodb-uploader
CartoDB renders tiles using mapnik, and we use extensively the postgis plugin. We are adding some improvements in order to speedup the rendering using the new features we added to PostGIS 2.2. Basically we are improving transfer sizes removing not needed points (with snaptogrid and clip2box) and reducing the payload with TWKB. More about this comming, here is the development branch
We will rollout this improvement little by little to user accounts.
Default postgres FDW does not allow to pass spatial filters between postgres instances, that's a pretty big issue for us since if you are fetching data to render a single tile with the following SQL:
select * from remote_table where the_geom_webmercator && TILE_BBOX
postgres will fetch the whole remote_table
and will run the spatial filter in local. If the
table has 10M records the problem becomes really important.
Paul has been working on a version of that FDW where postgis filters are sent between instances, check the branch on github FDW postgres
We did some tests with mapbox vector tiles rendering from Maps API. We managed to show some polygons with Tangram and mapbox-gl. The development branch is here.
Here is the proof we managed to rendering some spanish administrative regions :_)