Skip to main content
Solved

GeoJSON output order and NULL column


connecter
Forum|alt.badge.img+4

Hello,

my first problem: Writing a GeoJSON in the right order. Simple example:

I want a output in the order A,B,C (like I set it in the writer). But the GeoJSON file is A,C,B, because the first row in B is empty.

 

Second Problem: When the B column is empty. Only A and C is written. How can I get an empty column in the writer?

Thanks for your feedback!

Best answer by takashi

Hi @connecter, I was not able to reproduce the first issue - wrong order of attributes. What version of FME are you using? Could you share a small workspace and source dataset example which can reproduce the issue?

Regarding the second issue - missing B, try assign Null to every missing B with the NullAttributeMapper transformer before writing.

View original
Did this help you find an answer to your question?

2 replies

takashi
Influencer
  • Best Answer
  • July 23, 2019

Hi @connecter, I was not able to reproduce the first issue - wrong order of attributes. What version of FME are you using? Could you share a small workspace and source dataset example which can reproduce the issue?

Regarding the second issue - missing B, try assign Null to every missing B with the NullAttributeMapper transformer before writing.


connecter
Forum|alt.badge.img+4
  • Author
  • July 25, 2019

Hi @takashi,

thank you for your answer. Both problems are solved with the NullAttributeMapper. The first issue exists, when B have no entry and it looks like:

"properties" : {
"A" : Hans,
"C" : Berlin
}

"properties" : {
"A" : Klaus,
"B" : 25,
"C" : Paris
}

The order of the column is A,C,B. With your help, the NullAttributeMapper create a B with "null".

Maybe the GeoJSON writer get an update with this option? It that case, its makes not much sense.


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