geospatial

Conversion of MySQL binary GEOMETRY fields in PHP

╄→гoц情女王★ 提交于 2019-12-12 08:56:48
问题 I’m working on an application integrating mapquest maps and using the mapquest API. At this moment I want to achieve the following: the registered user has to input latitude and longitude information, and in the database this information has to be stored as geometry type field. Conversely, a user looking at their account should see the latitude and longitude information that was entered. In an earlier simplified codebase I achieved this directly in the MySQL query, by using the MySQL

Shortest great circle distance between a point and a polygon on a sphere/globe

我是研究僧i 提交于 2019-12-12 08:56:45
问题 I have a set of polygons specified by geographic (WGS84) coordinates: they live on a sphere. I have a point specified by a latitude-longitude pair. I would like to (efficiently) find the minimum great circle distance between the point and the polygon. My current stack includes fiona, shapely, gdal, and proj. Similar questions on StackOverflow mostly seem to project features onto a plane and find distances there, or (disturbingly) omit mention of projections or lack thereof entirely. 回答1: This

Group by value and create geography polyline from points (latitude and longitude) for each group in T-SQL

烂漫一生 提交于 2019-12-12 08:56:30
问题 A similar question has been asked here: Create geography polyline from points in T-SQL Taking that question further, I have a table schema that looks like this: CREATE TABLE [dbo].[LongAndLats]( [Longitude] [float] NULL, [Latitude] [float] NULL, [SortOrder] [bigint] NULL, [SensorID] [bigint] NULL, ) Sample data looks like this: How can I convert these points into a geography polyline for each SensorID using TSQL (so that I would have a SensorID/Polyline record for each SensorID)? I've tried

Creating D3 map of ellipse envelope data

假如想象 提交于 2019-12-12 08:19:20
问题 I have this dataset which has ellipses, more specifically ellipse "envelopes." I was wondering if someone had advice on how I could draw these on a D3 map. I already have a map setup with mercator projection. This stackoverflow answer has a createEllipse function which got me close, but I want to make sure I am interpreting the data correctly. I plugged in the major/minor axis values of the ellipse from the data, and used the azimuth for the rotation, would this be correct? I also don't

'The specified input does not represent a valid geography instance' exception when using SqlGeographyBuilder

心已入冬 提交于 2019-12-12 07:20:02
问题 I've written a small application that reads in from a series of KML files and then converts them into the Microsoft.SqlServer.Types.SqlGeography type using the following code: private SqlGeography CreateGeographyFromKML( string kml, bool debug ) { // use SqlGeographyBuilder to help create the SqlGeography type var geographyBuilder = new SqlGeographyBuilder(); // Get co-ordinates var xml = XDocument.Parse(kml); var df = xml.Root.Name.Namespace; XElement coordinates = xml.Descendants(df +

Search Azure Search Index for documents within x km of the reference point where x is a field on the document

帅比萌擦擦* 提交于 2019-12-12 06:45:39
问题 I am trying to search the Azure Search Index for documents that are not just within x km of the search reference point but also where the document + y km is within x km of the search reference. y is a field on the document so it will be different for each document in the index. 回答1: To find filter based on the distance between a reference point and a point given by a field in the document, you can use the geo.distance function in your $filter query. For instance if your geo point was in the

Cloudant - apply a view/mapReduce to a geospatial query

折月煮酒 提交于 2019-12-12 05:47:27
问题 HI I'm new to cloudant (and couch and asking questions on stackoverflow so I hope I manage to be vaguely clear about what I'm asking ) and I'm trying to do probably the second most basic geo task but am hitting a dead end. I've got a database of docs which are geojson objects, I've created an index so I can query for intersections etc but it seems the only options I have in the url is the format=legacy (gives me the ids) and the format=geojson and the include_docs parameter - what I'd like to

Generate view with X and Y from geometry type

让人想犯罪 __ 提交于 2019-12-12 05:04:04
问题 In sql-server-2012 I want to generate view with all points from geometry type. How can I do this? View example GeomKey | X | Y --------+----+----- 1 | X1 | Y1 1 | x2 | Y2 2 | x1 | Y1 Example in Oracle with sys.SDO select c.ngeometrykey, z.* from gis_map.mp_geometry c , table(sdo_util.getvertices(c.geometry)) z 回答1: I don't think you can do this in a view but you can create a table-valued user defined function (a function that returns a table) to get what you want. This example uses a table

Geodesic polygons in Nokia HERE 3.0?

二次信任 提交于 2019-12-12 04:49:00
问题 Using the HERE JavaScript API 3.0, is it possible to create geodesic polygons? I.e. draw the shortest path on the actual earth instead of the plain projection. Apparently I wasn't able to find anything in the HERE API documentation. For GoogleMaps this is possible as seen here: https://developers.google.com/maps/documentation/javascript/examples/geometry-headings?csw=1 Thanks in advance! 回答1: Although not available out of the box, It can be implemented using some simple coding. You will find

Need a sector based on bearing, geopoint, distance and angle

依然范特西╮ 提交于 2019-12-12 04:44:01
问题 I have a problem. I am trying to write a JAVA code were in given bearing, (lat,lon) , speed I need to get all points which form a sector (like in the diagram (x1,y1) , (x2,y2) and list of points which form an Arc in the direction which is given by bearing (I have very limited knowledge on bearing). My first thing is to achieve sector based on the direction with hard-coded distance and angle. (i.e fixed values say d = 5km and angle = 60 deg .) Next Step is based on the speed I want distance d