Spatial

Solr Spatial search with self-intersecting polygons

喜夏-厌秋 提交于 2019-12-11 10:27:46
问题 I’m using Solr 4.3.0 with an up to date version of JTS and spatial4j. As field type in my schema.xml i’m using “location_rpt” like the description in the documentation. Documentation <field name="standort" type="location_rpt" indexed="true" stored="true" /> Now when my Application create a FilterQuery like this standort:"IsWithin (POLYGON((16.243972778320312 48.27016879304729, 16.411170959472656 48.268340583150504, 16.44275665283203 48.19058119922813, 16.32396697998047 48.15921534239267,16

error in mask a raster by a spatialpolygon

混江龙づ霸主 提交于 2019-12-11 09:57:01
问题 I have raster of the following features: library(raster) library(rgeos) test <- raster(nrow=225, ncols=478, xmn=-15.8, xmx=32, ymn=-9.4, ymx=13.1) I want to mask in this raster the cells that are within a given distance of a point. I create the spatial points as followed: p2=readWKT("POINT(31.55 -1.05)") Then I create a spatial polygon object by adding a 0.5 buffer: p2_Buffered <- gBuffer(p2, width = 0.5) mask(test, mask=p2_Buffered,inverse=T) When I mask my raster given this spatial object,

Finding nearest neighbour (log, lat), then the next closest neighbor, and so on for all points between two datasets in R

こ雲淡風輕ζ 提交于 2019-12-11 06:57:39
问题 I have two datasets (csv format) of different lengths, both containing addresses as well as coordinates (log and lat). The both have this shape (example Dataset A): ID Address lat long 1 Lausitzer Strasse, 20/22, 2991, Lauta, Germany 51.46228 14.09522 2 Parkstrasse, 6, 2991, Lauta, Germany 51.4631141 14.1109184 3 Parkstrasse, 6, 2991, Lauta , Germany 51.4631141 14.1109184 4 Arndtstrasse, 27, 2991, Lauta, Germany 51.44664 14.10287 5 Goethestrasse, 13, 4746, Hartha, Germany 51.0965679 12

Can I convert kernel density plots to raster and then overlay them using map algebra?

回眸只為那壹抹淺笑 提交于 2019-12-11 06:15:19
问题 I am currently exploring three shapefiles, each with point data, and all confined to the same window. I also have them in ppp format which I've used to create kernel density maps. plot(density.ppp(smktppp, 0.5, edge=T), main="Supermarket Density") plot(density.ppp(tptppp, 0.5, edge=T), main="Transport Density") plot(density.ppp(farmppp, 0.5, edge=T), main="Urban Farm Density") I would like to overlay these plots, using map algebra, or fuzzy logic, etc, to create one output map showing the

Spatial search for neighbor with distance limit?

自闭症网瘾萝莉.ら 提交于 2019-12-11 05:31:05
问题 In the example page it is shown how to do a neighbor search with a limit on the number of returned items. Is it possible to also specify a distance limit? I.e.: Return all items that are at most X distance from the point, and further limit the result to Y number of items." 回答1: No, if you need distance, use OVERLAPS. https://tarantool.org/doc/book/box/box_index.html#rtree-iterator 来源: https://stackoverflow.com/questions/39644902/spatial-search-for-neighbor-with-distance-limit

Large MySQL DB (21MM records) with location data - each location has lat and long - need to run 'nearby' query

拜拜、爱过 提交于 2019-12-11 04:18:41
问题 We have a large location DB - with lat long specified for each row. The DB is hosted in MySQL. We need to run two type of queries: places nearby (sort by distance) places nearby by category (where category is a column) With the number of records growing, this query seems to slow down drastically. SELECT *, ( 3959 * acos( cos( radians(40.759105) ) * cos( radians( Latitude ) ) * cos( radians( longitude) - radians(-73.984654) ) + sin( radians(40.759105) ) * sin( radians( Latitude ) ) ) ) as

Mapping Geometry from SQLServer2008 to .NET (NHibernate 4.0.0.4000)

那年仲夏 提交于 2019-12-11 04:01:37
问题 I try to map a SqlServer2008 geometry with FluentNHibernate. I am using NHibernate version 4.0.0.4000. I installed NHibernate.Spatial, NetTopologySuite, GeoAPI and NHibernate with FluentNhibernate all with NUget. My Fluent mapping looks like this: public class ArealMap: ClassMap<Areal> { public Areal() { Table("Areal"); Id(x => x.Id).Column("Id").GeneratedBy.Identity(); Map(x => x.Geometry).Column("Geometry").CustomType(typeof(MsSql2008GeometryType)); } } public class Areal { .... public

How do I efficiently search in SQL CE for nearby geographical nodes that are road junctions?

你。 提交于 2019-12-11 03:49:17
问题 I have the following query: var nodes = DB.Nodes .Where(x => x.Lon > 486400 && x.Lon < 486600 && x.Lat > 5025100 && x.Lat < 5025300) .Join(DB.RoadNodes, x => x.Id, y => y.NodeId, (x, y) => x); This searches all the nodes in DB.Nodes near a certain location, then it checks whether the node is a road junction by taking a join with DB.RoadNodes ; however, this takes several seconds which is slow. It looks like I have to do two things here: Optimize the Where part which takes ~5 seconds on its

Combining SpatialPolygonsDataFrame of two neighbour countries

浪尽此生 提交于 2019-12-11 03:33:01
问题 I want to combine the SpatialPolygonsDataFrame of two neighbour countries like Pakistan and India. My MWE is below: library(raster) Pakistan.adm1.spdf <- getData( "GADM" , country = "Pakistan" , level = 1 ) India.adm1.spdf <- getData( "GADM" , country = "India" , level = 1 ) How can I combine these two shapefiles? 回答1: From the answer to this question, use rbind and the argument makeUniqueIDs . adm1.spdf <- rbind(Pakistan.adm1.spdf, India.adm1.spdf, makeUniqueIDs = TRUE) plot(adm1.spdf) 来源:

R - SpatialPolygonsDataFrame from a list of SpatialPolygons

 ̄綄美尐妖づ 提交于 2019-12-11 02:08:22
问题 I´m looking for a way to create a SpatialPolygonsDataFrame from a list of SpatialPolygons? In the following there´s an example of a list of Polygons from which a SpatialPolygonsDataFrame, containing all Polygons of the list, should be created. EDIT: The SpatialPolygonsDataFrame must be created from the list of SpatialPolygons! As my original data doesn´t contains SpatialPolygons as separate values but the list of SpatialPolygons. The way I received this list is different form the one in the