Search Results

Search found 109 results on 5 pages for 'geospatial'.

Page 2/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • Is there an extensible SQL like query language that is safe for exposing via a public API?

    - by Lokkju
    I want to expose some spatial (and a few non-spatial) datasets via a public API. The backend store will either be PostgreSQL/PostGIS, sqlite/spatialite, or CouchDB/GeoCouch. My goal is to find a some, preferably standard, way to allow people to make complex spatial queries against the data. I would like it to be a simple GET based request. The idea is to allow safe SQL type queries, without allowing unsafe ones. I would rather modify something that is off the shelf than doing the entire thing myself. I specifically want to support requesting specific fields from a table; joining results; and spatial functions that are already implemented by the underlying datastore. Ideas anyone?

    Read the article

  • Geopraphic Charting controls for Websites

    - by Ian
    Hi All, I need to create dash boards showing geographic regions and show sales, hot spots etc on a map. What have you tried and what do you recommend? I like the look of both Fusion Charts and Dundas I will be using asp.net for the site but any control's or library's including flash or javascript are good options. Most important is the look and feel followed by functionality in South Africa. After my last post looking for commercial mapping solutions, it looks like they are very expensive and now I am investigating alternatives to full mapping solutions. thanks

    Read the article

  • Determining whether geographic point is within X meters of a state border (using shapefile for borde

    - by DanM
    So I'm writing a Java app, and I've got an ESRI Shapefile which contains the borders of all the U.S. states. What I need is to be able to determine whether any given lat/lon point is within a specified distance from ANY state border line - i.e., I will not be specifying a particular border line, just need to see whether the point is close to any of them. The solution does NOT have to be very precise at all; e.g. I don't need to be dealing with measuring perpendicular to the border, or whatever. Just checking to see if going X meters north, south, east or west would result in crossing a border would be more than sufficient. The solution DOES have to be computationally efficient, as I'll be performing a huge number of these calculations. I'm planning to use the GeoTools library (though if there's a simpler option, I'm all for it) with the Shapefile plugin. What I don't really understand is: Once I've got the shapefile loaded into memory, how do I check to see whether I'm near a border? Thanks! -Dan

    Read the article

  • distance between two points across land using sql server

    - by dpwb
    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 polygon around the land mass boundary I am interested in. I believe that I need to combine these two methods to ensure that STDistance always remains within polygon - unless there is a simpler solution. Thanks for any advice

    Read the article

  • Reversed Latitude/Longitude US Tiger/Line Shape File to MySQL w/ OGR2OGRP

    - by Dave LeJeune
    Hi - I've downloaded the latest set (2010) of TIGER edge shape files (ESRI shapefile format) from the US Census website and am loading them into MySQL using the GDAL ogr2ogr utility. A new table (geotest) does get created with a SHAPE column that has the geometry defined as a LINESTRING. However, I am seeing reversed latitude and longitude values that get reversed when running the following command: ogr2ogr -f "MySQL" MySQL:"geo,user=lejeuned,host=localhost,password=cnickl234" -nln geotest -nlt LINESTRING -append -a_srs "EPSG:4326" -lco engine=MYISAM tl_2010_01021_edges.shp Mapping the latitude/longitude (after reversing them of course) they appear to be spot on so I suspect there is just something I am doing wrong or flag I am missing which is causing the latitude and longitudes to be transposed. When I select the SHAPE column using astext() I get the following result: LINESTRING(-86.69863 32.973164,-86.69853 32.97302,-86.69856 32.97287,-86.698613 32.972825,-86.6988 32.972825,-86.6989 32.972892,-86.6989 32.973002,-86.69874 32.97316,-86.69864 32.97318,-86.69863 32.973164) Any ideas what I am doing wrong?

    Read the article

  • How can I extend this SQL query to find the k nearest neighbors?

    - by Smigs
    I have a database full of two-dimensional data - points on a map. Each record has a field of the geometry type. What I need to be able to do is pass a point to a stored procedure which returns the k nearest points (k would also be passed to the sproc, but that's easy). I've found a query at http://blogs.msdn.com/isaac/archive/2008/10/23/nearest-neighbors.aspx which gets the single nearest neighbour, but I can't figure how to extend it to find the k nearest neighbours. This is the current query - T is the table, g is the geometry field, @x is the point to search around, Numbers is a table with integers 1 to n: DECLARE @start FLOAT = 1000; WITH NearestPoints AS ( SELECT TOP(1) WITH TIES *, T.g.STDistance(@x) AS dist FROM Numbers JOIN T WITH(INDEX(spatial_index)) ON T.g.STDistance(@x) < @start*POWER(2,Numbers.n) ORDER BY n ) SELECT TOP(1) * FROM NearestPoints ORDER BY n, dist The inner query selects the nearest non-empty region and the outer query then selects the top result from that region; the outer query can easily be changed to (e.g.) SELECT TOP(20), but if the nearest region only contains one result, you're stuck with that. I figure I probably need to recursively search for the first region containing k records, but without using a table variable (which would cause maintenance problems as you have to create the table structure and it's liable to change - there're lots of fields), I can't see how.

    Read the article

  • Calculating bounding box a certain distance away from a lat/long coordinate in Java

    - by Bryce Thomas
    Given a coordinate (lat, long), I am trying to calculate a square bounding box that is a given distance (e.g. 50km) away from the coordinate. So as input I have lat, long and distance and as output I would like two coordinates; one being the south-west (bottom-left) corner and one being the north-east (top-right) corner. I have seen a couple of answers on here that try to address this question in Python, but I am looking for a Java implementation in particular. Just to be clear, I intend on using the algorithm on Earth only and so I don't need to accommodate a variable radius. It doesn't have to be hugely accurate (+/-20% is fine) and it'll only be used to calculate bounding boxes over small distances (no more than 150km). So I'm happy to sacrifice some accuracy for an efficient algorithm. Any help is much appreciated. Edit: I should have been clearer, I really am after a square, not a circle. I understand that the distance between the center of a square and various points along the square's perimeter is not a constant value like it is with a circle. I guess what I mean is a square where if you draw a line from the center to any one of the four points on the perimeter that results in a line perpendicular to a side of the perimeter, then those 4 lines have the same length.

    Read the article

  • Caching view-port based Geo-queries

    - by friism
    I have a web app with a giant Google Map in it. As users pan and zoom around on the map, points are dynamically loaded through AJAX call which include the viewport bounds (NE and SW corner coordinates) and some other assorted parameters. How do I cache these request for points? The problem is that the parameters are highly variable and (worst) not discrete i.e. floats with a lots of decimal places. I'm using ASP.NET-MVC/C#/LINQ2SQL/SQL-Server but the problem is not tied to that platform. This is the signature of the the relevant method: [AcceptVerbs(HttpVerbs.Post)] public JsonResult Data(string date, string categories, string ne_lat, string ne_lng, string sw_lat, string sw_lng)

    Read the article

  • Does Android platform support SpatiaLite?

    - by Stan
    Is it possible to use SpatiaLite database on Android platform (1.6)? I am trying to program a google buzz-like app which need to take advantage of SpatiaLite functions, like calculating distance between 2 points, etc. Any external library needed? Thanks.

    Read the article

  • Change Projection in OpenLayers Map

    - by deamon
    I want to set "EPSG:4326" as the projection of an OpenLayers map, but when I try it, I always get "EPSG:900913". function init() { var options = { projection: new OpenLayers.Projection("EPSG:4326") // ignored }; map = new OpenLayers.Map('map', options); var layer = new OpenLayers.Layer.OSM.Osmarender("Osmarender"); map.addLayer(layer); ... alert(map.getProjection()); // returns "EPSG:900913" ... } How can I set the Projection to EPSG:4326?

    Read the article

  • MySQL GIS and Spatial Extensions - how to map regions and query against them

    - by chibineku
    I am trying to make a smartphone app which will return a list of users within a certain proximity, say 100m. It's easy to get the coordinates of my BlackBerry and write them to a database, but in order to return a list of other users within 100m, I need to pull every other record from the database and compare the distance between the two points, checking to see if it's within range, before outputting that user's information. This is going to be time consuming if there are many users involved. So I would like to map areas (countries, cities, I'm not yet sure of the resolution I'll need) so that I can first target a smaller subset of all users. This will save on processing time. I have read the basics of GIS and spatial querying on the mysql website but to be honest the query is over my head and I hate copying and pasting code without understanding it. Plus it only checks for proximity - I want to first check if a coordinate falls within a certain area. Does anyone have any experience of such matters and feel like giving me some pointers? Resources such as any preexisting databases of points describing countries as polygons would be really helpful too. Many thanks to anyone who takes the time :)

    Read the article

  • Selecting a good SQL Server 2008 spatial index with large polygons

    - by andynormancx
    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 the globe. This seems to make it very hard to get a spatial index that will eliminate many rows in the primary filter. For example, look at the following query: SELECT "ID","CODE","geom".STAsBinary() as "geom" FROM "dbo"."ContA" WHERE "geom".Filter( geometry::STGeomFromText('POLYGON ((-142.03193662573682 59.53396984952896, -142.03193662573682 59.88928136451884, -141.32743833481925 59.88928136451884, -141.32743833481925 59.53396984952896, -142.03193662573682 59.53396984952896))', 4326) ) = 1 This is querying an area which intersects with only two of the polygons in the table. No matter what combination of spatial index settings I chose, that Filter() always returns around 60,000 rows. Replacing Filter() with STIntersects() of course returns just the two polygons I want, but of course takes much longer (Filter() is 6 seconds, STIntersects() is 12 seconds). Can anyone give me any hints on whether there is a spatial index setup that is likely to improve on 60,000 rows or is my dataset just not a good match for SQL Server's spatial indexing ?

    Read the article

  • Use GIS to get geographic info for a single point

    - by Patrick Scott
    I am not quite sure where to start with this. I only just started looking into this in the past week, but hopefully someone can help point me in the right direction. The goal of my project is to be able to take a geohash, decode it to latitude and longitude, check the point against some GIS data, and find out some information about that point such as the terrain(is this a body of water? A lake? An Ocean? Is this a mountainous area? Is this a field?), altitude, or other useful things. Then simply be able to display that information as a starter. What I have gathered so far is that I need to get some free GIS data (this is for school, so I have no money!). I would like to have world data, and I found some online (http://www.webgis.com/terraindata.html) but I don't know where to go from here. I saw some tools such as PostGIS as a database. I am currently using Java for some other parts of the project, so if possible I would like to stick to Java. Can someone help me out, or point me in the right direction?

    Read the article

  • Calculating the union of 2 longitudal intervals (that may wrap around 180 degrees)

    - by timpatt
    The story: I have a LatLongBounds class that represents an area on the surface of the earth by a latitudinal interval (bounded by north & south - not important to this question) and a longitudinal interval (bounded by east and west; both normalized to a range [-180, 180] - negative being a westerly direction). In order to be able to represent an area that straddles the 180 degree meridian the value of west may be set to be greater than east (eg. the range west = 170, east = -170 will straddle said meridian). In effect the longitudinal interval may wrap around at 180 degrees (or equivalently -180 degrees). My Question: Does anyone have any suggestions as to how I can calculate the union of two longitudinal intervals that may wrap around at 180 degrees. Thanks.

    Read the article

  • GIS: line_locate_point() in Python

    - by miracle2k
    I'm pretty much a beginner when it comes to GIS, but I think I understand the basics - it doesn't seem to hard. But: All these acronyms and different libraries, GEOS, GDAL, PROJ, PCL, Shaply, OpenGEO, OGR, OGC, OWS and what not, each seemingly depending on any number of others, is slightly overwhelming me. Here's what I would like to do: Given a number of points and a linestring, I want to determine the location on the line closest to a certain point. In other words, what PostGIS's line_locate_point() does: http://postgis.refractions.net/documentation/manual-1.3/ch06.html#line%5Flocate%5Fpoint Except I want do use plain Python. Which library or libraries should I have a look at generally for doing these kinds of spatial calculations in Python, and is there one that specifically supports a line_locate_point() equivalent?

    Read the article

  • SQL Server 2008 spatial index and CPU utilization with MapGuide Open Source 2.1

    - by Antonio de la Peña
    I have a SQL Server table with hundreds of thousands of geometry type parcels. I have made indexes on them trying different combinations of density and objects per cell settings. So far I'm settiling for LOW, LOW, MEDIUM, MEDIUM and 16 objects per cell and I made a SP that sets the bounding box according to the extents of the entities in the table. There is an incredible performance boost from queries taking almost minutes without index to less than seconds, it gets faster when the zoom is closer thus less objects are displayed. Yet the CPU utilization gets to 100% when querying for features, even when the queries themselves are fast. I'm worrying this will not fly in a production environment. I am using MapGuide Open Source 2.1 for this project, but I am positive the CPU load is caused by SQL Server. I wonder if my indexes are set properly. I haven't found any clear documentation on how to properly set them up. Every article I've read basically says "it depends..." but nothing specific. Do you have any recommendations for me, including books, articles? Thank you.

    Read the article

  • Ruby implementation of conversion between Latitude/Longitude and OS National Grid Reference point?

    - by Harry Wood
    For converting between Latitude/Longitude and UK's Ordnance Survey National Grid eastings and northings, this seems to be the most popular explanation and reference implementation in JavaScript: http://www.movable-type.co.uk/scripts/latlong-gridref.html The web is littered with other implementations in different languages. Making the conversion via PostGIS queries is another alternative. ...but did anyone implement this maths in ruby? OSGridToLatLong is the direction I'm looking for just at this moment, but I would have thought a library for converting in both directions must surely be available in a gem somewhere. I'm just not searching for the right thing.

    Read the article

  • Calculating distance from latitude, longitude and height using a geocentric co-ordinate system

    - by Sarge
    I've implemented this method in Javascript and I'm roughly 2.5% out and I'd like to understand why. My input data is an array of points represented as latitude, longitude and the height above the WGS84 ellipsoid. These points are taken from data collected from a wrist-mounted GPS device during a marathon race. My algorithm was to convert each point to cartesian geocentric co-ordinates and then compute the Euclidean distance (c.f Pythagoras). Cartesian geocentric is also known as Earth Centred Earth Fixed. i.e. it's an X, Y, Z co-ordinate system which rotates with the earth. My test data was the data from a marathon and so the distance should be very close to 42.26km. However, the distance comes to about 43.4km. I've tried various approaches and nothing changes the result by more than a metre. e.g. I replaced the height data with data from the NASA SRTM mission, I've set the height to zero, etc. Using Google, I found two points in the literature where lat, lon, height had been transformed and my transformation algorithm is matching. What could explain this? Am I expecting too much from Javascript's double representation? (The X, Y, Z numbers are very big but the differences between two points is very small). My alternative is to move to computing the geodesic across the WGS84 ellipsoid using Vincenty's algorithm (or similar) and then calculating the Euclidean distance with the two heights but this seems inaccurate. Thanks in advance for your help!

    Read the article

  • How can I build a list of world geo locations and their relative geographical hierarchies?

    - by Nathan Ridley
    I want to build a database of geographical locations and would like to be able to identify locations that fall inside other locations. For example, The Empire State Building is going to have one geo-coordinate, but my database would be able to tell me that it falls inside Manhattan, which falls inside New York City, which is in the state of New York and so forth. I've been looking at OpenStreetMap which seems to have a pretty decent database but as best I can tell, I would need to create a set of polygon structures representing each region and then detect if a coordinate falls inside a given region's polygon. Is there a better way to do this, or is there a data source where all of this has already been calculated?

    Read the article

  • Is this feasbile with GIS?

    - by Gnu Engineer
    I'm just getting myself to familiarize with GIS but i like to know before hand if the following is feasible with current GIS apps/tools... I get the point for an address by geocoding. Easy part. Now if the point falls within a boundary (may be a city/county/state) then i need to get the data (any id/flag) associated with the boundary. Based on the id/flag i then apply some business logic. My question is... How do i define the boundary? What tools should i use for it? How can i store the boundary definition in database in order to check if the point falls within it? This has to be done in the back end and not in visual maps as we don't intend to show/use maps. How do i associate my custom data (id/flag) with the above boundary definition? Hope i'm having right assumption on capabilities of GIS. Most of examples what i see is around people trying to show maps with data which is exactly not what i'm looking for. Also please suggest me some tools/books on this.

    Read the article

  • Mysql retrieve polygon data

    - by dskanth
    Hi, i have been developing a site that stores spatial data in mysql database, like that of buildings, gardens, etc. in the form of polygons (latitudes and longitudes). I want to know how to retrieve polygon data in mysql. I have seen this sample query to insert a polygon data: http://amper.110mb.com/SPAT/mysql_initgeometry2.htm But now i want to know how to retrieve data from the table, based on certain constraints like: "where latitude < 9.33 and longitude > 22.4" Also how do i find whether a point lies inside or outside of a polygon

    Read the article

  • Get Distance from geohash field in solr 3.6

    - by Omar A. Shaaban
    Is it possible to get distance returned from a geodist() filter, on a geohash field that has multiple values? The geosort and the geodist filter are working fine, but I'm trying to get the distance between the query point and a location that was returned in the result. I've tried http://wiki.apache.org/solr/SpatialSearch#Returning_the_distance The second method which is : //localhost:8983/solr/select?indent=true&fl=name,store&sfield=store&pt=45.15,-93.85&sort=score%20asc&q={!func}geodist() But it returns weird results, tested with 2 locations it returns score 9979.032, where there is ~33,000 Km between both points in reality? What is the unit that it uses returning the distance in the score field? I assumed km, but it does not make sense, or the result is bogus, I dunno Anyhelp would be appreciated, thanks

    Read the article

  • Determine outer boundries of polygon from lat/lng point array

    - by DustinDavis
    I have a large array of lat/lng points. Could be up to 20k points. I'm plotting them using KML. What I want to do is to take only the outter most points and use them to draw a polygon instead. I already know how to draw a polygon in kml, I just need to figure out how to select only the outer most points of the group. Any ideas? I'd like to have at least 5 points to the polygon but no more than 25 points total. So far i've come up with checking for top most and bottom most points (basically crearing a square) using < & logic. The points will be in america & canada only if that matters. Thanks for any help.

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >