Does google app engine with mysql (Cloud SQL) support GIS?

不问归期 提交于 2019-12-21 17:33:03

问题


I have tried to find some documentation on this on the app engine and cloud sql sites, but can't find anything referring to it either way. I know that you can perform GIS queries on their custom sql option, and I know mysql supports GIS out of the box, but I also know it requires some C libraries which there is limited support for.

More particularly I am interested to know if geo-django using mysql supports gis using an app engine/cloud sql combination. (Or maybe if their custom offering supports geodjango?)


回答1:


GeoDjango with Cloud SQL is not supported. GeoDjango depends on several libraries that are not available in app engine. Any app with a dependency on django.contrib.gis.db.models throws a whitelist error in the app engine development server. Presumably, an equivalent error would be encountered on a live app engine instance.




回答2:


Yes, Cloud SQL does support Spatial Queries. I don't know if it works with geodjango, but I don't see why it wouldn't.

Keep in mind that Mysql geospatial queries require myisam tables. Myisam tables can get corrupted much more easily than innodb tables, so you should be very careful about using them. Specifically, if your data changes frequently, you should expect to have to restore from backup on occasion. In that case, consider using the Search API for geospatial queries instead. If the data changes infrequently (e.g. a physical store locator), the myisam tables will probably work just fine.



来源:https://stackoverflow.com/questions/11257930/does-google-app-engine-with-mysql-cloud-sql-support-gis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!