Skip to main content

I have about 1,000 KMLs in a folder, all with the same schema and only one feature each (line features). I want to bring in each KML into a single feature class in a file geodatabase in ArcGIS Pro and populate a field in that feature class with the unique name of each KML. Is there a way to even do this in FME?

 

Thanks!

This is not too hard.

  • Initiate with a Creator.
  • FeatureReader (Directory and File Pathnames) to scan the directory with files.
  • FeatureReader (OGC / Google KML) to read all files found by setting the Dataset to the attribute path_windows. Under Output Ports, choose Single Output Port. Under Attributes choose Merge Initiator and Result.
  • AttributeCreator, create a field OriginalFileName value path_filename.
  • FeatureWriter, define gdb and featureclassname, attribute OriginalFileName.

This is not too hard.

  • Initiate with a Creator.
  • FeatureReader (Directory and File Pathnames) to scan the directory with files.
  • FeatureReader (OGC / Google KML) to read all files found by setting the Dataset to the attribute path_windows. Under Output Ports, choose Single Output Port. Under Attributes choose Merge Initiator and Result.
  • AttributeCreator, create a field OriginalFileName value path_filename.
  • FeatureWriter, define gdb and featureclassname, attribute OriginalFileName.

Thanks for your help! This does seem doable but I guess I am not putting in all the variables correctly since I get an error (this error is about "Cannot open dataset 'path_windows'" and error initializing the KML reader).

 

This is what my flow looks like with the property dialog boxes (not sure how well it will show up here).

KML to Single Feature Class 1


Thanks for your help! This does seem doable but I guess I am not putting in all the variables correctly since I get an error (this error is about "Cannot open dataset 'path_windows'" and error initializing the KML reader).

 

This is what my flow looks like with the property dialog boxes (not sure how well it will show up here).

KML to Single Feature Class 1

You need to connect the FeatureReaders PATH outputport to the FeatureReader_2's inputport. Then you can select the path_windows attribute as dataset.


Thanks for your help! This does seem doable but I guess I am not putting in all the variables correctly since I get an error (this error is about "Cannot open dataset 'path_windows'" and error initializing the KML reader).

 

This is what my flow looks like with the property dialog boxes (not sure how well it will show up here).

KML to Single Feature Class 1

Thanks for your help again. This got me to not have an error. I suppose this is not writing any geometry. These are all line features and I set the geometry in the FeatureWriter to geodb_polyline. Does this need to be established elsewhere? I also assigned it a coordinate system of LL-WGS84 in the first feature reader since it was not coming across with a coordinate system. Thanks.


Thanks for your help! This does seem doable but I guess I am not putting in all the variables correctly since I get an error (this error is about "Cannot open dataset 'path_windows'" and error initializing the KML reader).

 

This is what my flow looks like with the property dialog boxes (not sure how well it will show up here).

KML to Single Feature Class 1

Can you use the sample workspace from this topic and change it for your needs?


Thanks for your help! This does seem doable but I guess I am not putting in all the variables correctly since I get an error (this error is about "Cannot open dataset 'path_windows'" and error initializing the KML reader).

 

This is what my flow looks like with the property dialog boxes (not sure how well it will show up here).

KML to Single Feature Class 1

Thanks for example. That helped. I am not sure what I changed exactly but I am now getting geometry features. In the first feature reader, I changed Features to Read from Schema and Data Features to Data Features. I added the Attribute exposer but I'm not sure I fully needed that since the PATH variable is already there. This is how looks in the end and it works so I don't think I want to change anything, haha! Thanks so much for your help.

image


Thanks for your help! This does seem doable but I guess I am not putting in all the variables correctly since I get an error (this error is about "Cannot open dataset 'path_windows'" and error initializing the KML reader).

 

This is what my flow looks like with the property dialog boxes (not sure how well it will show up here).

KML to Single Feature Class 1

Looks great. I always find it more convenient to work from a working sample. Happy it helped :)


Reply