geolocation

GeoMapping Bearing and Coordinate Calculation for GoogleMaps markers

旧时模样 提交于 2019-12-04 19:49:57
I'm writing an Android app and integrating GoogleMapsV2 API. I have a series of markers on the map at various locations around an anchor. I want those markers to converge on the anchor's position incrementally. I've got a loop running that will call each marker B and from B's position calculate the bearing to the anchor A. I then calculate the destination coordinate for a fixed distance along that bearing and update. Here are the two functions (taken from an amalgamation of stack posts and a GeoMapping site, for full disclosure) I'm using: public double calcBearing(double lat1, double lon1,

Converting pixel position to geographical coordinates (lat, long) for a Sentinel-1 SAR image

此生再无相见时 提交于 2019-12-04 19:32:16
How can i get the geographical coordinates from x,y position in a Sentinel-1 Synthetic Aperture Radar (SAR) satellite image? For example, I can access a downloaded image info sg as from snappy import ProductIO from snappy import PixelPos path='path_name' product = ProductIO.readProduct(path) sg = product.getSceneGeoCoding() But how can I get latitude and longitude for a desired point (x, y) in sg using ESA's snap engine within Python ? Using the custom function below, we can easily convert any point inside our image sg to its coordinates (latitude,longitude): def LatLon_from_XY

Geolocation WatchPosition Distance Calculator

时光怂恿深爱的人放手 提交于 2019-12-04 19:17:03
I am using geolocation to get the users current location and monitor it using the watchPosition method. However, is there a way of calculating the distance between the users starting position and current position? Below is my code: var x = document.getElementById("info"); function getLocation() { if(navigator.geolocation) { navigator.geolocation.watchPosition(showPosition, showError, { enableHighAccuracy: true, maximumAge: 60000, timeout: 27000 }) } else { x.innerHTML = "Geolocation is not supported by this browser."; } } var flightPathCoordinates = []; function showPosition(position) { x

No mapping exists from object type System.Data.Spatial.DbGeography to a known managed provider native type

馋奶兔 提交于 2019-12-04 18:48:07
I am building an app using the DotNetNuke 7 platform and am trying to write Geography data to the database. Here is some background on the project. I am building in VS 2012 and just upgraded to Server 2012 from 2008 R2. DotNetNuke 7 implements PetaPoco for the data layer and WebAPI. I hope what I provided is enough to information to understand the problem. My code fails on the line "rep.Insert(location);" using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Net; using System.Web; using System.Net.Http; using System.Web.Http; using System.Data

Find the intersection between two geographical data points

让人想犯罪 __ 提交于 2019-12-04 18:44:46
I have two pairs of lat/lon (expressed in decimal degrees) along with their radius (expressed in meters). What I am trying to achieve is to find if an intersect between these two points exits (of course, it is obvious that this doesn't hold here but the plan is to try this algorithm in many other data points). In order to check this I am using Shapely's intersects() function. My question however is how should I deal with the different units? Should I make some sort of transformation \ projection first (same units for both lat\lon and radius)? 48.180759,11.518950,19.0 47.180759,10.518950,10.0

Spatial Index in MySQL - ERROR - Cannot get geometry object from data you send to the GEOMETRY field

拟墨画扇 提交于 2019-12-04 18:40:25
问题 I am new to the whole 'spatial index' thing, but it seems to be the best solution for filtering based on latitude/longitude. So I added a column to my table: So I created a geometry field: ALTER TABLE `addresses` ADD `point` POINT NOT NULL And then I tried to add an index: ALTER TABLE `addresses` ADD SPATIAL INDEX ( `point` ) But I get an error: #1416 - Cannot get geometry object from data you send to the GEOMETRY field What am I doing wrong here? 回答1: OK I found the solution: Can't create a

Finding the center point of a city

﹥>﹥吖頭↗ 提交于 2019-12-04 18:38:51
We are purchasing a database of zip codes and their corresponding Lat/Long. I want to store cities in a separate table with a lat/long point representing the center of the city. Can I calculate that based on taking all of the zips that belong to that city, getting the min/max points for each direction, and taking the center point of the resulting rectangle? Is there a more accurate method? I want to avoid purchasing another DB. We haven't purchased the full DB yet so I can't just try it and compare the results to Google Maps. Well actually ZIP codes do not always encompass cities. Zip codes

How to determine n locations inside a circle efficiently?

拜拜、爱过 提交于 2019-12-04 18:23:54
Given this the scenario: We have the order of 1,000,000 points around the world, specified by longitude and latitude; We have a circle c based on a point pc (specified by longitude and latitude) and a radius rc We want to efficiently determine which of the points are in the circle I'm developing in C# and the locations stored in SQL server 2008. So as I see it I have these 3 options: Store the locations as longitude latitude floats and perform the calculations in C#. Store the locations as geographical data types and perform the calculations in SQL server 2008 like this: CREATE TABLE

Why is geosearching/location based searches returning zero results?

徘徊边缘 提交于 2019-12-04 17:48:29
I am trying to use app engine's search API to search locations: https://developers.google.com/appengine/docs/python/search/overview#Performing_Location-Based_Searches The problem is no matter what I do, I get zero results. I set the search lat/lng as the the exact point on a document's GeoPoint property and it still returns zero. I know the regular search is working because if I change the query to be a regular full-text search, it works. Here is an example of my data (this is actually from the example app here: http://www.youtube.com/watch?v=cE6gb5pqr1k ) Full Text Search > stores1 Document

ios custom maps, geolocation, mapping and more

落花浮王杯 提交于 2019-12-04 17:45:14
The next image was taken from www.Trimaps.com (I hope it's allowed to use images here, if not, please tell me and i'll remove it immediately). These images explain perfectly what i'm trying to accomplish. I have all the data one would need: Latitude/Longitude (in decimal values) of 4 corners of the desired area (from Google Maps). A beautiful custom image of a mountain (similar to the right image). All i need is the math. I've tried all the formula's, scaling/ transfomations, you name it. I'm sure it's possible as it depends on pure MATH, relatively simple math equations. www.Trimaps.com