spatial-query

SQL-Server 2008 R2 geoSpatial query error for Circular String

徘徊边缘 提交于 2019-12-13 08:13:58
问题 SQL Spatial Features: SQL geometry Point, Linestring working well but the Circular string is not working. When i try to save the CircularString type data to my geometry datatype its throws the following error: My statement: DECLARE @g1 geometry = 'CIRCULARSTRING EMPTY'; "A .NET Framework error occurred during execution of user-defined routine or aggregate "geometry": System.FormatException: 24114: The label CIRCULARSTRING EMPTY in the input well-known text (WKT) is not valid. Valid labels are

Find points within a circle using hibernate Spatial criteria - distanceWithin

两盒软妹~` 提交于 2019-12-11 16:54:39
问题 I have a domain object car . One of the car properties is location stored in MySQL as spatial type Point ( columnDefinition can't be of Geometry , throws an exception). @Type(type="org.hibernate.spatial.GeometryType") @Column(name = "location", columnDefinition="Point") private Point location; Using hibernate spatial criteria I would like to get those that are in a certain radius. In native sql I could use ST_Distance_Sphere , but I would like to use criteria instead. The problem is, that

Using a spatial database to find polygons that contain a point

妖精的绣舞 提交于 2019-12-11 13:54:22
问题 I'm using MongoDB to store spatial records. Some records are polygons, and others are points. Data is being continually inserted. I need to be able to access all records whose polygon contains a point. Mongo's spatial queries allow finding all points within a polygon, but not all polygons that contain a point. Is there a good way to do this in MongoDB another database system? 回答1: Unfortunately, there is no way to run this query at present -- unless you're willing to simplify the application

Query DBGeometry for specific LatLng value

六月ゝ 毕业季﹏ 提交于 2019-12-11 06:16:11
问题 Background I have a database of countries which I got from a shape file from here and uploaded to my database using Shape2Sql tool from http://www.sharpgis.net. While using the tool, I selected the option to use SRID 4326 as I believe this represents the geometry of the earths surface (please correct me if and when I am wrong). When I run Select in Sql management studio, in the results pane there is a spatial tab which basically shows a map of the world i.e. all the geometric data in the

Can I store circle and polygon within the same spatially indexed column in postgis?

匆匆过客 提交于 2019-12-10 21:23:43
问题 According to their documentation the spatial objects can be of the following POINT(0 0) LINESTRING(0 0,1 1,1 2) POLYGON((0 0,4 0,4 4,0 4,0 0),(1 1, 2 1, 2 2, 1 2,1 1)) MULTIPOINT(0 0,1 2) MULTILINESTRING((0 0,1 1,1 2),(2 3,3 2,5 4)) MULTIPOLYGON(((0 0,4 0,4 4,0 4,0 0),(1 1,2 1,2 2,1 2,1 1)), ((-1 -1,-1 -2,-2 -2,-2 -1,-1 -1))) GEOMETRYCOLLECTION(POINT(2 3),LINESTRING(2 3,3 4)) However , there is no circle type, where I can just store a point and its radius. And have the same feature where I

“Unable to determine the spatial data type in the specified dataset field…” using the map layer wizard

不打扰是莪最后的温柔 提交于 2019-12-10 18:48:00
问题 I'm using the map layer wizard for the first time in SSRS so we can add spatial data to the map. We get this error from the wizard: Unable to determine the spatial data type in the specified dataset field... The data type for the spatial data is geography. The spatial data looks like this when executed in the Query Designer: POINT (2.41866741166689 48.9082239283949) POINT (1.92902094274567 47.9294603618455) POINT (2.25244361602031 48.9619440062058) POINT (1.91174331024445 47.9109595746068)

Spatial queries on AWS SimpleDB

放肆的年华 提交于 2019-12-09 12:33:34
问题 I would like to know what people suggest as efficient ways of doing a spatial query in an Amazon Web Services SimpleDB? By spatial query I mean finding objects in a given radius of a latitude and longitude. 回答1: SimpleDB doesn't currently offer any built-in spatial search operations but that doesn't mean it can't be done. There's several methods of implementing geospatial searches in non-geospatially aware databases such as SimpleDB and all of them center around the idea of using the database

Find points in cells through pandas dataframes of coordinates

只谈情不闲聊 提交于 2019-12-09 01:48:54
问题 I have to find which points are inside a grid of square cells, given the points coordinates and the coordinates of the bounds of the cells, through two pandas dataframes. I'm calling dfc the dataframe containing the code and the boundary coordinates of the cells (I simplify the problem, in the real analysis I have a big grid with geographical points and tons of points to check): Code,minx,miny,maxx,maxy 01,0.0,0.0,2.0,2.0 02,2.0,2.0,3.0,3.0 and dfp the dataframe containing an Id and the

Need expert's help to solve minor change in spatial data query

半世苍凉 提交于 2019-12-08 13:04:38
问题 i have the following query to access the nearest locations around the given lat-lon. I followed Mr.Ollie's blog Nearest-location finder for MySQL to find nearest locations around given lat-long using haversine formula. But due to lack of much knowledge in spatial data query i failed to execute it properly, so looking for an expert's advice to solve this. Here is my query SELECT z.id, p.distance_unit * DEGREES(ACOS(COS(RADIANS(p.latpoint)) * COS(RADIANS(z.(x(property)))) * COS(RADIANS(p

rgeos gIntersection in loop takes too long to clip path network

风流意气都作罢 提交于 2019-12-08 08:17:49
问题 I am using gIntersection to clip a nationwide path network by polygons one at a time from a SpatialPolygonsDataFrame. I am looping through each polygon, clipping the path network, calculating the length of the clipped paths, and saving this to a dataframe called path.lgth: poly<-readShapePoly("C:\\temp\\polygons.shp") paths<-readShapeLines("C:\\temp\\paths.shp") #loop through all polygons clipping lines path.lgth<-data.frame() for (i in 1:length(poly)){ clip<-gIntersection(paths,poly[i,])