Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A loose grab-bag of python scripts I've used to help deal with KML files and other mapping-related shenanigans

NotificationsYou must be signed in to change notification settings

fiveham/map-tools

Repository files navigation

A loose grab-bag of python scripts I've used to help deal with KML files and other GIS/mapping stuff.

Generally, this repo is a place where I can keep "official" copies of these scripts.

fips

The fips module simply wraps a huge pile of static data from the US Census Bureau regarding states and counties.

It is named after the FIPS codes used by the USCB and some other federal entities to refer to specific geographic regions.

Everything worth doing in the module goes through itsstates table:fips.states. By default, that table is indexed by states' postal abbreviations/codes (AL, AR, MS, etc.), which enables quick, human access to a state's info viafips.states.[postal code here]. The index is case-insensitive by default; sofips.states.ak works just as well asfips.states.AK, for example. Each state is a dict that treats keys case-insensitively, treats unknown attributes as keys, and has a keyCOUNTIES that maps to a table of the county information for all the counties (or county-equivalents) in that state. Those county tables are indexed by the counties' FIPS codes ('001','003', etc.). Those county tables use the same sort of case-insensitive, attribute-defering dict that the overallstates table uses, but one other feature of these county tables is that calling the table with a single parameter will look that parameter up in the index, which gets around the inability to use digits at the start of attribute names. Each county dict has aSTATE key that points back to the state dict that the county (or county-equivalent) is part of.

#For instance, tangipahoa_parish = fips.states.la.counties('105')tangipahoa_water = tangipahoa_parish.awatertangipahoa_land = tangipahoa_parish.alandprint(tangipahoa_parish.state is fips.states.la) # True

kml

Basic tools for easily opening, saving, formatting, and otherwise handling KML files as bs4.BeautifulSoup XML documents, plus some tools for prepping a KML file for use as a KmlLayer in the Google Maps Javascript API.

About

A loose grab-bag of python scripts I've used to help deal with KML files and other mapping-related shenanigans

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp