|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.mkgmap.reader.osm.OsmReadingHooksAdaptor
uk.me.parabola.mkgmap.reader.osm.SeaGenerator
public class SeaGenerator
Code to generate sea polygons from the coastline ways. Currently there are a number of different options. Should pick one that works well and make it the default.
Constructor Summary | |
---|---|
SeaGenerator()
|
Method Summary | |
---|---|
void |
end()
All done, process the saved shoreline information and construct the polygons. |
java.util.Set<java.lang.String> |
getUsedTags()
Retrieves the tags that are used by this hook. |
boolean |
init(ElementSaver saver,
EnhancedProperties props)
Sort out options from the command line. |
static java.util.ArrayList<Way> |
joinWays(java.util.Collection<Way> segments)
Joins the given segments to closed ways as good as possible. |
void |
onAddWay(Way way)
Test to see if the way is part of the shoreline and if it is we save it. |
Methods inherited from class uk.me.parabola.mkgmap.reader.osm.OsmReadingHooksAdaptor |
---|
onAddNode, onCoordAddedToWay |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SeaGenerator()
Method Detail |
---|
public boolean init(ElementSaver saver, EnhancedProperties props)
init
in interface OsmReadingHooks
init
in class OsmReadingHooksAdaptor
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.
public java.util.Set<java.lang.String> getUsedTags()
OsmReadingHooks
getUsedTags
in interface OsmReadingHooks
getUsedTags
in class OsmReadingHooksAdaptor
public void onAddWay(Way way)
onAddWay
in interface OsmReadingHooks
onAddWay
in class OsmReadingHooksAdaptor
way
- The way to test.public static java.util.ArrayList<Way> joinWays(java.util.Collection<Way> segments)
segments
- a list of closed and unclosed ways
public void end()
end
in interface OsmReadingHooks
end
in class OsmReadingHooksAdaptor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |