MapfileHelper class
A helper class that contains the core logic for parsing the binary data of ways and points of interest (POIs) from a map file data block.
This class is responsible for decoding the variable byte-encoded integers, reading tag IDs, handling delta-encoded coordinates, and reconstructing the geographical data.
Constructors
- MapfileHelper(MapfileInfo _mapFileHeader, String? preferredLanguage)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- preferredLanguage → String?
-
the preferred language when extracting labels from this data store. The actual
implementation is up to the concrete implementation, which can also simply ignore
this setting.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
processPOIs(
double tileLatitude, double tileLongitude, int numberOfPois, BoundingBox boundingBox, bool filterRequired, Readbuffer readBuffer, MapDatastore mapDataStore) → List< PointOfInterest> -
Processes all points of interest (POIs) from a data block in the given
readBuffer. -
processWays(
QueryParameters queryParameters, int numberOfWays, BoundingBox boundingBox, bool filterRequired, double tileLatitude, double tileLongitude, MapfileSelector selector, Readbuffer readBuffer, MapDatastore mapDataStore) → List< Way> -
Processes all ways from a data block in the given
readBuffer. -
read1Poi(
Readbuffer readBuffer, double tileLatitude, double tileLongitude, MapDatastore mapDataStore, List< Tag> poiTags) → PointOfInterest -
Reads a single Point of Interest (POI) from the given
readBuffer. -
read1Way(
Readbuffer readBuffer, QueryParameters queryParameters, double tileLatitude, double tileLongitude, MapDatastore mapDataStore, List< Tag> wayTags, bool filterRequired, BoundingBox wayFilterBbox, MapfileSelector selector) → List<Way> -
Reads a single way from the given
readBufferand returns it as a list containing one or moreWayobjects. -
toString(
) → String -
A string representation of this object.
inherited
-
wayAsLabelTagFilter(
List< Tag> tags) → bool - Returns true if a way should be included in the result set for readLabels() By default only ways with names, house numbers or a ref are included in the result set of readLabels(). This is to reduce the set of ways as much as possible to save memory. @param tags the tags associated with the way @return true if the way should be included in the result set
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- MAXIMUM_BUFFER_SIZE → int
-
Maximum buffer size for map files.
final
- POI_FEATURE_ELEVATION → int
-
Bitmask for the optional POI feature "elevation".
final
- POI_FEATURE_HOUSE_NUMBER → int
-
Bitmask for the optional POI feature "house number".
final
- POI_FEATURE_NAME → int
-
Bitmask for the optional POI feature "name".
final
- POI_LAYER_BITMASK → int
-
Bitmask for the POI layer.
final
- POI_LAYER_SHIFT → int
-
Bit shift for calculating the POI layer.
final
- POI_NUMBER_OF_TAGS_BITMASK → int
-
Bitmask for the number of POI tags.
final
- SIGNATURE_LENGTH_POI → int
-
Length of the debug signature at the beginning of each POI.
final
- SIGNATURE_LENGTH_WAY → int
-
Length of the debug signature at the beginning of each way.
final
- TAG_KEY_ELE → String
-
The key of the elevation OpenStreetMap tag.
final
- TAG_KEY_HOUSE_NUMBER → String
-
The key of the house number OpenStreetMap tag.
final
- TAG_KEY_NAME → String
-
The key of the name OpenStreetMap tag.
final
- TAG_KEY_REF → String
-
The key of the reference OpenStreetMap tag.
final
- WAY_FEATURE_DATA_BLOCKS_BYTE → int
-
Bitmask for the optional way data blocks byte.
final
- WAY_FEATURE_DOUBLE_DELTA_ENCODING → int
-
Bitmask for the optional way double delta encoding.
final
- WAY_FEATURE_HOUSE_NUMBER → int
-
Bitmask for the optional way feature "house number".
final
- WAY_FEATURE_LABEL_POSITION → int
-
Bitmask for the optional way feature "label position".
final
- WAY_FEATURE_NAME → int
-
Bitmask for the optional way feature "name".
final
- WAY_FEATURE_REF → int
-
Bitmask for the optional way feature "reference".
final
- WAY_LAYER_BITMASK → int
-
Bitmask for the way layer.
final
- WAY_LAYER_SHIFT → int
-
Bit shift for calculating the way layer.
final
- WAY_NUMBER_OF_TAGS_BITMASK → int
-
Bitmask for the number of way tags.
final
- wayFilterDistance ↔ int
-
getter/setter pair
- wayFilterEnabled ↔ bool
-
Way filtering reduces the number of ways returned to only those that are
relevant for the tile requested, leading to performance gains, but can
cause line clipping artifacts (particularly at higher zoom levels). The
risk of clipping can be reduced by either turning way filtering off or by
increasing the wayFilterDistance which governs how large an area surrounding
the requested tile will be returned.
For most use cases the standard settings should be sufficient.
getter/setter pair