Search in sources :

Example 51 with ParseException

use of com.vividsolutions.jts.io.ParseException in project ili2db by claeis.

the class PostgisColumnConverter method toIomSurface.

@Override
public IomObject toIomSurface(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 52 with ParseException

use of com.vividsolutions.jts.io.ParseException in project ili2db by claeis.

the class FgdbColumnConverter method toIomMultiSurface.

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

Example 53 with ParseException

use of com.vividsolutions.jts.io.ParseException in project ili2db by claeis.

the class FgdbColumnConverter method toIomCoord.

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

Example 54 with ParseException

use of com.vividsolutions.jts.io.ParseException in project ili2db by claeis.

the class FgdbColumnConverter method toIomMultiPolyline.

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

Example 55 with ParseException

use of com.vividsolutions.jts.io.ParseException in project alliance by codice.

the class NitfGmtiTransformer method transformAircraftLocation.

private void transformAircraftLocation(Metacard metacard) {
    String aircraftLocation = formatAircraftLocation(metacard);
    try {
        LOGGER.debug("Formatted Aircraft Location = {}", aircraftLocation);
        if (aircraftLocation != null) {
            // validate the wkt
            WKTReader wktReader = new WKTReader(geometryFactory);
            wktReader.read(aircraftLocation);
            MtirpbAttribute.AIRCRAFT_LOCATION_ATTRIBUTE.getAttributeDescriptors().forEach(descriptor -> setMetacardAttribute(metacard, descriptor.getName(), aircraftLocation));
        }
    } catch (ParseException e) {
        LOGGER.debug(e.getMessage(), e);
    }
}
Also used : ParseException(com.vividsolutions.jts.io.ParseException) WKTReader(com.vividsolutions.jts.io.WKTReader)

Aggregations

ParseException (com.vividsolutions.jts.io.ParseException)64 Geometry (com.vividsolutions.jts.geom.Geometry)28 WKTReader (com.vividsolutions.jts.io.WKTReader)21 ConverterException (ch.ehi.ili2db.converter.ConverterException)17 RyaStatement (org.apache.rya.api.domain.RyaStatement)7 SimpleFeature (org.opengis.feature.simple.SimpleFeature)7 Statement (org.openrdf.model.Statement)7 Wkb2iox (ch.interlis.iox_j.wkb.Wkb2iox)6 IsValidOp (com.vividsolutions.jts.operation.valid.IsValidOp)6 ServiceException (eu.europa.ec.fisheries.uvms.commons.service.exception.ServiceException)6 IoxException (ch.interlis.iox.IoxException)5 MapLayer (au.org.emii.portal.menu.MapLayer)4 WKBReader (com.vividsolutions.jts.io.WKBReader)4 IOException (java.io.IOException)4 Literal (org.openrdf.model.Literal)4 Coordinate (com.vividsolutions.jts.geom.Coordinate)3 Point (com.vividsolutions.jts.geom.Point)3 Polygon (com.vividsolutions.jts.geom.Polygon)3 WKTWriter (com.vividsolutions.jts.io.WKTWriter)3 SQLException (java.sql.SQLException)3