SlideShare una empresa de Scribd logo
1 de 17
Descargar para leer sin conexión
小江戸らぐ第248回活動報告会
原野商法サーチ
2023/3/18
田口 貴久
原野商法とは
● 1970年代に過熱した「土地神話ブーム」に便乗し、不動産デベロッパーが原野や山間地を
こぞって切り売り
○ 純粋に別荘地として開発された土地もあるが、投機目的に原野や山間地を分譲するケースが多発
○ 買う側も投機目的が大半のため、現地視察をせずに土地を購入してしまう
● オイルショックやバブル崩壊を経て、これらの土地の大半は資産価値がない土地となる
● 近年になり子孫が相続により受け継いだ土地の処分に困り、そこに漬け込む業者による二
次被害も発生し問題になってるケースもある
● 近ごろそれらの現状を取材するブログ、書籍、Youtube動画がひそかに話題
○ 限界ニュータウン探訪記
■ ブログ:https://urbansprawl.net/
■ 書籍:http://www.tarojiro.co.jp/product/6288/
■ Youtubeチャンネル:https://www.youtube.com/channel/UCan6lszm2IMyMpnSYinewTg
原野商法分譲地の特徴
● 周囲に人が住んでいない
○ 場所によってはアクセス路すらない
● 概ね500坪(約1650㎡)未満で細かく分割されている
○ 場所によっては地形をまったく無視して碁盤の目に仕切られている
○ 名目上「別荘地」なので一般住宅より少し広めに分譲していることもある?
これらの特長を踏まえてデータ抽出をすればあぶり出すことができるのでは?
使用するデータ
● 国土数値情報 行政区域データ
○ https://nlftp.mlit.go.jp/ksj/jpgis/datalist/KsjTmplt-N03.html
○ 市区町村単位で区切られた位置情報データ
● 国土数値情報 500mメッシュ別将来推計人口データ(
H30国政局推計)
○ https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-mesh500h30.html
○ 500m四方に区切られた平成30年度の人口と将来の人口予測データ
○ 平成30年度時点で人が住んでいないエリアにはメッシュがない
● 法務省 登記所備付地図
○ https://www.moj.go.jp/MINJI/minji05_00494.html
○ 番地(一筆)単位で区切られた位置情報データ
○ 2023/1/23 にデータ公開
○ 現時点では座標系の違いにより一部のデータは地図上には表せない(随時更新される予定)
■ 該当するデータは今回検索不可
○ デジタル庁よりGeoJson形式への変換コンバータが公開
■ https://github.com/JDA-DM/mojxml2geojson/
○ MAPPLE より地図ビューワが公開
■ https://labs.mapple.com/mapplexml.html
○ 有志によるデータ再配布(kuwanauchi)
■ https://github.com/amx-project/kuwanauchi
PostGISへのインポート
使用するツール
● PostgreSQL + PostGIS
● mojxml2geojson
○ 法務省のXMLデータをGeoJsonへ変換
● geojson-merge
○ 必要に応じてgeojsonファイルをマージ
● ogr2ogr
○ GeoJsonやshapeファイルからPostGISへインポート
○ GDALに同梱されている
○ QGISにも同梱されているので、 Windows/MacOSでも利用可
■ https://www.qgis.org/
mojxml2geojson
● デジタル庁が公開しているGitHubリポジトリをクローン
● Python3で作られているがいくつかのライブラリを使用するため、手っ取り早く使用
したい場合はDockerを利用した方が楽
### コンテナのビルド
$ docker build -t mojxml2geojson .
### データの変換(カレントディレクトリ内のdir/ 内の file.xml を変換する場合)
$ docker run --rm -v $(pwd)/dir:/data mojxml2geojson /data/file.xml
geojson-merge
● 登記所備付地図は市区町村よりさらに細かく分割されているため、ファイルをマー
ジしたい場合に使用
### インストール
$ npm install -g @mapbox/geojson-merge
### マージ
$ geojson-merge dir/*.geojson > ./marged.geojson
PostGIS DBの作成
### PostgreSQLへ接続
psql -U postgres -d postgres
### DBの作成
CREATE DATABASE mojmap;
### DBの切り替え
c mojmap
### PostGIS拡張機能の追加
CREATE EXTENSION postgis;
データのインポート
● 国土数値情報 行政区域データ
○ 空間座標系をGPSで使用されているWGS84(EPSG:4326)へ変換
○ 文字コードは ShiftJIS(CP932)
ogr2ogr -f "PostgreSQL" PG:"host=postgresアドレス user=postgres
dbname=mojmap" -t_srs EPSG:4326 -oo ENCODING=CP932
./N03-22_01_220101.geojson -nln towns
データのインポート
● 国土数値情報 500mメッシュ人口データ
○ 空間座標系をGPSで使用されているWGS84(EPSG:4326)へ変換
ogr2ogr -f "PostgreSQL" PG:"host=postgresアドレス user=postgres
dbname=mojmap" -t_srs EPSG:4326 ./500m_mesh_2018_01.shp -nln mesh
データのインポート
● 法務省 登記所備付地図
○ デジタル庁のツールで変換されたデータの空間座標系は WGS84 が使われている
ogr2ogr -f "PostgreSQL" PG:"host=postgresアドレス user=postgres
dbname=mojmap" ./01343.geojson -nln parcel
データのインポート
● ファイル数が多いため、for を使って一括インポート
$ for f in *.geojson; do
ogr2ogr 
-f "PostgreSQL" PG:"host=postgresアドレス user=postgres dbname=mojmap" $f 
-update -append -nln parcel
done
データの抽出
市町村区分データから検索したい市町村のメッシュを切り抜く
SELECT mesh.*
FROM towns, mesh
WHERE towns.n03_004 LIKE '市区町村名'
AND ST_Intersects(towns.wkb_geometry, mesh.wkb_geometry)
;
データの抽出
市町村区分データから検索したい番地データを切り抜く
● インポートした法務省のデータが1つの市町村のみであれば省略可
● 任意座標系のデータが原因で変換後の緯度経度の数値が明らかにおかしいレ
コードは弾く(弾かれた検索対象外)
○ 北緯: 20.3~45.7度、東経: 122.8~154.0
SELECT *
FROM parcel
WHERE 代表点緯度 > 20.3 AND 代表点緯度 < 45.7
AND 代表点経度 > 122.8 AND 代表点経度 < 154.0
AND 市区町村名 LIKE '%市区町村名%'
;
データの抽出
原野商法分譲地と思われる土地の抽出
● 次の条件に当てはまるデータを抽出
○ 前述2つのクエリー結果が重なり合わない
■ 人の住んでいないエリアにはメッシュがない
■ =人が住んでいない地域
○ 一つの区域が500坪(約1650m^2)未満
データの抽出
● クエリー
WITH
x AS(
SELECT ST_Union(mesh.wkb_geometry) AS m
FROM towns, mesh
WHERE
towns.n03_004 LIKE '市区町村名'
AND ST_Intersects(towns.wkb_geometry, mesh.wkb_geometry)
),
p AS(
SELECT *
FROM parcel
WHERE 代表点緯度 > 20.3 AND 代表点緯度 < 45.7
AND 代表点経度 > 122.8 AND 代表点経度 < 154.0
AND 市区町村名 LIKE '%市区町村名%'
)
SELECT
市区町村名, 大字名, 丁目名, 小字名, 地番, wkb_geometry, ST_Area(Geography(wkb_geometry))
FROM
x,p
WHERE
ST_DisJoint(wkb_geometry, m)
AND ST_Area(Geography(wkb_geometry)) < 1650;
データの抽出
● クエリー(サブクエリーを除く)
SELECT
市区町村名, 大字名, 丁目名, 小字名, 地番, wkb_geometry, ST_Area(Geography(wkb_geometry))
FROM
x,p
WHERE
ST_DisJoint(wkb_geometry, m)
AND ST_Area(Geography(wkb_geometry)) < 1650
;

Más contenido relacionado

Destacado

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 

Destacado (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

原野商法サーチ