geo

polygons from coordinates

◇◆丶佛笑我妖孽 提交于 2019-12-04 08:10:39
I've got a data.frame with lat s and lng s that define the boundaries of rectangular boxes, like so geohash north_lat south_lat east_lng west_lng 1 gbsuv 48.69141 48.64746 -4.306641 -4.350586 2 gbsuy 48.69141 48.64746 -4.262695 -4.306641 What's the easiest way to convert this into an sf object that holds a column of POLYGON s? The key to creating polygons is that the coordinates have to be in sequence to form a closed area (i.e., the last point is the same as the first point). So your data will need a bit of manipulation to create the coordinates, and put them in order. In my example I've done

DbGeography make circle with center and radius

不羁岁月 提交于 2019-12-03 20:34:49
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? Something like this perhaps? String polyString = String.Format("CURVEPOLYGON(CIRCULARSTRING(xx yy, xx yy, xx

How to read external GeoJSON file from openlayers?

ⅰ亾dé卋堺 提交于 2019-12-03 16:55:34
问题 I have to draw some lines by OpenLayers. The line features are coded as GeoJSON format. My code is ok for hard coded GeoJSON features. But, if I put this features in separate file and try to load it. It just does not work. I do not know what is the wrong with my loading external GeoJSON file. I have given both the code. Code 1: // This code is ok with hard coded GeoJSON features map.addControl(new OpenLayers.Control.LayerSwitcher()); vectorLayer = new OpenLayers.Layer.Vector("Lines"); var

Accessing Leaflet.js GeoJson features from outside

左心房为你撑大大i 提交于 2019-12-03 16:02:37
I want to interact with a leaflet powered map's GeoJson overlay (polygons) from outside of L. 's realm, but I don't seem to be able to access objects created by L. . Interaction would include: getBounds(myFeature) fitBounds(myFeature) setStyle etc I can see Leaflet exposing L.GeoJSON.getFeature(), but I don't seem to be able to squeeze anything out of it. No documentation, and the inspector seems to suggest it does not take arguments... :\ Is this just there for future development? You may use getLayer to get the feature by its id. http://leafletjs.com/reference.html#layergroup-getlayer var

Missing results due to geo proximity formula (store locator)

心已入冬 提交于 2019-12-03 13:13:26
问题 OK - I've been wrestling with this for about 3 months on and off and since I've exhausted every geo proximity formula out there that I've come across and I'm no closer to getting the right results I figured it time to ask for some help. THE AIM I'm setting up a fairly basic implementation of a store locator. The user enters their postcode and selects from a predefined list of search radii. The gmaps API generates lat/long coordinates for this address and passes them to a php script. In this

Android terminal--telnet missing commands, receiving this error : KO: unknown command, try 'help'

筅森魡賤 提交于 2019-12-03 12:19:19
问题 I'm trying to set the coordinates on an emulated device. XXXX-MacBook-XXXXX XXXX$ telnet localhost 5554 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Android Console: Authentication required Android Console: type 'auth <auth_token>' to authenticate Android Console: you can find your <auth_token> in '/Users/XXXXX/.emulator_console_auth_token' OK The problem is... geo fix 77.9888 34.0000 KO: unknown command

Geo chart for java

a 夏天 提交于 2019-12-03 08:13:14
Can anyone recommend a Java component that lets you create a pretty looking image of a world map, highlighting certain countries (based on some statistics). Something similar to this image: Something similar to Google Geo Charts (but for Java): https://developers.google.com/chart/interactive/docs/gallery/geochart but runs on the server side, without an internet connection. Ideally I'd like to attach weight to a few countries which would highlight them proportionally. Either open source or commercial (as long as it's not something ridiculously priced). I couldn't find a java library to do what

Find land mass nearest to a geo coordinate

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: As part of a developer challenge, I am trying to determine the land mass closest to a given coordinate. Obviously, if the point is on land, I use reverse geocoding and can get details. The problem is that if the point is in a body of water, especially oceans, it often won't return anything (Google, Nokia, Bing). I'd like to know that a point 3 miles off the coast of California is 3 miles from USA, or x miles from Japan, y miles from South Korea when a point is reasonably near more than one country. Is there any service that provides this

Find all coordinates within a circle in geographic data in python

隐身守侯 提交于 2019-12-03 05:54:43
问题 I've got millions of geographic points. For each one of these, I want to find all "neighboring points," i.e., all other points within some radius, say a few hundred meters. There is a naive O(N^2) solution to this problem---simply calculate the distance of all pairs of points. However, because I'm dealing with a proper distance metric (geographic distance), there should be a quicker way to do this. I would like to do this within python. One solution that comes to mind is to use some database

osg 渲染ifc数据-测试

大城市里の小女人 提交于 2019-12-03 05:16:24
直接使用osg渲染ifc数据,提高渲染速度。 #include "teslamanage.h" #include <QtWidgets/QApplication> #include <QtGui/QIcon> #include <osgViewer/Viewer> osg::ref_ptr<osg::Node> createLand(int widthParam, int heightParam, int zParam); void loadIFCFile(osg::ref_ptr<osgViewer::Viewer> &viewer1,std::wstring &fileNmae); int main(int argc, char *argv[]) { std::wstring fileName = L"D://ck1.ifc"; osg::ref_ptr<osgViewer::Viewer> viewer1 = new osgViewer::Viewer; loadIFCFile(viewer1, fileName); viewer1->setUpViewInWindow(200, 200, 800, 600, 0); return viewer1->run(); } osg::ref_ptr<osg::Node> createLand(int widthParam, int