geospatial

Do geospatial queries work on arrays? ( $geoWithin, $geoIntersects )

安稳与你 提交于 2019-12-08 12:31:05
问题 I have documents as the one below stored in MongoDB 3.0.5 { "_id" : ObjectId("55f3a6ae0907233b5e9e7da0"), "user" : { "id" : "2d5b093ec8a3", "regions" : [ { "id" : NumberLong(1442365443852), "name" : "penta", "type" : "Polygon", "center" : { "lat" : -12.1254159880008100, "lng" : -77.0316830277442930 }, "zoom" : 17.0000000000000000, "coordinates" : [ [ -77.0322804898023610, -12.1271067552781560 ], [ -77.0336792618036270, -12.1255133434450870 ], [ -77.0326449349522590, -12.1239143495252150 ], [

Designing a normalize database for getting 5 nearest neighbor using MySQL spatial index

匆匆过客 提交于 2019-12-08 12:15:31
问题 I will be using MySQL with spatial index for a database, then i will query for 5 nearest neighbors from a given point(lat/long), these points will be interest points in Dominican Republic. Once that i get the 5 nearest points i will need the Name of the Location, Type of the Location, Address of the location and (lat,long) for each point. What should be the right way to design my database? i was thinking of doing the following: Table: Name Columns: ID, Name Table: Type Columns: ID, Type Table

Convert longitude latitude coordinates (WGS) to grid with equidistant axes (in given area)

穿精又带淫゛_ 提交于 2019-12-08 11:56:21
问题 I have a lot of geocoordinates in tow data sets and want to run a nearest-neighbor-search. I came across the package 'RANN' and the function nn2(x,y) runs really fast. Now there is the problem, that of course in the area of London a degree to the north is a quite a longer way then a degree to the west. My idea now was to convert the location coordinates to some grid where one step in the direction of x is nearly the same as one step in the direction of y. The area is London (Center -0.1045,51

Storing 'Point' column from ShapeFile

谁都会走 提交于 2019-12-08 09:48:01
问题 I have a Shapefile (*.shp) which I am loading into the Database. I have a column called Point" which stores the Data in shapes. For example POLYGON ((1543297.7815 5169880.9468, 1543236.7046 5169848.3834, 1543195.0218 5169930.2767, 1543104.4989 5170101.6818, 1543056.805 5170191.9835, 1542969.1187 5170358.1396, 1542820.9656 5170638.8525, 1542820.6605 5170639.7223, 1542816.1912 5170647.8707, 1543158.2618 5170829.6437, 1543318.4126 5170915.6562, 1543559.2078 5171043.8001, 1543840.2014 5171192

Major issue overlaying GeoTIF in Mapbox GL JS

被刻印的时光 ゝ 提交于 2019-12-08 09:33:12
问题 I have some general questions to understand what has become a very serious issue in my project. I hope that I might come to some sort of understanding on what is happening here, as I am perplexed well over 2 months into this issue. Let me just dive in : I am in the process of making a weather app using Mapbox which displays both radar (rain) and satellite (visible clouds) over the state of Texas. I am using image overlays to accomplish this. The process is simple, but the overlays are not

MySQL GeoSpatial function for ST_Distance_Spheroid? Metric used in return Type of GLength?

醉酒当歌 提交于 2019-12-08 06:55:28
Is there a ST_Distance_Sphere, ST_Distance_Spheroid equivalent function in MySQL's GeoSpatial Support? If not, any way to emulate this? What is the metric used in return type of GLength (length of the LineString)? The manual for GLength says that GLength() is a nonstandard name. It corresponds to the OpenGIS Length() function. But I couldn't find any Docs for OpenGIS Length(). All I found was for ST_Length are they the same? Also for accuracy do I need to specify the SRID(4326)? How Do I do this in MySQL? Since MySql 5.1 there are provided GIS functions distance_sphere() and distance_spheroid(

Geospatial $near within current document field value

天大地大妈咪最大 提交于 2019-12-08 05:11:41
问题 Take this query: { 'location' : { '$near' : [x,y], '$maxDistance' : this.field } } I want to assign $maxDistance the value of the specified field from the current evaluated document. Is that possible? 回答1: Yes it's possible. You just use $geoNear instead. Beware the catches and read carefully. Presuming that your intent to is to store a field such as "travelDistance" to indicate on the document that any such searches must be "within" that supplied distance from the queried point to be valid.

Use $within with a buffered MondoDB Linestring

纵饮孤独 提交于 2019-12-08 05:06:33
问题 I need to evaluate the proximity of a Point to a LineString using MongoDB. Because the $near operator can only compare a Point to another Point , I need to generate a polygon out of the LineString , so I can use the $within operator. The distance between the LineString and the edges of the polygon should represent the radius I want to search in, such as represented in red below: What might be a useful algorithm in order to accomplish this? 回答1: I think much easier would be to write your own

SQL Server Geography Point

≯℡__Kan透↙ 提交于 2019-12-08 05:06:27
问题 I have recently been researching the SQL Server spatial data types and have decided to try and store my long, lat points in a geography field. However I cannot figure out how to insert the data into the field, I have tried using stuff like "POINT(double, double), 0" and weird stuff like that, but no success. Also im curious as to what the purpose of the ID argument specified in the geography functions. Thanks, Alex. 回答1: Have you looked at the examples from MSDN? From geography (Transact-SQL)

Geospatial Indexing “No mapping found for field” with YAML

Deadly 提交于 2019-12-08 04:18:41
问题 I have a problem trying to map an embedded document for geospatial indexing using Doctrine2's OD with YAML format, and MongoDB : I would try to embed a "Coordinate" Document in the "Place" document to be able to execute some geospatial indexed queries, but got a mapping problem. As seen on the official documentation : http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/indexes.html#geospatial-indexing But I work with YAML mapping format... And got this problem :