Giter Site home page Giter Site logo

osm-fr / osmose-backend Goto Github PK

View Code? Open in Web Editor NEW
85.0 13.0 110.0 214.38 MB

Part of osmose that runs the analysis, and send the results to the frontend.

License: GNU General Public License v3.0

Python 91.65% Shell 0.41% Ruby 0.08% Makefile 0.04% C 5.80% PLpgSQL 1.60% Batchfile 0.02% ANTLR 0.14% Dockerfile 0.02% C++ 0.24%
openstreetmap openstreetmap-data quality-assurance

osmose-backend's Introduction

Backend part of the Osmose QA tool

This is the part of Osmose which analyses OSM and sends the results to the frontend. This works as follows:

  • an .osm.pbf extraction is downloaded
  • analyses are run directly on the .osm.pbf file, or on the database
  • results of the analyses are uploaded to the frontend
  • by default, the database is purged

Analysers can be build in many ways:

Installation

The default way to setup Osmose Backend is through Docker. Look at the docker/README.md.

You can also install manually on a debian distribution INSTALL.md.

Run

Look at the osmose_run.py help for options

osmose_run.py -h

Contributing

Setup a Docker install and follow the "Develop on Osmose with docker" guide.

Read the additional contribution guidelines.

osmose-backend's People

Contributors

andreadecorte avatar archie83 avatar comraderamen avatar danfos avatar dfaure avatar didier2020 avatar emersonveenstra avatar famlam avatar fansanelli avatar fgouget avatar flacombe avatar frodrigo avatar gileri avatar giselle-ms avatar hubminer avatar jdhoek avatar jocelynj avatar kymckay avatar marc-marc-marc avatar matkoniecz avatar naoliv avatar nlehuby avatar panieravide avatar soulei-seg avatar stephankn avatar tkas avatar treinen avatar vinber avatar wadouk avatar xionox 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  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  avatar

osmose-backend's Issues

Item 2060 - Should associatedStreet relations take into account roundabouts?

Osmose rises a class 7 issue when an associatedStreet relation includes different names.

However, in this example (http://osmose.openstreetmap.fr/fr/error/3880380933), the relation "Route de Nevers" encompasses several streets named "Route de Nevers" and 2 roundabouts named "Porte de Nevers".

Maybe the relation should not include the roundabouts or the Osmose test should be modified. I haven't found info on the wiki (http://wiki.openstreetmap.org/wiki/Relation:associatedStreet).

Feature request: detect way "name" tag with selected words

Hi,

I request a rule to detect ways with "name" tag starting with words: Calle, Camino, Avenida, Plaza, or Pasaje. These are Spanish words for type of way.

Such rule should be applied to Catalonia, Illes Balears (Spanish regions), and Andorra, where Catalan languages is preferred.

Some mappers use Spanish names for ways, but Catalan community use Catalan names for "name" and "name:ca" tags and Spanish names for "name:es" tag.
See this Overpass-turbo query
http://overpass-turbo.eu/s/at7

There are two Spanish regions, Comunitat Valenciana and Aragon, where language preference is city based. So, I don't know if it's possible to develop such rule for Valencian and Aragon regions.

"Highway intersecting building" false positives

I am seeing some false positivies with the "Highway intersecting building" test, when a highway pass below a building=roof + layer=1 (on gas stations, tolls, etc)
Since the highway has an implicit layer=0, there shouldn't be a warning about this.

Improvement for "Unfinished power line" test

In this area there are some messages about "Unfinished power line"

Reading http://wiki.openstreetmap.org/wiki/Osmose/errors#7040 it seems that the test searchs for power=substation or power=generator, but we have a deprecated power=sub_station at the area.

This could be improved with two steps:

  • ignore power lines ending at power=sub_station
  • give a warning about the deprecated power=sub_station tag.

Since the problem is in fact with the deprecated sub_station value, we shouldn't give any messages about the power lines.

indention behind 3161 parking lane 'missing access to parking'?

Now that I've gotten some warnings about 3161 parking lane 'missing access to parking' and nothing is documented in the wiki, i want to ask you: what is your indention behind this issue?

Just an example: 273144424 and related bing maps. How should i tag/map this parking area?

If you prefer parking:lane, where should i tag operator, surface, and so on? There's nothing mentioned about it in wiki for parking:lane.

Another opportunity could be to share the two corner-nodes with the highway, but this isn't best practice.

Test for incomplete objects

Could osmose test for incomplete objects?
For example, objects having only:

  • name
  • name + area=yes
  • area=yes

Node like way, false positive for proposed or construction

ti's about analyser_osmosis_node_like_way
exemple
when highway=proposed is on way and nodes
but the tag proposed is different for way and node

=> in sql20 ,
" where ways.tags->t = nodes.tags->t"
add something like this ?
" and nodes.tags not in (proposed,construction)"

Adapt "Missing primary Wikipedia tag" for Brazil

On objects that have both wikipedia:en=X and wikipedia:pt=X, the "Missing primary Wikipedia tag" test suggests a fix excluding wikipedia:en and adding wikipedia=en:

It should use the pt variant for this, removing wikipedia:pt and making it wikipedia=pt

new analyse to detect duplicated import of nodes

it's about detect duplicated nodes.
this 2 changest are from the same user who upload 2 times the same data
https://www.openstreetmap.org/changeset/34273139
https://www.openstreetmap.org/changeset/34273083

i try this

sql10 = """
-- node which is not in way and relation
CREATE TEMP TABLE {0}onlynodes AS
SELECT
id,tags,geom
FROM
nodes
LEFT JOIN way_nodes ON
nodes.id = way_nodes.node_id
LEFT JOIN relation_members ON
nodes.id = relation_members.member_id and
relation_members.member_type = 'N'
WHERE
way_nodes.node_id IS NULL AND
relation_members.member_id IS NULL
;
"""

sql11 = """
CREATE INDEX {0}onlynodes_idx ON {0}onlynodes USING gist(geom);
"""

sql12 = """
SELECT
b1.id AS id1,
-- b2.id AS id2,
ST_AsText(b1.geom)
FROM
{0}onlynodes AS b1,
{1}onlynodes AS b2
WHERE
b1.id > b2.id AND
b1.geom && b2.geom AND
ST_Equals(b1.geom, b2.geom) AND
((b1.tags @> b2.tags ) and (b2.tags @> b1.tags ))
;
"""

Error 5030 - two names

Hi,

With error 5030, there is a problem in bilingual areas. There all street names, street signs, oficial building names,... must be written in both languages. Common practice is to write in name field in both languages separated with / and also in both local languages.

Example:
way 277453150
name Razbremenilnik / Canale di scolo
name:it Canale di scolo
name:sl Razbremenilnik

So my suggestion is, that in case of / you check for both sides if they exists in name:xx tag and in such case don't report this as an error.

Same problem applies to error 5060

BTW: Can you add default language for Slovenia.

File osmose-backend/osmose_config.py Line 384

default_country("europe", "slovenia", 218657, {"country": "SI", "language": "sl", "proj": 32633}, download_repo=GEOFABRIK)

marker.subtitle %s not replaced

Exemple :

key value
marker.class 3040
marker.elems way210191694
dynpoi_class.title Bad value in a tag
marker.subtitle Bad value for service=%s

Improving names junction in forest

In forests, locate nodes at the intersection of ways highway=* and only with a tag name=*. Propose to add junction=yes with the following message to the user: "junction=yes missing at junction"

Support request: How to use it

I would like to work on a new analyser. How can I test my new analyser?

  • I cloned the repository
  • I've installed all the dependencies and extensions
    So how can I "run" my analyser? How can I check out wether I like its result?

Building rond : proposer aussi man_made=windmill

Je suis désolé de ne pas savoir si c'est un problème de backend ou de frontend.

Lorsqu'on osmose détecte un building générique (building=yes) rond, la liste des remplacements proposés devrait aussi contenir "man_made = windmill"

Feature request: check "name:es" without "name:ca"

Hi,

I request a custom local rule to check objects (nodes, ways, and relations) with "name:es" but lacking "name:ca".

This rule can be applied to Catalonia, Comunitat Valenciana, Illes Balears (Spanish regions), and Andorra, where Catalan is preferred language for "name"

Support addr:interpolation in addr:housenumber check

Support addr:interpolation in "addr:housenumber without addr:street, addr:district, addr:quarter, addr:suburb or addr:place must be in a associatedStreet relation" (2060/1)
analyser_osmosis_relation_associatedStreet.py

Broken highway continuity

Broken highway continuity should probably ignore ways that connect with highway=proposed and highway=construction. There are too many false alarms like these.

Feature request: detect duplicate object by names

Warn user when there similarly named features within proximity.

osmose should warn user about feature with same name, provide link to http://wiki.openstreetmap.org/wiki/One_feature,_one_OSM_element and suggest to use relation type=multipolygon or type=site.

Bonus points for transliterated text (Ελληνική Δημοκρατία - Hellēnikē Dēmokratia etc)
Bonus points for advanced string comparison features (support for articles, mixed case, umlaut)
Bonus points for fuzzy matching, preferably done as separate check/process.

Feature request: check buiding= tag mismatches

Case 1: way tagged as amenity=kindergarten contains (way/multipolygon) building=school
Expected result: osmose should warn about conflicting tags

Case 2: way without amenty= tag but part of multipolygon with amenity=kindergarten contains (way/multipolygon) building=school
Expected result: osmose should warn about conflicting tags

PS. This is not limited to (building|amenity)=(kindergarten|school|college|university) but just example how to handle mismatches.

Detect wrong highway connections

I don't know what osmose already detects or if this is wanted, but could osmose detect:

  1. highway connected to waterway|water without ford
  2. highway connected to power=line|minor_line
  3. highway connected to landuse

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.