From CAD to DB
-
Upload
jorge-sanz -
Category
Technology
-
view
190 -
download
2
description
Transcript of From CAD to DB
![Page 1: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/1.jpg)
From CAD to DBFOSS4G to the rescue!
May 25th, , ÓbidosGeocamp 2013
http://bit.ly/from-cad-to-db
![Page 2: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/2.jpg)
Jorge SanzWorking at
Hacking at:
y
Prodevelop
@xurxosanz
gvSIG
OSGeo OSGeo-es
Geoinquietos Valencia
OSM
![Page 3: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/3.jpg)
AgendaThe world is complicated
Our use case
First part: AutoCAD
Second part: GeoKettle
Conclusions
![Page 4: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/4.jpg)
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](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/5.jpg)
![Page 6: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/6.jpg)
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](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/7.jpg)
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](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/8.jpg)
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](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/9.jpg)
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](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/10.jpg)
Our last approachUse GeoKettle to migrate data
Executed as an AutCAD tool
![Page 11: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/11.jpg)
First part: AutoCAD
![Page 12: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/12.jpg)
First part: AutoCAD
![Page 13: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/13.jpg)
![Page 14: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/14.jpg)
First part: AutoCAD1. Saves the drawing as a DXF
2. Launches a GeoKettle Job
3. Presents the results
![Page 15: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/15.jpg)
Second part: GeoKettle
![Page 16: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/16.jpg)
What is Kettle?Extraction
Transformation
Load
![Page 17: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/17.jpg)
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](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/18.jpg)
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](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/19.jpg)
Spoon: tranformation
![Page 20: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/20.jpg)
![Page 21: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/21.jpg)
Spoon: job
![Page 22: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/22.jpg)
![Page 23: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/23.jpg)
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](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/24.jpg)
GeoKettle
![Page 25: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/25.jpg)
![Page 26: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/26.jpg)
Our process
![Page 27: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/27.jpg)
Delete index
![Page 28: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/28.jpg)
Delete index
![Page 29: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/29.jpg)
Count geometries
![Page 30: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/30.jpg)
Load DXF into Database
![Page 31: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/31.jpg)
Get geometry type
![Page 32: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/32.jpg)
Polygonize
![Page 33: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/33.jpg)
Polygonize
![Page 34: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/34.jpg)
Filter, refine and load
![Page 35: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/35.jpg)
Count geometries after load
![Page 36: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/36.jpg)
Finish the job
![Page 37: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/37.jpg)
Finish the job 1/3Set the correct SRS
![Page 38: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/38.jpg)
Finish the job 2/3Fix invalid geometries
![Page 39: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/39.jpg)
Finish the job 3/3Create a new index
![Page 40: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/40.jpg)
Present results
![Page 41: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/41.jpg)
Et voilà!
![Page 42: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/42.jpg)
![Page 43: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/43.jpg)
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 45: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/45.jpg)
Happy Towel Day!!!
![Page 46: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/46.jpg)
References, now Pentaho Data Integration
at Spatialytics
Kettle
GeoKettle
![Page 47: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/47.jpg)
Pictures, ,Draughtsman Genoa accident at The Telegraph
stylish gifs from topito
![Page 48: From CAD to DB](https://reader033.fdocuments.in/reader033/viewer/2022052505/5550787ab4c9052d158b508f/html5/thumbnails/48.jpg)
This content is under a
license.
Creative Commons
Attribution-NonCommercial-ShareAlike 3.0
unported