From CAD to DB

Preview:

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

From CAD to DBFOSS4G to the rescue!

May 25th, , ÓbidosGeocamp 2013

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

Jorge SanzWorking at

Hacking at:

y

Prodevelop

@xurxosanz

gvSIG

OSGeo OSGeo-es

Geoinquietos Valencia

OSM

AgendaThe world is complicated

Our use case

First part: AutoCAD

Second part: GeoKettle

Conclusions

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

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

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

and our loved draughtsman have

to load THEIR data into the GIS

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

RequirementsOn demand execution

From AutoCAD (really, those guys live inside it)

Some feedback of the process

Tolerant to messy drawings

Our last approachUse GeoKettle to migrate data

Executed as an AutCAD tool

First part: AutoCAD

First part: AutoCAD

First part: AutoCAD1. Saves the drawing as a DXF

2. Launches a GeoKettle Job

3. Presents the results

Second part: GeoKettle

What is Kettle?Extraction

Transformation

Load

Bulding blocksStep: minimum element, a task

Transformation: chain of steps

Job: sequential execution and coordination of

jobs and trans.

Three user interfaces:Spoon: Graphical User Interface

Kitchen: CLI to execute jobs

Pan: CLI to execute transformations

Carte: web

Spoon: tranformation

Spoon: job

GeoKettleTechical fork of Kettle

Java

Multiplatform

LGPL

Integrates: GDAL/OGR/...

Uses JTS and GeoTools

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

GeoKettle

Our process

Delete index

Delete index

Count geometries

Load DXF into Database

Get geometry type

Polygonize

Polygonize

Filter, refine and load

Count geometries after load

Finish the job

Finish the job 1/3Set the correct SRS

Finish the job 2/3Fix invalid geometries

Finish the job 3/3Create a new index

Present results

Et voilà!

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,...

From CAD to DBThanks!!

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

Happy Towel Day!!!

References, now Pentaho Data Integration

at Spatialytics

Kettle

GeoKettle

This content is under a

license.

Creative Commons

Attribution-NonCommercial-ShareAlike 3.0

unported

Recommended