Package net.fortytwo.twitlogic.model.geo

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


            }
        }*/

        // Note: double-typing the feature as a Point is cheating (but it works...)
        if (null != place.getCentroid()) {
            Point c = place.getCentroid();
            net.fortytwo.twitlogic.persistence.beans.Point p
                    = designate(uriOf(place), net.fortytwo.twitlogic.persistence.beans.Point.class);

            p.setLong(c.getLongitude());
            p.setLat(c.getLatitude());
        }

        return f;
    }
View Full Code Here


    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

        // TODO: user mention entities and media entities
        entities = new Entities(status.getHashtagEntities(), status.getURLEntities());

        if (null != status.getGeoLocation()) {
            geo = new Point(status.getGeoLocation());
        }

        id = ((Long) status.getId()).toString();

        if (status.getInReplyToStatusId() > 0) {
View Full Code Here

                    LOGGER.warning("unfamiliar geo type: " + type);
                } else {
                    JSONArray coords = geoObj.getJSONArray(TwitterAPI.Field.COORDINATES.toString());

                    // Note: in the Twitter API 2.0, the order of longitude and latitude will be reversed.
                    geo = new Point(coords.getDouble(1), coords.getDouble(0));
                }

                // TODO: look for unrecognized attributes
            }
View Full Code Here

TOP

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

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.