XNSTT
XNSTT

Reputation: 143

Fusion Tables / KML preserve or merge attributes to permit queries

I have created a .kml polygonal file from a shapefile. I then create a fusion table uploading the .kml . I want to be able to query the attributes of the shapefile but all the attributes are loaded into an html object "description." Not only do I want to be able to query the attribute table but I want the to preserve the polygonal features as a layer in the map.

I figure there are at least 2 ways to solve this problem: a) merge the KML fusion table with an identical fusion table layer containing all attributes (i.e. exported as a .csv) - I have tried this by merging the location attribute data with the geometry column and it does not preserve the polygonal features.

If I can merge the 2 tables succesfully (preserving polygonal features and attributes) using a column other than geometry/location - how can I generate a set of unique ID's within Google Fusion Tables that will be consistent for each table?

b) extract the attributes from within the html object "description" as new columns.

Upvotes: 1

Views: 1541

Answers (1)

XNSTT
XNSTT

Reputation: 143

I found the answer from pvanb's helpful blog

To Quote him:-

"In QGIS you use the ‘save as’ option in QGIS. You can get this using the context menu (right click mouse on the layer) or the menu ‘Layer | Save as..’. In the menu that opens, there are two fields under the header ‘OGR creation options’; ‘Data source’ and ‘Layer’. In the ‘Data source’ field, you can define which columns you want to use to fill the Name and Description fields in your kml file. You do this by defining the NameField and the DescriptionField. For example, NameField=PNVname and DescriptionField=PNVcode."

There are more options but basically what I have found is that by listing only Namefield= (unique ID table) and ignoring the DescriptionField entirely all the columns of data from the shapefile are preserved and thus there is no need to even merge another table and you get Polygons!

Fantastic

Upvotes: 2

Related Questions