Examples of GeoPoint


Examples of org.encuestame.persistence.domain.GeoPoint

                       final String locDescription,
                       final String locTypeName,
                       final Integer Level,
                       final Account secUsers,
                       final GeoPointFolder geoPointFolder){
        final GeoPoint location = new GeoPoint();
        location.setLocationStatus(Status.ACTIVE);
        location.setLocationDescription(locDescription);
        location.setLocationLatitude(2F);
        location.setAccount(secUsers);
        location.setGeoPointFolder(geoPointFolder);
        location.setLocationLongitude(3F);
        location.setTidtype(createGeoPointType(locTypeName));
        getGeoPointDao().saveOrUpdate(location);
      return location;
    }
View Full Code Here

Examples of org.securegraph.type.GeoPoint

        return eventVertex;
    }

    private void setGeolocationProperty(GDELTEvent event, VertexBuilder eventVertexBuilder) {
        if (event.getActionGeoFullName() != null) {
            GeoPoint point = new GeoPoint(event.getActionGeoLatitude(), event.getActionGeoLongitude(), event.getActionGeoFullName());
            GDELTProperties.EVENT_GEOLOCATION.setProperty(eventVertexBuilder, point, visibility);
        }
    }
View Full Code Here

Examples of org.securegraph.type.GeoPoint

        String processId = getClass().getName();
        for (Vertex termMention : termMentions) {
            loc = resolvedLocationOffsetMap.get((int) LumifyProperties.TERM_MENTION_START_OFFSET.getPropertyValue(termMention, 0));
            if (isLocation(termMention) && loc != null) {
                String id = String.format("CLAVIN-%d", loc.getGeoname().getGeonameID());
                GeoPoint geoPoint = new GeoPoint(loc.getGeoname().getLatitude(), loc.getGeoname().getLongitude(), LumifyProperties.TERM_MENTION_TITLE.getPropertyValue(termMention));
                String title = toSign(loc);
                String termMentionConceptType = LumifyProperties.TERM_MENTION_CONCEPT_TYPE.getPropertyValue(termMention);
                String conceptType = getOntologyClassUri(loc, termMentionConceptType);

                VisibilityJson sourceVertexVisibilityJson = LumifyProperties.VISIBILITY_JSON.getPropertyValue(sourceVertex);
View Full Code Here

Examples of org.securegraph.type.GeoPoint

            double lat = Double.parseDouble(line.get(6));
            double lon = Double.parseDouble(line.get(7));
            if (airportCode == null) {
                continue;
            }
            airportCodeMap.put(airportCode.toLowerCase(), new Airport(airportCode, title, new GeoPoint(lat, lon)));
        }
    }
View Full Code Here

Examples of org.securegraph.type.GeoPoint

    public void updateLocation(Vertex airplaneVertex, double latitude, double longitude, double altitude, double heading, Visibility visibility, Authorizations authorizations) {
        LOGGER.debug("updating location of airplane %s (lat: %f, lon: %f, alt: %f, head: %f)", airplaneVertex.getId(), latitude, longitude, altitude, heading);

        ExistingElementMutation<Vertex> m = airplaneVertex.prepareMutation();
        FlightTrackOntology.LOCATION.addPropertyValue(m, MULTI_VALUE_PROPERTY_KEY, new GeoPoint(latitude, longitude, altitude), visibility);
        FlightTrackOntology.ALTITUDE.addPropertyValue(m, MULTI_VALUE_PROPERTY_KEY, altitude, visibility);
        FlightTrackOntology.HEADING.addPropertyValue(m, MULTI_VALUE_PROPERTY_KEY, heading, visibility);
        m.save(authorizations);

        graph.flush();
View Full Code Here

Examples of org.securegraph.type.GeoPoint

        if (foodTruck == null) {
            return;
        }

        String keywordTitle = LumifyProperties.TITLE.getPropertyValue(keywordVertex);
        GeoPoint geoLocation = FoodTruckOntology.GEO_LOCATION.getPropertyValue(keywordVertex);
        if (geoLocation != null) {
            Date geoLocationDate = LumifyProperties.PUBLISHED_DATE.getPropertyValue(tweetVertex);
            Date currentGetLocationDate = FoodTruckOntology.GEO_LOCATION_DATE.getPropertyValue(foodTruck);
            if (currentGetLocationDate == null || geoLocationDate.compareTo(currentGetLocationDate) > 0) {
                Calendar geoLocationCalendar = Calendar.getInstance();
                geoLocationCalendar.setTime(geoLocationDate);

                Calendar nowCalendar = Calendar.getInstance();
                nowCalendar.setTime(new Date());

                if (geoLocationCalendar.get(Calendar.DAY_OF_YEAR) != nowCalendar.get(Calendar.DAY_OF_YEAR)) {
                    return;
                }

                geoLocation = new GeoPoint(geoLocation.getLatitude(), geoLocation.getLongitude(), geoLocation.getAltitude(), keywordTitle);
                FoodTruckOntology.GEO_LOCATION.addPropertyValue(foodTruck, MULTI_VALUE_KEY, geoLocation, data.getVisibility(), getAuthorizations());
                FoodTruckOntology.GEO_LOCATION_DATE.addPropertyValue(foodTruck, MULTI_VALUE_KEY, geoLocationDate, data.getVisibility(), getAuthorizations());
                getGraph().flush();
                getWorkQueueRepository().pushGraphPropertyQueue(foodTruck, FoodTruckOntology.GEO_LOCATION.getProperty(foodTruck));
            }
View Full Code Here

Examples of org.securegraph.type.GeoPoint

                propertyValue = "";
            }
            Point2D pt = geometryGis.getJavaPoint();
            double lon = pt.getX();
            double lat = pt.getY();
            propertyValue = new GeoPoint(lat, lon, propertyValue.toString());
        } else {
            LOGGER.error("Unhandled geometry gis type: " + geometryGis.getType());
        }
        return propertyValue;
    }
View Full Code Here

Examples of org.securegraph.type.GeoPoint

    }

    private void testGeoSearch() throws ApiException, JsonProcessingException {
        LumifyApi lumifyApi = login(USERNAME_TEST_USER_1);

        String geoPoint = ObjectMapperFactory.getInstance().writeValueAsString(new GeoPoint(38.8951, -77.0367));
        lumifyApi.getVertexApi().setProperty(artifactVertexId, "", TestOntology.GEO_LOCATION.getPropertyName(), geoPoint, "", "justification", null, null);

        ClientApiVertexSearchResponse geoSearchResults = lumifyApi.getVertexApi().vertexGeoSearch(38.8951, -77.0367, 1000.0);
        assertEquals(1, geoSearchResults.getVertices().size());
View Full Code Here

Examples of org.securegraph.type.GeoPoint

            String id = String.format("GEO-ZIPCODE-%s", zipCodeEntry.getZipCode());
            String title = String.format("%s - %s, %s", zipCodeEntry.getZipCode(), zipCodeEntry.getCity(), zipCodeEntry.getState());
            VisibilityJson sourceVertexVisibilityJson = LumifyProperties.VISIBILITY_JSON.getPropertyValue(sourceVertex);
            Map<String, Object> metadata = new HashMap<String, Object>();
            LumifyProperties.VISIBILITY_JSON.setMetadata(metadata, sourceVertexVisibilityJson);
            GeoPoint geoPoint = new GeoPoint(zipCodeEntry.getLatitude(), zipCodeEntry.getLongitude());
            ElementBuilder<Vertex> resolvedToVertexBuilder = getGraph().prepareVertex(id, sourceVertex.getVisibility())
                    .addPropertyValue(MULTI_VALUE_PROPERTY_KEY, geoLocationIri, geoPoint, metadata, sourceVertex.getVisibility());
            LumifyProperties.CONCEPT_TYPE.addPropertyValue(resolvedToVertexBuilder, MULTI_VALUE_PROPERTY_KEY, zipCodeIri, metadata, sourceVertex.getVisibility());
            LumifyProperties.SOURCE.addPropertyValue(resolvedToVertexBuilder, MULTI_VALUE_PROPERTY_KEY, "Zip Code Resolver", metadata, sourceVertex.getVisibility());
            LumifyProperties.TITLE.addPropertyValue(resolvedToVertexBuilder, MULTI_VALUE_PROPERTY_KEY, title, metadata, sourceVertex.getVisibility());
View Full Code Here

Examples of org.securegraph.type.GeoPoint

                    //No code needed. Altitude is already null.
                }

                if (latitude != null && latitude != 0 && longitude != null && longitude != 0) {
                    if (altitude != null && altitude != 0) {
                        GeoPoint geoPoint = new GeoPoint(latitude, longitude, altitude);
                        return geoPoint;
                    } else {
                        GeoPoint geoPoint = new GeoPoint(latitude, longitude);
                        return geoPoint;
                    }
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.