Git Product home page Git Product logo

mongosm's People

Contributors

iandees avatar serv-inc avatar sh1ng avatar vanuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongosm's Issues

Changeset elements don't have timestamp

The import script reads in <changeset> elements and attempts to read the default stuff (including timestamp).

We should probably just remove the changeset parsing because we're not doing anything with it right now.

Does map server create indexes?

I have this error when trying to access api/0.6/map?bbox=...:

OperationFailure: database error: can't find special index: 2d for: 

error importing osm

./insert_osm_data.py  australia-oceania-latest.osm 
./insert_osm_data.py: riga 7: errore di sintassi vicino al token non atteso "newline"
./insert_osm_data.py: riga 7: `<!DOCTYPE html>'

usage question

should I use map_server or tile_server?
also should I use insert_osm_data or insert_tiled_osm_data?

Error while Importing

I'm hitting the following error when I tried to import the osm-pbf file into MongoDB!

MacBook-Pro:mongosm jothi$ python insert_osm_data.py /Users/joe/Desktop/nordrhein-westfalen-latest.osm.pbf
Traceback (most recent call last):
File "insert_osm_data.py", line 11, in
from pymongo import Connection
ImportError: cannot import name Connection

can't seem to get all the way through planet.osm

I keep hitting this: ( and not sure if it's an issue at all )

sudo python insert_osm_data.py ../planet-latest.osm
348974k nodes, 0k ways, 0 relationsTraceback (most recent call last):
File "insert_osm_data.py", line 190, in
handler.parse(open(filename))
File "insert_osm_data.py", line 72, in parse
for (event, elem) in iterparse(file_obj, events=('start', 'end')):
File "", line 103, in next
IndexError: pop from empty stack

query and utf-8 encoding issues

Hi,

I had trouble getting some results through my queries so I modified the code a little.

At first I had some issues with the generated query which generated the following query:
Built query: {u'tags.highway': {'$exists': True}}

After I modified map_server.py:307 into this:

groups = re.findall(r'(?:\[(.*?)\])', xapiQuery.encode("utf-8"))

The map_server.py seems to generate now the correct strings without the prefix 'u'.

Also, in my generated Mongo DB the 'tags' in each element are called 'tg' and the wildcard query did not look very correct to me, so I modified map_server:326-329 into this:

elif right == u'*':
  q['ky'] = { '$in': [left] }
else:
  q['tg'] = [left, right]

I tested the new queries with the modified map_server.py and MongoHub.
Could someone confirm or deny my changes? Thanks in advance.

Best regards

PS I'm not a python programmer, so my changes might be not very stylish

Wrong node order result in self-intersection way

Russian dump

way
"_id" : NumberLong(46151894),
"loc" : [
[
51.5588722,
46.0375795
],
[
51.558026,
46.0372197
],
[
51.5586159,
46.0391391
],
[
51.5577697,
46.0387793
]
],
"ch" : NumberLong(11623411),
"nd" : [
NumberLong(588413447),
NumberLong(588413451),
NumberLong(588413452),
NumberLong(588413448),
NumberLong(588413447)
],
"ts" : "2012-05-17T13:22:36Z",
"un" : "Eugene",
"ui" : NumberLong(26260),
"v" : 6,
"tg" : [
[
"addr:housenumber",
"14"
],
[
"addr:street",
"улица Аэропорт"
],
[
"building",
"yes"
],
[
"name",
"METRO"
],
[
"shop",
"supermarket"
]
],
"ky" : [
"addr:housenumber",
"addr:street",
"building",
"name",
"shop"
]

node
{ "_id" : NumberLong(588413451), "loc" : [ 51.5586159, 46.0391391 ], "ch" : NumberLong(11623411), "ts" : "2012-05-17T13:22:41Z", "un" : "Eugene", "ui" : NumberLong(26260), "v" : 4 }
is second in nd, but third in loc.

Local variable 'record' referenced before assignment

I am trying to run this, but continually get this error message. I have tried with two different compilers (python 2.7 and pypy) - I have also checked the md5 of my planet.osm

untitled

I get this error after it connects to my mongodb database, but less than 5 minutes into running the script

There is no key 'nodes'

File "/medialibrary/Stuff/projects/custom_map/mongosm/map_server.py", line 49, in getNodesFromWays
for nodeId in way['nodes']:
KeyError: 'nodes'

Is map_server up-to-date?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.