[GIS] Is it possible to import a KMZ file in to access with VBA

google earthkmlkmzms access

I am building an MS Access database and am a beginner but have experience with VBA coding in excel (including the generation of KML files).

In theory, is it possible to import a KMZ file in to access, compare data (unique numbers) from the KMZ with tables within the access database, amend the KMZ data (change color codes for polgygons where the data matches), and regenerate the KMZ (or as KML) for display in google earth?

I have reviewed the KMZ file and the unique numbers I require are stored in the placemark description, with duplicate information stored within "Extended data" tags under "Simple Data".

Best Answer

Given that VBA is a programming language, in theory, it is possible to process a KMZ file. However, you must first unzip it from binary into KML format. Maybe look at how-to-parse-process-a-kmz-file and Read From Binary Files in Visual Basic for inspiration. Then you need to parse this hierarchically structured KML data and reconcile it with the relationally structured Access data. There may be better tools than VBA, for doing the bulk of the work.

Related Question