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
  • 34 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.

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

4 replies

danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • September 27, 2021

Hi @toarches​ 

 

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

 

Thanks in Advance,

Danilo


  • Author
  • 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
  • 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
  • September 29, 2021

Thanks drc43. It works after adding a test filter.


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