func (i *Importer) WaitStop() {
	i.eg.Wait()
}
WaitStop is wrapper around waitgroup
package osm
import (
	"fmt"
	"log"
	"net/http"
	"os"
	"github.com/julienschmidt/httprouter"
	geo "github.com/kellydunn/golang-geo"
	"github.com/maddevsio/ariadna/config"
	"github.com/maddevsio/ariadna/elastic"
	"github.com/maddevsio/ariadna/osm/handler"
	"github.com/maddevsio/ariadna/osm/parser"
	"github.com/missinglink/gosmparse"
	"github.com/sirupsen/logrus"
	"golang.org/x/sync/errgroup"
)
type (
	Importer struct {
		handler   *handler.Handler
		parser    *parser.Parser
		config    *config.Ariadna
		e         *elastic.Client
		eg        errgroup.Group
		logger    *logrus.Logger
		countries []country
	}
	country struct {
		name  string
		towns []city
		geom  *geo.Polygon
	}
	city struct {
		name      string
		placeType string
		geom      *geo.Polygon
		districts []district
	}
	district struct {
		name string
		geom *geo.Polygon
	}
)
func NewImporter(c *config.Ariadna) (*Importer, error) {
	i := &Importer{config: c, logger: logrus.New()}
	if err := i.download(); err != nil {
		return nil, err
	}
	p, err := parser.NewParser(c.OSMFilename)
	if err != nil {
		return nil, err
	}
	i.parser = p
	e, err := elastic.New(c)
	if err != nil {
		return nil, err
	}
	i.e = e
	i.handler = handler.New()
	i.logger.Info("parser initialized")
	return i, nil
}
func (i *Importer) parse() error {
	return i.parser.Parse(i.handler)
}
func (i *Importer) updateIndices() error {
	return i.e.UpdateIndex()
}
func (i *Importer) Start() error {
	if err := i.parse(); err != nil {
		return err
	}
	if err := i.updateIndices(); err != nil {
		return err
	}
	i.areasToPolygons()
	i.eg.Go(i.crossRoadsToElastic)
	i.eg.Go(i.nodesToElastic)
	i.eg.Go(i.waysToElastic)
	return nil
}