Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Geospatial CSV Imports Hidden Complexity
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kartones
October 27, 2015
Programming
62
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Geospatial CSV Imports Hidden Complexity
@ Mindcamp 7.0 2015, Madrid
Kartones
October 27, 2015
More Decks by Kartones
See All by Kartones
Building Autonomous Agents with gym-retro
kartones
0
54
Python static typing with MyPy
kartones
0
89
High-impact refactors keeping the lights on
kartones
0
76
Remote Work
kartones
0
110
Intro to GameBoy Development
kartones
0
110
Myths & The Real World of OpenSource Development
kartones
0
54
CartoDB Tech Intro
kartones
0
58
Copy Protection & Cracking History
kartones
0
150
Cómo ganar dinero con tus juegos online
kartones
1
130
Other Decks in Programming
See All in Programming
運用ダッシュボードの設計を誰も教えてくれないのだけどみなさんどうしてるんですか? - チームに監視するという文化を根付かせるための第一歩を踏みたい -
satoshi256kbyte
1
140
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
570
ソフトウェアラスタライザ
fadis
1
600
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
1
1.9k
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
370
Hono + Inertia + React で LP を構築した話
oukayuka
2
150
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
320
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
170
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
300
MySQLとPostgreSQLって何が違うの?
akagami
0
130
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
360
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
410
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
210
New Earth Scene 8
popppiees
3
2.5k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
580
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
250
エンジニアに許された特別な時間の終わり
watany
108
250k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
420
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
390
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
Transcript
@Kartones GEOSPATIAL CSV IMPORTS HIDDEN COMPLEXITY
@Kartones CartoDB
@Kartones Agenda 1) CSV Format Issues 2) Import Issues
@Kartones CSV FORMAT ISSUES
@Kartones Intro .csv / MIME:text/csv Unknown birthdate (80s?) RFC 4180
(2005)
@Kartones Intro Plain text Simple format Simple rules
@Kartones Usage
@Kartones CSV 0101000020E610000000000000008049C000000000000038C0,1083 "alien",2014-11-04 15:24:40.43413+00 category 1, "jump jump up!",
{""value"":""es""}
@Kartones WKT: Well-Known Text POINT (30 10) LINESTRING (30 10,
10 30, 40 40) POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) MULTIPOINT ((10 40), (40 30), (20 20), (30 10)) MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5))) https://en.wikipedia.org/wiki/Well-known_text
@Kartones WKB: Well-Known Binary POINT(2.0 4.0) = 000000000140000000000000004010000000000000 https://en.wikipedia.org/wiki/Well-known_text#Well-known_binary
@Kartones GeoJSON { "type": "Feature", "geometry": { "type": "Point", "coordinates":
[125.6, 10.1] }, "properties": { "name": "Dinagat Islands" } } http://geojson.org/
@Kartones IMPORT ISSUES
@Kartones Typical Huge files (>1GB) Lots of rows (+2M) Lots
of columns (~1600) XLS/XLSX -> CSV
@Kartones Typical Stream HTTP downloaded file Stream file between servers
Stream data import to DB
@Kartones Typical
@Kartones CartoDB-specific Content guessing (e.g. lat/lon) Type guessing Geometry errors
fixing Sync tables -> No downtime allowed
@Kartones DB-Specific Leave DB indexes as last step Prefer big
INSERT to multiple UPDATE GDAL’s ogr2ogr > Ruby/Python scripts http://www.gdal.org/ogr2ogr.html
@Kartones Questions? Thanks!
[email protected]