Skip to main content
Hi,

 

 

I am new to FME, and am in the process of creating a workbench (in FME Desktop 2013) that joins an ArcSDE Feature Class to an Oracle Table, and writes the output to KML.

 

 

I was fairly successful, but am having difficulties in writing arbitary/additional XML data using <ExtendedData>.  See this link for info about KML Extended Data (scroll to the bottom for the arbitary XML part)

 

https://developers.google.com/kml/documentation/extendeddata

 

 

 

I would like to include the following in the KML:

 

 

ExtendedData using xmlns:pdif="http://www....."
  • pdif:Agency
  • pdif.Status
  • pdif.StartDate
  • pdif.EndDate
Values for these fields will come from the joined data.  I am not sure how to do this, and would appreciate any help/input.

 

 

The ExtendedData required are in addition to some other fields such as Name, Description, Geometry, etc.

 

 

Thanks for your time and consideration.

 

 

Regards,

 

 

Sendhil

 

 

 

 

 

Hi Sendhil,

 

The FME Readers and Writers Manual will help you out here. You can access it through Help > FME Readers and Writers in the menubar of Workbench.

 

 

Navigate to Google Earth KML > Feature Represenation > Extended Data. Here you will see the names of the attributes you need to use to create extended data.

 

 

Basically you need to create list attributes, kml_data{}.name and kml_data{}.value. If you need there is also kml_schema_url to define the URL of the schema being used.

 

 

I hope this helps to answer your question,

 

 

Regards

 

 

Mark

 

 

Mark Ireland

 

Product Evangelist

 

Safe Software Inc.
Sendhil,

 

Looking at the screenshots in the link sent by you,could I ask you to check out KMLPropertySetter transformer in FME Workbench?

 

 

http://docs.safe.com/fme/html/FME_Transformers/Default.htm#Transformers/kmlpropertysetter.htm

 

 

Cheers

 

SRG
SRG / Mark:

 

 

Thanks for your responses.  I was able to make a bit more progress based on your input.  Here is where I am:

 

 

I was able to get the data to look like this:

 

 

<Placemark id="kml_1"> <name>Test Project</name> <description>Installation of Infrastructure.</description> <styleUrl>Road Construction</styleUrl> <ExtendedData> <SchemaData schemaUrl="#kml_schema_ft_CIP_FACILITIES"> <SimpleData name="Agency">Henderson</SimpleData> <SimpleData name="StartDate">07/01/2013</SimpleData> <SimpleData name="EndDate">06/30/2015</SimpleData> <SimpleData name="Contact">John Doe</SimpleData> <SimpleData name="AProjectID">X-251</SimpleData> </SchemaData> </ExtendedData> <Point> <coordinates>-113.92,36.213,0 </coordinates> </Point> </Placemark>

 

 

I am trying to get the data to look like this:

 

 

<Placemark id="kml_1"> <name>Test Project</name> <description>Installation of Infrastructure.</description> <styleUrl>Road Construction</styleUrl> <ExtendedData xmlns:pdif="http://www.rtcnv.com/pdif/1.0"> <pdif:Agency>Henderson</pdif:Agency> <pdif:StartDate>07/01/2013</pdif:StartDate> <pdif:EndDate>06/30/2015</pdif:EndDate> <pdif:Contact>John Doe</pdif:Contact> <pdif:AProjectID>X-251</pdif:AProjectID> </ExtendedData> <Point> <coordinates>-113.92,36.213,0 </coordinates> </Point> </Placemark>

 

I tried using the km_extended_xmlns_prefix (=pdif) and  km_extended_xmlns_url (=http://www.rtcnv.com/pdif/1.0) format attributes, but that removes the whole ExtendedData block.

 

 

Any ideas on what I am missing or doing wrong?

 

 

Thanks,

 

 

Sendhil

 


The format attributes were kml_extended_data_xmlns_prefix and kml_extended_data_xmlns_url - just discovered the typo I had made earlier.

Reply