def _get_administrative_division_ku(y, x): geom = geom_point("geom_polygon", x, y) sql = "SELECT * FROM " + ADMINISTRATIVE_DIVISION_KU_TABLE_NAME + " WHERE ST_Contains(%s);" % geom row = get_row(DATABASE_NAME_RUIAN, sql) if row is None: return None out: KatastralniUzemi = KatastralniUzemi(row) return out
def _get_administrative_division_parcela(y, x): geom = geom_point("geom_polygon", x, y) sql = "SELECT * FROM {0} WHERE {1}({2});".format( ADMINISTRATIVE_DIVISION_TABLE_NAME, 'ST_Contains', geom) row = get_row(DATABASE_NAME_RUIAN, sql) if row is None: return None out: Parcela = Parcela(row) return out
def _get_map_sheet_50(y, x): geom = geom_point("geom", x, y) sql = "SELECT * FROM {0} WHERE {1}({2});".format(ZVM50KLAD_TABLENAME, 'ST_Contains', geom) row = get_row(DATABASE_NAME_MAPY, sql) if row is None: return None out: MapovyList50 = MapovyList50(row) return out
def _get_parcela(y, x): # HOTOVO geom = geom_point("parcely.originalnihranice", x, y) sql = "SELECT " + PARCELY_COLUMNS_GET_LIST + \ "FROM parcely " \ "LEFT OUTER JOIN katastralniuzemi ON (parcely.katastralniuzemikod=katastralniuzemi.kod) " \ "LEFT OUTER JOIN obce ON (katastralniuzemi.obeckod=obce.kod) " \ "LEFT OUTER JOIN okresy ON (obce.okreskod=okresy.kod) " \ "LEFT OUTER JOIN pou ON (obce.poukod=pou.kod) " \ "LEFT OUTER JOIN kraje ON (okresy.krajkod=kraje.kod) " \ "LEFT OUTER JOIN vusc ON (okresy.vusckod=vusc.kod) " \ "LEFT OUTER JOIN orp ON (pou.orpkod=orp.kod) " \ "LEFT OUTER JOIN staty ON (kraje.statkod=staty.kod) " \ "LEFT OUTER JOIN regionysoudrznosti ON (vusc.regionsoudrznostikod=regionysoudrznosti.kod) " \ "WHERE ST_Contains(%s);" \ % geom row = get_row(DATABASE_NAME_RUIAN, sql) if row is None: return None out: Parcela = Parcela(row) return out