Skip to main content
Dear community

 

I'm trying to build a workflow that convert an autocad dxf to a geotiff, 1 dxf, 1 tiff, I don't want the dxf (dataset) to be splitted into layers (data type).

 

I was able to create it and it works except for the output tiff name, that I want to be the same as dxf name in input.

 

The workspace is this:

 

http://img199.imageshack.us/img199/7752/fmedxftotiff.png

 

The dxf reader has a fme_basename that is the name, without extension, of the input dxf. This parameter goes trough each transformer but, when it comes to the imagerasterizer it changes.

 

Imagerasterizer exposes its own fme_basename, that is equal to the imagerasterizer name (i.e imagerasterizer).

 

How can I tell the tiff writer to use the fme_basename coming from the reader (i.e. dxf name) to save the tif?

 

 

Am I clear?

 

Thank you

 

Pietro
Link to the workflow

 

http://img199.imageshack.us/img199/7752/fmedxftotiff.png
Hi Pietro,

 

 

have you tried to set a fanout on the writer with fme_basename as the fanout attribute?

 

 

David
One more thing: try to use an AttributeCopier on fme_basename (right after the Reader) and then use the new attribute as the fanout value on the Writer.

 

 

That way you should be able to avoid any intereference from the ImageRasterizer.

 

 

David
Yes, I tried..

 

On writer under general/Name parameters I selected Fanout by attributes>nome

 

In attribute copier I selected soucre att.= fme_basename and target=nome.

 

This is the workflow:

 

http://img94.imageshack.us/img94/7752/fmedxftotiff.png

 

I get this error:

 

 

GEOTIFF writer: Failed to obtain a raster geometry from the feature. Only features with raster geometry are expected by the GEOTIFF writer

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Feature Type: `018131AQ'

Attribute(string) : `__wb_out_feat_type__' has value `018131AQ'

Attribute(entangled: 32 bit unsigned integer): `autocad_color' has value `7'

Attribute(string) : `autocad_entity' has value `autocad_ellipse'

Attribute(encoded: utf-16) : `autocad_entity_handle' has value `4075F'

Attribute(string) : `autocad_entity_visibility' has value `visible'

Attribute(encoded: utf-16) : `autocad_layer' has value `X1A000GH_GHIAIONE_PIETRAIA'

Attribute(string) : `autocad_layer_frozen' has value `no'

Attribute(string) : `autocad_layer_hidden' has value `no'

Attribute(string) : `autocad_layer_locked' has value `no'

Attribute(string) : `autocad_layer_on' has value `yes'

Attribute(string) : `autocad_layer_type' has value `not_frozen'

Attribute(encoded: utf-16) : `autocad_linetype' has value `ByLayer'

Attribute(string) : `autocad_linetype_scale' has value `1'

Attribute(string) : `autocad_lineweight' has value `-1'

Attribute(string) : `autocad_original_color' has value `ByLayer'

Attribute(string) : `autocad_original_entity_type' has value `autocad_circle'

Attribute(64 bit real) : `autocad_primary_axis' has value `0.5'

Attribute(encoded: utf-16) : `autocad_resolved_linetype' has value `CONTINUOUS'

Attribute(64 bit real) : `autocad_rotation' has value `0'

Attribute(64 bit real) : `autocad_secondary_axis' has value `0.5'

Attribute(string) : `autocad_source_filename' has value `E:\\CTRN5000\\018131AQ.dxf'

Attribute(string) : `autocad_space' has value `model_space'

Attribute(64 bit real) : `autocad_thickness' has value `0'

Attribute(string) : `fme_basename' has value `018131AQ'

Attribute(entangled: string) : `fme_color' has value `0,0,0'

Attribute(string) : `fme_feature_type' has value `X1A000GH_GHIAIONE_PIETRAIA'

Attribute(string) : `fme_geometry' has value `fme_undefined'

Attribute(string) : `fme_template_feature_type' has value `NewFeatureType'

Attribute(string) : `fme_type' has value `fme_no_geom'

Attribute(string) : `geotiff_type' has value `fme_no_map'

Attribute(string) : `multi_writer_id' has value `018131AQ'

Attribute(string) : `nome' has value `018131AQ'

Coordinate System: `MonteMario_1.Italy-2'

Geometry Type: IFMENull

===========================================================================

A fatal error has occurred. Check the logfile above for details

... Last line repeated 4 times ...

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Feature output statistics for `GEOTIFF' writer using keyword `GEOTIFF_1':

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Features Written

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

018131AQ 1

==============================================================================

Total Features Written 1

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Feature output statistics for `MULTI_WRITER' writer using keyword `GEOTIFF_1_FANOUT':

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Features Written

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

018131AQ 1

==============================================================================

Total Features Written 1

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

A fatal error has occurred. Check the logfile above for details

Stored 2 feature(s) to FME feature store file `C:\\Documents and Settings\\arpa771000\\Documenti\\My FME Workspaces/acad2geotiff_log.ffs'

FME Session Duration: 4.0 seconds. (CPU: 2.0s user, 0.4s system)

END - ProcessID: 5096, peak process memory usage: 84764 kB, current process memory usage: 65680 kB

 

A fatal error has occurred. Check the logfile above for details

Program Terminating

 

Translation FAILED.

 

 


Hi Pietro,

 

 

yes, you cannot connect the AttributeCopier directly to your writer since it outputs your original vector features (hence the error you get).

 

 

The AttributeCopier goes between the Reader and the 2DForcer.

 

 

You will also have to include your attribute "nome" as a Group By attribute inside the ImageRasterizer.

 

 

David
SuperThankyou!

 

Now it works!!

 

Now, do you have any hint/tutorial on how to process 1000 dxf files this way?

 

 

Bie

 

Pietro
Ok, I found Batch deploy under file menu..

 

Is this the best way?

 

Thank you again

 

p
Good to hear!

 

 

There are several ways of running a workspace over many input files. The easiest is probably to just point your reader to a directory rather than a file. In the dialog where you specify the DXF filename, there is a button on the far right with a plus-sign on it:

 

 

 

 

Here you can easily specify one or many directories to read.

 

 

Other ways include batch deployment and the WorkspaceRunner.

 

 

Buona fortuna!

 

 

David
Ok, got it!

 

Thnx again!

 

p

Reply