Skip to main content
Solved

Attributes missing from Output file

  • December 8, 2014
  • 7 replies
  • 74 views

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

Best answer by takashi

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.
View original
Did this help you find an answer to your question?
<strong>This post is closed to further activity.</strong><br /> It may be a question with a best answer, an implemented idea, or just a post needing no comment.<br /> If you have a follow-up or related question, please <a href="https://community.safe.com/topic/new">post a new question or idea</a>.<br /> If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

david_r
Celebrity
  • December 8, 2014
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

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • December 8, 2014
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.

takashi
Evangelist
  • December 9, 2014
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

  • Author
  • December 9, 2014
Hi Takashi,

 

 

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

 

 

Cheers.

takashi
Evangelist
  • Best Answer
  • December 9, 2014
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.

takashi
Evangelist
  • December 9, 2014
Or, the Schema (Any Format) reader can also be used to check if the schema in the source dataset is defined correctly.

  • Author
  • December 9, 2014
Thanks Takashi. Filed names in dbf were of zero width.

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