Skip to main content

Say I have a FILE GDB called Fruit with the following feature datasets (Oranges).

say there are not feature rows inside Peel or Slices feature classes. how can I extract the coordinate system

Fruit

  • Oranges (feature dataset)
    • peel (feature class)
    • slices (feature class)

In arcCatalog I can easily right click the feature dataset and go to the XY coordinate system tab to see this.

methods I have tried in FME

  • TCPL start up script - (here I extract domains and geometry type, but no COORD systems)
  • populating a single row in FME, than reading trying coordinate extractor
  • python caller - this will not work if feature dataset is empty

Thanks,

Doug

Hi @dfresh,

Did you try to use a PythonCaller and a scrpit to get the coordinatesystem:

import fme
import fmeobjects
def _sistema_coord(feature):
    
    csMgr = fmeobjects.FMECoordSysManager() # call coord system
    
    cs = feature.getCoordSys()  #get the coord system of features
   
    if cs != None and cs != '':
        
        params = csMgr.getCoordSysParms(cs)
        if 'EPSG' in params:
            
            loc = params.index('EPSG') + 1  
            feature.setAttribute('EPSG',params loc])

But i believe to need to have a feature beforr this transformer.

Thanks,

Danilo


Hi @dfresh,

Did you try to use a PythonCaller and a scrpit to get the coordinatesystem:

import fme
import fmeobjects
def _sistema_coord(feature):
    
    csMgr = fmeobjects.FMECoordSysManager() # call coord system
    
    cs = feature.getCoordSys()  #get the coord system of features
   
    if cs != None and cs != '':
        
        params = csMgr.getCoordSysParms(cs)
        if 'EPSG' in params:
            
            loc = params.index('EPSG') + 1  
            feature.setAttribute('EPSG',params loc])

But i believe to need to have a feature beforr this transformer.

Thanks,

Danilo

yes you do need a feature, so this one wont solve it.

 

 


Hi @dfresh,

If you use the Esri Geodatabase (ArcObjects) reader, you have the option to set the Feature Read Mode to Metadata. This will allow the reader to return a metadata feature for each feature class.

The metadata feature geometry will be the bounds of the feature class, in the feature class coordinate system, so you can use a CoordinateSystemExtractor to get the coordinate system name in an attribute.

If you want the Esri WKT for this coordinate system, you can use the CoordinateSystemDescriptionConverter transformer to convert the attribute containing the FME coordinate system name to Esri WKT.


Hi @dfresh,

If you use the Esri Geodatabase (ArcObjects) reader, you have the option to set the Feature Read Mode to Metadata. This will allow the reader to return a metadata feature for each feature class.

The metadata feature geometry will be the bounds of the feature class, in the feature class coordinate system, so you can use a CoordinateSystemExtractor to get the coordinate system name in an attribute.

If you want the Esri WKT for this coordinate system, you can use the CoordinateSystemDescriptionConverter transformer to convert the attribute containing the FME coordinate system name to Esri WKT.

Thanks @DaveAtSafe

 

you solved it, I completely forgot about the metadata feature read mode. this is exactly what I need. thanks!!

Reply