Import/Catalogue/Japan KSJ2 Import

From OpenStreetMap Wiki
Jump to navigation Jump to search

(Caution) Can no longer use the data, because they are changed usage agreement.

Term of use for Japan KSJ2 was changed and added TWO prohibit tems in 2015 July and prohibit a business usage. This make OSM import as illegal action.

【Term of Use in Japanese】 http://nlftp.mlit.go.jp/ksj/other/yakkan.html

Brief Translation is as follows:

- IMPORTANT WARNING(Limitation for usage and recommend to ask original data authors about license) (Mandatory to read)

- IMPORTANT WARING(Understanding for Copyright, Intellectual property and limitation for sharing for nothing) (Mandatory to read)

These terms express following two items;


- "prohibit redistribution by 3rd party"

- "Explicitly display data as business usage permission. without these expression, every data are categorized as public use and non-business treatment"


http://nlftp.mlit.go.jp/ksj/jpgis/jpgis_datalist.html

"National-Land Numerical Information based on JPGIS" is geo data provided by National Land Information Division, a section of National and Regional Policy Bureau(NRPB), Ministry of Land, Infrastructure, Transport and Tourism (MLIT), Japan

Licenses

Their terms of use is written in Japanese; a summary in English is as follows.

  • 2-3. If you reproduce the National-Land Information or create derivative works, you must do a citation of the source (e.g., "「国土数値情報(○○データ) 国土交通省」", a literal translation, National-Land Numerical Information (XX Data), MLIT Japan).
  • 3-1. You may use the National-Land Information free of charge.
  • 3-5. Disclaimer. MLIT Japan makes no warranty on your use of the National-Land Information.
need discussion > concluded. see followings

OSMFJ confirmed using of KSJ2 to OSM(2012/July)

(Answer from MLIT)  No problem to import KSJ2 data into OSM. The source information is written to each Object as Tag(data attribution), and details are written on OSM wiki.(2012/12/02)

So, tags on each Nodes (means parts of way) method was deplicated. (need additional descriptions)

Accuracy/Quality

Almost "National-Land Numerical Information based on JPGIS" is based on "Digital Map 25000" by Geographical Survey Institute (GSI) Japan. Files are in XML format and datum is Japanese Geodetic Datum 2000 (JGD2000) which is based on ITRF94 and GRS80.

Type of data

Currently, following data are available for OSM use.

Please do not improt 国土数値情報 鉄道時系列データ due to license compatibility. It claims to only non-commertial use.

http://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-N05.html


Name
データ名称
As of
基準日
Shape
形状
Main attributes
主な属性情報
File unit
ファイル作成単位
Status
状態
Start
開始
End
終了
Notes
備考
Administrative district
行政区域データ
2007
平成19年
area municipality name, municipality code.
市区町村の名称、市区町村コード。
each prefecture
各都道府県
in progress Apr 2008 - ODbL Reductionにより破損多し
Administrative district_2014
行政区域データ再インポート
2012
平成24年
area relation municipality name, municipality code.
市区町村の名称、市区町村コード。
each prefecture
各都道府県
not started June 2014 - -
Airport
空港データ
2007
平成19年
node area name, classification, operation hours.
空港の名称、種別、運用時間。
country
全国
done Mar 2008 Apr 2010 -
Coastline
海岸線データ
2006
平成18年
way name, administrative area code (prefecture code and municipality code), administrator.
海岸保全区域・海岸名、行政区域コード、管理者。
each prefecture
各都道府県
done Nor 2009 Feb 2010 -
Dam
ダムデータ
2005
平成17年
node name, river name, scale, address.
ダム名、河川名、規模、所在地。
country
全国
- - - -
Fishing port
漁港データ
2006
平成18年
node way name, fishing port code, administrative area code (prefecture code and municipality code), administrator.
漁港名、漁港コード、行政区域コード、管理者。
country
全国
- - - -
Forest
森林地域データ
2006
平成18年
node way area
森林エリア。
each prefecture
各都道府県
in progress Apr 2010 - -
Harbor
港湾データ
2006
平成18年
node way name, harbor code, administrative area code (prefecture code and municipality code), administrator.
港湾名、港湾コード、行政区域コード、管理者。
country
全国
- - - -
Lake and pond
湖沼データ
2005
平成17年
area name, administrative area code (prefecture code and municipality code).
湖沼名、行政コード(都道府県コードと市区町村コード)。
country
全国
in progress Apr 2008 - -
Power plant
発電所データ
2007
平成19年
node name, classification, generating capacity.
発電所名、種別、出力。
country
全国
done Mar 2011 Mar 2011 -
Public facility
公共施設データ
2006
平成18年
node facility name, classification code, address, administrator.
施設の名称、分類コード、所在地、管理者。
each prefecture
各都道府県
done Apr 2011 Sep 2011 -
Railway
鉄道データ
2007
平成19年
way line name, operator, classification, station name.
鉄道路線名、会社名、路線種別、駅名。
country
全国
in progress Mar 2008 - -
River
河川データ
2006
平成18年
node way name, river code, river beginning point, river ending point.
河川名、河川コード、河川始点、河川終点。
each prefecture
各都道府県
done Apr 2010 Oct 2011 -

Sample of Tags

Tags below is a sample of the common tags to all of KSJ2 data. And this is a case of railway data 2007, so "type of data" (note, note:ja) and "url" (source_ref) should be adapted for each type of data.

For all ways or relations of KSJ2 data. (not all nodes. (2012))

    <tag k='source' v='KSJ2/NO3' />
    <tag k='source_ref' v='https://wiki.openstreetmap.org/wiki/Import/Catalogue/Japan_KSJ2_Import' />

See each pages for details.

How to import data

Xml files, xmlschemas, codelists and specifications can be downloaded from the site, so someone who is familiar with xml could convert the data to osm file.

KsjTool(v1.5), a java program for conversion from KSJ2 xml file to shape format files, is also available.

  • User:Tatata made a perl script to convert the railway data from shape files to osm file. (ja)User:Tatataが鉄道データのshapeファイルをosmファイルへ変換するperlスクリプトを作成しました。 (notice: obsolete. please discuss on talk-ja ML first.)

Post Import Cleanup

Since I accidentially discovered several intersecting waterways in Japan I had a deeper look into the data. I looked for intersections of ways tagged with
waterway=canal
waterway=drain
waterway=ditch
waterway=stream
waterway=river
with the tool waycheck20.pl. On the script I disabled not matching for layers since all the imported waterways I checked had generally a layer= tag from -1 to -3 on them regardless the reality (compared with Bing). The waterways I extracted from japan.osm.pbf at geofabrik using osmfilter. The result with 2670 intersections you can find here.
A cleanup by the importers would be nice.
It also would be interesting to check the other parts of the import but I leave that to other people. :)

An updated check I will only deliver on request since the script is quite slow. As you can see on bottom of the result page it took more then 80 hours to run.

Links

  • SuperMap Viewer 5 http://www.supermap-japan.com/products/viewer.htm
    • This software supports SHP format file, so you can view KSJ2 data as a image and check attributes of each object after you convert the KSJ2 data from xml to shape by KsjTool. You can use this free of charge.