geography models

class geography.models.Division(*args, **kwargs)

A political or administrative geography.

For example, a particular state, county, district, precinct or municipality.

add_intersecting(division, intersection=None, symm=True)

Adds paired relationships between intersecting divisions.

Optional intersection represents the portion of the area of the related division intersecting this division. You can only specify an intersection on one side of the relationship when adding a peer.

get_intersection(division)

Get intersection percentage of intersecting divisions.

remove_intersecting(division, symm=True)

Removes paired relationships between intersecting divisions

save(*args, **kwargs)

uid: division:{parentuid}_{levelcode}-{code}

set_intersection(division, intersection)

Set intersection percentage of intersecting divisions.

class geography.models.DivisionLevel(*args, **kwargs)

Level of government or administration at which a division exists.

For example, federal, state, district, county, precinct, municipal.

save(*args, **kwargs)

uid: {levelcode}

class geography.models.IntersectRelationship(*args, **kwargs)

Each IntersectRelationship instance represents one side of a paired relationship between intersecting divisions.

The intersection field represents the decimal proportion of the to_division that intersects with the from_division. It’s useful for apportioning counts between the areas, for example, population statistics from census data.

class geography.models.Geography(*args, **kwargs)

The spatial representation (in GeoJSON) of a Division.