Skip to main content
Solved

I have a lot of files with different coordinate systems. However, coordinate extractor only works to get a coordinate system of a file. Is there a way to get a list of coordinate system names of multiple files in different formats (shp, tab, kmz..)

  • September 27, 2021
  • 4 replies
  • 50 views

I have a lot of files with different coordinate systems. However, coordinate extractor only works to get a coordinate system of a file. Is there a way to get a list of coordinate system names of multiple files in different formats (shp, tab, kmz..)

Best answer by drc43

I think you can achieve this with a Directory & File Pathnames Reader and a FeatureReader. The Directory Reader can be set up to read in all the files you want to check. And then run that into the FeatureReader setup with Format: Generic (Any Format) and Dataset: path_windows attribute from the Directory Reader. Then run the Generic port into the CoordinateSystemExtractor. Keep in mind you will have to clean up the result, especially for multi-file formats like shapefiles. This method reads in all the files individually (.dbf, .shp, .shx, .prj, etc.) of which only the .prj file will have a coordinate system assigned to it.

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

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • September 27, 2021

Hi @toarches​ 

 

You can use the transformer CoordinateSystemExtractor to get the name of files.

 

Thanks in Advance,

Danilo


  • Author
  • 2 replies
  • September 28, 2021

Thanks Danilo. I tried it and it worked with single file. I mentioned it in my question. I want to get coordinate systems of a lof of files as a list.


drc43
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 83 replies
  • Best Answer
  • September 28, 2021

I think you can achieve this with a Directory & File Pathnames Reader and a FeatureReader. The Directory Reader can be set up to read in all the files you want to check. And then run that into the FeatureReader setup with Format: Generic (Any Format) and Dataset: path_windows attribute from the Directory Reader. Then run the Generic port into the CoordinateSystemExtractor. Keep in mind you will have to clean up the result, especially for multi-file formats like shapefiles. This method reads in all the files individually (.dbf, .shp, .shx, .prj, etc.) of which only the .prj file will have a coordinate system assigned to it.


  • Author
  • 2 replies
  • September 29, 2021

Thanks drc43. It works after adding a test filter.