geospatial

Mapdeck Package in R - add_grid Does Not Appear to Render Anything

南楼画角 提交于 2019-12-12 21:52:38
问题 Problem: The add_grid function in the R mapdeck package is very exciting. However, following the CRAN documentation, I cannot seem to get any data to actually plot on the returned map. In other words, the map returns, but no data is plotted. Is this a known bug? Code: library(tidyverse) library(mapdeck) # - Enter mapdeck key ... Note that it is user-specific key <- rstudioapi::askForPassword() # - Read Example Data Set df <- read.csv(paste0( 'https://raw.githubusercontent.com/uber-common/deck

Geospatial Index for inner structure

泄露秘密 提交于 2019-12-12 20:42:57
问题 I have a collections names locations with data structures like: { "_id" : ObjectId("4e95263f1783ae8487be26d4"), "name" : "test 1", "location" : { "coordinate" : { "latitude" : 40.731987, "longitude" : -73.999701 }, "address": "xxxxxxx" } } and want to make geo queries against location.coordinate field. When I'm trying to add index I get following results: $> db.locations.ensureIndex( { "location.coordinate" : "2d" } ) $> **** SyntaxError: syntax error (shell):0 Is it possible to use

Image manipulation

妖精的绣舞 提交于 2019-12-12 18:34:26
问题 I am just wondering what kind of computing/programming language/frameworks are needed to produce images such as the one in http://www.erdas.com/ ? Programmatically, how does one produce the general spatial analysis images ? ps: I use java most of the time. Thanks 回答1: First of all, uDIG, OpenJUMP (not sure about this) cannot process images in a way that ERDAS can. These softwares are great, but they do not have extensive raster funcionality. You need to take a look at GDAL, which covers a

MBR Within not accurate in mysql

[亡魂溺海] 提交于 2019-12-12 14:02:23
问题 I have been using the MBRWithin function for quite a lot of times. Suddenly I notice on google map this POINT(101.11857 4.34475) is out of the geo fence which I specify but it still give a value of 1 in mysql any reason or tweaking need to be done? SELECT MBRWithin(GeomFromText('POINT(101.11857 4.34475)'),GeomFromText('POLYGON((101.12112522125244 4.3531723687957164,101.11846446990967 4.351417913665312,101.13138198852539 4.336397898951581,101.13477230072021 4.33211863778494,101.14065170288086

How do I add a simple image overlay in Mapbox Javascript?

可紊 提交于 2019-12-12 13:18:19
问题 The following link in the Mapbox Javascript API describes how to add an image overlay on a map, and it is very simple : https://www.mapbox.com/mapbox-gl-js/example/image-on-a-map/ This works! However, I am trying to add an image overlay on a custom map. I am wanting to do this without creating tiles or anything of the like. I can't find a way to overlay an image on a satellite map (that's my goal, just a weather radar GIF on a satellite map), but I can't seem to get this to work on any other

How would I plot borehole traces in 3d?

旧城冷巷雨未停 提交于 2019-12-12 13:10:18
问题 Borehole data contains the "collar" information: that's X,Y, and Z (Z is ground elevation, and Z=0 is some datum like mean sea level), and also borehole length in Z direction. How can I create a 3D plot of the borehole traces (curves)? I'm looking for solutions in R but also interested in python (though haven't tagged it as such in case it just confuses). The result might be similar to this image from ArcScene: . Here, the borehole traces are coloured by another parameter from one or more

In R, how can I convert SpatialPolygons* to map objects

末鹿安然 提交于 2019-12-12 12:19:32
问题 I'm trying to make use of ProportionalSymbolMap map as defined in this JSS paper. In order to plot proportional symbols I first need an object of map class. The methods I normally use however return SpatialPolygonDataFrame. Is there any package or method that could be of help here? 回答1: Hack is the way to go about it. I just used this set of commands to take apart a SpatialPolygons* object and put it back together again as an object of class map . I hope you like it: # read in shapefile as

MongoMapper near with maxDistance - Mongo::OperationFailure: geo values have to be numbers:

自古美人都是妖i 提交于 2019-12-12 12:13:03
问题 I'm trying to encapsulate a near query with a maxDistance in a MongoMapper backed model. I must be doing something silly in my query syntax. Model class Site include MongoMapper::Document key :id, Integer key :name, String key :location, Array ensure_index [[:location, '2d']] def self.nearest(center_point, range) where(:location => {'$near' => center_point, '$maxDistance' => range}).all end end Trying to get everything within 200 miles of a point... Site.nearest([-122.0,44.0],200) > Mongo:

Updated world map for R “maps” package?

不打扰是莪最后的温柔 提交于 2019-12-12 10:37:30
问题 library(maps) 1> map.where(database="world",29.392089,53.592505) [1] "USSR" does anyone know how I can get an updated world map database to drive this function in the maps package? I need country names only for now, not detailed sub-national administrative information such as is available in at gadm.org. 回答1: Try wrld_simpl in the maptools package. require(maptools) data(wrld_simpl) plot(wrld_simpl) ## or subset based on the name plot(wrld_simpl[wrld_simpl$NAME == "Russia", ]) ## explore

Creating a UK map with geom_polygon

安稳与你 提交于 2019-12-12 09:55:20
问题 I am quite new to R and have recently been trying to create an outline of the UK in ggplot2 with the following code: library(ggplot2) UK <- map_data("world2Hires", region = "UK") ggplot() + geom_polygon(data = UK, aes(x = long, y = lat, group = group)) + coord_map() Result of ggplot2 code: This creates the map above as it does not take into account the longitude scale of the map and stretches it across the x-axis. The UK has a longitude that spans from -x to +x which is causing the problem