Giter VIP home page Giter VIP logo

nominatim-java-api's People

Contributors

aklakan avatar buehner avatar ceefour avatar dependabot[bot] avatar grwld avatar jeremiehuchet avatar jugalps avatar klapsa2503 avatar mmyersde avatar snodnipper avatar sunil3590 avatar tonytw1 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nominatim-java-api's Issues

about updating nominatim...

Hi,
I wanted to know how can I update nominatim without setting this line in settings/local.php :

@define('CONST_Replication_Url', 'https://planet.openstreetmap.org/replication/minute');

I mean I don't want to sync with osm, I want to update nominatim whenever I would like.
for example I have a osm data for two months ago, now I want to update them. but I don't know if I set replicarion service with above value, all data are updated from two months ago until now ?
how can I sure that updating process is correct ?

better to use this address ?
http://download.geofabrik.de/europe-updates/

Thanks in Advance

Feature request: add ref in result

Hello,

I would like to ask if you can add the "ref" tag in the address model.
The others (osm_type, osm_id) are already implemented in 2.0.2, but the ref isn't and it sometimes contains information about roadnumbers where the road tag in addressparts always returns the name of the street if available.
I would like to display both the roadnumber as the name of the street.

Kind regards,
Qlubbie

Edit never mind. we did some testing and the json result doesn't contain the ref element. The xml-response does, but thats a nominatim thing. apologies.

OSM id should be long, not int

Hi! It seems place_id is long, not int.
Please try the following address: "ул. Евдокимова,37, Ростов-на-дону" (It is in cyrillic).

why don't set NominatimOptions for all request in JsonNominatimClient

at the first time when I find the following contruction method of JsonNominatimClient, I feel very happy. Because, in my thought, I can set NominatimOptions for my request in the way. However, the NominatimOptions defaults just work for search(final String query). So although I have set a NominatimOptions, I still need to set the accept-language and ploygon_json.

public JsonNominatimClient(final HttpClient httpClient, final String email, final NominatimOptions defaults) {
        this(DEFAULT_BASE_URL, httpClient, email, defaults);
 }

@Override
public List<Address> search(final String query) throws IOException {
        final NominatimSearchRequest q = new NominatimSearchRequest();
        defaults.mergeTo(q);
        q.setQuery(query);
        return this.search(q);
}
@Override
public List<Address> search(final NominatimSearchRequest search) throws IOException {

        final String apiCall = String.format("%s&%s", searchUrl, search.getQueryString());
        LOGGER.debug("search url: {}", apiCall);
        final HttpGet req = new HttpGet(apiCall);
        return httpClient.execute(req, defaultSearchResponseHandler);
}

NominatimClient.java sample code

Hi,

I would like to use your nominatim java api in my Android Java app.

Would you have some sample code of how to use it that you could popint me to?

Thanks,

Alex Donnini

Feature request: support accept-language

Hello,

I noticed that in the current version (2.0.2) it's impossible to set the accept-language.
I would like to ask if you could implement that.

Kind regards,
Qlubbie

Drop JDK6 support

#28 introduces a new library built with JDK7.
Oracle has dropped support for JDK 6 in 2013.

Parameter namedetails is not supported

Client does not allow to obtain namedetails.

Steps to resolve issue:

  • change model (to support new parameters)
  • add new Query parameter (similar to addressdetails)

Licensing Issues

Hi there,

Do you provide a commercial license (dual license) for this library? The reason I'm asking is that the GPL license that you are using reduces the number of potential users as the library cannot be used in commercial (closed-source) projects. Is there a specific reason that you are using the GPL license instead of the less restrictive LGPL license?

DoubleSerializer should use locale

Users in not US locale can get , insted . when parsing double.

@OverRide
public String handle(final Object value) {
if (value instanceof Double) {
return String.format(Locale.US, "%f", (Double) value);
} else {
throw new IllegalArgumentException("Can't serialize anything but Double");
}
}

Maven dependency gson version conflict

Currently the pom.xml includes gson 2.8.5, however geogson-jts has a (transitive) dependency on gson 2.6.2. If you could exclude gson from geogson-jts that'd be good.

Address elements is null for search results

Hi,

When performing a search using version 3.2, getAddressElements() returns null for an Address object. Otherwise when calling lookup(), getAddressElements() is functional.

release 3.0

Hello,
Could you please release 3.0 and push it to Maven central ?
That would allow users to benefit from the latest changes (since May 2013)
thanks

Address elementClass wrong json tag name

When Address class object is deserialized from JSONv2 received from server field elementClass is always null.
SerializedName is wrong, currently used = 'class' is correct for JSON but now JSONv2 is used where that field was renamed to 'category'.

addressdetails in NominatimSearchRequest.java

@QueryParameter(value = "address=%s", serializer = BooleanSerializer.class)
private Boolean address;

should be

@QueryParameter(value = "addressdetails=%s", serializer = BooleanSerializer.class)
private Boolean address;

otherwise no address details are returned.

wrong documentation

fr.dudie.nominatim.client.NominatimClient mentions in line 22 as a comment " * Interface to use the Google Maps Service.", which, I hope, is wrong. Should be Nominatim instead ;)

make Address serializable

Hello & thanks for the great library!
Nominatim requests, as part of the terms of service, to cache results in order to avoid waste of computational resources.
Unfortunatly, the current version of Address object is not serializable.
Would it is possible to consider to make it implement Serializable ?

Tks !

Add minimal implementation example for request + maybe reverse request

I am a not so experienced Java Developer and i want to use this Library.
I am currently looking through the Javadoc to find out which classes to use.

I guess that at least one code Example would be very helpful to a lot of users who are not that familiar with the library classes.
If anyone does have a working tutorial for this Library please link it. Thanks !

Deprecated code

Hello the code is deprecated, a few exemple here :

final SchemeRegistry registry = new SchemeRegistry();
registry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
final ClientConnectionManager connexionManager = new SingleClientConnManager(null, registry);
final HttpClient httpClient = new DefaultHttpClient(connexionManager, null);

Become now :

static CloseableHttpClient httpClient = HttpClients.createDefault();

Thanks for the great work, i hope for an update anti legacy.

Tests in JsonNominatimClientTest failing

All test in JsonNominatimClientTest.java a currently failing on branch master and release 3.3. I believe this may be related to #32 as the errors reference HTTPS (and the lack thereof).

The initial error was java.lang.IllegalStateException: Scheme 'https' not registered. I attempted to resolve this by switching the scheme and URL in the test file to https. This caused a new error org.apache.http.client.ClientProtocolException caused by org.apache.http.client.CircularRedirectException: Circular redirect. Finally, I tried allowing the client to follow circular redirects by adding

httpClient.getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, true);

to the constructor of the test class. This only caused a different error: org.apache.http.client.ClientProtocolException caused by org.apache.http.client.RedirectException: Maximum redirects (100) exceeded .

Outputs for my test runs are linked below:

scheme_https_not_registered.txt
max_redirect.txt
circ_redirect.txt

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.