Skip to main content
Solved

How do you batch translate from Shapefile to GeoPackage


wolters
Contributor
Forum|alt.badge.img+6

I have a number of shapefiles which I want to translate to Geopackage.

However I want the original shapefile name intact. So just a one on one batch shapefile to geopackage translation

 

I thought that the FME Quicktranslator app would be handy in this situation, however, it asks me to specify a database connection, even though I want all the individually translated shapefiles as separate .GPKG files in a destination folder.

 

In FME Workbench, a specific filename is also required to translate shapefiles into, and there is no way (as far as I can tell) to let this be a dynamic name based on the fme_basename attribute. Note that I do not want to have a single geopackage file with all the shapefiles combined in it.

 

How do I do this?

 

Thanks for your time.

 

Best answer by rahulsharma

hi @wolters​ 

you can use Data Fanout (see article) for this workflow.

Please see attached workflow using Dynamic Workflow as an example.

View original
Did this help you find an answer to your question?

2 replies

rahulsharma
Safer
Forum|alt.badge.img+10
  • Safer
  • Best Answer
  • May 28, 2021

hi @wolters​ 

you can use Data Fanout (see article) for this workflow.

Please see attached workflow using Dynamic Workflow as an example.


wolters
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • May 28, 2021

@rahulsharma​ 

Ah, great. I looked and tried your workflow using batch commands, but it does not do exactly what I want as it still combines everything in one dataset but then under multiple tables, but after looking at the article I did adjust it in a way to make it do what I want.

  • Add 'FME Basename'  to the exposed attribute of the input shapefile
  • Click Fanout Dataset under the writer on the menu on the left, and add the following as the fanout expression
@Value(fme_basename).gpkg

Still not quite sure how to do it in FME Quick Translator as there does not seem to be an option to fanout datasets, it all gets merged instead, or a database connection is required. But using the above in FME Workbench is a good workaround, I guess. 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings