Re: [OSM-talk] Data filter
On 1/12/2015 1:30 AM, Steve Chilton wrote: Can anyone help me with filtering OSM data please? For a project I am working on I need data on my contributions to the project. How can I select ‘my contributions in UK’ and output as XML (or JSON?). Need a file that can be imported in to standard GIS packages. Any help gratefully received. There's a few options, but it depends what you mean precisely. Each object in OSM can be a mix of multiple contributions, which is the strength of the project. It just makes what you're asking hard, and it's important to define precisely what you want with your contributions. The easy way is if you just want objects that you touched last - then you can do simple filtering on a UK extract, or import into a database with metadata and select out what you want. The latter is what I would do for working with standard GIS tools. This is easy, but inaccurate for reasons I'll come to. You could download your changesets - but this won't be usable by any standard GIS packages, or in fact, by anything in isolation. If you are after data that consists solely of your intellectual property, it's harder - what you've contributed is built on others, so separating that out isn't trivial. The tools are there, but they've never been used quite for that application, and the number of people who understand them is approximately 1. The reason why this is a hard question is the nature of a crowd-sourced project, and the OSM data model. Consider a highway which someone creates and tags with highway=primary. Suppose you then come along and add a name tag. Depending on what you're doing you might then want the entire highway included in the file of your contributions, even though you didn't contribute to the geometry. Another case is if you move some nodes in a highway but don't add new ones. You actually haven't made a new version of the the highway. I might be able to help more, but need more information on the use case first. ___ talk mailing list talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/talk
[OSM-talk] Data filter
Can anyone help me with filtering OSM data please? For a project I am working on I need data on my contributions to the project. How can I select 'my contributions in UK' and output as XML (or JSON?). Need a file that can be imported in to standard GIS packages. Any help gratefully received. Cheers Steve Steve Chilton FSEDA, Teaching Fellow Lead Academic Developer Centre for Academic Practice Enhancement (CAPE) Middlesex University phone: 020 8411 5355 email: ste...@mdx.ac.ukmailto:ste...@mdx.ac.uk Profile: http://www.middlesex.wikispaces.net/user/view/steve8 Blog: http://itsahill.wordpress.com/ Chair of the Society of Cartographers: http://www.soc.org.uk/ Chair of ICA Neocartography Commission: http://neocartography.icaci.org/ [cid:image001.jpg@01D02E4A.6A7D0460] --- Please note that Middlesex University's preferred way of receiving all correspondence is via email in line with our Environmental Policy. All incoming post to Middlesex University is opened and scanned by our digital document handler, CDS, and then emailed to the recipient. If you do not want your correspondence to Middlesex University processed in this way please email the recipient directly. Parcels, couriered items and recorded delivery items will not be opened or scanned by CDS. There are items which are exceptions which will be opened by CDS but will not be scanned a full list of these can be obtained by contacting the University. ___ talk mailing list talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Data filter
A totally different approach for a very small part you could use Overpass: replace with your username. The following query only returns the ways in the bbox of which was the last modifier. [out:json][timeout:25]; // gather results (way({{bbox}});)-.a; ( // query part for: “user=” way.a(user: )-.e; ); // print results out body; ; out skel qt; On Mon, Jan 12, 2015 at 10:30 AM, Steve Chilton s.l.chil...@mdx.ac.uk wrote: Can anyone help me with filtering OSM data please? For a project I am working on I need data on my contributions to the project. How can I select ‘my contributions in UK’ and output as XML (or JSON?). Need a file that can be imported in to standard GIS packages. Any help gratefully received. Cheers Steve Steve Chilton FSEDA, Teaching Fellow Lead Academic Developer Centre for Academic Practice Enhancement (CAPE) Middlesex University phone: 020 8411 5355 email: ste...@mdx.ac.uk Profile: http://www.middlesex.wikispaces.net/user/view/steve8 Blog: http://itsahill.wordpress.com/ Chair of the Society of Cartographers: http://www.soc.org.uk/ Chair of ICA Neocartography Commission: http://neocartography.icaci.org/ *[image: MDX LOGO]* * --- * *Please note that Middlesex University's preferred way of receiving all correspondence is via email in line with our Environmental Policy. All incoming post to Middlesex University is opened and scanned by our digital document handler, CDS, and then emailed to the recipient. If you do not want your correspondence to Middlesex University processed in this way please email the recipient directly. Parcels, couriered items and recorded delivery items will not be opened or scanned by CDS. There are items which are exceptions which will be opened by CDS but will not be scanned a full list of these can be obtained by contacting the University. * ___ talk mailing list talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/talk ___ talk mailing list talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Data filter
How can I select ‘my contributions in UK’ and output as XML (or JSON?). Need a file that can be imported in to standard GIS packages. Hi Steve, *--- hard way * see http://wiki.openstreetmap.org/wiki/Planet.osm/full and filter data with your user id. #1 download full history pbf: http://planet.openstreetmap.org/pbf/full-history/ (42Gb !!! ) xml: http://planet.openstreetmap.org/planet/full-history/(59Gb) #2 cut area with osm-history-splitter , smaller the better ( UK ) https://github.com/MaZderMind/osm-history-splitter [ there are some history extracts but no UK , http://osm.personalwerk.de/full-history-extracts/2014-11-24/ but you can test your workflow with nepal.osh.pbf ( it is only 23M ) ] #3. Load to PostgreSQL database with osm-history-importer https://github.com/MaZderMind/osm-history-renderer #4. Filter PostgreSQL data ( hist_point ; hist_line ; hist_polygon ) with your user_name schema: https://github.com/MaZderMind/osm-history-renderer/blob/master/importer/scheme/00-before.sql alternative solution: - using osmium library and write a simple code to - filter OSM history data with your user_id ( with pyosmium [ ptyhon library : https://github.com/osmcode/pyosmium ] or with node-osmium [ Javascript library : https://github.com/osmcode/node-osmium ] Cheers, Imre 2015-01-12 10:30 GMT+01:00 Steve Chilton s.l.chil...@mdx.ac.uk: Can anyone help me with filtering OSM data please? For a project I am working on I need data on my contributions to the project. How can I select ‘my contributions in UK’ and output as XML (or JSON?). Need a file that can be imported in to standard GIS packages. Any help gratefully received. Cheers Steve Steve Chilton FSEDA, Teaching Fellow Lead Academic Developer Centre for Academic Practice Enhancement (CAPE) Middlesex University phone: 020 8411 5355 email: ste...@mdx.ac.uk Profile: http://www.middlesex.wikispaces.net/user/view/steve8 Blog: http://itsahill.wordpress.com/ Chair of the Society of Cartographers: http://www.soc.org.uk/ Chair of ICA Neocartography Commission: http://neocartography.icaci.org/ *[image: MDX LOGO]* * --- * *Please note that Middlesex University's preferred way of receiving all correspondence is via email in line with our Environmental Policy. All incoming post to Middlesex University is opened and scanned by our digital document handler, CDS, and then emailed to the recipient. If you do not want your correspondence to Middlesex University processed in this way please email the recipient directly. Parcels, couriered items and recorded delivery items will not be opened or scanned by CDS. There are items which are exceptions which will be opened by CDS but will not be scanned a full list of these can be obtained by contacting the University. * ___ talk mailing list talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/talk ___ talk mailing list talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Data filter
The last touched is quite an easy query on overpass, see the examples here: http://wiki.openstreetmap.org/wiki/Overpass_API#Advanced_usage_examples If you want to return the nodes only: http://overpass-turbo.eu/ query type=node user name=Steve Chilton/ bbox-query {{bbox}}/ /query print mode=meta/ That would return tons of data if you're a heavy mapper. You might meet some overpass limits if you go too large. Glenn On 12-01-15 10:30, Steve Chilton wrote: Can anyone help me with filtering OSM data please? For a project I am working on I need data on my contributions to the project. How can I select ‘my contributions in UK’ and output as XML (or JSON?). Need a file that can be imported in to standard GIS packages. Any help gratefully received. ___ talk mailing list talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/talk