ibm-cloud-docs / Cloudant

11 stars 48 forks source link

GeoIndexing are not work properly #15

Closed umashanker088 closed 4 years ago

umashanker088 commented 4 years ago

We are using local Clodant Database as bank client requirement,

Issue: I am facing issue while using the Geo spatial indexing.

eg: we are used Indian geo-coordinates but after geo-indexing check in map showing different -different location in map . check below view

{ "_id": "_design/XYX", "_rev": "1-0cf4b616a42c8dee12de2e5728873ba9", "views": {}, "language": "javascript", "st_indexes": { "my-geo-index": { "index": "function (doc) {\r\n if (doc.geometry && doc.geometry.coordinates)\r\n {\r\n if(doc.geometry.coordinates[0] !==0.0)\r\n {\r\n st_index(doc.geometry);\r\n }\r\n }\r\n}\r\n" } } }

IUsing this view :_design/FetchAllBranchBasedOnGBS/_geo/my-geo-index?lat=21.569843&lon=70.198990&radius=10000&limit=100&relation=contains Result :{"bookmark":"g2o","rows":[]}

But above geo-coordinates are available in db.

So Please check what is issue while using the geo-indexing

{ "_id": "60064", "_rev": "1-742822449d910a5ca7ebddb919e6f661", "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 21.569843, 70.198990 ] }, "properties": { "district": "JUNAGADH", "add1": "SARDARGADH", "add2": "SARDARGADH", "add3": "DIST-JUNAGADH", "pinCode": "362640", } }

.

lbboe commented 4 years ago

Hello Umashanker,

I don't think the problem is with the documentation. You'll need to contact IBM Cloudant support for help at support@cloudant.com. When you contact support, please include the following information:

-Is this for Cloudant Local? -Which version are you using?

Thanks again for contacting us!

Sincerely, Lora