izzetkalic / geojsons-of-turkey

GeoJSON Data for Turkey Administrative Borders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

English, Türkçe

Administrative Borders of Turkey

This project has been created to resolve the lack of geographic coordinates of Turkey that can be used in data analysis and put together the data in a single source. Data has been collected from OpenStreetMap with overpass-turbo and cleanised with Pentaho Data Integration. You can find previously created repositories in the below;

Data Acquisition

OpenStreetMap - Overpass Api

Overpass Turbo is a tool to make it easy to query of OSM data provided by OpenStreetMap through the browser. It has an API for developers and there is a project in order to use in Python.

According to OpenStreetMap documentation admin_level described as;

The admin_level key describes the administrative level of an object within a government hierarchy. A lower level means higher in the hierarchy.

The description of administrative borders of Turkey are;

  • admin_level=2 : Country border
  • admin_level=4 : Province border
  • admin_level=6 : Town border
  • admin_level=8 : Neighbourhood border

The data are very limited for admin_level=8. Google Maps API or Yandex Map API can be used to complete the data.

In order to collect layers with these border codes the below code should be run.

[out:json];
(area["name"="Türkiye"] -> .a;);
(rel(area)["admin_level"="<CHANGEIT>"];);
out geom;

In order to see all layers together, the below code should be run.

[out:json];
(area["name"="Türkiye"] -> .a;);
(rel(area)["type"="boundary"]["boundary"="administrative"];);
out geom;

According to Overpass Turbo documentation osmtogeojson library is used to convert raw OSM data to geojson. The data in geojsons folder are created with this library.

Overpass turbo uses the osmtogeojson library to convert the raw OSM data output it gets from the Overpass API to GeoJSON.

💥 💥 Due to bandwidth quota json files can be downloaded with this link.

TKGM (General Directorate of Land Registry and Cadastre)

Parsel Sorgu can be used to collect geographic coordinates. tkgm_postman_collection.json has been created to query this api. Import it into Postman and run it hierarchically. But neighbourhood level data is not as good as OpenStreetMap data and query limit is very low but you know the trick.

Pentaho and Flows

In order to use flows download Pentaho PDI and open .ktr files where you can find in the pentaho-flows folder. Please, do not hesitate to open an issue or send email to me if you have any problem during installation. It can also be created these flows with any other ETL tool.

Examples

  • A heatmap can be created using R library with these geographic coordinates.

About

GeoJSON Data for Turkey Administrative Borders