Solved

NetCDF - no CRS desposited

  • 27 January 2017
  • 7 replies
  • 14 views

Badge

Dear FME-community,

I use NetCDF-Data for a FME-Transformation as input (Reader).

The problem is that there’s no CRS (Coordinate Reference System) deposited.

I've add a screenshot (Inspector) in the attachment. "Koordinatensystem" stands for CRS and "Unbekannt" stands for unknown (Line 2).

What I’m doing wrong? Has somebody an idea with transformer I’ve to use?

Thank your very much and best regards!

Konrad

icon

Best answer by david_r 7 February 2017, 09:27

View original

7 replies

Userlevel 4

The NetCDF format is a bit particular like that, FME doesn't automatically parse the metadata to detect the coordinate system. However it isn't too difficult to do yourself if you know your way around FME lists.

Make sure to expose the reader format attributes "netcdf_coordinate_variable{}.name" and check the list contents for relevant keywords. Here's an example for a NetCDF in WGS84 LatLong:

Badge

The NetCDF format is a bit particular like that, FME doesn't automatically parse the metadata to detect the coordinate system. However it isn't too difficult to do yourself if you know your way around FME lists.

Make sure to expose the reader format attributes "netcdf_coordinate_variable{}.name" and check the list contents for relevant keywords. Here's an example for a NetCDF in WGS84 LatLong:

Thank you very much @david_r .

 

I know how to expose the reader format attributes. But I don't know how to work with lists.

 

Which transformer(s) would you recommend?

 

Thank you very much. :)

 

Userlevel 4
Thank you very much @david_r .

 

I know how to expose the reader format attributes. But I don't know how to work with lists.

 

Which transformer(s) would you recommend?

 

Thank you very much. :)

 

In this instance, the absolute easiest to do is to create the list items manually using e.g. the AttributeCreator. You can create them like any other attribute name:

 

 

And so on.

 

 

Otherwise you have the ListBuilder etc, but I think they're overkill for this, personally.

 

Badge

Thank you @david_r ! Now I know how to create attributes, but I don't unterstand the connection to the missing CRS. Can I get the projection from the metadata with this transformer? Thank you very much!

Badge +16

just a guess... from looking at your screen dump it seems like the raster is in LL, if that is the case and you know that for sure you can specify it in the reader coordinate system parameter.

Hope this helps.

Userlevel 4

If you only need FME to recognize the CRS used when reading the NetCDF file, you can e.g. use a Tester to check for

netcdf_coordinate_variable{1}.name = lat

If that is so, you can use a CoordinateSystemSetter set to LL84.

Badge

I've setted to "LL84", now it works! :) Thank you @david_r.

Best regards!

Konrad

Reply