• Search:



Planet eZ publish




ez publish community gateway

› eZ Platform and Sylius integration open sourced (+a chance to showcase it on SymfonyLive London)

A month ago we announced opensourcing our Sylius integration with eZ. Today the project is shortlisted for a community stand at the SymfonyLive London. If you would like to support us please place your vote at twtsurvey.com/bbkwh3l82sb55rt.

29/07/2015 1:17 pm (UTC)   http://share.ez.no   View entry   Digg!  digg it!   del.icio.us  del.icio.us

derick rethans

› Adressing Flats

Adressing Flats

I recently moved into a new area in London, and that means, a new area to map. That means drawing in all the buildings, but also adding shops and addresses. Unlike my old area, the new neighbourhood has lots of buildings with flats. In OpenStreetMap, you can tag addresses on flats with the addr:flats tag. In most cases, the addresses of the flats are formed by a flat number, building name (addr:housename) and street name (addr:street). Only occasionally the address consists of flat number, house number, and street name.

When I started tagging a nearby collection of flat blocks, and the flat number/house name/street name on their entrance nodes, I noticed that it rendered as:

As you can see, it ignored the addr:flats tag, and instead just rendered the addr:housename tag over and over again. Not particularly useful.

So I thought, why not "fix" the rendering. In the past, I already added a basic rendering for natural=tree_row to the "default" rendering style. So I had another look on how to make addr:flats render and show up instead of the house name 20 times.

OpenStreetMap's style sheet is developed through the Git repository at git@github.com:gravitystorm/openstreetmap-carto.git. I cloned the repository and searched after the places where I needed to make modifications to add the flat numbers. The style sheets first require a "style" file to tell which data to import from the main database (or .xml file). Only fields that are copied into the rendering database are available for use in the style sheets. OpenStreetMap Carto stores these definitions in the project.mml file. But that's a nasty JSON file, so instead, you add the definition into the project.yaml file. There is a script to convert the YAML file into the project.mml file which the carto tool can use to generate a Mapnik stylesheet. Mapnik is then responsible for rendering the map.

In project.yaml, just above the - id: "housenumbers" line, I added the following section:

- id: "flatnumbers"
  name: "flatnumbers"
  class: ""
  geometry: "point"
  <<: *extents
  Datasource:
    <<: *osm2pgsql
    table: |-
      (SELECT
          way,
          "addr:flats",
          way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
        FROM planet_osm_polygon
        WHERE "addr:flats" IS NOT NULL
          AND building IS NOT NULL
      UNION ALL
      SELECT
          way,
          "addr:flats",
          NULL AS way_pixels
        FROM planet_osm_point
        WHERE "addr:flats" IS NOT NULL
        ORDER BY way_pixels DESC NULLS LAST
      ) AS flatnumbers
  properties:
    minzoom: 17
  advanced: {}

It basically instructs the stylesheet to run an extra query to obtain information on addr:flats and make that information available to the actual styles.

It requires an extra column in the database (addr:flats), the import "style" needs to include this data while importing from the data source into the rendering database. The file containing the import definitions is openstreetmap-carto.style. I added the following line in between the definitions for access and addr:housenumber:

node,way   addr:flats   text         linear

Adding an extra column into the "style" means that it is necessary to reimport the data from the main database (or XML file) into the rendering database. My original source is the openstreetmap.osm file, which I re-imported with:

/home/derick/install/osm2pgsql/osm2pgsql \
        -S openstreetmap-carto.style --slim -d gis -C 2400 openstreetmap.osm

To render the flat numbers, and attach a style to them, I had to add a section to the addressing.mss file which is a sub-stylesheet that deals with address information. This stylesheet is linked from the project file. I added the following lines in between the #interpolation and #housenumbers sections:

#flatnumbers {
  [zoom >= 17] {
        text-name: "[addr:flats]";
        text-placement: interior;
        text-min-distance: 1;
        text-wrap-width: 0;
        text-face-name: @book-fonts;
        text-fill: #666;
        text-size: 8;
  }
}

I picked the same style as for standard house numbers, but one size smaller.

With all the sections added to the right files I had to regenerate the project.mml file from project.yaml with:

./scripts/yaml2mml.py < project.yaml > project.mml

And generate a Mapnik stylesheet from the project.mml file with:

carto project.mml > mapnik.osm

With all that in place, I re-rendered the area. The flat numbers are now visible on the map:

I have packaged up all the changes, and prepared a pull request for openstreetmap-carto. With some luck, the changes will make it to the OpenStreetMap website at some point in the future.

21/07/2015 10:11 am (UTC)   Derick Rethans   View entry   Digg!  digg it!   del.icio.us  del.icio.us

netgen

› TagsBundle and eZ Tags with multilanguage tags released

Today is a special day for Netgen. After couple of years of development and constant testing, we finally tagged and released multilanguage variant of eZ Tags (which includes TagsBundle as well as legacy extension).

17/07/2015 2:19 pm (UTC)   http://www.netgenlabs.com/Blog   View entry   Digg!  digg it!   del.icio.us  del.icio.us

netgen

› eZ Community on Slack

Exactly a month ago I created eZ Community on Slack. For those of you who do not know what is Slack, let’s say it is a modern version of IRC. It got really popular as internal tool for companies (we at Netgen started using it a while ago). I’ve also noticed that people started to use it for community communication too, so it didn't take me long to create one instance for eZ community.

15/07/2015 1:28 pm (UTC)   http://www.netgenlabs.com/Blog   View entry   Digg!  digg it!   del.icio.us  del.icio.us

ez publish community gateway

› eZ Platform 15.05 is available!

Summer is coming! And the lastest Alpha release of eZ Platform as well!

07/07/2015 3:53 pm (UTC)   http://share.ez.no   View entry   Digg!  digg it!   del.icio.us  del.icio.us

netgen

› June @ Netgen

June was another productive and interesting month for us. We have many news and you can read them all here :)

07/07/2015 11:35 am (UTC)   http://www.netgenlabs.com/Blog   View entry   Digg!  digg it!   del.icio.us  del.icio.us

ez publish community gateway

› Phục vụ hút bể phốt, thông tắc bồn cầu giá tốt nhất

Hút bể phốt, thông tắc bồn cầu của công ty kỹ thuật công nghệ môi trường Hà Nội luôn dùng các phương tiện máy móc hiện đại nhất, loại bỏ những lãng phí không cần thiết mà other services không làm được.

29/06/2015 11:02 am (UTC)   http://share.ez.no   View entry   Digg!  digg it!   del.icio.us  del.icio.us

ez publish community gateway

› Mugo Image Server for eZ Publish: a scalable, flexible solution

In order to increase the image serving performance of high-traffic websites and improve the editorial user interface around image management, Mugo Web came up with an alternative way to serve content images in eZ Publish.  It is aptly titled the "Mugo Image Server for eZ Publish".

19/06/2015 10:42 am (UTC)   http://share.ez.no   View entry   Digg!  digg it!   del.icio.us  del.icio.us

mugo web

› Mugo Image Server for eZ Publish: a scalable, flexible solution

In order to increase the image serving performance of high-traffic websites and improve the editorial user interface around image management, Mugo Web came up with an alternative way to serve content images in eZ Publish.  It is aptly titled the "Mugo Image Server for eZ Publish".

18/06/2015 2:51 pm (UTC)   Mugo Web   View entry   Digg!  digg it!   del.icio.us  del.icio.us

netgen

› Kerning, the Trip to Italy

Want to mingle and have great discussion with famous typeface designers? Want to learn about web design, front-end development and web typography? If that is a case, Kerning Conference is a great conference for you to attend.

18/06/2015 12:55 pm (UTC)   http://www.netgenlabs.com/Blog   View entry   Digg!  digg it!   del.icio.us  del.icio.us