Giter Club home page Giter Club logo

geodata's People

Contributors

dr0i avatar fsteeg avatar philboeselager avatar sbritter avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

vovoma

geodata's Issues

Use embedded Elasticsearch index

The current geodata index size is only 3.5 MB. To ease deployment and increase self-containedness, we should use an embedded Elasticsearch index as we do in lobid-organisations. Since filling up the geodata index takes time, the index should not be recreated on app start (unlike lobid-organisations).

Make geodata accessible from the web

In order to use geodata in integration tests (like in hbz/lobid-organisations), this microservice should be accessible from the web resp. under a constant URL. Therefore, find a suitable (sub-) domain and make geodata be accessible that way.

Prevent automatic deletion of existing index on startup

Currently, a new empty index is created on every application's startup, possibly leading to unwanted loss of data.
Preferably, a new empty index only should be created if there is no such index existing, yet.

Also, there should be no deletion of productive data while running tests.

Report locations not listed

All requests to this microservice that no result could be delivered for should be listed. By doing so, notifications to the owners of the requested organisations could be generated.

Store empty Nominatim results

...to prevent Nominatim being requested subsequently for the same set of data. Currently, that behaviour occurs, because "lat", "long" and "postcode" are being requested in separate, subsequent commands from geodata.

Service throws error if postcode cannot be found

An error is thrown if the postcode cannot be found in JSON coming from Nominatim.

Sample error output:

[error] play - Cannot invoke the action, eventually got an error: org.json.JSONException: JSONObject["postcode"] not found.
[error] application - 

! @711781k9f - Internal server error, for (GET) [/geodata/long/J%205/Mannheim/DE] ->

play.api.Application$$anon$1: Execution exception[[JSONException: JSONObject["postcode"] not found.]]
    at play.api.Application$class.handleError(Application.scala:296) ~[play_2.11-2.3.4.jar:2.3.4]
    at play.api.DefaultApplication.handleError(Application.scala:402) [play_2.11-2.3.4.jar:2.3.4]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.11-2.3.4.jar:2.3.4]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.11-2.3.4.jar:2.3.4]
    at scala.Option.map(Option.scala:145) [scala-library-2.11.1.jar:na]
Caused by: org.json.JSONException: JSONObject["postcode"] not found.
    at org.json.JSONObject.get(JSONObject.java:476) ~[json-20141113.jar:na]
    at controllers.geo.NominatimQuery.getPostcode(NominatimQuery.java:47) ~[classes/:na]
    at controllers.geo.NominatimQuery.createGeoNode(NominatimQuery.java:59) ~[classes/:na]
    at controllers.geo.GeoInformator.getFirstGeoNode(GeoInformator.java:95) ~[classes/:na]
    at controllers.geo.GeoInformator.getLatLong(GeoInformator.java:82) ~[classes/:na]

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.