|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OsmReadingHooks
Allows common code to be called during the reading of OSM files in both their XML and binary formats. You should only use this when you need access to other ways or nodes or the IDs of the individual points that go into a way, which are no longer available during conversion. This is the stage before conversion from the node/way/tag format to the general intermediate format. Most operations should be done during that conversion process, which is accessible from the style file language. We also want access to the other ways/nodes to generate sea polygons, cycle lanes and so on.
Method Summary | |
---|---|
void |
end()
Called after the file has been read. |
java.util.Set<java.lang.String> |
getUsedTags()
Retrieves the tags that are used by this hook. |
boolean |
init(ElementSaver saver,
EnhancedProperties props)
Passes in the element saver and the command line options. |
void |
onAddNode(Node node)
Called on adding a node to the saver and just before it is added. |
void |
onAddWay(Way way)
Add the given way. |
void |
onCoordAddedToWay(Way way,
long coordId,
Coord co)
This is called whenever a node is added to a way. |
Method Detail |
---|
boolean init(ElementSaver saver, EnhancedProperties props)
saver
- This is where all the elements are being collected. You can access previously added
elements from here by their id. You can also add generated elements. You must not add the
element that is being passed in as it will be added automatically.props
- The command line options.
java.util.Set<java.lang.String> getUsedTags()
void onAddNode(Node node)
node
- The node to be added.void onAddWay(Way way)
way
- The osm way.void onCoordAddedToWay(Way way, long coordId, Coord co)
way
- The incomplete way.coordId
- The coordinate id of the node that is being added.co
- The coordinate.void end()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |