Package net.fortytwo.twitlogic.model.geo

Examples of net.fortytwo.twitlogic.model.geo.Polygon


    }

    private void assertCentroid(final double lon,
                                final double lat,
                                final String json) throws Exception {
        Polygon p = new Polygon(new JSONArray(json));
        Point c = p.findCentroid();
        assertEquals(lon, c.getLongitude());
        assertEquals(lat, c.getLatitude());
    }
View Full Code Here


            if (1 != coords.length()) {
                throw new TweetParseException("wrong number of coordinate components for bounding box: " + box);
            }

            Polygon p;
            try {
                p = new Polygon(coords.getJSONArray(0));
            } catch (JSONException e) {
                throw new TweetParseException(e);
            }
            centroid = p.findCentroid();
        }
    }
View Full Code Here

TOP

Related Classes of net.fortytwo.twitlogic.model.geo.Polygon

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.