/** * The 34 columns of an OS Open Names CSV, in file order, as `Doc/OS_Open_Names_Header.csv` names them. */ export declare const OPEN_NAMES_COLUMNS: readonly ["ID", "NAMES_URI", "NAME1", "NAME1_LANG", "NAME2", "NAME2_LANG", "TYPE", "LOCAL_TYPE", "GEOMETRY_X", "GEOMETRY_Y", "MOST_DETAIL_VIEW_RES", "LEAST_DETAIL_VIEW_RES", "MBR_XMIN", "MBR_YMIN", "MBR_XMAX", "MBR_YMAX", "POSTCODE_DISTRICT", "POSTCODE_DISTRICT_URI", "POPULATED_PLACE", "POPULATED_PLACE_URI", "POPULATED_PLACE_TYPE", "DISTRICT_BOROUGH", "DISTRICT_BOROUGH_URI", "DISTRICT_BOROUGH_TYPE", "COUNTY_UNITARY", "COUNTY_UNITARY_URI", "COUNTY_UNITARY_TYPE", "REGION", "REGION_URI", "COUNTRY", "COUNTRY_URI", "RELATED_SPATIAL_OBJECT", "SAME_AS_DBPEDIA", "SAME_AS_GEONAMES"]; /** * The `LOCAL_TYPE` values that mark a road row. */ export declare const OPEN_NAMES_ROAD_TYPES: ReadonlySet; /** * One road row of OS Open Names, with the columns the corpus adapter reads. */ export interface OpenNamesRoad { /** * The roadNameTOID, such as `osgb4000000010927776`. */ id: string; /** * The road's name, in the language OS lists first. */ name1: string; /** * The road's other-language name, Welsh or Gaelic, or an empty string. */ name2: string; /** * The outward code of the postcode district holding the road, such as `LS6`. */ postcodeDistrict: string; /** * The settlement holding the road, or an empty string. * * A bilingual settlement is written ` / ` of that settlement, * such as `Stornoway / Steòrnabhagh`. */ populatedPlace: string; districtBorough: string; countyUnitary: string; } /** * Counts from a read, with a reason for each row that didn't yield. */ export interface OpenNamesReadStats { /** * Rows read across every file. */ read: number; /** * Road rows yielded. */ roads: number; /** * Road rows skipped because their `ID` was not among the requested ids. */ unrequested: number; /** * Rows with a column count other than 34. */ malformed: number; } /** * A stats object with every count at zero. */ export declare function createOpenNamesReadStats(): OpenNamesReadStats; /** * Streams the road rows of one Open Names CSV. * * @param ids When given, only roads whose `ID` is in the set are yielded. */ export declare function readOpenNamesRoads(csvPath: string, stats: OpenNamesReadStats, ids?: ReadonlySet): AsyncGenerator; /** * One unit postcode of OS Open Names with the county or unitary authority holding it. */ export interface OpenNamesPostcodeCounty { /** * The postcode as OS writes it in `NAME1`, such as `ME14 1JH`. */ postcode: string; /** * The `COUNTY_UNITARY` name, such as `Kent`, or an empty string where OS records none. */ countyUnitary: string; } /** * Streams the unit-postcode rows of one Open Names CSV with their county or unitary authority. */ export declare function readOpenNamesPostcodeCounties(csvPath: string, stats: OpenNamesReadStats): AsyncGenerator; /** * The settlement's first-listed name from a `POPULATED_PLACE` value. * * OS writes a bilingual settlement as ` / `, and NAME1 is the form the adapter emits. */ export declare function populatedPlaceName1(populatedPlace: string): string; //# sourceMappingURL=names.d.ts.map