db_classes.py
Module that defines SQL database classes in the GeocoderPL project
- class db_classes.BDOT10K(kod_sektora, kat_budynku, nazwa_kart, stan_budynku, funkcja_budynku, liczba_kond, czy_zabytek, opis_budynku, powierzchnia, centr_lat, centr_long, bubd_geojson)
Bases:
Base
Class that defines columns of “BDOT10K_TABLE”
- __init__(kod_sektora, kat_budynku, nazwa_kart, stan_budynku, funkcja_budynku, liczba_kond, czy_zabytek, opis_budynku, powierzchnia, centr_lat, centr_long, bubd_geojson)
Method that creates objects from a class “BDOT10K”
- Parameters:
kod_sektora – Code of the sector in which the building is located
kat_budynku – Type of building
nazwa_kart – Cartographic name of the building
stan_budynku – Condition of the building
funkcja_budynku – Function of the building
liczba_kond – Number of storeys in the building
czy_zabytek – Flag indicating whether a building is a historic building
opis_budynku – Brief description of the building
powierzchnia – Building surface in square metres
centr_lat – Latitude of the centroid of the building
centr_long – Longitude of the centroid of the building
bubd_geojson – Building outline in GEOJSON format
- Returns:
The method does not return any values
- __repr__()
Method that represents an objects in a class “BDOT10K” as a string
- Return type:
str
- Returns:
String that represents objects of the class “BDOT10K”
- class db_classes.PRG(wojewodztwo, powiat, gmina, miejscowosc, miejscowosc2, ulica, numer, kod_pocztowy, status, szerokosc, dlugosc, zrodlo, czy_poprawny, odleglosc_od_gminy, bdot10_bubd_id, odleglosc_od_budynku, kod_sektora, dodatkowy_opis)
Bases:
Base
Class that defines columns of “PRG_TABLE”
- __init__(wojewodztwo, powiat, gmina, miejscowosc, miejscowosc2, ulica, numer, kod_pocztowy, status, szerokosc, dlugosc, zrodlo, czy_poprawny, odleglosc_od_gminy, bdot10_bubd_id, odleglosc_od_budynku, kod_sektora, dodatkowy_opis)
Method that creates objects from a class “PRG”
- Parameters:
wojewodztwo – Name of the province in which the address point is located
powiat – Name of the county in which the address point is located
gmina – Name of the municipality in which the address point is located
miejscowosc – Name of the town in which the address point is located
miejscowosc2 – Additional name of the town where the address point is located
ulica – Name of the street in which the address point is located
numer – Number of the building in which the address point is located
kod_pocztowy – Postcode where the address point is located
status – Status of a given address point
szerokosc – Longitude of a given address point
dlugosc – Latitude of a given address point
zrodlo – Source of data from which information on a given address point is derived
czy_poprawny – Flag indicating whether an address point is correct
odleglosc_od_gminy – The distance of a given point from the contour of its municipality (in meters)
bdot10_bubd_id – D of the nearest building in the BDOT10k database
odleglosc_od_budynku – Distance of a given address point from the nearest building
kod_sektora – Code of the sector in which given point is located
dodatkowy_opis – Additional description of the address point
- Returns:
The method does not return any values
- __repr__()
Method that represents an objects in a class “PRG” as a string
- Return type:
str
- Returns:
String that represents objects of the class “PRG”
- class db_classes.RegJSON(json_name, json_teryt, json_shape)
Bases:
Base
Class that defines regional JSON files
- __init__(json_name, json_teryt, json_shape)
Method that creates objects from a class “RegJSON”
- Parameters:
json_name – Name of the reginal JSON file
json_teryt – TERYT code of the reginal JSON file
json_shape – JSON shape of region
- Returns:
The method does not return any values
- __repr__()
Method that represents an objects in a class “RegJSON” as a string
- Return type:
str
- Returns:
String that represents objects of the class “RegJSON”
- class db_classes.TerytCodes(teryt_name, teryt_code)
Bases:
Base
Class that defines TERYT codes
- __init__(teryt_name, teryt_code)
Method that creates objects from a class “TerytCodes”
- Parameters:
teryt_name – TERYT name
teryt_code – TERYT code
- Returns:
The method does not return any values
- __repr__()
Method that represents an objects in a class “TerytCodes” as a string
- Return type:
str
- Returns:
String that represents objects of the class “TerytCodes”
- class db_classes.UniqPhrs(uniq_phrs)
Bases:
Base
Class that defines unique phrases
- __init__(uniq_phrs)
Method that creates objects from a class “UniqPhrs”
- Parameters:
uniq_phrs – String containing unique street addresses in Poland
- Returns:
The method does not return any values
- __repr__()
Method that represents an objects in a class “UniqPhrs” as a string
- Return type:
str
- Returns:
String that represents objects of the class “UniqPhrs”