48
From CAD to DB FOSS4G to the rescue! May 25th, , Óbidos Geocamp 2013 http://bit.ly/from-cad-to-db

From CAD to DB

Embed Size (px)

DESCRIPTION

Slides from a Geocamp 2013 talk about what Geokettle is and how we used it to migrate data from AutoCAD to an Oracle database. Original HTML slides at http://bit.ly/from-cad-to-db

Citation preview

Page 1: From CAD to DB

From CAD to DBFOSS4G to the rescue!

May 25th, , ÓbidosGeocamp 2013

http://bit.ly/from-cad-to-db

Page 2: From CAD to DB

Jorge SanzWorking at

Hacking at:

y

Prodevelop

@xurxosanz

gvSIG

OSGeo OSGeo-es

Geoinquietos Valencia

OSM

Page 3: From CAD to DB

AgendaThe world is complicated

Our use case

First part: AutoCAD

Second part: GeoKettle

Conclusions

Page 4: From CAD to DB

The world is complicatedOn harbours we have draughtsmen,

surveyors, civil engineers

High skills on technical drawings, surveying, etc

Almost 0 (zero) knowledge on GIS or databases

They live inside AutoCAD

Page 5: From CAD to DB
Page 6: From CAD to DB

The world is complicated...but harbours want to use GIS to manage

their space (€€€)

emergencies (real or simulated)

industrial and environmental sensors

real time moving elements

Page 7: From CAD to DB

World is complicated...so they usually implement GIS at some level

and our loved draughtsman have

to load THEIR data into the GIS

Page 8: From CAD to DB

One use caseWe have a space management application

Cartography is maintained in DWG format

We have to load that data

into an Oracle database

The draughtsman has to be able to load it as he

does changes on the cartography

Page 9: From CAD to DB

RequirementsOn demand execution

From AutoCAD (really, those guys live inside it)

Some feedback of the process

Tolerant to messy drawings

Page 10: From CAD to DB

Our last approachUse GeoKettle to migrate data

Executed as an AutCAD tool

Page 11: From CAD to DB

First part: AutoCAD

Page 12: From CAD to DB

First part: AutoCAD

Page 13: From CAD to DB
Page 14: From CAD to DB

First part: AutoCAD1. Saves the drawing as a DXF

2. Launches a GeoKettle Job

3. Presents the results

Page 15: From CAD to DB

Second part: GeoKettle

Page 16: From CAD to DB

What is Kettle?Extraction

Transformation

Load

Page 17: From CAD to DB

Bulding blocksStep: minimum element, a task

Transformation: chain of steps

Job: sequential execution and coordination of

jobs and trans.

Page 18: From CAD to DB

Three user interfaces:Spoon: Graphical User Interface

Kitchen: CLI to execute jobs

Pan: CLI to execute transformations

Carte: web

Page 19: From CAD to DB

Spoon: tranformation

Page 20: From CAD to DB
Page 21: From CAD to DB

Spoon: job

Page 22: From CAD to DB
Page 23: From CAD to DB

GeoKettleTechical fork of Kettle

Java

Multiplatform

LGPL

Integrates: GDAL/OGR/...

Uses JTS and GeoTools

Steps for GI: analysis, projections, OGC services,...

Page 24: From CAD to DB

GeoKettle

Page 25: From CAD to DB
Page 26: From CAD to DB

Our process

Page 27: From CAD to DB

Delete index

Page 28: From CAD to DB

Delete index

Page 29: From CAD to DB

Count geometries

Page 30: From CAD to DB

Load DXF into Database

Page 31: From CAD to DB

Get geometry type

Page 32: From CAD to DB

Polygonize

Page 33: From CAD to DB

Polygonize

Page 34: From CAD to DB

Filter, refine and load

Page 35: From CAD to DB

Count geometries after load

Page 36: From CAD to DB

Finish the job

Page 37: From CAD to DB

Finish the job 1/3Set the correct SRS

Page 38: From CAD to DB

Finish the job 2/3Fix invalid geometries

Page 39: From CAD to DB

Finish the job 3/3Create a new index

Page 40: From CAD to DB

Present results

Page 41: From CAD to DB

Et voilà!

Page 42: From CAD to DB
Page 43: From CAD to DB

RemarksGeoKettle is a powerful tool to manipulate data

It is a specialized desktop GIS to automate

processes that will be executed many times

It is mainly focused on powers users with

knowledge on SQL, JavaScript, OGR/GDAL,...

Page 44: From CAD to DB

From CAD to DBThanks!!

http://bit.ly/from-cad-to-db

Page 45: From CAD to DB

Happy Towel Day!!!

Page 46: From CAD to DB

References, now Pentaho Data Integration

at Spatialytics

Kettle

GeoKettle

Page 48: From CAD to DB

This content is under a

license.

Creative Commons

Attribution-NonCommercial-ShareAlike 3.0

unported