GithubHelp home page GithubHelp logo

grundid / relation-analyzer Goto Github PK

View Code? Open in Web Editor NEW
41.0 5.0 8.0 1.63 MB

Relation Analyzer for OSM

Home Page: http://ra.osmsurround.org

License: Other

Java 38.54% JavaScript 53.43% CSS 7.70% Shell 0.14% Dockerfile 0.18%

relation-analyzer's Introduction

Relation Analyzer for OSM

This project contains the source code for the Relation Analyzer which is available online at http://ra.osmsurround.org.

The Relation Analyzer is written in Java. It is build using the SpringFramework http://www.springframework.org/. Apache Maven http://maven.apache.org is used as the build system.

Building

To build the Relation Analyzer launch:

mvn package

This will create a WAR file in the target folder with the name "relation-analyzer.war". Place this file in the webapps folder of your servlet container http://tomcat.apache.org and launch the server.

You can then access the Relation Analyzer with

http://localhost:8080/relation-analyzer

Hacking

The source code has some test case coverage so you should be fine to be able to do some hacking without braking major functionality.

As for the IDE, I recommend the SpringSource Tool Suite: http://www.springsource.com/downloads/sts It already has some useful plugins on board.

Basically you can also use the Web Developer Editon of Eclipse and install all the plugins you need yourself.

Here is a list of plugins you'll definitely need:

M2Eclipse - http://www.eclipse.org/m2e/ JAXB2 Extension for M2Eclipse - https://github.com/hwellmann/m2eclipse-extras/raw/master/p2 Use the above URL as an update site in Eclipse. If you open it in the browser it will give you 404 - file not found. EGit - http://eclipse.org/egit/

To set things up, please follow the steps below:

  1. Setup the Git repo in eclipse.
  2. Checkout the amenity-editor project
  3. Right click on the amenity-editor project and choose "Configure > Convert to Maven Project"
  4. Right click on the amenity-editor project and choose "Run As... > maven generate-sources"

At this point the project should compile fine. If it does not, please do the following:

Right click on the amenity-editor project and choose "Maven > Update Project Configuration..."

Now you should be able to run the tests:

  1. Right click on the amenity-editor project and choose "Run As... > JUnit test"

Is the bar green? Good.

Running in Eclipse

You can launch the Relation Analyzer directly in Eclipse. You will need to have a Servlet Container setup. If everything is OK, you can right click on the project and choose "Run As... > Run on Server". Then open this link: http://localhost:8080/relation-analyzer

relation-analyzer's People

Contributors

grundid avatar osmtools avatar oxcar avatar tordans avatar wiktorn 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

Watchers

 avatar  avatar  avatar  avatar  avatar

relation-analyzer's Issues

Support for route_master

Would like to see support for route_master relations like this; http://www.openstreetmap.org/browse/relation/4605600

The one in the example should consist of 3-4 relations forming parts of the same extremely long highway, the Brazilian BR-101 which spans from Recife in north of Brazil to Rio Grande in the south of Brazil.

Supporting this correctly would enable us to see if the master relation is correctly built, and check the integrity of each of the member relations.

Provide example values

Please provide some examples at http://ra.osmsurround.org/ for:

  • Relation ID
  • Relation Name
  • Relation Type
  • Route
  • Ref Tag
  • Network
  • Operator

That will each return a result that properly showcases this OSM Relation Analyzer

A relation type=route including a "way" platform is said to be "Split into several pieces"

Hi there,

I've checked a bus route relation : 2525489 I've updated myself in OSM.
RA says the relations is "Split into several pieces", but I can't find any hole in the bus route.

I think this is due to the fact that one of the platforms is a closed way. Maybe the RA algorithm needs an improvement on this one. Or maybe I've missed something somewhere.

Note: relation 2411701 which starts exactly from this platform gets the same error message.

Rgds,
Thibault

Use global DEM instead of or in addition to SRTM

SRTM is limited to area between 60 deg. north and 58 deg. south. What about:

  1. ASTER v2: Covers almost the whole world with high 30 metres resolution, but there are still some issues with anomalies and voids. Used successfully by turkompisen.no. Limits on distribution of original data, no limits on use and distribution on derived data that cannot be converted back to original data.
  2. GMTED2010: Only one with worldwide coverage, good accuracy and quality, but best resolution is 7.5 arc-seconds (~232 m). Should be public domain. Suitable for routes of several km, but not good for (at least) sub-1 km routes.

Some relations are not found

Looking for some relations does not give a result. Example: Searching for RelationName=Via Alpina Red R48 gives no result, but searching for RelationID=8535120 gives the correct relation.
There are lot of other relations as well: Bus routes, hiking and so on.

Bandwidth Limit Exceeded when running in batch

I'm quering this page for public transport relations in our contries and after while the page return (only sometimes) following internal error:

Internal error
Message:

org.springframework.web.client.HttpServerErrorException: 509 Bandwidth Limit Exceeded

Home

cycle_network

The relation analyzer allows searching by network value, but for cycling routes, cycle_network is much more specific and would lead to better results.

Skips when zooming

Hi
In the hope this project is still being maintained....

When using the +/- or mouse wheel to zoom, the map 'skips' to the side & then back again. Kind of annoying.
Occurs in latest Firefox & Chrome.

feature request: statistics of surface and smoothness

ra already offers statistics of highway. lately surface and smoothness becomes more important. i think ra could be an assistant to improve the qualitity of this tags.
surface and smoothness are one dimension sized, so you need no "hierarchy".

PS: StatisticsService.StatisticsService() looks a bittle strange, cause you call createHierarchy() without using its return? And in createHierarchy() there's a copy&paste issue: you add unknown highway * as subhierarchy to humans?

HighwayHierarchy unknown = new HighwayHierarchy("unknown");
        humans.addSubHierarchy(new HighwayHierarchy("unknown", "highway", "*"));

        hierarchy.addSubHierarchy(unknown);

Could not get JDBC Connection in search

the search query looks like this

searchRelation?name=DN&relationType=&route=&ref=&network=&operator=

Internal error
Message:

org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.postgresql.Driver'

Home

Improvement: easy check for continuity

curl -s "http://ra.osmsurround.org/analyzeRelation?relationId=1083417&_noCache=on" | grep "Graph " | wc -l
tells me if the Oise river is correct (result=1) or (as now) split into chunks (result>1).
Great to be able to do that ;-).

Having a JSON output would make life easier.
http://ra.osmsurround.org/analyzeRelation?relationId=1083417&_noCache=on&output=json
(or filtering :
http://ra.osmsurround.org/analyzeRelation?relationId=1083417&_noCache=on&output=text&filter=graph_count) => 2

route=rail gives error on platform role

When analyzing railway route 32243,
ra shows an error "org.osmsurround.ra.AnalyzerException: Unknown member role [platform]"

According to the wiki this role should be used to add platforms to the corresponding stops. I would expect the relation analyzer to totally ignore ways with role=platform. Or could you replace the exception with an appropriate warning, that the role is not recognized and thus ignored?

harmonize colors for road type and surface

Shows the distribution of way types in this relations. Hover over a color for more details.
red = major roads, blue = rural roads, brown = tracks, green = footways and cycleways, gray = unknown

Shows the distribution of way surfaces in this relations. Hover over a color for more details.
solid = paved, dashed = unpaved, blue = no surface tag on way

I propose to:

  • use gray for missing surface tag
  • use blue, rather than red for surface=unpaved (red is both for major roads and surface=unpaved what feels inconsistent)

error

Unable to locate the Javac Compiler in:
/usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 10 seconds
[INFO] Finished at: Wed Jul 15 21:02:09 EEST 2015
[INFO] Final Memory: 16M/239M
[INFO] ------------------------------------------------------------------------

Non-empty roles on route-relations should be ignored

The Relation Analyzer seems to have problems with relations of type “route” that have associated objects like platforms and other things.
For example, look at relation 5504331: → link to Relation Analyzer, → link to the OSM relation
As far as I can see, this relation is correct. Beside the actual route (consisting of ways with empty role) it contains additional data, like several stops and platforms. These have appropriate roles like “stop”, “platform_entry_only” and “platform_exit_only”. The latter seem to cause problems with Relation Analyzer.
The solution is to consider only relation members that are actual part of the route, i.e. with empty role. All other members (with non-empty role) should be ignored by the Relation Analyzer.

Add API for send analysis from console

I like RA but I'm missing an option to send analysis from console.

I want to schedule analysis for discover quickly if relation breaks and I need API for its.

thanks

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.