-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
st_distance_sphere not found during GeonamesFeatureSimpleImporter #53
Comments
hi have you install postgis? if yes, which version.
Le 31/10/2019 à 15:44, kayakko a écrit :
…
Hi
I have installed gisgraphy-5.0-beta3 over java 1.8.201 postgres 12 and
postgis_3_0
When importing the data , for the GeonamesFeatureSimpleImporter i've
got an error.
The traslation is st_distance_sphere was not found.
Any help to solve the issue?
This is the message
Caused by: org.postgresql.util.PSQLException: ERRORE: la funzione
st_distance_sphere(geometry, geometry) non esiste
Hint: Nessuna funzione trovata con nome e tipi di argomenti forniti.
Potrebbe essere necessario convertire i tipi esplicitamente.
Position: 1237
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2497)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2233)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)
at
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at
org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:108)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at
org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
at org.hibernate.loader.Loader.doQuery(Loader.java:802)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2533)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#53?email_source=notifications&email_token=AB2LKSBHDA3T7VVU7FEUTMDQRLVLRA5CNFSM4JHLIXT2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HVZX6KA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2LKSAS5FGVBDVU5J2TTULQRLVLRANCNFSM4JHLIXTQ>.
|
Yes, as I mentioned in the issue, postgis_3_0 |
SELECT PostGIS_Version(); 3.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1 |
Gisgraphy has not been tested on postgis 3.0..it seems that there is some difference David Masclet-------- Message original --------Objet : Re: [gisgraphy/gisgraphy] st_distance_sphere not found during GeonamesFeatureSimpleImporter (#53)De : kayakko À : gisgraphy/gisgraphy Cc : gisgraphy ,Comment SELECT PostGIS_Version();
3.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "#53?email_source=notifications\u0026email_token=AB2LKSE5R47QUWUZLUKWCLDQSAFYZA5CNFSM4JHLIXT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC7ARTY#issuecomment-549325007",
"url": "#53?email_source=notifications\u0026email_token=AB2LKSE5R47QUWUZLUKWCLDQSAFYZA5CNFSM4JHLIXT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC7ARTY#issuecomment-549325007",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
https://hexdocs.pm/geo_postgis/Geo.PostGIS.htmlDavid Masclet-------- Message original --------Objet : Re: [gisgraphy/gisgraphy] st_distance_sphere not found during GeonamesFeatureSimpleImporter (#53)De : kayakko À : gisgraphy/gisgraphy Cc : gisgraphy ,Comment SELECT PostGIS_Version();
3.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "#53?email_source=notifications\u0026email_token=AB2LKSE5R47QUWUZLUKWCLDQSAFYZA5CNFSM4JHLIXT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC7ARTY#issuecomment-549325007",
"url": "#53?email_source=notifications\u0026email_token=AB2LKSE5R47QUWUZLUKWCLDQSAFYZA5CNFSM4JHLIXT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC7ARTY#issuecomment-549325007",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
I checked the geo_postgis docs and found the problem: |
Yes that s why I ve sent the link. It seems that we need to have some dev to choose between postgis 2.x or 3.x and call the correct functionNo delay for thisDavid Masclet-------- Message original --------Objet : Re: [gisgraphy/gisgraphy] st_distance_sphere not found during GeonamesFeatureSimpleImporter (#53)De : kayakko À : gisgraphy/gisgraphy Cc : gisgraphy ,Comment I checked the geo_postgis docs and found the problem:
The funcion now is called st_distancesphere(geometryA, geometryB)
The code generating the error:
com.gisgraphy.domain.repository.GenericGisDao.getNearest(GenericGisDao.java:664)
uses :st_distance_sphere
Seems GeoPostGIS vers 3.x changed the function name from "st_distance_sphere" to "st_distancesphere"
I tried the sql on pgadmin and is working
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "#53?email_source=notifications\u0026email_token=AB2LKSEUUT55UBOKGOP6C6LQSBB7FA5CNFSM4JHLIXT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC7YTWA#issuecomment-549423576",
"url": "#53?email_source=notifications\u0026email_token=AB2LKSEUUT55UBOKGOP6C6LQSBB7FA5CNFSM4JHLIXT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC7YTWA#issuecomment-549423576",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
Hi
I have installed gisgraphy-5.0-beta3 over java 1.8.201 postgres 12 and postgis_3_0
When importing the data , for the GeonamesFeatureSimpleImporter i've got an error.
The traslation is st_distance_sphere was not found.
Any help to solve the issue?
This is the message
Caused by: org.postgresql.util.PSQLException: ERRORE: la funzione st_distance_sphere(geometry, geometry) non esiste
Hint: Nessuna funzione trovata con nome e tipi di argomenti forniti. Potrebbe essere necessario convertire i tipi esplicitamente.
Position: 1237
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2497)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2233)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:108)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
at org.hibernate.loader.Loader.doQuery(Loader.java:802)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2533)
The text was updated successfully, but these errors were encountered: