I have three questions about spatial indexes management in GeoDjango, and I can't find the answers in the documentation.

First, I know GeoDjango creates a spatial_index for a geometry field by default when a table is loaded. Is the spatial_index is automatically re-created when the table is updated. For instance, when new features are added to the table through the web application.

Second, If a table has more than one geometry fields, is GeoDjango creating spatial index for each of them or just for the first it encounters?

Third, I would like to create many spatial indexes on the same geometry table based on an id. Is it possible to do it with GeoDjango? For instance, many countries limits are stored in a single table and I would like to create a different spatial index for each country in the case each country are always queried individually.

  • Please post only one question per thread and use descriptive titles for each. That's better for future users who might be looking for the same answers. – underdark Feb 18 '14 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.