Re: [Libosmscout-development] add feature to address type
Library for OpenStreetMap offline rendering and routing
Status: Beta
Brought to you by:
tteuling
|
From: Tim T. <ti...@fr...> - 2016-09-08 19:57:25
|
Hello Adrian,
> I found my error but when i add the feature the import only finds very
> little nodes at all as if the feature acts as a filter or so.
>
> Normally i get around 350k nodes in Berlin and with {PostalCode} only 185.
That should not be the case. Assigning a feature to a type, results in
the following things:
* In the type definition it is stated that the type has the feature
* A bit is reserved in a bitmask each object instance has. This
bitmask flags, if the feature is set or unset. For features that have
a value and in case the feature flag is set the value is loaded.
* The actual bit for the feature is depended on the type (flags are
simply given in definition order).
* To read a feature or its value you use class templates like
FeatureReader, FeatureValueReader, since they provide fast and safe
access. Feature and FeatureValues use some C++ tricks to make sure
that memory handling is efficient.
If you have such problems you should show (at least parts of your)
code. How do you read the address nodes and get the amount of
instances? Did you make sure that your database created during import
is consistent? Adding features in the map.ost invalidates the existing
database if you only do some steps of the import. The type config
holds information which features a type have. The information there is
authoritative for parsing the rest of the files.
You also should be able to dump objects using DumpData to see which
information and features are available (though DumpData is of course
limited in showing unknown features values, t would only should the
"label" if available).
--
Gruß...
Tim
|