Search in sources :

Example 1 with Wkb2iox

use of ch.interlis.iox_j.wkb.Wkb2iox in project ili2db by claeis.

the class PostgisColumnConverter method toIomMultiSurface.

@Override
public IomObject toIomMultiSurface(Object geomobj, String sqlAttrName, boolean is3D) throws SQLException, ConverterException {
    byte[] bv = (byte[]) geomobj;
    Wkb2iox conv = new Wkb2iox();
    try {
        return conv.read(bv);
    } catch (ParseException e) {
        throw new ConverterException(e);
    }
}
Also used : ConverterException(ch.ehi.ili2db.converter.ConverterException) ParseException(com.vividsolutions.jts.io.ParseException) Wkb2iox(ch.interlis.iox_j.wkb.Wkb2iox)

Example 2 with Wkb2iox

use of ch.interlis.iox_j.wkb.Wkb2iox in project ili2db by claeis.

the class PostgisColumnConverter method toIomMultiCoord.

@Override
public IomObject toIomMultiCoord(Object geomobj, String sqlAttrName, boolean is3D) throws SQLException, ConverterException {
    byte[] bv = (byte[]) geomobj;
    Wkb2iox conv = new Wkb2iox();
    try {
        return conv.read(bv);
    } catch (ParseException e) {
        throw new ConverterException(e);
    }
}
Also used : ConverterException(ch.ehi.ili2db.converter.ConverterException) ParseException(com.vividsolutions.jts.io.ParseException) Wkb2iox(ch.interlis.iox_j.wkb.Wkb2iox)

Example 3 with Wkb2iox

use of ch.interlis.iox_j.wkb.Wkb2iox in project ili2db by claeis.

the class PostgisColumnConverter method toIomPolyline.

@Override
public IomObject toIomPolyline(Object geomobj, String sqlAttrName, boolean is3D) throws SQLException, ConverterException {
    byte[] bv = (byte[]) geomobj;
    // String v=((org.postgresql.util.PGobject)geomobj).getValue();
    // byte bv[]=WKBReader.hexToBytes(v);
    Wkb2iox conv = new Wkb2iox();
    try {
        return conv.read(bv);
    } catch (ParseException e) {
        throw new ConverterException(e);
    }
}
Also used : ConverterException(ch.ehi.ili2db.converter.ConverterException) ParseException(com.vividsolutions.jts.io.ParseException) Wkb2iox(ch.interlis.iox_j.wkb.Wkb2iox)

Example 4 with Wkb2iox

use of ch.interlis.iox_j.wkb.Wkb2iox in project ili2db by claeis.

the class PostgisColumnConverter method toIomCoord.

@Override
public IomObject toIomCoord(Object geomobj, String sqlAttrName, boolean is3D) throws SQLException, ConverterException {
    byte[] bv = (byte[]) geomobj;
    Wkb2iox conv = new Wkb2iox();
    try {
        return conv.read(bv);
    } catch (ParseException e) {
        throw new ConverterException(e);
    }
}
Also used : ConverterException(ch.ehi.ili2db.converter.ConverterException) ParseException(com.vividsolutions.jts.io.ParseException) Wkb2iox(ch.interlis.iox_j.wkb.Wkb2iox)

Example 5 with Wkb2iox

use of ch.interlis.iox_j.wkb.Wkb2iox in project ili2db by claeis.

the class PostgisColumnConverter method toIomMultiPolyline.

@Override
public IomObject toIomMultiPolyline(Object geomobj, String sqlAttrName, boolean is3D) throws SQLException, ConverterException {
    byte[] bv = (byte[]) geomobj;
    // String v=((org.postgresql.util.PGobject)geomobj).getValue();
    // byte bv[]=WKBReader.hexToBytes(v);
    Wkb2iox conv = new Wkb2iox();
    try {
        return conv.read(bv);
    } catch (ParseException e) {
        throw new ConverterException(e);
    }
}
Also used : ConverterException(ch.ehi.ili2db.converter.ConverterException) ParseException(com.vividsolutions.jts.io.ParseException) Wkb2iox(ch.interlis.iox_j.wkb.Wkb2iox)

Aggregations

ConverterException (ch.ehi.ili2db.converter.ConverterException)6 Wkb2iox (ch.interlis.iox_j.wkb.Wkb2iox)6 ParseException (com.vividsolutions.jts.io.ParseException)6