GeoMedia 6.1 can read and display KML files. Once you are able to connect to the KML warehouse, you can use any GeoMedia command to manipulate the KML features. The Output to Feature Class and Export Warehouse commands are also available for you to convert KML features into other formats such as Access, Shape files, DGN, DWG, etc. However, I encountered some difficulty in exporting KML features to DXF. If you tried to run the Export to DXF command as shown below, you will encounter this "Exporting query on image feature class not supported" error message.
This posting describes a method that I used to manipulate the data to enable GeoMedia to export the KML features to DXF successfully. The issue is that the KML format supports embedded raster images while the Export to DXF command is not able to handle raster geometries. So the workaround is to import the KML features into an Access warehouse first, delete the raster geometry database field, update the metadata, then export the KML features in Access to DXF. Details are below.
Import KML features into Access
Import KML features into Access
- In GeoMedia, select Warehouse | New Connection.
The New Connection dialog box appears.
- In the Connection type list box, select KML.
- In the KML file field, click Browse and select a KML file. You can leave the Warehouse configuration file field blank.
- Click OK.
GeoMedia is now connected to the KML file.
- Select Warehouse | Output to Feature Classes.
The Output to Feature Classes dialog box appears.
- In the Source features to output box, toggle on the KML feature. In the Target connection drop down list, select a read/write Access warehouse connection. Note: If you don't have one, then connect to one or create a new Access Warehouse first.
The Output to Feature Classes dialog box may look this.
- Click the Advanced tab.
- In the Target Feature Class field, type in a new name e.g. google if you do not like the default name.
The Output to Feature Classes dialog box may look like this.
- Click OK and Yes when prompted.
The KML features are imported into the target Access warehouse. Notice that the KML feature has 3 geometry types - text, raster and compound.
- Exit GeoMedia.
Delete the KML feature's Raster geometry field
- In Microsoft Access, select File | Open.
The Open dialog box appears.
- In the File name field, type in the name of the Access warehouse file and click Open.
The selected database is opened in Microsoft Access.
- In Microsoft Access, select the KML table name imported from the KML file previously, e.g. google.
- Click Design.
The Table form is displayed.
- Click the gray box on the left of the RasterGeometry field name.
The RasterGeometry row is highlighted.
- On the keyboard, press Delete. Click Yes when prompted.
The RasterGeometry field is removed from the form.
- Close the table form and click Yes when prompted.
The RasterGeometry field is deleted from the table.
- Exit Microsoft Access.
Update the Access Warehouse Metadata
- On the Windows desktop, select Start | All Programs | GeoMedia | Utilities | Database Utilities.
The Database Connection dialog box appears.
- In the Access database name field, click Browse and select the Access warehouse file.
The Database Connection dialog box may look like this.
- Click OK.
The Database Utilities dialog box appears.
- Click Delete Feature Class Metadata.
The Delete Feature Class Metadata dialog box appears.
- In the Feature classes list box, select the KML feature e.g. google. Click OK.
The metadata for the KML feature is removed.
- In the Database Utilities dialog box, click Insert Feature Class metadata.
The Insert Feature Class Metadata dialog box appears.
- In the Available tables/views list box, select the KML feature. Click the '>' button.
The Insert Feature Class Metadata dialog box may look like this.
- Click OK.
The Select Coordinate System dialog box appears.
- Click Assign and close the dialog box.
The KML feature metadata is regenerated and added back this time without the metadata for the rasterGeometry field.
- Close the Database Utilities dialog box.
Export to DXF
Now you can perform the export to DXF successfully.
- In GeoMedia, open up the connection to the Access warehouse again.
- Select Warehouse | Export to | AutoCAD.
The Export to AutoCAD dialog box appears.
- In the Features to export field, select the KML feature. Change any other settings if you wish.
The dialog box may look like this.
- Click Apply.
The KML feature is exported to DXF.
No comments:
Post a Comment