• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DaveFoss / DAVE_data / 10689762467

03 Sep 2024 08:00PM UTC coverage: 78.98% (-7.4%) from 86.4%
10689762467

Pull #10

github

uvchik
Rename module to just polygon.py
Pull Request #10: Add basic functions

66 of 90 branches covered (73.33%)

Branch coverage included in aggregate %.

160 of 211 new or added lines in 7 files covered. (75.83%)

2 existing lines in 1 file now uncovered.

321 of 400 relevant lines covered (80.25%)

4.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/src/dave_data/geometry/attributes.py
1
import geopandas as gpd
5✔
2

3
from dave_data.geometry.layers import get_federal_state_layer
5✔
4

5

6
def divide_between_federal_states(polygon):
5✔
7
    """
8
    Get the name and iso code of the underlying federal state for each part of
9
    the given polygon.
10

11
    Parameters
12
    ----------
13
    polygon : shapely.geometry
14
        A valid shapely geometry.
15

16
    Returns
17
    -------
18
    geopandas.GeoDataFrame
19

20
    """
NEW
21
    poly = gpd.GeoDataFrame(index=[0], crs="epsg:4326", geometry=[polygon])
×
NEW
22
    fs_map = get_federal_state_layer().layer
×
NEW
23
    return fs_map.clip(poly)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc