ravi5677 / gisgraphy

Automatically exported from code.google.com/p/gisgraphy
0 stars 0 forks source link

Trying to use gisgraphoid #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

After some trials on your geocoding comparator, Gisgraphy seems to be exactly 
the service I was looking for (fully free, but much better than Nominatim). 

I would like to integrate gisgraphoid in an Android app, just replacing calls 
to Google Geocoder by calls to GisgraphyGeocoder. 

What I did: 
- I downloaded gisgraphoid-1.0.jar available here: 
http://code.google.com/p/gisgraphoid/downloads/list
- I added it in the libs dir of my Android project
- I added it to the Build path
- I made the call change in my code. 
- and I launched the app. 

Then I got this serie of errors: 

04-19 19:31:05.336: E/dalvikvm(344): Could not find class 
'com.gisgraphy.domain.valueobject.StreetSearchResultsDto', referenced from 
method com.gisgraphy.gisgraphoid.GisgraphyGeocoder.getFromLocation

04-19 19:31:05.473: E/dalvikvm(344): Could not find class 
'com.gisgraphy.addressparser.AddressResultsDto', referenced from method 
com.gisgraphy.gisgraphoid.GisgraphyGeocoder.getFromLocationName

04-19 19:31:05.544: E/dalvikvm(344): Could not find class 
'com.gisgraphy.addressparser.Address', referenced from method 
com.gisgraphy.gisgraphoid.AndroidAddressBuilder.transformGisgraphyAddressesToAnd
roidAddresses

04-19 19:31:05.573: E/dalvikvm(344): Could not find class 
'com.gisgraphy.domain.valueobject.StreetDistance', referenced from method 
com.gisgraphy.gisgraphoid.AndroidAddressBuilder.transformStreetsToAndroidAddress
es

04-19 19:31:05.593: E/dalvikvm(344): Could not find class 
'com.google.gson.Gson', referenced from method 
com.gisgraphy.gisgraphoid.RestClient.get

And the fatal one: 

04-19 19:31:05.613: E/AndroidRuntime(344): FATAL EXCEPTION: main
04-19 19:31:05.613: E/AndroidRuntime(344): java.lang.NoClassDefFoundError: 
com.gisgraphy.addressparser.AddressResultsDto
04-19 19:31:05.613: E/AndroidRuntime(344):  at 
com.gisgraphy.gisgraphoid.GisgraphyGeocoder.getFromLocationName(GisgraphyGeocode
r.java:384)

=> Apparently, we have to include some additional libs. 
I fixed the Gson one. 
But for others, I don't really understand what I should do - I didn't found 
anything about those missing libs in the doc. 

Original issue reported on code.google.com by mathieu....@gmail.com on 19 Apr 2014 at 8:19

GoogleCodeExporter commented 8 years ago
Hi,

this is not a bug.

you can find an example on how to use with gisgraphoid demo  : 
https://code.google.com/p/gisgraphoid/source/browse/#svn%2Ftrunk%2Fgisgraphoid-d
emo%253Fstate%253Dclosed

The error seems to be because you miss some libraries : gisgraphy-commons, 
universalserialiser-commons (version 1.0)

Original comment by davidmasclet@gmail.com on 25 Apr 2014 at 11:21

GoogleCodeExporter commented 8 years ago
OK, I found the exact list inside the .classpath of the demo project. 

But where those 2 jars can be found:

<classpathentry kind="var" 
path="M2_REPO/com/gisgraphy/gisgraphy-commons/1.0/gisgraphy-commons-1.0.jar"/>
<classpathentry kind="var" 
path="M2_REPO/com/gisgraphy/universalserialiser-commons/3.0/universalserialiser-
commons-3.0.jar"/>

Apparently, this M2_REPO is not part of the svn repo. And a quick Googling 
didn't returned obvious answer. 
Do I have to build them myself? 

Original comment by mathieu....@gmail.com on 26 Apr 2014 at 8:29

GoogleCodeExporter commented 8 years ago
Hi

You can find those jar in the gisgraphy distribution :)

David

Original comment by davidmasclet@gmail.com on 28 Apr 2014 at 8:45

GoogleCodeExporter commented 8 years ago

Original comment by davidmasclet@gmail.com on 28 Apr 2014 at 8:45

GoogleCodeExporter commented 8 years ago
Hi, how can I use this jar think you

Original comment by Mahrez....@gmail.com on 28 Jul 2014 at 9:28