geospatial

GIS buffer value degree to meters with spatiallite

我是研究僧i 提交于 2019-12-04 02:15:45
问题 I am new to Spatialite. I have following query: select A.* from linka as A, pointa as B where Contains(Buffer(B.Geometry, 100), A.Geometry) I actually want to create 100 meters buffer and get to know which are the link's are contained by it. I can able to find the inserted '100' is actually degree value and it's giving me output which are coming in this range. I can put the degree value also in my query but the transformation from degree to meters/kilometers is not same all around the world.

coordinateSystemId on DbGeography

微笑、不失礼 提交于 2019-12-04 00:52:03
I need to geocode a large number of addresses, using the Bing Map service, EF 5 and SQL Server 2008. I'm using the geography data type in SQL, which translates to a DbGeography type by the EF. When I create a DbGeography object, like this string point = string.Format("POINT({0} {1})",address.Longitude,address.Latitude); address.Location = System.Data.Spatial.DbGeography.PointFromText(point, 4326); The second parameter calls for a "coordinateSystemId". What exactly is this? A lot of the examples I see use 4326. I am new to spatial data, but I'm guessing there is a set of well defined coordinate

Converting lat/long to JTS?

走远了吗. 提交于 2019-12-03 22:32:04
I am trying to integrate hibernate spatial with JPA for Geo searches. I have been referencing the tutorial on the official site (I am not associated with hibernatespatial). The tutorial, unfortunately, does not cover how to create a Point instance from a latitude/longitude pair. I'm attempting to do this here, but I am still not sure if this is this the right way to convert a latitude/longitude pair to a JTS Point instance: import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.GeometryFactory; import com.vividsolutions.jts.geom.Point; import org.geotools.geometry

Plot spatial area defined by multiple polygons

梦想的初衷 提交于 2019-12-03 22:14:17
问题 I have a SpatialPolygonsDataFrame with 11589 spatial objects of class "polygons". 10699 of those objects consists of exactly 1 polygon. However, the rest of those spatial objects consist of multiple polygons (2 to 22). If an object of consists of multiple polygons, three scenarios are possible: 1) The additional polygons could describe a "hole" in the spatial area described by the first polygon . 2) The additional polygons could also describe additional geographic areas, i.e. the shape of the

How to calculate geo-distance from a polygon?

蓝咒 提交于 2019-12-03 21:46:50
I have a shapefile with 50+ different polygonal shapes (representing 50+ different regions) and 10,000+ data points that are supposed to be present in one of the regions. The thing is, the 10,000+ points are already coded with a region they are supposed to be in, and I want to figure out how far they are from this coded region in geo-spatial distance. My current approach (code below), which involves converting shapefiles to owin objects from the sp library and using distfun gets me distances in lat,long euclidean space. But I would like to get geo-spatial distances (eventually to convert to km

Get ECEF XYZ given starting coordinates, range, azimuth, and elevation

白昼怎懂夜的黑 提交于 2019-12-03 21:34:27
I'm having a problem locating anything on converting RAE to XYZ. If I am on a WGS84 spheroid, at say position -742507, -5462738, 3196706 and I detect an object at a range of 30km, azimuth of 310, and elevation angle of 18 degrees how can I convert that to ECEF XYZ coordinates? Thanks. It appears that there is no straight forward process to do this. The best method I found is to convert from RAE coordinates to SEZ coordinates, then from SEZ coordinates to ECR coordinates. Here is some C# code I modified to C++ to achieve this: void main() { // NOTE: distances are in meters, while angles are in

MongoDB - Geospatial Index with Aggregation

坚强是说给别人听的谎言 提交于 2019-12-03 21:03:44
I've read from the to docs that it is not possible to use a geospatial index on an aggregation with MongoDB. Is there an alternative to this? I am attempting to run a query take grab all activities within a certain radius, then group/sort them by the number of times that activity has occurred. Is there way around this issue? You can use map-reduce on a geo query. Here is an example based on geo_mapreduce.js (from the mongodb jstests): // setup test collection var act_date = new Date(2010,06,07); for (i = 1; i <= 10; i++) { db.activity.insert( { "geo" : { "lat" : 32.68331909, "long" : 69

natural neighbour interpolation. error in calculating polygon intersection area

老子叫甜甜 提交于 2019-12-03 20:30:36
I am trying to write this algorithm in R. Does it exist in any package already?!? This is what I did (with help from SO and various blog posts): library(rgdal) library(ggmap) require("maptools") require("plyr") locations<- unique(cbind(data22[,1], data22[,2])) [,1] [,2] [1,] 24.9317 60.1657 [2,] 24.9415 60.1608 [3,] 24.9331 60.1577 [4,] 24.9228 60.1477 [5,] 24.9370 60.1545 [6,] 24.9491 60.1559 [7,] 24.9468 60.1591 [8,] 24.9494 60.1675 [9,] 24.9561 60.1609 [10,] 24.9218 60.1632 [11,] 24.9213 60.1605 [12,] 24.9219 60.1557 [13,] 24.9208 60.1704 [14,] 24.9233 60.1714 [15,] 24.9469 60.1737 [16,] 24

Distance between two coordinates, how can I simplify this and/or use a different technique?

北城余情 提交于 2019-12-03 18:00:23
问题 I need to write a query which allows me to find all locations within a range (Miles) from a provided location. The table is like this: id | name | lat | lng So I have been doing research and found: this my sql presentation I have tested it on a table with around 100 rows and will have plenty more! - Must be scalable. I tried something more simple like this first: //just some test data this would be required by user input set @orig_lat=55.857807; set @orig_lng=-4.242511; set @dist=10; SELECT *

Table structure for Geo Spatial Data

流过昼夜 提交于 2019-12-03 17:21:11
What is the suggested way to structure a table in a MYSQL Database containing Geo Spatial data. As a POC i am working to insert the data as in the image as below into a database table. This below is the snapshot of the table creation of Phpmyadmin table creation looking for suggestions to create table for geospatial data as in screenshots. EDIT: I am working on XAMPP V1.8.3 Windows8 running MYSQL version 5.6.16. Created Table geomduplicate and columns and inserted data as in screenshot with the below sql CREATE TABLE geomduplicate1( zip INTEGER(3) NOT NULL PRIMARY KEY, latitude NUMERIC(9,6),