Package com.impetus.kundera.gis.geometry

Examples of com.impetus.kundera.gis.geometry.Envelope


        return persons;
    }

    public List<Person> findWithinRectangle(double x1, double y1, double x2, double y2)
    {
        Envelope envelope = new Envelope(x1, x2, y1, y2);
        Query q = em.createQuery("Select p from Person p where p.currentLocation IN :envelope");
        q.setParameter("envelope", envelope);
        List<Person> persons = q.getResultList();
        return persons;
    }
View Full Code Here


    @Override
    public Object createGeospatialQuery(String geolocationColumnName, Object shape, Object query)
    {
        List boxList = new ArrayList();

        Envelope box = (Envelope) shape;

        boxList.add(new double[] { box.getMinX(), box.getMinY() }); // Starting
                                                                    // coordinate
        boxList.add(new double[] { box.getMaxX(), box.getMaxY() }); // Ending
                                                                    // coordinate

        BasicDBObject q = (BasicDBObject) query;

        if (q == null)
View Full Code Here

TOP

Related Classes of com.impetus.kundera.gis.geometry.Envelope

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.