Skip to main content

Folks, I'm having trouble getting an actual object out of my Mapinfo objects and getting them represented in GML. Being that FME is (Feature Manipulation Engine) I expected this was implicit but it appears not. The Mapinfo Reader doesn't present an "object" to perform some kind of process on. I'm taking a guess I need some kind of Transformer.

 

I tried a GeometryExtractor. I presume the Input is implicit in that I attached it to the Mapinfo table. I have some options on the output. I selected GML v3.1.1.(matches my schema) and named the output to match the GML tag I'm targeting. Running the conversion shows no errors but neither does it give me a "poslist". I did see a GMLFeatueComposer with enough sophistication to reference my XSD but this threw and error when the translation was run.

BTW my attribute tagging works perfectly in the translation so at that minimal level I have a GML (that has no Geography)

Any guidance appreciated.

If I understand you correctly, you are trying to write the geometry to the GML....did you try the GeometryExtractor (set to GML)?


If I understand you correctly, you are trying to write the geometry to the GML....did you try the GeometryExtractor (set to GML)?

Indeed @itay From my original post.

 

I tried a GeometryExtractor. I presume the Input is implicit in that I attached it to the Mapinfo table. I have some options on the output. I selected GML v3.1.1.(matches my schema) and named the output to match the GML tag I'm targeting. Running the conversion shows no errors but neither does it give me a "poslist".

Indeed @itay From my original post.

 

I tried a GeometryExtractor. I presume the Input is implicit in that I attached it to the Mapinfo table. I have some options on the output. I selected GML v3.1.1.(matches my schema) and named the output to match the GML tag I'm targeting. Running the conversion shows no errors but neither does it give me a "poslist".
oops! note to myself minimally 2 cups of coffee before answering anything.....

 

Anything of value in this page?

 

https://knowledge.safe.com/search.html?f=&type;=kbentry&c;=&redirect;=search%2Fsearch&sort;=relevance&q;=writing+gml

 

 


How are you writing the features into the destination GML document? If you are using the GML writer, you don't need to use the GeometryExtractor, since the GML writer translates the geometry object to an appropriate GML geometry element automatically.

And the GometryExtracotor would remove the geometry object from every feature if the Remove Geometry was set to Yes. Check the parameter setting.


How are you writing the features into the destination GML document? If you are using the GML writer, you don't need to use the GeometryExtractor, since the GML writer translates the geometry object to an appropriate GML geometry element automatically.

And the GometryExtracotor would remove the geometry object from every feature if the Remove Geometry was set to Yes. Check the parameter setting.

@takashi well that's a good question. I presumed that since I had a Mapinfo Reader and a GML writer that the features would somehow FMEagically look after themselves. They haven't. The GeometryExtractor was a desperate attempt to get something spatial across.

 

The prepared examples all seem to work.

 

The only wrinkle I have is an XSD I'm trying to comply with. It's confirmed as well formatted and is GML by the guys as Safe.

 

When I added the GML writer I specified the Feature Type Definition as Import from Data Set.

 

From there I can go into the Parameters and specify my XSD which gives me all the target elements.

 

Is is possible, amongst the many setting in Parameters I'm not selecting or checking a box?

 

To teach myself bits and pieces I use a simple MI to SHP conversion. As I'm intimately familiar with both formats it's easy to see when something is working or not. However no examples I've found deal with the objects being written to GML which leads me to believe I'm not supposed to do anything special and yet I still have no coordinates at all in the GML.

 


Indeed @itay From my original post.

 

I tried a GeometryExtractor. I presume the Input is implicit in that I attached it to the Mapinfo table. I have some options on the output. I selected GML v3.1.1.(matches my schema) and named the output to match the GML tag I'm targeting. Running the conversion shows no errors but neither does it give me a "poslist".
What about trying a simple approach such as generate workspace? (cntrl+g) and see how that goes.

 

 


What about trying a simple approach such as generate workspace? (cntrl+g) and see how that goes.

 

 

@itay I tried your suggestion and to the extent that I have an Mapinfo input and a successful GML output it works.

 

So functionally I have an FME project that works.

 

However it's nowhere near what I need to validate against my Schema.

 

Is the idea now to rework this project to end up with an XML\\GML that validates against my Schema?

 


@itay I tried your suggestion and to the extent that I have an Mapinfo input and a successful GML output it works.

 

So functionally I have an FME project that works.

 

However it's nowhere near what I need to validate against my Schema.

 

Is the idea now to rework this project to end up with an XML\\GML that validates against my Schema?

 

If you intention is now to validate your result, try using the XMLValidator.

 

 


How are you writing the features into the destination GML document? If you are using the GML writer, you don't need to use the GeometryExtractor, since the GML writer translates the geometry object to an appropriate GML geometry element automatically.

And the GometryExtracotor would remove the geometry object from every feature if the Remove Geometry was set to Yes. Check the parameter setting.

Hi @andyew, if you want to import destination feature type(s) from an existing application schema file (*.xsd), this procedure might help you.

 

  1. Select Import from Dataset as the Feature Type Definition in the Add Writer dialog and close with OK].
  2. In the Import Writer Feature Types dialog, click Parameters] button to open the GML parameters dialog, set the application schema file path to the Application Schema field, then close the parameters dialog with OK]. Here, you don't need to set the Dataset field in the Import Writer Feature Types dialog.
  3. Close the Import Writer Feature Types dialog with OK]. You can then select required feature type(s) in the Select Feature Types dialog if the application schema defines two or more feature types.

 


@takashi well that's a good question. I presumed that since I had a Mapinfo Reader and a GML writer that the features would somehow FMEagically look after themselves. They haven't. The GeometryExtractor was a desperate attempt to get something spatial across.

 

The prepared examples all seem to work.

 

The only wrinkle I have is an XSD I'm trying to comply with. It's confirmed as well formatted and is GML by the guys as Safe.

 

When I added the GML writer I specified the Feature Type Definition as Import from Data Set.

 

From there I can go into the Parameters and specify my XSD which gives me all the target elements.

 

Is is possible, amongst the many setting in Parameters I'm not selecting or checking a box?

 

To teach myself bits and pieces I use a simple MI to SHP conversion. As I'm intimately familiar with both formats it's easy to see when something is working or not. However no examples I've found deal with the objects being written to GML which leads me to believe I'm not supposed to do anything special and yet I still have no coordinates at all in the GML.

 

Hi @andyew, I was able to reproduce the situation that the GML writer won't write geometry elements into the destination dataset if the destination feature types have been imported from an existing application schema (*.xsd). It would be necessary to investigate further.

 


OK. Try setting the geometry element name as the Geometry Name to every feature with the GeometryPropertySetter. For example, if the application schema defines "pos" as geometry element name for the destination feature type,


OK. Try setting the geometry element name as the Geometry Name to every feature with the GeometryPropertySetter. For example, if the application schema defines "pos" as geometry element name for the destination feature type,

Thanks @takashi. This is inddeed the issue. I seem to have a mixture of GML targets where the object is explicitly noted(per your answer) as a target and others where GML is implied. In the case where it's implied I don't need the GeometryPropertySetter, where it's implied I don't need the 'Setter. Thanks for the help.

 


Reply