spatial

Query to find shortest route in Oracle

Hello, fellow developers. I'm starting studies in Oracle 11g Spatial Databases and I want to know if is there a query that returns the shortest route (or path) between two points, or between a point and a linestring. I have a map with some linestring (hiking trails) and Polygons (geographic accidents) and I want to find the shortest ro...

SQL SERVER Spatial Data

Hi All, I am struggling finding an efficient way to find a distance between a Point that intersects a polygon and the border of that polygon. I was able to use the STDistance comparing the point to every point that made up the polygon but that is taking a lot of time. Using SPatial indexed wasn't much helpful because the STDistance is n...

How to very efficiently assign lat/long to city boundary described by shape ?

I have a huge shapefile of 36.000 non-overlapping polygones (city boundaries). I want to easily determine the polygone into which a given lat/long falls. What would the best way given that it must be extremely computationaly efficient ? I was thinking of creating a lookup table (tilex,tiley,polygone_id) where tilex and tiley are tile id...

Solr vs. Sphinx for spatial search

I'm tasked with choosing the fulltext search engine we're going to be using on an upcoming projects. Based on what I've read, I'm leaning toward Solr, but I'm a little concerned about spatial search. In addition to some other parameters (keywords, category, etc.) we want to be able to specify a location and a maximum distance (e.g., with...

How do I Correct for False Positive using MBRContains in a mySQL db?

I've got a mySQL database. I'm testing points to see whether they are in particular polygons. Unfortunately, I'm getting false positives. So, for example, if I test to see if different points are in polygon ABCD, the MBRContains query returns 6 points, when I know for a fact that only 5 of the points are in that polygon. I know that MB...

C# Drawing Oracle Spatial Geometries

I need to create a simple app which can display geometries from Oracle Spatial in C#. These geometries are exported from AutoCAD Map 3D 2010 to Oracle Spatial. I need to pan, zoom, manage layers of these objects, events (like right click to popup a contextual menu, potentially different for every object), creating/deleting points (maybe...

Estimating the boundary of arbitrarily distributed data

I have two dimensional discrete spatial data. I would like to make an approximation of the spatial boundaries of this data so that I can produce a plot with another dataset on top of it. Ideally, this would be an ordered set of (x,y) points that matplotlib can plot with the plt.Polygon() patch. My initial attempt is very inelegant: ...

Spatial domain to frequency domain

I know about Fourier Transforms, but I don't know how to apply it here, and I think that is over the top. I gave my ideas of the responses, but I really don't know what I'm looking for... Supposed that you form a low-pass spatial filter h(x,y) that averages all the eight immediate neighbors of a pixel (x,y) but excludes itself. a. Fin...

Selecting a good SQL Server 2008 spatial index with large polygons

I'm having some fun trying to pick a decent SQL Server 2008 spatial index setup for a data set I am dealing with. The dataset is polygons, representing contours over the whole globe. There are 106,000 rows in the table, the polygons are stored in a geometry field. The issue I have is that many of the polygons cover a large portion of t...

distance between two points across land using sql server

I am looking to calculate the shortest distance between two points inside SQL Server 2008 taking into account land mass only. I have used the geography data type along with STDistance() to work out point x distance to point y as the crow flies, however this sometimes crosses the sea which i am trying to avoid. I have also created a p...

Does SQL Server CE support synchronization of Spatial Data type?

Does Sql Server support replication to SQL Server CE? In the documentation, SQL server CE seems to be not supporting the st_geometry type. ...

Does Oracle Lite Database 10g support spatial data type?

Can't find any online documentation about the support data types? ...

Neo4j spatial within distance query

I would like to store coordinates as nodes in neo4j to do simple querys For example a list of 10,000 nodes: Node[1] - lon=-74.007124, lat=40.714550 Node[2] - lon=-94.626824, lat=39.113380 Node[3] - lon=-105.937406, lat=35.691543 Node[4] - lon=-122.329439, lat=47.603560 Node[5] - lon=-122.420139, lat=37.779600 .. .. ...

Importing ShapeFiles into Oracle XE

Hi, I'm looking to import one of the Shapefiles supplied with the Ordnance Survey Boundary-Line opensource set into Oracle XE. http://data.gov.uk/dataset/os-boundary-line Unfortunately I'm completely unsure how to go about this, despite much Googling. Anyone got any pointers or tips or a link to a guide? Cheers James ...

org.hibernate.MappingException: No Dialect mapping for JDBC type: 2002

Hi at all, I'm having a issue trying to get working a JPA nativeQuery. I'm having a org.hibernate.MappingException: No Dialect mapping for JDBC type: 2002 when a try to do a nativeQuery and get a geometry field type. I use oracle and org.hibernatespatial.oracle.OracleSpatial10gDialect. The geom fields is mapped as: @Column(name="geo...

Unable to retrieve computed distance in Spatial Solr queries

I'm using this plugin to allow spatial queries in Solr. I have followed the steps included in the documentation and I've got the spatial queries working fine. Now I want to retrieve the computed distance. I added these lines in the solrconfig.xml file: <searchComponent name="geodistance" class="nl.jteam.search.solrext.spatial.GeoDistan...

how to sort rows by a distance from a given point, mysql?

I'm trying to get 100 points from my table with a lowest distance to a given point. I'm using SELECT *, GLENGTH( LINESTRINGFROMWKB( LINESTRING( ASBINARY( POINTFROMTEXT("POINT(40.4495 -79.988)") ), ASBINARY(pt) ) ) ...

Spatial querying, converting metres to radians?

I have geographic data that was loaded into the geography datatype. For very specific purposes, I now need to have store this as a geometry. However, I need to perform a query like this. DECLARE @radius INT -- e.g. 3000 metres DECLARE @geo geometry -- my starting shape SET @geo = @geo.STBuffer(@radius) -- this obviously doesnt work.. ...

How to find "nearby" results?

Assuming you have the latitude and longitude of your user, and you want to find nearby... let's say restaurants, how do you query your relational DB? For something like "restaurants within a 25 mile radius"? Would you just query for restaurants in a square with a long and lat greater than/less than the user's loc +/- 25 miles (converte...

Inverse Distance Weighted (IDW) Interpolation with Python

The Question: What is the best way to calculate inverse distance weighted (IDW) interpolation in Python, for point locations? Some Background: Currently I'm using RPy2 to interface with R and it's gstat module. Unfortunately, the gstat module conflicts with arcgisscripting which I got around by running RPy2 based analysis in a separate...