Include "service\ab.mb"
Declare Sub CorrectSubareaTowns(ByVal InDir as String)
Sub CorrectSubareaTowns(ByVal InDir as String)
If ProcessAlpha Then
Open Table InDir + "cities"
Select search_towns.ObjectName,search_towns.ObjectType,search_towns.SubArea,search_towns.SubAreaType,cities.obj_name,cities.obj_type,
cities.adm_code from search_towns,cities where search_towns.ObjectName=cities.obj_name and search_towns.ObjectType=cities.obj_type
and search_towns.obj intersects cities.obj and Right$(cities.adm_code,5)="00000"
Update Selection Set Subarea="", subareatype = ""
Commit Table search_towns
Close Table cities
End if
End Sub
Dim InDir, OutDir, DesignOutDir, TmpDir, SrcDir as String
Dim time_, globaltime As Integer
TmpDir = "D:\home\a1ekx\tmp\"
' SrcDir = "s:\source\transnavicom\2012\ukraine\regions\kiev_i_kievskaja\"
SrcDir = "d:\home\a1ekx\carto_data\kiev_i_kievskaja\"
InDir = SrcDir + "source\20120428\"
OutDir = SrcDir + "mapinfo\search\"
DesignOutDir = SrcDir + "mapinfo\design\"
Close All
Call InitLevels()
Call SetTopCountry("Украина")
Call SetPrefixes("design", "search")
Call ProduceAlpha()
Call ProduceBeta()
Print Chr$(12)
' Call CorrectBoundary(InDir, BoundDir, TmpDir, "regions", "Днепропетровская_обл")
'===========================================================
Call SetNameField("obj_name")
Call SetTypeField("obj_type")
Call SetFullField("obj_full")
Call SetFilterField("obj_type")
Call SetStreetIdField("relation_id")
Call SetNatNameField("nat_name")
Call SetNatTypeField("nat_type")
Call SetNatFullNameField("nat_full")
Call SetLang("Ru")
Call SetNatLang("Uk")
Call SetAddressField("obj_name")
' Area (области)
time_ = Timer()
Call CreateAB(OutDir, DesignOutDir, "admin")
Call Add2AB(InDir, "regions", "admin", "область")
Call Add2Beta(InDir, "regions", "admin", "! область")
Call Hierarchy(0, "admin")
Call DropDoubleNatNamesBeta("admin")
Call AppendLevel("admin", "Area", "AreaType")
Call UniqAlphaWithSize("admin")
Print (Timer()-time_) + "сек. обсчитывались области"
Call CreateBeta(DesignOutDir, "line_boundary")
Call Add2Beta(InDir, "line_boundary", "line_boundary", "")
' Subarea (районы)
time_ = Timer()
Call CreateAB(OutDir, DesignOutDir, "subarea")
Call Add2AB(InDir, "districts", "subarea", "")
Call Hierarchy(0, "subarea")
Call DropDoubleNatNamesBeta("subarea")
Call AppendLevel("subarea", "Subarea", "SubAreaType")
Call UniqAlphaWithSize("subarea")
If ProcessAlpha Then
Select * From search_subarea Where ObjectName = "Киев"
If SelectionInfo(SEL_INFO_NROWS) > 0 Then
Delete From selection
Commit table search_subarea
End If
End If
Print (Timer()-time_) + "сек. обсчитывались областные районы"
' Кварталы
Call CreateBeta(DesignOutDir, "quarter")
Call Add2Beta(InDir, "quarter", "quarter", "")
' Locality & SubLocality
' Города и другие населенные пункты
time_ = Timer()
Call SetKategoryField("population")
Call CreateAB(OutDir, DesignOutDir, "towns")
Call CreateAB(OutDir, DesignOutDir, "sublocality")
Call Add2ABWithID(InDir, "cities", "towns", "")
Call Hierarchy(0, "towns")
Call DropDoubleNatNamesBeta("towns")
Call CorrectSubareaTowns(InDir)
Call UniqAlphaWithSizeSkipID("towns")
If ProcessAlpha Then
Select * from search_towns where ObjectName = "Обухов"
Update Selection Set SubArea = "", SubAreaType = ""
Select * from search_towns where ObjectName = "Припять"
Update Selection Set Subarea="Иванковский", Subareatype = "район"
Select * From search_towns Where ObjectType like "город"
Update selection Set ObjectFull = Replace(ObjectFull, "город ", ""), NatFullName = Replace(NatFullName, "місто ", "")
Commit Table search_towns
End If
If ProcessBeta Then
Select * From design_towns where object_name like natname
If SelectionInfo(SEL_INFO_NROWS) > 0 Then
Update Selection Set natname = ""
Commit Table design_towns
End If
End If
Call SetLnmToCitiesWQuartersBeta("towns", "quarter", "leg_num")
Call DistributeCitiesByTypeBeta(DesignOutDir, "towns")
Call ExpandAlpha("search_towns")
Call SetCentrAlpha("towns", "Киев",30.5223,50.451119)
Call SetCentrAlpha("towns", "Борисполь",30.952861,50.348377)
Call SetCentrAlpha("towns", "Боярка",30.298087,50.315977)
Call SetCentrAlpha("towns", "Бровары",30.788252,50.508578)
Call SetCentrAlpha("towns", "Буча",30.21959,50.549309)
Call SetCentrAlpha("towns", "Вишневое",30.368648,50.383927)
Call SetCentrAlpha("towns", "Вышгород",30.485014,50.582758)
Call SetCentrAlpha("towns", "Ирпень",30.244294,50.519989)
Call AppendLevel("towns", "Locality", "LocalityType")
Call SetKategoryField("")
Print (Timer()-time_) + "сек. обсчитывались города"
time_ = timer()
' District (районы)
Call CreateAB(OutDir, DesignOutDir, "districts")
Call Add2AB(InDir, "CityDistr", "districts", "")
Call Hierarchy(0, "districts")
Call DropDoubleNatNamesBeta("districts")
Call UniqAlphaWithSize("districts")
Call AppendLevel("districts", "district", "districtType")
Print (Timer()-time_) + "сек. обсчитывались городские районы"
' Микрорайоны
Call CreateAB(OutDir, DesignOutDir, "subdistricts")
Call Add2Beta(InDir, "squares", "subdistricts", "! площадь")
'==============================================================================
' Улицы
' Площади
time_ = Timer()
Call SetStreetIdField("relation_id")
Call CreateAB(OutDir, DesignOutDir, "streets")
Call CreateAB(OutDir, DesignOutDir, "square")
Call Add2AlphaWithID(InDir, "squares", "streets", "! микро")
Call Add2BetaWithID(InDir, "squares", "square", "площ")
Call UniqAlphaWithSize("square")
Print (Timer()-time_) + "сек. обсчитывались площади"
Call SetNameField("name_rus")
Call SetTypeField("type_rus")
Call SetFullField("label_rus")
Call SetFilterField("type_rus")
Call SetStreetIdField("street_id")
Call SetNatNameField("name_ukr")
Call SetNatTypeField("type_ukr")
Call SetNatFullNameField("label_ukr")
Call SetKategoryField("class")
' Улицы
time_ = Timer()
Call SetOldName("old_rus")
Call SetOldNatName("old_ukr")
Call Add2AlphaWithID(InDir, "Roads_combined", "streets", "! микро")
Call Add2AlphaWithID(InDir, "Roads_combined", "subdistricts", " микро квартал пос массив")
Call Add2BetaWithID(InDir, "roads", "streets", "! микро")
Call Hierarchy(0, "subdistricts")
Call DropDoubleNatNamesBeta("subdistricts")
Call Hierarchy(0, "streets")
Call DropDoubleNatNamesBeta("streets")
Call UKRBindStreetsToCityBySTRT(InDir, "streets", "towns", "strt")
Call GetNameHierarchyFromBrackets("streets", "ObjectName", "SubDistrict", "SubDistrictType", "микрорайон")
Call UniqAlphaWithSize("subdistricts")
Call UniqAlphaWithSize("streets")
Call ChangeClassInCitybuffBeta(InDir, "citybuff", "streets", "kategor")
Call AddFakeLNum("streets", "kategor")
Call CombineBetaMain("streets", 0)
Call SetKategoryField("")
Call SetOldName("")
Call SetOldNatName("")
Print (Timer()-time_) + "сек. обсчитывались улицы"
' Шоссе (только дизайн)
Call SetLegnumField("class")
Call SetFilterField("class")
Call CreateBeta(DesignOutDir, "highway")
Call Add2BetaWithID(InDir, "roads", "highway", "6 5 4 3 2 1")
If ProcessBeta Then
Select * From design_highway Where leg_num > 6
If SelectionInfo(SEL_INFO_NROWS) > 0 Then
Delete From selection
Commit Table design_highway
End If
End If
Call AppendLength2Beta("highway")
Call ChangeClassInCitybuffBeta(InDir, "citybuff", "highway", "leg_num")
Call CreateBeta(DesignOutDir, "highway_combine")
Call CombineBetaWithName("highway", "highway_combine")
Call CreateCombineField("highway_combine", "combine_name")
Call AddFakeLNum("highway", "leg_num")
Call SetLegnumField("")
Call SetNameField("obj_name")
Call SetTypeField("obj_type")
Call SetFullField("obj_full")
Call SetFilterField("obj_type")
Call SetNatNameField("nat_name")
Call SetNatTypeField("nat_type")
Call SetNatFullNameField("nat_full")
'==============================================================================
' Адреса
time_ = timer()
Call SetAddressField("obj_name")
Call SetStreetIdField("relation_id")
Call CreateAB(OutDir, DesignOutDir, "address")
Call AddAddresses2AB(InDir, "address", "address")
Call BindAddressTo("address", "subdistricts", "SubDistrict", "SubDistrictType")
Call BindAddressToStreet("address", "streets")
Call DropRowWithoutLocality("address")
Print (Timer()-time_) + "сек. обсчитывались адреса"
' Дома
Call CreateBeta(DesignOutDir, "houses")
Call AddHouses2Beta(InDir, "buildings", "houses")
'===========================================================
' Площадные объекты вне иерархии
' Водные + болота
Call InitLevels()
Call AppendLevel("admin", "Area", "AreaType")
time_ = timer()
Call CreateAB(OutDir, DesignOutDir, "hydro")
Call Add2AB(InDir, "hydrography", "hydro", "! бассейн")
Call Hierarchy(0, "hydro")
Call DropDoubleNatNamesBeta("hydro")
Call UniqAlphaWithSize("hydro")
Print (Timer()-time_) + "сек. обсчитывались гидр. объекты"
Call AppendLevel("subarea", "Subarea", "SubAreaType")
Call AppendLevel("towns", "Locality", "LocalityType")
Call CreateBeta(DesignOutDir, "hydro_line")
Call MoveLinar2OtherBeta("hydro", "hydro_line")
Call CreatePlineHydroFromPolygon(TmpDir, "hydro", "hydro_line")
Call BetaLegNumFromArea("hydro", "km")
' Острова
Call CreateAB(OutDir, DesignOutDir, "islands")
' Зелень
time_ = timer()
Call CreateAB(OutDir, DesignOutDir, "veget")
Call CreateBeta(DesignOutDir, "stadiums")
Call Add2Beta(InDir, "hydrography", "veget", "бассейн")
Call Add2AB(InDir, "vegetation", "veget", "")
Call Add2AB(InDir, "park", "veget", "")
Call SetOldName("old_name")
Call SetOldType("old_type")
Call Add2Alpha(InDir, "stadium", "veget", "")
Call SetOldName("")
Call SetOldType("")
Call Add2Beta(InDir, "stadium", "veget", "")
Call Hierarchy(0, "veget")
Call DropDoubleNatNamesBeta("veget")
If ProcessAlpha Then
Select * from search_veget where ObjectName like "%оопарк"
If SelectionInfo(SEL_INFO_NROWS) > 0 Then
Delete from Selection
Commit Table search_veget
End If
End If
Call UniqAlphaWithSize("veget")
Print (Timer()-time_) + "сек. обсчитывались зел. насаждения"
' Кладбища
time_ = timer()
Call CreateAB(OutDir, DesignOutDir, "cemetery")
Call Add2AB(InDir, "cemetery", "cemetery", "")
Call Hierarchy(1, "cemetery")
Call DropDoubleNatNamesBeta("cemetery")
Call UniqAlphaWithSize("cemetery")
Print (Timer()-time_) + "сек. обсчитывались кладбища"
' Мосты
Call SetNameField("name_rus")
Call SetTypeField("type_rus")
Call SetFullField("label_rus")
Call SetNatNameField("name_ukr")
Call SetNatTypeField("type_ukr")
Call SetNatFullNameField("label_ukr")
Call SetFilterField("kind")
Call SetLegnumField("kind")
Call CreateAB(OutDir, DesignOutDir, "bridge")
Call Add2AB(InDir, "bridges", "bridge", "")
Call Hierarchy(1, "bridge")
Call DropDoubleNatNamesBeta("bridge")
Call UniqAlphaWithSize("bridge")
Call SetNameField("obj_name")
Call SetTypeField("obj_type")
Call SetFullField("obj_full")
Call SetFilterField("obj_type")
Call SetNatNameField("nat_name")
Call SetNatTypeField("nat_type")
Call SetNatFullNameField("nat_full")
Call SetLegnumField("")
'==============================================================================
' Точечные объекты
Call CreateAB(OutDir, DesignOutDir, "rw_st")
Call Add2AB(InDir, "railroad_stations", "rw_st", "")
Call Hierarchy(0, "rw_st")
Call DropDoubleNatNamesBeta("rw_st")
Call UniqAlphaWithoutID("rw_st")
Call CreateAB(OutDir, DesignOutDir, "ports")
Call CreateAB(OutDir, DesignOutDir, "auto")
Call CreateAB(OutDir, DesignOutDir, "air")
Call Add2AB(InDir, "airport", "air", "")
Call Hierarchy(0, "air")
If ProcessAlpha Then
SELECT *
FROM search_air
WHERE ObjectType = "терминал" and ObjectName in ("Старый", "Новый")
If SelectionInfo(SEL_INFO_NROWS) > 0 Then
UPDATE selection SET Street = "Жуляны", StreetType = "аэропорт"
End If
SELECT *
FROM search_air
WHERE ObjectType = "терминал" and ObjectName not in ("Старый", "Новый")
If SelectionInfo(SEL_INFO_NROWS) > 0 Then
UPDATE selection SET Street = "Борисполь", StreetType = "аэропорт"
End If
COMMIT TABLE search_air
End If
Call DropDoubleNatNamesBeta("air")
Call UniqAlphaWithoutID("air")
Call SetLegnumField("line_id")
Call SetStreetIdField("line_id")
Call CreateAB(OutDir, DesignOutDir, "metro_st")
Call Add2AlphaWithID(InDir, "subway_stations", "metro_st", "")
Call Add2Beta(InDir, "subway_stations", "metro_st", "")
Call Hierarchy(0, "metro_st")
Call DropDoubleNatNamesBeta("metro_st")
Call UniqAlphaWithoutID("metro_st")
Call CreateBeta(DesignOutDir, "metro_st_exit")
Call Add2Beta(InDir, "subway_station_exits", "metro_st_exit", "")
Call SetLegnumField("")
'==============================================================================
' Линейные объекты
Call SetLegnumField("leg_num")
Call CreateAB(OutDir, DesignOutDir, "rw_lines")
Call Add2AB(InDir, "railroad_ways", "rw_lines", "")
Call SetLegnumField("")
Call CreateBeta(DesignOutDir, "tr_lines")
Call Add2Beta(InDir, "tram", "tr_lines", "")
Call SetLegnumField("relation_id")
Call CreateAB(OutDir, DesignOutDir, "metro_lines")
Call Add2AB(InDir, "subway_lines", "metro_lines", "")
Call Hierarchy(0, "metro_lines")
Call DropDoubleNatNamesBeta("metro_lines")
Call UniqAlphaWithoutID("metro_lines")
Call SetLegnumField("")
Call CreateAB(OutDir, DesignOutDir, "substreets")
Print "Общее время работы "+(Timer()-globaltime)+".сек"
Import status: Running file import (still 2 documents to extract)
Because of yet running and open tasks like text extraction and analysis maybe not all results were found yet, since at the moment of this search 2 file(s) could be only searched, overviewed and filtered by their file names only, not yet by their content and/or content based facets/filters!
You can prioritize the import(s) of (a) not yet processed file(s) by click on "Prioritize import" in the list view.
2022-02-24T04:00:00Z
ConvertUkrKiev_i_Kievskaja.MB
Filename extension
mb
etl_file_b:
1
1
etl_enhance_mapping_id_time_millis_i:
0
0
etl_enhance_mapping_id_b:
1
1
etl_filter_blacklist_time_millis_i:
0
0
etl_filter_blacklist_b:
1
1
etl_filter_file_not_modified_time_millis_i:
4
4
etl_filter_file_not_modified_b:
1
1
etl_enhance_extract_text_tika_server_ocr_enabled_b:
1
1
etl_count_images_yet_no_ocr_i:
0
0
etl_enhance_ocr_descew_b:
1
1
etl_enhance_pdf_ocr_b:
1
1
etl_enhance_extract_text_tika_server_time_millis_i:
4
4
etl_enhance_extract_text_tika_server_b:
1
1
etl_enhance_detect_language_tika_server_time_millis_i:
2
2
etl_enhance_detect_language_tika_server_b:
1
1
etl_enhance_contenttype_group_time_millis_i:
0
0
etl_enhance_contenttype_group_b:
1
1
etl_enhance_pst_time_millis_i:
0
0
etl_enhance_pst_b:
1
1
etl_enhance_csv_time_millis_i:
0
0
etl_enhance_csv_b:
1
1
etl_enhance_file_mtime_time_millis_i:
0
0
etl_enhance_file_mtime_b:
1
1
etl_enhance_path_time_millis_i:
0
0
etl_enhance_path_b:
1
1
etl_enhance_extract_hashtags_time_millis_i:
0
0
etl_enhance_extract_hashtags_b:
1
1
etl_enhance_warc_time_millis_i:
0
0
etl_enhance_warc_b:
1
1
etl_enhance_zip_time_millis_i:
0
0
etl_enhance_zip_b:
1
1
etl_clean_title_time_millis_i:
0
0
etl_clean_title_b:
1
1
etl_enhance_annotations_time_millis_i:
4
4
etl_enhance_annotations_b:
1
1
etl_enhance_multilingual_time_millis_i:
0
0
etl_enhance_multilingual_b:
1
1
etl_enhance_regex_time_millis_i:
1
1
etl_enhance_regex_b:
1
1
etl_time_millis_i:
20
20
X-TIKA_Parsed-By:
- org.apache.tika.parser.CompositeParser
- org.apache.tika.parser.DefaultParser
- org.apache.tika.parser.csv.TextAndCSVParser
X-TIKA_Parsed-By-Full-Set:
- org.apache.tika.parser.CompositeParser
- org.apache.tika.parser.DefaultParser
- org.apache.tika.parser.csv.TextAndCSVParser
X-TIKA_content_handler:
ToTextContentHandler
ToTextContentHandler
X-TIKA_parse_time_millis:
1
1
X-TIKA_embedded_depth:
0
0
etl_enhance_pdf_ocr_time_millis_i:
0
0