mapbox / osm-bright Goto Github PK
View Code? Open in Web Editor NEWA Carto template for OpenStreetMap data
License: BSD 3-Clause "New" or "Revised" License
A Carto template for OpenStreetMap data
License: BSD 3-Clause "New" or "Revised" License
I've just started using TileMill, so this could easily be a user issue.
I've tried changing the @text_adjust value, but I can't see any difference on the map. in palette.mss:
/* Some fonts are larger or smaller than others. Use this variable to
globally increase or decrease the font sizes. /
/ Note this is only implemented for certain things so far */
@text_adjust: 5;
Also, I was wondering what the value should be - does it correspond to a percentage increase?
Thanks.
no data layer for #campus defined. what would be a good query for showing campuses?
https://github.com/developmentseed/osm-bright/blob/master/osm-bright/base.mss#L157
Hi - I'm following through the guide on http://mapbox.com/tilemill/docs/guides/osm-bright-ubuntu-quickstart/ on Ubuntu 11.10.
Step 0 should include "postgresql-9.1-postgis" as a package that should be installed. Without it, the end of step 1 fails.
I have been attempting to render cities' boundaries (referred as 'administrative boundaries' in osm) in tilemill (using the osm-bright stylesheet) using the default style of osm2pgsql and osm-bright.
osm2pgsql's default stylesheet treats the tag admin-level with the data type 'text' (see https://github.com/openstreetmap/osm2pgsql/blob/master/default.style#L35 )
Currently, osm-bright's base.mss treats the admin-level field as a numerical, 'float' flavor. When a user is importing osm data into osm-bright via osm2pgsql, no administrative boundaries will be displayed.
To fix this, simply change admin[admin_level=2] to admin[admin_level='2'] in base.mss
Pull request was removed because there still may be conflicts with imposm.
The population field doesn't come over via osm2pgsql with the default import style, at least for me.
Mostly only for very high zoom levels, to avoid crowding the map.
lines: walls, fences, hedges...
points: gates, bollards...
Add support for tunnels on roads and railways
Could be very helpful for people who aren't comfortable with the command line and aren't customizing the configuration too much.
When opening osm-bright in Mapbox I'm getting a missing image error showing up in the console:
Marker does not exist: /Users/barnaclebarnes/Documents/MapBox/project/OSMBright/img/swamp-16.png
I'm guessing we need a marker for this somewhere?
a more accurate coastline is mentioned at http://www.kindle-maps.com/blog/better-coastlines-in-tilemill-with-openstreetmap-data.html
Hi, this is more of a support request than an actual issue. If there is a more appropriate forum for this, please direct me there.
We have forked OSM Bright and made significant changes to the style, to adapt it to another data set than OSM (the Swedish land survey's data).
We're trying to understand what we have to do with regards to attribution. The license talks about source and binary form, but it is not entirely clear to me if rendered tiles are to be considered as "binary form".
In summary: what is the appropriate way to follow the license regarding rendered tiles? Should we reference Mapbox, Development Seed or this repository, or is this only required when redistributing the source (CartoCSS)?
On a side note, we want to redistribute the changes we've made, but have some more work to do regarding the required data mangling for the code to be usable to anyone else.
I've pulled the new version and imported a new OSM set with the new imposm mapping and now it is incredibly slow in rendering. I've also updated TileMill (0.9.0) so I'm not sure if it is tilemill being slow, or the new queries of OSM-Bright.
Anyone noticed a performance decrease with the advanced tunnel/intersection rendering?
As TileMill does not yet have the ability to warn users are long background downloads, we should avoid the common pitfall of osm-bright setup and require that the shapefiles are downloaded ahead of time, not during the first view in TileMill.
...
Two things:
I get this error when I try to install a copy of the project with this new configuration to your MapBox projects directory.
Traceback (most recent call last):
File "./make.py", line 116, in
build()
File "./make.py", line 26, in build
copy_tree("osm-bright", "build")
File "/home/katrina/Documents/osm-bright/lib/utils.py", line 21, in copy_tree
raise DistutilsFileError, "cannot copy tree '%s': not a directory" % src
distutils.errors.DistutilsFileError: cannot copy tree 'osm-bright': not a directory
What do I need to fix?
I'm getting a parse error, TileMill says line 167 https://github.com/developmentseed/osm-bright/blob/master/osm-bright/places.mss#L167 on places.mss . Don't know if some syntax changed or something...
Hi guys,
I really love your work! The open source effort of MapBox is amazing :)
I was wondering if you had any plans, or even wanted, to expand osm-bright to support different themes? I've forked osm-bright and changed the sytlesheets to provide a different theme. See: https://github.com/jacobtoye/osm-bright
I'd love to hear your thoughts.
The SQL used to fetch places for the #place
id in osm-bright.osm2pgsql.mml
doesn't include the type of country
. This means that no country names are rendered:
SELECT way, place AS type, name, z_order, population\n FROM planet_osm_point\n WHERE place in ('state', 'city', 'town', 'village', 'hamlet', 'suburb', 'neighbourhood', 'locality')\n ORDER BY population DESC NULLS LAST\n) AS data
Adding country
fixes the issue, and causes country names to be rendered:
SELECT way, place AS type, name, z_order, population\n FROM planet_osm_point\n WHERE place in ('country', 'state', 'city', 'town', 'village', 'hamlet', 'suburb', 'neighbourhood', 'locality')\n ORDER BY population DESC NULLS LAST\n) AS data
Pull request incoming.
Currently is:
Line 14: ... %UserProfile%\MapBox\project ...
which isn't working for me.
Explicitly using something like:
C:\Users[user]\Documents\MapBox\project
seems to do the trick
Would have edited it directly in the file, but my gitwork still needs work...
Win 7, Py2.7, 64 bit
hi i have done every thing as according to instruction give in quick setup......nd now i have got osm bright project in tile mil but it does not contain any map
although it have layers like places,roads etc nd 4 .mss files....
i m making map of islamabad ohm data has taken by link given at guide....
following is preview of tile mill project
to show coffee shops, restaurants, etc.
I am kind of new into this world of mapping, as a newcomer I have followed the path you have set to follow.
imported africa OSM data using osm2pgsql and used it as an importer (osm2pgsql).
Need your help.
I imported a full planet via osm2pgsql.
For example "SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type
FROM planet_osm_polygon
WHERE way_area > 100000
ORDER BY way_area DESC
) AS data" query
and
SELECT ST_AsBinary("way") AS geom,"area","name","type" from ( SELECT COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type,
name, way_area AS area,
ST_PointOnSurface(way) AS way
FROM planet_osm_polygon
WHERE name IS NOT NULL
AND ST_SetSRID(way,900913) && ST_SetSRID('BOX3D(242458.2537205777 5068997.967759746,243681.2461731433 5070220.960212312)'::box3d, 900913)
AND ST_IsValid(way)
UNION ALL
SELECT 'building' AS type, name, way_area AS area,
ST_PointOnSurface(way) AS way
FROM planet_osm_polygon
WHERE name IS NOT NULL
AND building NOT IN ('', 'no', '0', 'false')
AND ST_SetSRID(way,900913) && ST_SetSRID('BOX3D(242458.2537205777 5068997.967759746,243681.2461731433 5070220.960212312)'::box3d, 900913)
AND ST_IsValid(way)
ORDER BY area DESC
) AS data
hangs forever. Does anyone encounter this problem?
When I import only my city rendering also takes reasonable time.
This should be under mapbox/ right?
after osm2pgsql import and build, the project renders in Tilemill. When zooming in to level 10, i get a PSQL error:
Postgis Plugin: PSQL error:
ERROR: column "oneway" does not exist
LINE 1: SELECT ST_AsBinary("way") AS geom,"name","oneway","reflen","...
^
Full sql was: 'SELECT ST_AsBinary("way") AS geom,"name","oneway","reflen","type" from ( SELECT way, highway AS type, name, ref, CHAR_LENGTH(ref) AS reflen
FROM planet_osm_line
WHERE highway IN ('motorway', 'trunk')
AND (name <> '' OR ref <> '')
) AS data WHERE "way" && SetSRID('BOX3D(-8707706.262247277 4598451.621636204,-8590298.986801246 4715858.897082234)'::box3d, 900913)'
Viewing the DB, the column 'oneway' in table 'planet_osm_line' does exist. Could this be a bb issue, or a specific to the osm extract that i tried? I tried the DC extract: http://metro.teczno.com/#dc-baltimore
Postgis Plugin: FATAL: no pg_hba.conf entry for host "30.30.30.1", user "vagrant", database "osm", SSL on
FATAL: no pg_hba.conf entry for host "30.30.30.1", user "vagrant", database "osm", SSL off
host=30.30.30.30 port=5432 dbname=osm user=vagrant password=osm connect_timeout=4 encountered during parsing of layer 'landuse_gen0' in Layer at line 214
Why does TileMill tries to connect to 30.30.30.1 if 30.30.30.30 is configured as host?
configure.py
#...
config["postgis"]["host"] = "30.30.30.30"
config["postgis"]["port"] = "5432"
config["postgis"]["dbname"] = "osm"
config["postgis"]["user"] = "vagrant"
config["postgis"]["password"] = "osm"
#...
Any help appreciated.
Regards
There are a couple ways this could happen:
There seeems to be a bug in the waterways labels, with unicode.
I don't really know if this bug should be reported to you, or to mapnik.
The following label definition implicitly convert from unicode to "something-else", resulting in accented letters being replaced by the infamous interrogation mark:
[type='stream'][zoom=18] {
text-name: "[name].replace('([\S\ ])','$1 ')";
}
This could be fixed on your side by not doubling the spaces, or by performing the work in-db, which doesn't lose the encoding.
This is the solution I implemented (by manually editing the mapnik xml export).
The following code demonstrates how this could be done in your json format:
{
"Datasource": {
"dbname": "osm",
"extent": "-20037508.34 -20037508.34 20037508.34 20037508.34",
"geometry_field": "way",
"id": "waterway_label",
"key_field": "",
"project": "foss4g-2011",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"table": "( SELECT way, waterway AS type, regexp_replace(name, '(\s)', '\1 ', 'g')
\n FROM planet_osm_line\n WHERE waterway IN ('canal', 'river', 'stream') \n AND name IS NOT NULL\n) AS data",
"type": "postgis"
}
Hi,
There are lots of tertiary_links at least in germany in the osm db. With the default imposm template they will not be imported and so these parts are totally missing in the map.
Beside it would be nice to have a separate style for tertiary roads in osm_bright
Using imposm fails with an UnicodeEncodeError when processing relations.
I processed an OSM file from Geofabrik (alps.osm.pbf). At the end it failed with the following error repeated 4 times, and the process hanged.
Last message was: relations: 10k/79k
. TileMill complains about missing relations.
$ imposm -U postgres -d osm -m mapbox-osm-bright-c9bc5ee/imposm-mapping.py --read --write --optimize --deploy-production-tables alps_20130208.osm.pbf
loading mapbox-osm-bright-c9bc5ee/imposm-mapping.py as mapping
password for postgres at localhost:
[11:38:55] ## reading alps_20130208.osm.pbf
[11:38:55] coords: 78954k nodes: 1579k ways: 11279k relations: 78k (estimated)
[11:51:19] coords: 103636k nodes: 365k ways: 12045k relations: 73k
[11:51:21] reading took 12m 25s
[11:51:21] ## dropping/creating tables
[11:51:25] ## writing data
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/imposm/dbimporter.py", line 87, in db_importer
db.insert(mapping, insert_data)
File "/usr/local/lib/python2.7/dist-packages/imposm/db/postgis.py", line 104, in insert
self.cur.executemany(insert_stmt, insert_data)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 9: ordinal not in range(128)
It appears the osm2pgsql template still references quite a few imposm tables osm_*
, while there do appear to be some new definitions that look for the typical osm2pgsql tables planet_osm_*
.
Or maybe I'm looking at things wrong?
Hi,
Roads.mss states that it does bicycle and pedestrian ways, but it doesn't. There are no bicycle or pedestrian paths showing up. They are part of the minorroads table in a standard imposm import. And as far as I can tell they are completly ignored by osm-bright.
Compare http://osm.geodan.nl/tms/1.0.0/imposm_EPSG28992/11/936/1066.png with http://www.openstreetmap.org/?lat=52.31741&lon=4.83668&zoom=16&layers=M
ps. I'm working on adding them if I get anything satisfying I'll send a pull request
steven
I believe the following should say "with imposm" not "with osm2pgsql":
at: http://mapbox.com/tilemill/docs/guides/osm-bright-ubuntu-quickstart/
...
With a PBF file downloaded, you can import it with osm2pgsql. Assuming you downloaded the PBF to your Downloads folder, run the following command in the Terminal:
...
Also believe the following paragraph:
This will take something like 1 to 10 minutes, depending on the size of extract you downloaded. (If you downloaded a particularly large extract it may take much longer.) When its finished it will tell you something like “Osm2pgsql took 71s overall”.
should say something different... not quite sure what, as I'm not sure my output is correct!
after importing and styling a map, you may want to export it from tilemill again to use it in your map server.
If you export your project as "mapnik xml" you get the basics for that - but such a file does not run "out of the box". Images have to be copied, path adjusted, I get font errors for font '' and so on...
what about providing a script, that fixes / copies all things you need for deployment?
until z14 the noauto roads have no case. You changed the color of those roads to one similar to the @land color. So they habe no contrast on land areas and you wont see them. In older versions from osm-bright you had a darker color for those ways so you could see them on land areas.
I checked the logs after trying to create an osm-bright based map and not seeing any vectors from my osm tables. And saw that the srs definition for a few layers (buildings, turning_circle_case and turning_circle_fill) was failing. I changed these to the standard 900913 projection and things worked fine.
Including different types of railways, railway platforms, etc
Hi,
I followed all steps for both ubuntu and windows and can't seem to get the osm-bright project to load in tilemill. I thought initially it was just downloading the necessary data, however both crash with the same error as soon as i load the project in tilemill now. The TileMill Error is:
[tilemill] Error: child process: "tile" failed with code "3"
Thanks in advance for any advice or help. BTW, total newbie to postgis, both importer tools (I've tried). I have used TileMill since the early releases on snow leopard.
Hi,
just had the problem, that the arrows on a oneway street where heading in the wrong direction. Turned out that it is a oneway=-1 street. The Carto code in OSM Bright is
[oneway=-1] { marker-file: url(img/icon/oneway-reverse.svg); }
But the oneway-value is not stored as integer in my osm2pgsql import, so I fixed this using:
[oneway='-1'] { marker-file: url(img/icon/oneway-reverse.svg); }
Thanks for the beautiful start-off-theme!
Tom
Hi!
I've imported OSM data to postgis 2 db with imposm.
When trying to at through any layer attributes in TileMill, I've got an error:
Postgis Plugin: PSQL error:
ERROR: function setsrid(box3d, integer) does not exist
LINE 4: ) AS data WHERE "geometry" && SetSRID('BOX3D(-20037508.34 -2...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Full sql was: 'SELECT ST_AsBinary("geometry") AS geom,"name","population","type","z_order" from ( SELECT geometry, type, name, z_order, population
FROM osm_places
ORDER BY z_order, population DESC NULLS LAST
) AS data WHERE "geometry" && SetSRID('BOX3D(-20037508.34 -20037508.34,20037508.34 20037508.34)'::box3d, 900913)'
I guess SetSRID function has to be changed to ST_SetSRID. SetSRID doesn't exist in default postgis installation.
No idea what kind of issues might pop up
In palette.mss there is a line:
@poi_text: @poi_text;
When I tried to use this in a line:
#linz_address[zoom>=18] {
text-name:"[house_number]";
text-face-name:@sans_lt;
text-size:8;
text-wrap-width:30;
text-fill: @poi_text;
}
If gives me an error Maximum call stack size exceeded
.
I'm guessing that @poi_text
is referencing itself which is causing an infinite loop of sorts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.