Skip to main content
Question

Directory and File Pathname lack of extension Shapefile (shp/shx/dbf/prj)

  • April 8, 2019
  • 4 replies
  • 68 views

Forum|alt.badge.img

Hello!

 

For an FME Batch process I am working with the Workspace runner. In the two main FME workbenches a conversion from GeoJSON EPSG 4326 to Shapefile EPSG 31256 is made. In the second main workbench there is a conversion in the opposite direction. My question now is the following:

 

In the Workspace that actually runs the two "main" workspaces I am using the Directory and File Pathname Reader. In this reader I defined the folder, where the Input GeoJSON and Shapefiles are stored. (attached you van find a Picture of the Workspace.) This path I connected to the two WorkspaceRunners (1 for GeoJSON and one for the Shapefile Converter. For source (GeoJSON/Shape) I used path_windows).

 

My Problem is that for the process of Shape -> GeoJSON I always get an error '...se_shape_2.shx' lacks the required extension `shp', altough the shx, prj and dbf file belong to the shapefile.

 

Is there ANY way how FME recognizes that these files also belong to the shapefile?

 

 

Thanks a lot.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • April 8, 2019

Can you use a testfilter after the PATH reader to filter out .shp files in one direction, .json in another and then do nothing with the other files in the folder, e.g. shx


Forum|alt.badge.img

Can you use a testfilter after the PATH reader to filter out .shp files in one direction, .json in another and then do nothing with the other files in the folder, e.g. shx

Hi @egomm, thanks a lot for the tip! Unfortunately all four(shx/shp/prj/dbf) are needed do to the feature attributes and projection information. Do you maybe have an idea how FME could recognize all of them as the one "shapefile"?


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • April 8, 2019

Hi @egomm, thanks a lot for the tip! Unfortunately all four(shx/shp/prj/dbf) are needed do to the feature attributes and projection information. Do you maybe have an idea how FME could recognize all of them as the one "shapefile"?

I'm not sure i follow. You should only have to read the .shp file. The other files need to be present alongside the shp file in the folder it's in but you don't need to read them separately.


xiaomengatsafe
Safer
Forum|alt.badge.img+11

As egomm mentioned, to read the attribute, and projection info from the associated files, FME only need to read the file with .shp extension. So, in your Directory and File Pathnames reader, you can add a Path Filter to only read .shp. Hope this helps.