Skip to Content
Mastering Geospatial Analysis with Python
book

Mastering Geospatial Analysis with Python

by Silas Toms, Paul Crickard, Eric van Rees
April 2018
Beginner to intermediate content levelBeginner to intermediate
440 pages
11h 36m
English
Packt Publishing
Content preview from Mastering Geospatial Analysis with Python

Relationship query

If the county query was successful, the district query is performed, and then a relationship attribute (state_ref) is used to find the state within which the county is placed:

        state = county.state_ref

The two-way relationship established in the County, District, and State model definitions make this possible. This state object is a member of the State model class and can be used to retrieve the name of the state.

To create the custom popup, string template formatting is used to populate the popup with the specifics describing the arena requested. The result is assigned to the variable form.popup.

Finally, the populated form is then passed once again to the index.html template, but this time it contains data about the selected ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Geospatial Analysis with Python

Learning Geospatial Analysis with Python

Joel Lawhead

Publisher Resources

ISBN: 9781788293334Supplemental Content