Re: I solved my problem.

10 views
Skip to first unread message

Jeffrey Warren

unread,
Feb 21, 2012, 5:33:25 PM2/21/12
to Michael Overmeyer, cartag...@googlegroups.com
Glad you figured it out, Michael. If you have a chance to change the older wiki page you found to redirect to this page others can hopefully figure it out faster as well:

https://github.com/jywarren/cartagen/issues/103

my hope is that someone will solve this one way or another since it's the most common question for Cartagen users.

I'm tempted to write a quick standalone web service to translate osm-xml to osm-json. But don't have much time these days.

Another solution may be that direct parsing of XML with javascript seems to have made much progress since Cartagen was written:

http://stackoverflow.com/questions/649614/xml-parsing-in-javascript

Best,
Jeff

On Sun, Feb 19, 2012 at 2:27 PM, Michael Overmeyer <m.ove...@yahoo.ca> wrote:
For some reason, I had assumed that you had modified the tag names coming from OpenStreetMaps. (I guess I was wondering why you didn't just use OSM XML)

I have converted the files using a simple xml-to-json converter and it works like a charm.

Thanks,

Michael Overmeyer

-------- Original Message --------
Subject: Is Cartagen still a viable option?
Date: Sat, 18 Feb 2012 23:13:53 -0500
From: Michael Overmeyer <m.ove...@yahoo.ca>
To: je...@unterbahn.com


Hello,

I was looking into using Cartagen to create a digital map of my 
university campus. It seems to be exactly what I was looking for, 
however I have been so far unable to figure out how to convert OSM data 
to the JSON format that Cartagen uses. (If I wanted to use custom map data)

Reading http://wiki.cartagen.org/wiki/show/ImportingData, it says to set 
up a copy of Cartagen Server, in order to be able to make a call to 
/extract/osm_to_json/map-osm.js

Where can I find the server code? The links provided either don't work 
or appear to be only for the Client.

The other option mentioned is to modify the OpenStreetMap Ruby Port 
(http://unterbahn.com/2009/07/serving-osm-json-alongside-xml-from-the-openstreetmap-rails-port/). 
However when I install the server, the codebase seems to have changed 
significantly enough that I cannot tell where in the files I should be 
modifying the code. (It's probably been overhauled since the v0.6 API 
change)

I have also tried http://cartagen.org/extract/osm_to_json/map-osm.js? 
and supplying it my OSM XML data, but it never seems to return anything 
but an error.

I have also tried downloading the pre-converted geohash files from you 
server in a similar way to the Rio example, but I have found that some 
of the files I request from the server are missing. This makes sense as 
you probably didn't convert the entire world.

Are there any other ways to convert OSM data to the JSON that Cartegan 
requires?

I realise that you seem to have moved onto other projects, and I can 
respect that. Is Cartagen a viable option for mapping anymore, or should 
I look for a different tool?

Thanks for you time,

Michael Overmeyer



Reply all
Reply to author
Forward
0 new messages