[Talk-cz] automaticka pojmenovavacka ulic

Tomáš Tichý t.tichy na post.cz
Pátek Listopad 21 15:36:47 UTC 2008


Ahoj,
nedaří se mi přeložit nameit - v SVN je nějaká divná verze libosm, na
kterou nejde aplikovat Tvůj patch, ani to s ní nejde přeložit. Nešlo
by někam vystavit verzi libosm, se kterou to funguje ?
=TT=

On Sun, Aug 31, 2008 at 00:51, Pavel Machek <pavel na ucw.cz> wrote:
>
> ...docela funguje, tj "na uz pojmenovanych ulicich se vetsinou
> trefi". Prvni verse je tady.
>
> (Samozrejme ocekava uid-adr adresni body jiz importovane... Coz se da
> pro lokalni pouziti udelat treba tou shellovou priserou, pak download
> zbytku v josm a ulozenim.)
>
> Index: applications/lib/libosm/Way.cpp
> ===================================================================
> --- applications/lib/libosm/Way.cpp     (revision 10302)
> +++ applications/lib/libosm/Way.cpp     (working copy)
> @@ -65,7 +65,7 @@
>        if (hasTags() || segments.size()) {
>                strm << "  <way id='" << id << "'>" << endl;
>                for(int count=0; count<segments.size(); count++)
> -                       strm  << "    <seg id='" << segments[count] << "'/>" << endl;
> +                       strm  << "    <nd id='" << segments[count] << "'/>" << endl;
>                tagsToXML(strm);
>                strm << "  </way>" << endl;
>        } else {
> Index: applications/lib/libosm/Parser.cpp
> ===================================================================
> --- applications/lib/libosm/Parser.cpp  (revision 10302)
> +++ applications/lib/libosm/Parser.cpp  (working copy)
> @@ -45,23 +45,6 @@
>
>
>                }
> -               else if(!strcmp(element,"segment"))
> -               {
> -                       curID=0;
> -                       inSegment = true;
> -                       for(int count=0; attrs[count]; count+=2)
> -                       {
> -                               if(!strcmp(attrs[count],"from"))
> -                                       from = atoi(attrs[count+1]);
> -                               if(!strcmp(attrs[count],"to"))
> -                                       to = atoi(attrs[count+1]);
> -                               if(!strcmp(attrs[count],"id"))
> -                                       curID = atoi(attrs[count+1]);
> -                       }
> -
> -                       curObject = new Segment(curID,from,to);
> -                       components->addSegment ((Segment*)curObject);
> -               }
>                else if (!strcmp(element,"way"))
>                {
>                        curID=0;
> @@ -74,13 +57,13 @@
>                        curObject  =  new Way(curID);
>                        components->addWay((Way*)curObject);
>                }
> -               else if (!strcmp(element,"seg") && (inWay))
> +               else if (!strcmp(element,"nd") && (inWay))
>                {
>                        int segID;
>
>                        for(int count=0; attrs[count]; count+=2)
>                        {
> -                               if(!strcmp(attrs[count],"id"))
> +                               if(!strcmp(attrs[count],"ref"))
>                                {
>                                        segID=atoi(attrs[count+1]);
>                                        ((Way*)curObject)->addSegment(segID);
> Index: applications/lib/libosm/Makefile
> ===================================================================
> --- applications/lib/libosm/Makefile    (revision 10302)
> +++ applications/lib/libosm/Makefile    (working copy)
> @@ -3,6 +3,7 @@
>  OBJ = Object.o Way.o Parser.o Components.o functions.o llgr.o FeaturesParser.o
>  NETOBJ = Client.o
>  TESTOBJ = test.o
> +NAMEITOBJ = nameit.o
>  RULESTESTOBJ = rulestest.o
>  CXX = g++
>
> @@ -15,6 +16,9 @@
>  test: $(TESTOBJ) libosm.a libosmnet.a
>        $(CXX) -o test $(TESTOBJ) libosm.a libosmnet.a $(LDFLAGS)
>
> +nameit: $(NAMEITOBJ) libosm.a libosmnet.a
> +       $(CXX) -o nameit $(NAMEITOBJ) libosm.a libosmnet.a $(LDFLAGS)
> +
>  rulestest: $(RULESTESTOBJ) libosm.a
>        $(CXX) -o rulestest $(RULESTESTOBJ) libosm.a $(LDFLAGS)
>
>
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
>
> _______________________________________________
> Talk-cz mailing list
> Talk-cz na openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk-cz
>
>


Další informace o konferenci talk-cz