[Openstreetmap] Re: Problems using the osmeditor

Petter Reinholdtsen pere at hungry.com
Wed May 18 21:20:08 BST 2005


[Nick Whitelegg]
>> Did you solve the projection issue?
>
> Not yet- I can't figure that one out and I've even converted to
> using pure latitude/longitude now with no OSGB stuff.

I see a similar problem when I try to fetch tracks from
openstreetmap.org.  The GPS points outlining a road is not correctly
drawn.  I'm look at the areas close to lat 68.45825 lon 16.695437.
(hard to pick the correct location when it isn't displayed. :/)

>> The 'Grab tracks' menu entry is gone.  I suspect this is intentional?
>
> Since you're keen for it to stay, I can add it back.

Please do.  This patch add support for it, and also get rid of the
label for the GPS points to make it easier to see where the road
actually is located.

Index: MainWindow.cpp
===================================================================
--- MainWindow.cpp      (revision 324)
+++ MainWindow.cpp      (working copy)
@@ -67,7 +67,7 @@
        }

        // Only attempt to draw supplied label if this image type expects one
-       if(labelData)
+       if(false && labelData)
        {
                QFontMetrics fm(labelData->font);
                int labelY = (image.isNull() ? y:y + image.height()/2),
@@ -126,6 +126,7 @@
        fileMenu->insertItem("&Save",this,SLOT(save()),CTRL+Key_S);
        fileMenu->insertItem("Save &as...",this,SLOT(saveAs()),CTRL+Key_A);
        fileMenu->insertItem("&Read GPS",this,SLOT(readGPS()),CTRL+Key_R);
+       fileMenu->insertItem("Gra&b Tracks",this,SLOT(grabTracks()),CTRL+Key_B);
        fileMenu->insertItem("&Grab Landsat",this,SLOT(grabLandsat()),CTRL+Key_G);
        fileMenu->insertItem("&Quit", this, SLOT(quit()), ALT+Key_Q);
        menuBar()->insertItem("&File",fileMenu);

I had to modify the makefile to get the build working.  I changed it
to use xmlrpc-c-config, and fetch Qt from the default Debian location,
and to link/build jeeps without installing it into /usr/local/.  Which
of these changes are acceptable?

Index: Makefile
===================================================================
--- Makefile    (revision 324)
+++ Makefile    (working copy)
@@ -6,23 +6,23 @@
          Permissions.o LoginDialogue.o moc_MainWindow.o grab_landsat.o \
          Polygon.o TrackSeg.o
 LIBS = -ljeeps
-LIBPATH = -L/usr/local/lib
+LIBPATH = -L/usr/local/lib -Ljeeps-0.1.4-nick

 # Configure Qt paths
-QTINCPATH = /usr/lib/qt3/include
+QTINCPATH = /usr/include/qt3
 QTLIB = -lqt-mt
-QTLIBPATH = -L/usr/lib/qt3/lib
-MOC=/usr/lib/qt3/bin/moc
+QTLIBPATH = -L/usr/lib
+MOC=moc

 CURLLIBS = `curl-config --libs`
 CURLCFLAGS = `curl-config --cflags`

 #set OPTS to -DXMLRPC to compile in XMLRPC stuff
-#OPTS       = -DXMLRPC
-WARNFLAGS  = -W -Wall
+OPTS       = -DXMLRPC
+WARNFLAGS  = -W -Wall -ansi
 DEBUGFLAGS = -g
 CXXFLAGS = $(WARNFLAGS) $(DEBUGFLAGS) -I$(QTINCPATH) $(CURLCFLAGS) \
-       -I/usr/local/include $(OPTS)
+       -I/usr/local/include $(OPTS) -Ijeeps-0.1.4-nick

 JEEPSSRC = jeeps-0.1.4-nick

@@ -32,12 +32,13 @@
                        -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile -lwwwdir \
                        -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore -lwwwutils\
                        -lmd5 -ldl -lz -lssl -lcrypto -lxmlrpc_client
+XMLRPCLIBS=`xmlrpc-c-config c++ libwww-client --libs`

 moc_%.cpp : %.h
        ${MOC} $< -o $@

 osmeditor: $(OBJ)
-       cd $(JEEPSSRC); make INSTROOT=/usr/local; make install
+       $(MAKE) -C $(JEEPSSRC) INSTROOT=/usr/local # ; make install
        $(CXX) -o osmeditor $(OBJ) $(LIBPATH) $(QTLIBPATH) $(LIBS) $(QTLIB) $(CURLLIBS) $(XMLRPCLIBS)

 testgps: $(TESTGPSOBJ)

Should we try to focus on one editor, instead of working on one java
one and one C++ one?





More information about the talk mailing list