Skip to main content
Question

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


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.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • 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
ebygomm wrote:

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+32
  • Influencer
  • April 8, 2019
sara_lenakordas wrote:

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+3

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.

 


Reply


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