
// #ifndef _JFXMAP_SDOSM_PARSER_H_
// #define _JFXMAP_SDOSM_PARSER_H_

// #include <string>

// #include "SdTypes.h"
// #include "tinyxml.h"

// namespace jf {

// const char *const OSM = "osm";
// const char *const BOUNDS = "bounds";
// const char *const NODE = "node";
// const char *const WAY = "way";
// const char *const TAG = "tag";

// const char *const BOUND_MIN_LON = "minlon";
// const char *const BOUND_MIN_LAT = "minlat";
// const char *const BOUND_MAX_LON = "maxlon";
// const char *const BOUND_MAX_LAT = "maxlat";

// const char *const PARAM_ID = "id";
// const char *const PARAM_LON = "lon";
// const char *const PARAM_LAT = "lat";
// const char *const PARAM_USER = "user";
// const char *const PARAM_UID = "uid";
// const char *const PARAM_VISIBLE = "visible";
// const char *const PARAM_VERSION = "version";
// const char *const PARAM_CHANGESET = "changeset";
// const char *const PARAM_TIMESTAMP = "timestamp";
// const char *const PARAM_SPEEDLIMITED_TYPE1 = "speedLimited_type1";
// const char *const PARAM_SPEEDLIMITED_TYPE0 = "speedLimited_type0";
// const char *const PARAM_LEVEL = "level";

// const char *const TAG_KEY = "k";
// const char *const TAG_VALUE = "v";

// const char *const ND = "nd";
// const char *const ND_REF = "ref";

// struct OsmNode {
//     double lon;
//     double lat;
// };

// class SdSsmParser {
//    public:
//     template <typename boundCallbackType, typename nodeCallbackType, typename wayCallbackType, typename relationCallbackType>
//     TiXmlElement *parse(const std::string &in_file_name, nodeCallbackType nc, wayCallbackType wc, boundCallbackType bc, relationCallbackType rc) {
//         std::string file_name = in_file_name.substr(0, in_file_name.size() - 1);
//         TiXmlDocument doc(file_name.c_str());

//         if (!doc.LoadFile()) {
//             std::cout << "ERROR: Could not load XML file: " + file_name << std::endl;
//             return nullptr;
//         }

//         int i = 0;
//         TiXmlElement *pRoot = doc.FirstChildElement(OSM);
//         TiXmlElement *element = pRoot->FirstChildElement();
//         do {
//             const char *v = element->Value();
//             if (strcmp(v, NODE) == 0) {
//                 nc(readXmlNode(element));
//             } else if (strcmp(v, WAY) == 0) {
//                 wc(readXmlWay(element));
//             } else if (strcmp(v, BOUNDS) == 0) {
//                 // bc(readXmlBounds(element));
//             } else {
//                 continue;
//             }
//         } while ((element = element->NextSiblingElement()) != nullptr);

//         return pRoot;
//     }

//    private:
//     SdNode readXmlNode(TiXmlElement *element);

//     typedef std::map<std::string, std::string> tagsMap;
//     tagsMap readXmlTags(TiXmlElement *element);
//     BaseWay readXmlWay(TiXmlElement *element);
//     // osmBound readXmlBounds(TiXmlElement *element);

//     std::map<uint64_t, SdNodeId> nodeIdMap;
// };

// }  // namespace jf
// #endif
