OpenStreetMap

Littlebtc's Diary

Recent diary entries

As the openstreetmap-carto updated, My pull request (#2687) now live on OpenStreetMap. Now the name from railway will be slightly rendered.

A three-level rendering is set (z11 for highspeed, z14 for main lines and z17 for all) to make it impact less to other elements.

After visiting Tokyo in July 2017, I found out that most of the rendering for OpenStreetMap is not that friendly to a railway-centric urban area, so I came with this request trying to fix that.

This is how Tokyo looks like, before and after, in z14:

Before Before

After After

I hope this rendering changes can inspire a better map rendering for railways on all other map styles. :)

Update: Thanks Operations for blazing quick response, new FreeType is on the server and rendering should back to normal after cache invalidated.

:D


After the Noto CJK finally landed in the Standard layer, Boldness issue became a major problem for them.

Imgur

Investigation by ` vholten` proved it was caused by the old FreeType version (2.6.1) in the rendering server, but it seems there is no easy or safe way to fix the issue.

  • Converting to (Cubic) OTF to (Quadratic) TTF will take very long time and the result may not be loseless.
  • Upgrade newer FreeType via third-party PPA, or patch and build old FreeType from apt-get source will work, but dangerous and will become a maintenance hell.

Maybe we should give up on fixing it until we can get newer Linux distro?

Noto CJK is still missing in Standard Layer for now (#2391), to help people understand what is missing, this is how the font should like after the pull request: Imgur

This is what is rendered in Standard layer now, as Unifont rather then Noto CJK is used: Imgur


The reason that the font is missing may be the server configuration. Following discussions in pull requests #2396, #2397 and #2398, in Ubuntu 16.04 the fonts-noto only recommends fonts-noto-cjk and other variants. However, in previous version of Ubuntu, fonts-noto acted as a metapackage to install all Noto Fonts. This confusing changes may be the reason. Some server configuration will disable install-recommends which is true by default, causing Noto CJK not installed in Ubuntu 16.04.

A proper fix may be Chaning the chef recipe to match the new dependency in #2398.

I am sill looking forward to a better font in Asia. :)

PostGIS 2.2 rocks!

Posted by Littlebtc on 11 February 2016 in English.

Recently I had worked on a simple server that will import the bus stop data from the New Taipei City government and generate map tiles to be used in JOSM, as they seemed to change their license to be compatible. The result is now available on GitHub.

Imgur

Historically it was hard to implement a feature in the Transport Map: Group near bus stops with the same name. But after a lot of research, I found it is not hard again: PostGIS 2.2 added friendly spatial clustering functions!

So the problem can be mostly solved by one line SQL command now:

INSERT INTO ntpc_stop_group (convex_hull, name)
    SELECT ST_ConvexHull(unnest(ST_ClusterWithin(ST_Buffer(location, 0.0003), 0.001))),
        name from ntpc_stops GROUP BY name;

Use ST_Buffer to generate circles centered at every stops, use ST_ClusterWithin to place them into groups, finally using unnest and ST_ConvexHull to generate the resulting polygon.

The current result looks great and I think further optimization is still possible. :)

The Open Data movement in Taiwan is growing fast. In July, after half year of discussions between authorities and communities, the data.gov.tw platform released a new, permissive, CC-BY convertible open data license. It is a game changer for the open data community, and now for the OpenStreetMap Taiwan mappers.

In this week, the National Land Surveying and Mapping Center, or the NLSC, announced open data edition of Taiwan e-Map under new open data license. The zoom level of the open data edition is limited to 1/18000 or z15, but it already contains a lot of data that is not available in any other sources.

Great quality of NLSC maps

And most importantly, the accuracy of NLSC maps is superior. Take a look at it with Strava Heatmap. It is accurate not only for the downtown: Downtown Taipei, NLSC + Strava

But also for mountain area where accurate orthophoto is hard to achieve: Taroko, NLSC + Strava

I beilieve it has < 3m accuracy for most highways in Taiwan. For now, it should be available for tracing.

Celebrate by Tracing!

The community is very happy with that, and now we are working hard on tracing things that is not available before. Take Da-Yeh University for example, both Bing and Mapbox are not working, but now we can trace the place with NLSC data:

Da-Yeh University, Changhua

And a lot of village streets in Changhua. (In fact, in Changhua, you can only find the ref in maps!)

Changhua, Cloudy Mapbox + NLSC + OSM

Go out and map more!

I know that OpenStreetMap is all about “local knowledge”, but the openness of more map sources should give us more opportunity to get a better result in less time.

The cloudy imagery in Changhua made the map progress there slower. It is now finally resolved with Strava Heatmap and NLSC Open Data. Now people can add more POIs without wondering why no roads present here.

Now it is time to go out and map more!

Location: Tong'anzhai, Tongren Village, Yongjing Township, Changhua County, 51247, Taiwan