Package lupos.geo.serializer

Examples of lupos.geo.serializer.GeoSPARQLWktSerializer


        if(args.length==2)
        {
            Geometry geo1 = GeoHelper.getGeoSPARQLGeometry(args[0]);
            Geometry geo2 = GeoHelper.getGeoSPARQLGeometry(args[1]);
            Geometry union = geo1.union(geo2);
            return new GeoSPARQLWktSerializer().toLiteral(union);
        }
        else
        {
            throw new TypeErrorException("Union Function expects exactly 2 arguments: two geometry objects.");
        }
View Full Code Here


        if(args.length==2)
        {
            Geometry geo1 = GeoHelper.getGeoSPARQLGeometry(args[0]);
            Geometry geo2 = GeoHelper.getGeoSPARQLGeometry(args[1]);
            Geometry symDifference = geo1.symDifference(geo2);
            return new GeoSPARQLWktSerializer().toLiteral(symDifference);
        }
        else
        {
            throw new TypeErrorException("SymDifference Function expects exactly 2 arguments: two geometry objects.");
        }
View Full Code Here

        if(args.length==1)
        {
            Geometry geo = GeoHelper.getGeoSPARQLGeometry(args[0]);
            ConvexHull hull = new ConvexHull(geo);
            Geometry convexHullGeo = hull.getConvexHull();
            return new GeoSPARQLWktSerializer().toLiteral(convexHullGeo);
        }
        else
        {
            throw new TypeErrorException("ConvexHull Function expects exactly 1 arguments: A geometry.");
        }
View Full Code Here

        if(args.length==2)
        {
            Geometry geo1 = GeoHelper.getGeoSPARQLGeometry(args[0]);
            Geometry geo2 = GeoHelper.getGeoSPARQLGeometry(args[1]);
            Geometry intersection = geo1.intersection(geo2);
            return new GeoSPARQLWktSerializer().toLiteral(intersection);
        }
        else
        {
            throw new TypeErrorException("Intersection Function expects exactly 2 arguments: two geometry objects.");
        }
View Full Code Here

        if(args.length==2)
        {
            Geometry geo1 = GeoHelper.getGeoSPARQLGeometry(args[0]);
            Geometry geo2 = GeoHelper.getGeoSPARQLGeometry(args[1]);
            Geometry difference = geo1.difference(geo2);
            return new GeoSPARQLWktSerializer().toLiteral(difference);
        }
        else
        {
            throw new TypeErrorException("Difference Function expects exactly 2 arguments: two geometry objects.");
        }
View Full Code Here

        if(args.length==3)
        {
            Geometry geo = GeoHelper.getGeoSPARQLGeometry(args[0]);
            Double radius = Helper.getDouble(args[1]);
            Geometry buffer = geo.buffer(radius);
            return new GeoSPARQLWktSerializer().toLiteral(buffer);
        }
        else
        {
            throw new TypeErrorException("Buffer Function expects exactly 3 arguments: a geometry object, a radius and a unit.");
        }
View Full Code Here

    {
        if(args.length==1)
        {
            Geometry geo = GeoHelper.getGeoSPARQLGeometry(args[0]);
            Geometry envelope = geo.getEnvelope();
            return new GeoSPARQLWktSerializer().toLiteral(envelope);
        }
        else
        {
            throw new TypeErrorException("Envelope Function expects exactly 1 arguments: one geometry object.");
        }
View Full Code Here

    @Override
    public Object evaluate(final Object[] args) throws TypeErrorException {
        if(args.length==1){
            final Geometry geo = GeoHelper.getGeoSPARQLGeometry(args[0]);
            final Geometry boundary = geo.getBoundary();
            return new GeoSPARQLWktSerializer().toLiteral(boundary);
        }
        else {
            throw new TypeErrorException("Boundary Function expects exactly 1 arguments: one geometry object.");
        }
    }
View Full Code Here

TOP

Related Classes of lupos.geo.serializer.GeoSPARQLWktSerializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.