Skip to main content
Solved

Create multiple geometry with XML


philippeb
Enthusiast
Forum|alt.badge.img+20

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

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

3 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 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+20
  • Author
  • Enthusiast
  • October 22, 2019
daveatsafe wrote:

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
  • October 22, 2019
philippeb wrote:

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.


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