You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement support for alpha features in datastore (geopt) #675
I was not able to run com.google.appengine.api.datastore locally (using emulator or java-sdk), and found that using com.google.gcloud.datastore work against my gcloud datastore and sdk without hassle.
But now I am stuck unable to implement the geopt as the 2 are incompatible.
While geospacial queries can be done via the App Engine Datastore API, they aren't yet available via the Cloud Datastore API, which is the API gcloud-java uses. The next version of the Cloud Datastore API (v1beta3) is supposed to be released sometime soon, and soon after gcloud-java will use it and support geopoints.
The comment you pointed out about using RawValue pertains more to how gcloud-java handles getting unrecognized values from Datastore, rather than enabling users to set unrecognized values. While you can obtain geopoints from Datastore using RawValue, you can't create your own raw values, which may make querying difficult. We can make this distinction clearer in the documentation.
The v1beta3 gcloud-java code, which has the classes LatLng and LatLngValue (for geopoints), is currently sitting in the update-datastore branch and is functional when used against that branch's local service emulator, LocalGcdHelper. However, that branch can't be used to send requests to Cloud Datastore, as they do not yet service v1beta3 requests.
Activity
eddiewebb commentedon Feb 26, 2016
Looks like I can accomplish what I need with RawValue -https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/Value.java#L32
ajkannan commentedon Feb 26, 2016
Hi @eddiewebb, thanks for creating this issue.
While geospacial queries can be done via the App Engine Datastore API, they aren't yet available via the Cloud Datastore API, which is the API gcloud-java uses. The next version of the Cloud Datastore API (v1beta3) is supposed to be released sometime soon, and soon after gcloud-java will use it and support geopoints.
The comment you pointed out about using
RawValuepertains more to how gcloud-java handles getting unrecognized values from Datastore, rather than enabling users to set unrecognized values. While you can obtain geopoints from Datastore usingRawValue, you can't create your own raw values, which may make querying difficult. We can make this distinction clearer in the documentation.The v1beta3 gcloud-java code, which has the classes
LatLngandLatLngValue(for geopoints), is currently sitting in theupdate-datastorebranch and is functional when used against that branch's local service emulator,LocalGcdHelper. However, that branch can't be used to send requests to Cloud Datastore, as they do not yet service v1beta3 requests.eddiewebb commentedon Feb 26, 2016
Awesome, thanks @ajkannan I guess I'll just fudge it with some spherical calculations against lat and long until its ready to ship.
Update, Doh.
Look's like I'm blocked on this as I am not allowed to compare BOTH longitude and latitude of entities.
Anyway thanks for the fast support and information, I understand you're blocked.
mziccard commentedon Jul 22, 2016
I believe this is now fixed. We added
LatLngandLatLngValueclasses.deps: update dependency com.google.cloud:google-cloud-shared-dependen…
deps: update dependency com.google.cloud:google-cloud-shared-dependen…
chore(main): release 2.3.1 (#677)
chore(main): release 2.2.1 (#677)
chore: remove enable-samples profile (googleapis#1284) (googleapis#675)
ci: removing clirr from required checks (#675)
chore(main): release 2.3.0 (googleapis#675)
build(deps): update dependency org.apache.maven.plugins:maven-deploy-…
deps: update dependency com.google.cloud:google-cloud-shared-dependen…
chore(main): release 2.6.2 (#678)
chore: Generated snippets should not be owned by samples reviewers (#…
chore (doc): update readme partial template (#675)
build(deps): update dependency org.apache.maven.plugins:maven-project…
chore(main): release 2.2.8 (#675)
chore (doc): update readme partial template (googleapis#675)
chore: release 2.5.5-SNAPSHOT (googleapis#675)
chore: release 0.123.9 (#675)
chore: release 0.123.9 (#675)
build(deps): update dependency com.google.cloud:google-cloud-shared-c…
build(deps): update dependency com.google.cloud:google-cloud-shared-c…
chore: release 1.21.2-SNAPSHOT (googleapis#675)