Skip to main content

Hi there,

I was wondering if anybody can give some pointers on writing CityGML dynamically.

I am using a Generic writer in combination with a referenced CityGML writer.

The CityGML feature types have been imported as mentioned here to the referenced CityGML writer.

 

The source data contains feature types that match exactly the CityGML schema specification (PlantCover, Road, LandUse, Building, WaterBody and GenericCityObject).

The Generic writer schema definition is set to dynamic using the schema feature from the FeatureReader transformer.

 KnipselI am not very familiar with the CityGML schema specifications , but since the resulting CityGML LandUse feature type has all the original source attributes plus CityGML generated attributes, I imagine that it should be possible to have that for all the resulting CityGML feature types.

 

Another issue it noticed is that the city_feature_role is set to cityObjectMember despite the fact that I am setting the value in the workspace to the corresponding feature type (PlantCover, Road, LandUse, Building, WaterBody and GenericCityObject), see second image.

Knipsel2LandUse with source data attributes.

 

Knipsel1Building (no source data attributes)

Any help would be appreciated.

@Mark Stoakes​ @Dale Lutz​ @trentatsafe​ @deanatsafe​ 

Cheers,

Itay

 

p.s. Using FMe Desktop Build 20594 - WIN64

The citygml_feature_role looks correct to me

I wonder, if you fanout per fme feature type if the attributes come through, have you tried that? I mean it's not ideal but it's another clue as to what's going on.


The citygml_feature_role looks correct to me

I wonder, if you fanout per fme feature type if the attributes come through, have you tried that? I mean it's not ideal but it's another clue as to what's going on.

Great idea I will give it a try.


The citygml_feature_role looks correct to me

I wonder, if you fanout per fme feature type if the attributes come through, have you tried that? I mean it's not ideal but it's another clue as to what's going on.

Hi @virtualcitymatt​ ,

The writer fan out didn't help all CityGML feature types, beside LandUse, don't have the original attributes. I think this has to do with the strict CityGML schema since mapping some of the original attributes into CItyGML attributes does work.

Still looking for a possible solution for dynamic writing (if at all possible).


Hi @virtualcitymatt​ ,

The writer fan out didn't help all CityGML feature types, beside LandUse, don't have the original attributes. I think this has to do with the strict CityGML schema since mapping some of the original attributes into CItyGML attributes does work.

Still looking for a possible solution for dynamic writing (if at all possible).

All types have support for GenericAttributes so that shouldn't be an issue. The only issue would be if you tried to map an attribute specific to one schema (e..g, the Building Schema) to a different schema (e.g., SolitaryVegetationObject).

It really sounds like a bug to me. I know that FME can read genericAttribues separately, perhaps it can also write them separately. In this case you would need one Mega Schema feature which contained all the attributes, just map null and empty to missing and you should have an appropriate output.

I have never tried this though so I have no idea if it would work.

Have you tried the SchemaSetter to attach a schema feature to each item rather than one for the feature type? That could be another thing to try. Could be that the schema feature only gets used at the beginning and the the rest gets lost?

Either way still seems like a bug to me

 


Hi @virtualcitymatt​ ,

The writer fan out didn't help all CityGML feature types, beside LandUse, don't have the original attributes. I think this has to do with the strict CityGML schema since mapping some of the original attributes into CItyGML attributes does work.

Still looking for a possible solution for dynamic writing (if at all possible).

I tend to agree about the bug but still not sure if I am missing something.

Using the SchemaSetter or creating the schema feature list does not make a difference.

I have also added generic writer feature types for each present feature type but the result is still the same.

KnipselJust to make sure that reading the data is not the issue (using a reader in tech preview status) I have translated the data into FFS and used that to write dynamically, unfortunately the results are the same.

Running out of ideas and a support ticket sounds like the next step.


Reply