Skip to main content
Solved

Create multiple geometry with XML

  • October 22, 2019
  • 3 replies
  • 22 views

philippeb
Enthusiast
Forum|alt.badge.img+22

I'm trying to create multiple geometry with XML.

I'm using GeometryReplacer to create my geometry.

My XML looks like this, but it seems that I can't create more than 1 geometry... Why??

Functions aren't supported more than once??

I don't want to use a Creator for each geometry... any solution?

Thanks!

<?xml version="1.0" encoding="US_ASCII" standalone="no" ?>
<geometry>
    <arcBy3Points>
            <startCoord x="100" y="0"/><midCoord x="80" y="40"/><endCoord x="50" y="50"/>
    </arcBy3Points> 
    <line>
            <coord x="50" y="50"/><coord x="100" y="50"/>
    </line>
</geometry>

Best answer by daveatsafe

Hi @philippeb,

You can only create a single geometry in the GeometryReplacer. If you want the arc and line to be part of the same geometry, please wrap them in a <path>:

<?xml version="1.0" encoding="US_ASCII" standalone="no" ?>
<geometry>
<path>
    <arcBy3Points>
            <startCoord x="100" y="0"/><midCoord x="80" y="40"/><endCoord x="50" y="50"/>
    </arcBy3Points> 
    <line>
            <coord x="50" y="50"/><coord x="100" y="50"/>
    </line>
 </path>
</geometry>

If the two pieces do not join, you can wrap them in a <multicurve> instead

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 1637 replies
  • Best Answer
  • October 22, 2019

Hi @philippeb,

You can only create a single geometry in the GeometryReplacer. If you want the arc and line to be part of the same geometry, please wrap them in a <path>:

<?xml version="1.0" encoding="US_ASCII" standalone="no" ?>
<geometry>
<path>
    <arcBy3Points>
            <startCoord x="100" y="0"/><midCoord x="80" y="40"/><endCoord x="50" y="50"/>
    </arcBy3Points> 
    <line>
            <coord x="50" y="50"/><coord x="100" y="50"/>
    </line>
 </path>
</geometry>

If the two pieces do not join, you can wrap them in a <multicurve> instead


philippeb
Enthusiast
Forum|alt.badge.img+22
  • Author
  • Enthusiast
  • 329 replies
  • October 22, 2019

Hi @philippeb,

You can only create a single geometry in the GeometryReplacer. If you want the arc and line to be part of the same geometry, please wrap them in a <path>:

<?xml version="1.0" encoding="US_ASCII" standalone="no" ?>
<geometry>
<path>
    <arcBy3Points>
            <startCoord x="100" y="0"/><midCoord x="80" y="40"/><endCoord x="50" y="50"/>
    </arcBy3Points> 
    <line>
            <coord x="50" y="50"/><coord x="100" y="50"/>
    </line>
 </path>
</geometry>

If the two pieces do not join, you can wrap them in a <multicurve> instead

it's working good thanks a lot!

Is there a documentation about those <path> <multicurve> functions? (And potentially more of them I suppose?)

 


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 1637 replies
  • October 22, 2019

it's working good thanks a lot!

Is there a documentation about those <path> <multicurve> functions? (And potentially more of them I suppose?)

 

We don't document the FME XML externally, since it can change without notice as we add more capabilities to FME. It's best used to store geometry, or extract info from, rather than create geometry. That said, you can figure out a lot from the XML tab in the Creator transformer, or by extracting FME XML in the GeometryExtractor.