Spatial

convert geoJson data to sql server spatial data type (GIS)

╄→гoц情女王★ 提交于 2019-12-12 12:56:51
问题 I've downloaded from openstreetmaps administrative borders (city, region, country, etc...) in geoJson format. I'm trying to store the json data related to the polygons in my ms sql server using spatial data. Since I've never parsed such a complex json file I've got difficulties in manually creating a c# object to store the parsed data. I'm using newtonsoftJson.json, to read the geoJson file and create an object. Then I use reflection to get the properties related to the object. This is quite

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

Boost Geometry/Spatial Query Shapes

让人想犯罪 __ 提交于 2019-12-12 10:11:24
问题 I am currently using the boost geometry/spatial index library, in order to perform range queries on 3d bounding boxes. For example I am able to get a list of all bounding boxes, that overlap a query bounding box. The documentation (http://www.boost.org/doc/libs/1_54_0_beta1/libs/geometry/doc/html/geometry/spatial_indexes/queries.html) shows, that -- at least in 2d -- polygons can be used instead of the bounding box as a query object. Is it possible to use more advanced query shapes in 3d as

Saving spatial data in CakePHP

谁都会走 提交于 2019-12-12 09:40:03
问题 I have a problem saving spatial data in CakePHP with saveAll(). I really dont want to write the query manually (Handling spatial data in CakePHP) because there are number of models being saved. Also I read this CakePHP and MySQL Spatial Extension but when I try to do the same, $db->expression() returns an stdClass. This is the returned object printed out: stdClass Object ( [type] => expression [value] => GeomFromText('POINT(48.18879 18.527579999999944)') ) If I use this object the way it is

Find the nearest X,Y coordinate using R

丶灬走出姿态 提交于 2019-12-12 08:37:28
问题 I'm just starting to learn R but would like project done sooner rather than later. It's rather simple: I have an X column and a Y column consisting of X coordinates and Y coordinates. (Working in the NAD27 coordinate system). Going from the first coordinate, I'd like to find the nearest point within the data set and then move onto the next coordinate and find it's nearest point within the same data set. Ideally, it would go through each point and determine the closest point. point x y 1

calculate distance between each pair of coordinates in wide dataframe

大兔子大兔子 提交于 2019-12-12 08:13:53
问题 I want to calculate the distance between two linked set of spatial coordinates ( program and admin in my fake dataset). The data are in a wide format, so both pairs of coordinates are in the same row. library(sp) set.seed(1) n <- 100 program.id <- seq(1, n) c1 <- cbind(runif(n, -90, 90), runif(n, -180, 180)) c2 <- cbind(runif(n, -90, 90), runif(n, -180, 180)) dat <- data.frame(cbind(program.id, c1, c2)) names(dat) <- c("program.id", "program.lat", "program.long", "admin.lat", "admin.long")

Choropleth or Thematic map creation from number of points within Shapefile polygon

[亡魂溺海] 提交于 2019-12-12 03:37:48
问题 I have geocoded data points (.csv) and a shapefile (Tigerline) read into R and maps overlaying the points (locations) on the polygons (counties) all under the same projection using plot() and add=. I am trying to find a way to map the number of points found in each polygon (county). I assume this would be a choropleth or some sort of thematic map. However associating the shapefile and the points is throwing me for a loop. And if you can't tell, I am both an R and spatial analysis newbie I

MySQL Spatial dialect

淺唱寂寞╮ 提交于 2019-12-12 02:53:08
问题 I am trying to set <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /> to <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLSpatialDialect" /> because when I run the following query I get thrown an error select e from Event e where within(e.name, :filter) = true Where filter is a com.vividsolutions.jts.geom.Geometry object Error when I used MySQLDialect: java.lang.UnsupportedOperationException at org.hibernate.spatial.GeometrySqlTypeDescriptor

Spatialytics - failed to load resources (map)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 02:45:22
问题 I am working with geokettle, geomondrian and spatialytics to show the results in map. When I reload the page of spatialytics (it is on server tomcat), the map doesn't appear(gets pink). I inspected element and I saw what is in image below: Click to see the image Anyone knows what can i do? Cumps. 来源: https://stackoverflow.com/questions/17374197/spatialytics-failed-to-load-resources-map

generate clustered spatstat marks?

北慕城南 提交于 2019-12-12 02:39:28
问题 I was wondering if anyone knows how to assign marks in spatstat so that they tend to cluster spatially? I have a set of lat long coordinates that I want to categorize into 4 groups. I have figured out how to randomly assign marks/groups to these points using the following code: as.ppp(data, window ,marks=factor(sample(1:4,replace=TRUE))) But I can't figure out how to assign the marks so that groups tend to occupy points closer to one another. As a further complication, I would also like the