Comments (8)
Okay, let me know what you find out; Onramp exercises more code paths than my own production system so I'm keen to get to the bottom of any missing data, etc.
from osmexpress.
Hi,
- There are two tables, one called
nodes
and one calledlocations
. Lat,Long,and Version are stored inlocations
, and there will only be a corresponding entry innodes
for the ID if there are tags. So if a node has no tags, it will only appear inlocations
. This may not be relevant in this situation. - Can you provide the node ID? If your database is replicating the public stream, it would be helpful for me to try to reproduce this. Maybe it's just a matter of the python code missing logic to add that information to the diff.
from osmexpress.
@jpolchlo looking over this a bit more, it may just be as simple as https://github.com/azavea/onramp/blob/master/app/onramp/diff.py#L101-L102 checking if o
exists first, e.g.:
o = nodes.get(elem_id)
if o:
it = iter(o.tags)
for t in it:
tag = ET.SubElement(elem, "tag")
tag.set("k", t)
tag.set("v", next(it))
The majority of nodes (~70%) have no tags, so nd
will be none. in the context of onramp, the empty tag field should be correct behavior. but it would need to be modified as above to include tags for nodes that are tagged.
from osmexpress.
Sadly, this is a private deployment, and I cannot share the contents, but I'll give you a redacted form of the diff:
{
"type":"FeatureCollection",
"id":"delete",
"features":[
{
"type":"Feature",
"id":"old",
"properties":{
"changeset":"2345678",
"id":"1234567890",
"tags":{
"building":"greenhouse",
"condition":"intact",
...
},
"timestamp":"...",
"type":"node",
"uid":"###",
"user":"...",
"version":"1",
"visible":true
},
"geometry":{
"type":"Point",
"coordinates":[
...
]
}
},
{
"type":"Feature",
"id":"new",
"properties":{
"changeset":"3456789",
"id":"1234567890",
"tags":{
"building":"greenhouse",
"condition":"intact",
...
},
"timestamp":"...",
"type":"node",
"uid":"###",
"user":"...",
"version":"2",
"visible":false,
"augmentedDiff":#####
},
"geometry":{
"type":"Point",
"coordinates":[
...
]
}
}
]
}
That's from Overpass. The thing to notice is that the node appears here with non-empty tags. The Onramp-generated augmented diff record has no tags. If I attempt to query for the node ID (1234567890 in the above) using osmx
, I can find the matching location, but I get a None
response from the Nodes.get
query, which is confusing.
Am I thinking about this wrong? Shouldn't the tags in Overpass be represented in the osmx
database?
from osmexpress.
Oh, rats. It occurred to me that because the entity I'm querying was deleted, the tags would no longer be present in the OSMX DB at the time I'm querying it. The solution you posted should work.
Will re-open if I'm wrong.
from osmexpress.
That definitely seems odd. In the OSMX database, the locations table has a 3rd number which is the version number. Can you compare that to overpass?
from osmexpress.
Oh, rats. It occurred to me that because the entity I'm querying was deleted, the tags would no longer be present in the OSMX DB at the time I'm querying it. The solution you posted should work.
Will re-open if I'm wrong.
I thought of that too, but if that was the case I believe the location entry should have been deleted, because OSMX doesn't store historical data (overpass does)
from osmexpress.
Right. Got my memory mixed up. The locations were from a different example. Indeed the locations for the deleted node are deleted as well.
from osmexpress.
Related Issues (20)
- Segfault running query command with no arguments HOT 2
- augmented diff example program HOT 7
- get the approximate cell covering for a relation HOT 1
- What's the preferred linux package name for OSM Express? HOT 3
- Document how to build with system libs instead of vendored libs HOT 4
- (windows) MDB_Transaction Error when trying to work with Windows Subsystem for Linux HOT 3
- Add polygon extract queries to the Python API HOT 12
- Publish 0.0.4 osmx python bindings HOT 2
- Converting full planet pbf file fail HOT 4
- Include all metadata for locations HOT 1
- S2CellUnion Expand for extract operation HOT 4
- Script to render examples/screenshot.png HOT 1
- Possible to use this to serve tiles? HOT 3
- Continuous growths of the osmx file with nightly updates HOT 5
- Crashes during parsing of malformed OSMX files HOT 2
- Master build failing on Ubuntu 22.04.1 LTS HOT 1
- Investigate string pools HOT 5
- Transactions will fail when db exceeds 1 TB
- Python wrapper API has changed; python examples are not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osmexpress.