ch.interlis.iox_j.jts
Class Iox2jts

java.lang.Object
  extended by ch.interlis.iox_j.jts.Iox2jts

public class Iox2jts
extends java.lang.Object

Utility to convert from INTERLIS to JTS geometry types.

Author:
ceis

Method Summary
static java.lang.String coord2hexwkb(IomObject value)
          Converts a COORD to a OGC WKB hex string.
static com.vividsolutions.jts.geom.Coordinate coord2JTS(IomObject value)
          Converts a COORD to a JTS Coordinate.
static java.lang.String polyline2hexwkb(IomObject value, double p)
          Converts a POLYLINE to a OGC WKB hex string.
static com.vividsolutions.jts.geom.CoordinateList polyline2JTS(IomObject polylineObj, boolean isSurfaceOrArea, double p)
          Converts a POLYLINE to a JTS CoordinateList.
static java.lang.String surface2hexwkb(IomObject value, double strokeP)
          Converts a SURFACE to a OGC WKB hex string.
static com.vividsolutions.jts.geom.Polygon surface2JTS(IomObject obj, double strokeP)
          Converts a SURFACE to a JTS Polygon.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

coord2hexwkb

public static java.lang.String coord2hexwkb(IomObject value)
                                     throws Iox2jtsException
Converts a COORD to a OGC WKB hex string.

Parameters:
value - INTERLIS COORD structure.
Returns:
WKB as hex encoded string.
Throws:
Iox2jtsException

polyline2hexwkb

public static java.lang.String polyline2hexwkb(IomObject value,
                                               double p)
                                        throws Iox2jtsException
Converts a POLYLINE to a OGC WKB hex string.

Parameters:
value - INTERLIS POLYLINE structure.
Returns:
WKB as hex encoded string.
Throws:
Iox2jtsException

surface2hexwkb

public static java.lang.String surface2hexwkb(IomObject value,
                                              double strokeP)
                                       throws Iox2jtsException
Converts a SURFACE to a OGC WKB hex string.

Parameters:
value - INTERLIS SURFACE structure.
Returns:
WKB as hex encoded string.
Throws:
Iox2jtsException

coord2JTS

public static com.vividsolutions.jts.geom.Coordinate coord2JTS(IomObject value)
                                                        throws Iox2jtsException
Converts a COORD to a JTS Coordinate.

Parameters:
value - INTERLIS COORD structure.
Returns:
JTS Coordinate.
Throws:
Iox2jtsException

polyline2JTS

public static com.vividsolutions.jts.geom.CoordinateList polyline2JTS(IomObject polylineObj,
                                                                      boolean isSurfaceOrArea,
                                                                      double p)
                                                               throws Iox2jtsException
Converts a POLYLINE to a JTS CoordinateList.

Parameters:
polylineObj - INTERLIS POLYLINE structure
isSurfaceOrArea - true if called as part of a SURFACE conversion.
p - maximum stroke to use when removing ARCs
Returns:
JTS CoordinateList
Throws:
Iox2jtsException

surface2JTS

public static com.vividsolutions.jts.geom.Polygon surface2JTS(IomObject obj,
                                                              double strokeP)
                                                       throws Iox2jtsException
Converts a SURFACE to a JTS Polygon.

Parameters:
obj - INTERLIS SURFACE structure
strokeP - maximum stroke to use when removing ARCs
Returns:
JTS Polygon
Throws:
Iox2jtsException