[Openstreetmap] gpx track upload

Richard Fairhurst richard at systemeD.net
Thu Jul 28 09:18:14 BST 2005


On 28 Jul 2005, at 00:21, Frank Mohr wrote:

> XMLRPC::Lite seems to be a bit too lite
>
> I tried getAllKeys, getPoints and getNodes, but the module didn't
> handle boolean and double as expected.
>
> 49.0, 8.0, 50.0, 9.0 gave me a error
> java.lang.NoSuchMethodException:
> org.openstreetmap.server.osmServerHandler.getPoints(java.lang.String,
> int, int, int, int)'
> while 49.1, 8.1, 50.1, 9.1 worked
> (at least no error but also no usable result)

I had a bunch of similar trouble with XMLRPC::Lite at the weekend, but 
eventually got it working... mostly.


This worked for getNodes:

@method = ('openstreetmap.getNodes',(
XMLRPC::Data->type(string =>$token),
XMLRPC::Data->type(double =>51.5),	# north
XMLRPC::Data->type(double =>0 ),		# west
XMLRPC::Data->type(double =>50),	# south
XMLRPC::Data->type(double =>.5)));	# east
@nodelist = XMLRPC::Lite -> proxy($url) -> call(@method) -> result();


For getLines, I had all sorts of trouble trying to get XMLRPC::Lite to 
recognise an array. Eventually I gave up and fed it some handcoded XML 
as follows:

$xml_content="<value><array><data>";
foreach $node (@recvdnodes) { 
$xml_content.="<value><int>$node</int></value>"; }
$xml_content.="</data></array></value>";

@method = ('openstreetmap.getLines',(
XMLRPC::Data->type(string=>$token),
XMLRPC::Data->type(xml   =>$xml_content)));
@linelist = XMLRPC::Lite -> proxy($url) -> call(@method) -> result();


Looking forward to the RESTful interface which should make life easier. 
:)

cheers
Richard





More information about the talk mailing list