osm2po transforms tags to a simple and flat representation which in most use cases is sufficient. Three attributes exist for this purpose. The clazz
(byte 1-27) denotes the anchor/main-type. This is mostly set by highway tags. The second one are the flags
(Integer32). Each parsed tag can indicate its existence in one Bit (flag). These bits must be declared in the wtr.flagList
before. e.g.:
wtr.flagList = car, bike, foot, ..., surfaceA, surfaceB
Where car=1, bike=2, foot=4, ..., surfaceA=32(?), surfaceB=64
e.g. bike|surfaceB=66
Once declared, you can define simple rules:
wtr.allow.tracktype.grade[1|2] = bike|surfaceA
wtr.allow.tracktype.grade[3|4] = bike|surfaceB
wtr.allow.tracktype.grade[5] = bike|surfaceA|surfaceB
where allow=SetBitFlag and deny=RemoveBitFlag
Theses flags will be written to the pgRouting-Table respectively.
The third attribute is meta
but it cannot be influenced thru configuration.
So, only if things become more complex, it is necessary to overwrite the API.