geo

DbGeography make circle with center and radius

廉价感情. 提交于 2020-01-01 07:03:16
问题 I create a DbGeography-point like this: String selectedLocation = String.Format("POINT ({0} {1})", lon, lat).Replace(",", "."); DbGeography selectedLocationGeo = DbGeography.FromText(selectedLocation, 4326); I also have a radius R. I want to create a curvepolygon with the shape of a circle with the specified radius from the point-coordinate. Be aware that I am using DbGeography, and not DbGeometry. How do I create the CIRCULARSTRING? Or is there a better way than using a CIRCULARSTRING?

Geo distance MySQL

十年热恋 提交于 2020-01-01 03:35:08
问题 To search nearest locations to given locations, order by distance Should I use float or Point? Should I pre-compute value of cos/sin/sqrt http://www.movable-type.co.uk/scripts/latlong-db.html My searches are various locations within one city. Many OLD posts are telling mysql is not having proper geo support, Is it true with latest MySQL version as well? 回答1: We are using double to store latitude and longitude . In addition we precomute (by triggers) all values which are precomputable when

Draw a map of a specific country with cartopy?

时间秒杀一切 提交于 2019-12-29 04:23:26
问题 I have tried this example here, which works fine. But how do I focus on another country, i.e. show only germany? source for this example http://scitools.org.uk/cartopy/docs/latest/examples/hurricane_katrina.html I've tried some coordinates on the extend() method, but I didn't manage to get to look it like the US map. Or do I have to modify the shape file? 回答1: Using the Global Administrative Areas dataset at http://www.gadm.org/country, just download the Germany dataset and use cartopy's

Draw a map of a specific country with cartopy?

北慕城南 提交于 2019-12-29 04:23:06
问题 I have tried this example here, which works fine. But how do I focus on another country, i.e. show only germany? source for this example http://scitools.org.uk/cartopy/docs/latest/examples/hurricane_katrina.html I've tried some coordinates on the extend() method, but I didn't manage to get to look it like the US map. Or do I have to modify the shape file? 回答1: Using the Global Administrative Areas dataset at http://www.gadm.org/country, just download the Germany dataset and use cartopy's

How do I convert County FIPS to Lat-Long coordinates in R or Python?

假如想象 提交于 2019-12-24 19:23:04
问题 Glyphosate has hogged the limelight recently due to listing as a possible carcinogen by the World Health Organization's IARC. I got curious about pesticide usage patterns in the US and plotting this data with interactive maps in R-Shiny, using leaflet, for example. County-level estimates of pesticide usage can be found here: https://water.usgs.gov/nawqa/pnsp/usage/maps/county-level/ The data are reported using State/County FIPS codes. I require lat-long coordinates to show the data. It seems

Flutter Firestore Geo query

旧时模样 提交于 2019-12-24 15:06:26
问题 WHAT I HAVE TO DO: I'm building an application where I want to do a query in firebase and receive the users who are in a range of X kilometers. But I want to limit this received documents and also to have a function for getting more documents on the scroll. I'm using a StreamBuilder->ListView.build in order to build my list. When I'm going to receive the end of the scrollable list I want to get more documents from Firestore (if I have any). WHAT I'VE DONE ALREADY: So far I found just 2

Redirect all countries except ONE

∥☆過路亽.° 提交于 2019-12-24 11:33:38
问题 We have an online store that is only available to our local clients. If I put multiple country codes, it does not work. Is there an alternative to include all country codes except for one? Been Using this code: jQuery.getJSON('http://freegeoip.net/json/', function(location) { if (location.country_code == 'AP','EU','AD','AE','AF','AG','AI','AL','AM','CW', 'AO','AQ','AR','AS','AT','AU','AW','AZ','BA','BB', 'BD','BE','BF','BG','BH','BI','BJ','BM','BN','BO', 'BR','BS','BT','BV','BW','BY','BZ','CA

Polygon overlapping percentage

匆匆过客 提交于 2019-12-24 07:48:49
问题 I'm working on a geo spatial web app with MongoDB. I have a lot of polygons on a collection with different categories ( COUNTRY , STATE , etc.), and I want to know which is the COUNTRY of a certain STATE but in some cases the border of a neighbour COUNTRY is touching the border of the STATE so when I query the intersection I get 2 countries. I want to calculate the overlapping percentage between the state and both countries to know which one is the parent. I've been looking but I didn't found

SQL Server rand() aggregate

↘锁芯ラ 提交于 2019-12-24 07:27:51
问题 Problem: a table of coordinate lat/lngs. Two rows can potentially have the same coordinate. We want a query that returns a set of rows with unique coordinates (within the returned set). Note that distinct is not usable because I need to return the id column which is, by definition, distinct. This sort of works ( @maxcount is the number of rows we need, intid is a unique int id column): select top (@maxcount) max(intid) from Documents d group by d.geoLng, d.geoLat It will always return the

Is it possible to have a horizontal color bar in plotly.js

拜拜、爱过 提交于 2019-12-24 02:47:06
问题 I am working with choropleth charts in plotly.js. Is there a way to get the colorbar scale to display horizontally at the bottom of the chart instead of vertically along the right or left sides? For reference, check out the first example given at the Plotly site https://plot.ly/javascript/choropleth-maps/#world-choropleth-map-robinson-projection Thank you! Plotly.d3.csv('https://raw.githubusercontent.com/plotly/datasets/master/2010_alcohol_consumption_by_country.csv', function(err, rows){