Class SimpleOSMBuilder
java.lang.Object
rgu.transport.geospatial.osm.SimpleOSMBuilder
- All Implemented Interfaces:
OSMListener
- Author:
- Lee A. Christie
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BiPredicate<Speed, Map<String, String>> static final BiPredicate<Speed, Map<String, String>> static final BiPredicate<Speed, Map<String, String>> static final BiPredicate<Speed, Map<String, String>> Fields inherited from interface OSMListener
NONE -
Constructor Summary
ConstructorsConstructorDescriptionSimpleOSMBuilder(Speed maxSpeed, BiPredicate<Speed, Map<String, String>> edgeFilter, Predicate<GeoLocation> vertexFilter) SimpleOSMBuilder(Speed maxSpeed, BiPredicate<Speed, Map<String, String>> edgeFilter, Predicate<GeoLocation> vertexFilter, OSMProgressListener progress) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled on loading the map bounds information.build()voidlocation(long id, GeoLocation location, String version, LocalDateTime timestamp, Map<String, String> tags) Called on loading new location (node) information.voidrelation(long id, String version, LocalDateTime timestamp, List<RelationMember> referencedLocations, List<RelationMember> referencedWays, List<RelationMember> referencedRelations, Map<String, String> tags) Called on leading new relation information.voidvoidCalled on loading the OSM version information.vertices()voidCalled on loading new way information.
-
Field Details
-
IS_HIGHWAY
-
HAS_SPEED
-
IS_HIGHWAY_OR_HAS_SPEED
-
IS_HIGHWAY_AND_HAS_SPEED
-
-
Constructor Details
-
SimpleOSMBuilder
public SimpleOSMBuilder(Speed maxSpeed, BiPredicate<Speed, Map<String, String>> edgeFilter, Predicate<GeoLocation> vertexFilter) -
SimpleOSMBuilder
public SimpleOSMBuilder(Speed maxSpeed, BiPredicate<Speed, Map<String, String>> edgeFilter, Predicate<GeoLocation> vertexFilter, OSMProgressListener progress)
-
-
Method Details
-
setCancelEvent
-
build
-
vertices
-
version
Description copied from interface:OSMListenerCalled on loading the OSM version information.- Specified by:
versionin interfaceOSMListener- Parameters:
version- the OSM file version, not nullgenerator- the OSM generator, noy null
-
bounds
Description copied from interface:OSMListenerCalled on loading the map bounds information.- Specified by:
boundsin interfaceOSMListener- Parameters:
minlat- the minimum latitude, not nullminlon- the minimum longitude, not nullmaxlat- the maximum latitude, not nullmaxlon- the maximum longitude, not null
-
location
public void location(long id, GeoLocation location, String version, LocalDateTime timestamp, Map<String, String> tags) Description copied from interface:OSMListenerCalled on loading new location (node) information.- Specified by:
locationin interfaceOSMListener- Parameters:
id- the unique node IDlocation- the node location, not nullversion- the version information, not nulltimestamp- the timestamp for the node, not nulltags- the tags for the node, not null
-
way
public void way(long id, String version, LocalDateTime timestamp, List<Long> points, Map<String, String> tags) Description copied from interface:OSMListenerCalled on loading new way information.- Specified by:
wayin interfaceOSMListener- Parameters:
id- the unique way IDversion- the version information, not nulltimestamp- the timestamp for the way, not nullpoints- the way points, not nulltags- the tags for the way, not null
-
relation
public void relation(long id, String version, LocalDateTime timestamp, List<RelationMember> referencedLocations, List<RelationMember> referencedWays, List<RelationMember> referencedRelations, Map<String, String> tags) Description copied from interface:OSMListenerCalled on leading new relation information.- Specified by:
relationin interfaceOSMListener- Parameters:
id- the unique way IDversion- the version information, not nulltimestamp- the timestamp for the way, not nullreferencedLocations- the referenced locations, not nullreferencedWays- the referenced ways, not nullreferencedRelations- the referenced relations, not nulltags- the tags for the way, not null
-