Skip to main content

Hello

 

 

I'm looking for inspiration to parse a tab delimited text file that defines features. Geometry can be Point (single row), or Line/Poly multiple rows with the order maintained in the file and also with a sequenece number if required.

This is all fairly simple except the segments for Line/Poly can be a mix of straight lines and arc segments.

Looking for ideas how to construct the geometry for Lines/Polys containing arcs?

 

My current approach might be to build the geometry in an attribute value (FME OGC WKT doesn't support arcs) and use GeometryReplacer

Further suggestions appreciated - Thanks

How are the arcs defined? Could you build the text string as FME XML/gml and follow with the geometry replacer?

 


How are the arcs defined? Could you build the text string as FME XML/gml and follow with the geometry replacer?

 

0684Q00000ArKHlQAN.png

There's a coordinate, radius and also two angle (start/end). Your approach is what I'm thinking, and might stay away from GML if I can.

 

Here's a slightly different example extracted from Oracle:

<?xml version="1.0" encoding="US_ASCII" standalone="no" ?>
<geometry>
    <polygon>
        <path>
            <line>
                <coord x="6" y="10"/>
                <coord x="10" y="1"/>
                <coord x="14" y="10"/>
            </line>
            <arcBy3Points>
                <startCoord x="14" y="10"/>
                <midCoord x="10" y="14"/>
                <endCoord x="6" y="10"/>
            </arcBy3Points>
        </path>
    </polygon>
</geometry>

There's a coordinate, radius and also two angle (start/end). Your approach is what I'm thinking, and might stay away from GML if I can.

 

Here's a slightly different example extracted from Oracle:

<?xml version="1.0" encoding="US_ASCII" standalone="no" ?>
<geometry>
    <polygon>
        <path>
            <line>
                <coord x="6" y="10"/>
                <coord x="10" y="1"/>
                <coord x="14" y="10"/>
            </line>
            <arcBy3Points>
                <startCoord x="14" y="10"/>
                <midCoord x="10" y="14"/>
                <endCoord x="6" y="10"/>
            </arcBy3Points>
        </path>
    </polygon>
</geometry>

It looks like you can omit the secondary radius and the end point without issues, so you'd just need to calculate the sweep angle if you have coordinate, radius and also two angles (start/end)  - I'm not sure if you just have start and end how you know whether to go clockwise or counterclockwise though?


It looks like you can omit the secondary radius and the end point without issues, so you'd just need to calculate the sweep angle if you have coordinate, radius and also two angles (start/end) - I'm not sure if you just have start and end how you know whether to go clockwise or counterclockwise though?

Just finding the code for ACW/CW direction

Next up Great Circle and Rhumb lines


Reply