geo

Django TastyPie Geo Distance Lookups

牧云@^-^@ 提交于 2019-12-23 17:28:04
问题 I'm using TastyPie for Geo-distance lookups. That is a bit difficult, because oficially its not supported by TastyPie. On Github (https://gist.github.com/1067176) I found the following code-sample: def apply_sorting(self, objects, options=None): if options and "longitude" in options and "latitude" in options: return objects.distance(Point(float(options['latitude']), float(options['longitude']))).order_by('distance') return super(UserLocationResource, self).apply_sorting(objects, options) It

The change of polygon contain make my demo wrong in D3

拟墨画扇 提交于 2019-12-23 05:59:20
问题 I'm using D3 to draw some pieces of information on canvas. And I got my aim in version 3 but failed in version 4 (Of course, I had changed the updated functions in version 4 such as d3.geo.mercator() to d3.geoMercator() ). I debugged some relative functions and found the projection function was different. In Version 3: function projection(point) { point = projectRotate(point[0] * d3_radians, point[1] * d3_radians); return [ point[0] * k + δx, δy - point[1] * k ]; } In Version 4: function

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

ぃ、小莉子 提交于 2019-12-23 02:58:20
问题 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

GEO基因芯片数据处理精华(一):GEOquery包

五迷三道 提交于 2019-12-22 06:15:39
合作研究请联系QQ 2279055353 GEO( Gene Expression Omnibus )是NCBI(美国国家生物信息中心)下的基因表达数据库,包括各种各样的基因芯片检测技术得到的试验记录与平台信息。GEO是最具知名度的基因表达数据存储数据库,这些数据包括单通道和双通道的微阵列实验,测量对象包括 mRNA , 基因组 cDNA , 蛋白质冗余物,以及各种非阵列技术,例如,高通量测序技术。现在,我们介绍GEO数据库的检索、下载,以及数据的预处理方法。首先,我们介绍GEO数据集查询R语言包—— GEOquery . GEOquery包的下载与安装 GEOquery包位于生物信息开源软件库 Bioconductor , 在Bioconductor主页的搜索栏输入 GEOquery 回车后,出现了下载项。 按照安装提示在R控制台安装即可。 GEO数据组织结构 GEO上的数据通常有四种组织形式,它们分别是: Platforms Samples Series Datasets 其中,前三种形式由用户提交,第四种数据集的形式由GEO整理汇总。 Platforms 一个 platform 记录描述了阵列上的元素列表,例如,cDNA, 探针,ORFs, 抗体等。每个平台记录有一个唯一的GEO访问符 GPLxxx . 一个平台记录可能包括由多个用户提交的多个样本。 Samples 一个

Querying for things near a geolocation?

人盡茶涼 提交于 2019-12-20 09:37:57
问题 I have a query that attempts to find things within a certain geolocation, but the results that it brings back are a little bit... strange. I had previously posted this thread and the community helped me find a formula that I needed: Querying within longitude and latitude in MySQL but the query now gives really wacky results. My data is surrounding the city of San Francisco which has the lat/lng 37.780182 , -122.517349 Query: SELECT id, hike_title, lat, lng, ( 3959 * acos( cos( radians(37) ) *

Calculate the mid point of latitude and longitude co-ordinates

只愿长相守 提交于 2019-12-19 21:48:56
问题 Does anyone know the best way to go about getting the mid-point of a pair of latitude and longitude points? I mm using d3.js to draw points on a map and need to draw a curved line between two points, so I need to create a mid point to draw a curve in the lines. Please see image below for a better understanding of what I am trying to do: 回答1: Apologies for the long script - it just seemed fun to draw stuff :-). I've marked off sections that are not required // your latitude / longitude var co2

Why ng-href behaving weird while parsing geo string

三世轮回 提交于 2019-12-19 10:23:04
问题 I've multiple geo string like geo:0,0q=1+a+bc , and I'm gonna assign this to ng-href of the anchor tag. Like below I'm doing it. HTML <a ng-href="{{geoString}}">Location</a> </br> Above tag is rendering fine on HTML but adding unsafe: string geo:0,0q=1+a+bc inside href attribute Rendered HTML <a ng-href="geo:0,0q=12345+jefferson+st" href="unsafe:geo:0,0q=12345+jefferson+st">Location</a> Plunkr with demonstrating issue. I don't want unsafe: inside href , Any idea why it is pre-appending unsafe

d3 US state map with markers, zooming transform issues

北城以北 提交于 2019-12-18 16:31:17
问题 I've created a d3 map with US states, following this example: http://bl.ocks.org/mbostock/4699541 and added markers following this SO question: Put markers to a map generated with topoJSON and d3.js The problem is that on zoom, the map markers stay in place. I believe I need to translate them into a new position, but not sure how to make that happen. var width = 900, height = 500, active = d3.select(null); var projection = d3.geo.albersUsa() .scale(1000) .translate([width / 2, height / 2]);

Plot curved lines between two locations in ggplot2

ⅰ亾dé卋堺 提交于 2019-12-18 04:23:04
问题 I am making a map about exports from the Americas to the Netherlands. To visualise my data, I want to make a map with arrows from countries in the Americas to the Netherlands. I use a cshapes world map and ggplot2. data = data.frame("Country.name" = c("Brazil","USA","Canada","Paraguay","Uruguay"), "lng" = c(14.23,37,56.13,-23.44,-32.52), "lat" = c(-51.92,-95.71,-106.34,-58.44,-55.77)) require(cshapes) cshp.data = cshp(date=as.Date("2012-1-1"), useGW=TRUE) region.data.frame = fortify(cshp.data

Android GEO Location Tutorial [closed]

血红的双手。 提交于 2019-12-17 21:52:30
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Does anyone know a good GEO Location tutorial for Android. I don’t want to have to get a Google maps API key I just want an Activity