Skip to main content
Hello,

 

I am converting shape files to variuos formats. Input shape file has been created by non-ESRI tool. When the shape file contains NULL attribute values for all features; that particular attribute is not in target format.

 

 

e.g.

 

Shape file with attributes ID, NAME, URL, REMARKS with URL and REMARKS for all features is NULL. In this case output format there are only 2 attributes ID and NAME rest two are missing from output file.

 

 

I also observed that in "User Attributes" tab in "Feature Type Properties" dialog of a shape reader, I am not able to see these attributes i.e. in ablove case REMARKS and URL.

 

 

Is this behavior as expected? How can force FME to write out all attributes even if it's NULL.

 

 

Cheers,

 

John
Hi,

 

 

NULL-values aren't really supported in Shape-files, if I recall correctly. You can try and use a NullAttributeMapper to map these values to an empty string:

 

 

 

 

David
you can have blank or non geometric objects mixed in shape files, maybe test on those?

 

I would also map "Missing" attributes, empty or null attributes would show up in the inspector.
Hi Jhon,

 

 

sounds strange. If the source shape data has field definitions for "URL" and "REMARKS", the reader feature type should show their names as "User Attributes" even if all of their values are empty.

 

How did you confirm that the shape data has those field definitions?

 

 

Takashi
Hi Takashi,

 

 

If I open source shape file in FME data Inspector I am seeing those fields. But not in output shapefile.

 

 

Cheers.
If the field names appear in the Table View of Data Inspector, those should also appear in the User Attributes tab of the reader feature type.

 

I tested a shape dataset that has completely empty fields, but was not able to reproduce the behavior. The field names appeared in the User Attributes, and also the schema was copied to destination Dynamic Schema writer feature types correctly.

 

increasingly strange...

 

 

Another test. Try opening the file (*.dbf) containing attributes of the source shape dataset with MS-Excel. If the field names appear in the spread sheet with appropriate cell width, the dbf file probably has no problem.
Or, the Schema (Any Format) reader can also be used to check if the schema in the source dataset is defined correctly.
Thanks Takashi. Filed names in dbf were of zero width.

Reply