• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Autodesk InfraWorks

    Reply
    Distinguished Contributor
    Posts: 132
    Registered: ‎02-28-2006

    KML export

    714 Views, 5 Replies
    09-20-2012 07:04 PM

    Hi Anyone tried to export the AIM model to KML file format? Are there any tricks? Only FBX and IMX can be exported from AIM! Does it need to convert by Civil 3D or Max design? How to preserve the coordinate system? Waiting for your kind feedback! 

     

    Eric

    Please use plain text.
    Contributor
    spatialguru
    Posts: 12
    Registered: ‎05-12-2011

    Re: KML export

    09-20-2012 09:18 PM in reply to: Cadbeyond

    I've gotten my features dumped into various formats - and just tried KML.  I had to use a SQLite exporter command line tool to do the conversion.  This is first run that I did and it seems to work okay (except some of my data coming out was huge - it was the full source file I had imported, not trimmed to city extent).  I'm not sure if it exports 3D models associated with some layers, etc.  It certainly did not export colours for the water features I tried :smileyhappy:

     

    The GDAL/OGR conversion toolkit is the open source choice, or else you can also use FME for more advanced options (e.g. more Autodesk output formats and maybe handles more 3D objects and styling ??).

     

    First use GDAL/OGR's ogrinfo tool to see what layer names are stored in your city.sqlite file:

     

    > ogrinfo mycity.sqlite

    1: CITIES
    2: LAYERS
    3: BARRIERS
    4: BUILDINGS
    5: CITY_FURNITURE
    6: COVERAGES
    7: MARKUP
    8: PIPELINES
    9: PIPE_CONNECTORS
    10: RAILWAYS
    11: ROADS
    12: TERRAIN_SURFACES
    13: TERRAIN_TEXTURES
    14: TREES
    15: WATER_AREAS

     

    Then I used GDAL/OGR's ogr2ogr command like:

     

    ogr2ogr -f KML output.kml  mycity.sqlite RAILWAYS

     

    If anyone need tips to get this process started I'm happy to tell more.

    Geo-geek, Publisher, Author
    http://LocatePress.com
    http://WebMappingIllustrated.com
    http://actian.com/products/ingres/geospatial
    Please use plain text.
    Contributor
    spatialguru
    Posts: 12
    Registered: ‎05-12-2011

    Re: KML export

    09-20-2012 09:47 PM in reply to: spatialguru

    I don't have Autodesk Map 3D handy, so forgive me if it can also do this...

     

    In Quantum GIS (download for windows here) you can also open SQLite format that AIM uses in the backend.

    See attached screenshot below (dense tree points in top right).

     

    From QGIS menu, choose...

    1. LAYER -> ADD VECTOR LAYER
    2. Leave on default radio option "File" and press BROWSE
    3. Switch file filter selection (bottom right corner) to SQLite and find your project file, press OPEN
    4. Press OPEN and a list of LAYERS within the SQLite file appear

    Several of the layers in the database don't have geometry associated with them (apparently), and others it's not clear by the dialog box it shows.  With a small sample project, just select all the layers and say OK.  You'll then see all the layers loaded.  Some will show as points, lines, polygons and some will just be little table symbols in the list on the left.

     

    Hope that helps, holler here or in private message if you want some more help. 

     

    I'm impressed with the structure and accessibility of the AIM format (good job folks!!), because they didn't reinvent the wheel there should be no reason to not be able to export.  Perhaps I have to learn about scripting in AIM or to talk to others at Autodesk to see if we can leverage these libraries that they already use behind AIM to export more options.

     

    Cheers,

    Tyler Mitchell

     

     AIM data in QGIS

    Geo-geek, Publisher, Author
    http://LocatePress.com
    http://WebMappingIllustrated.com
    http://actian.com/products/ingres/geospatial
    Please use plain text.
    Distinguished Contributor
    Posts: 132
    Registered: ‎02-28-2006

    Re: KML export

    09-21-2012 02:05 AM in reply to: spatialguru

    Thanks for your great idea. I will test it shortly! 

    Please use plain text.
    Distinguished Contributor
    Posts: 132
    Registered: ‎02-28-2006

    Re: KML export

    09-27-2012 01:33 AM in reply to: spatialguru

    Hi SpatialGuru 

     

    Which version of GDAL are you using now? I using GDAL 1.7.0b2 pre-compilied binary. 

     

    It fails everytime when I tried to convert the sqlite to shp! I have attached the screenshot for your reference.

     

    Thanks.

    Eric

     

     

    Please use plain text.
    Contributor
    spatialguru
    Posts: 12
    Registered: ‎05-12-2011

    Re: KML export

    09-27-2012 09:49 AM in reply to: Cadbeyond
    Hi Eric, I'm using at least GDAL 1.8 and maybe 1.9. I'll have to check later when I'm at my other computer. On Windows, I installed it using http://download.osgeo.org/osgeo4w/osgeo4w-setup.exe Hope that helps!
    Geo-geek, Publisher, Author
    http://LocatePress.com
    http://WebMappingIllustrated.com
    http://actian.com/products/ingres/geospatial
    Please use plain text.